auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void run ( ) { super . run ( ) ; mNextButton.setVisibility ( View.GONE ) ; findViewById ( R.id.pass_button ) . setVisibility ( View.VISIBLE ) ; }

Target:
public void run ( ) { ( mTestIndex ) ++ ; if ( ( mTestIndex ) < ( mTests.length ) ) { mTests [ mTestIndex ] . run ( ) ; } else { mNextButton.setVisibility ( View.GONE ) ; findViewById ( R.id.pass_button ) . setVisibility ( View.VISIBLE ) ; } }
Source:
public void testRootnF32 ( ) { script_f32 = new android.renderscript.cts.ScriptC_rootn_f32 ( mRS , mRes , R.raw.rootn_f32 ) ; android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandom ( 305419896 , 32 , 1 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; script_f32 = new android.renderscript.cts.ScriptC_rootn_f32 ( mRS ) ; }
Source:
public void testToString ( ) { java.lang.String result = java.util.regex.Pattern.compile ( "(\\d{1,3})" ) . matcher ( "aaaa123456789045" ) . toString ( ) ; assertTrue ( "The result doesn't contain pattern info" , result.contains ( "(\\d{1,3})" ) ) ; }

Target:
public void testToString ( ) { java.util.regex.Matcher m = java.util.regex.Pattern.compile ( "(\\d{1,3})" ) . matcher ( "aaaa666456789045" ) ; assertEquals ( "java.util.regex.Matcher[pattern=(\\d{1,3}) region=0,16 lastmatch=]" , m.toString ( ) ) ; assertTrue ( m.find ( ) ) ; assertEquals ( "java.util.regex.Matcher[pattern=(\\d{1,3}) region=0,16 lastmatch=666]" , m.toString ( ) ) ; m.region ( 4 , 8 ) ; assertEquals ( "java.util.regex.Matcher[pattern=(\\d{1,3}) region=4,8 lastmatch=]" , m.toString ( ) ) ; }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile original = new com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile ( this , parent , name ) ; com.android.sched.vfs.BaseVFile encoded = vfs.getRootDir ( ) . createVFile ( encode ( original.getPath ( ) ) ) ; original.setEncodedFile ( encoded ) ; return original ; }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { assert ! ( isClosed ( ) ) ; return new com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir ( this , parent , name ) ; }
Source:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { android.util.Log.i ( com.android.cts.verifier.audio.USBAudioPeripheralButtonsActivity.TAG , ( ( "onKeyDown(" + keyCode ) + ")" ) ) ; switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE : mHasBtnA = true ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_UP : mHasBtnB = true ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_DOWN : mHasBtnC = true ; break ; } showButtonsState ( ) ; calculateMatch ( ) ; return super . onKeyDown ( keyCode , event ) ; }

Target:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { android.util.Log.i ( com.android.cts.verifier.audio.USBAudioPeripheralButtonsActivity.TAG , ( ( "onKeyDown(" + keyCode ) + ")" ) ) ; if ( ( mSelectedProfile ) != null ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE : mHasBtnA = true ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_UP : mHasBtnB = true ; break ; case android.view.KeyEvent.KEYCODE_VOLUME_DOWN : mHasBtnC = true ; break ; } showButtonsState ( ) ; calculateMatch ( ) ; } return super . onKeyDown ( keyCode , event ) ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { org.eclipse.jface.viewers.IStructuredSelection selection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( mSelectionTableViewer.getSelection ( ) ) ) ; java.lang.Object first = selection.getFirstElement ( ) ; if ( first instanceof com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier ) { com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier ) ( first ) ) ; mSelectedConfiguration.removeQualifier ( qualifier ) ; mBaseConfiguration.addQualifier ( qualifier ) ; mFullTableViewer.refresh ( ) ; mSelectionTableViewer.refresh ( ) ; onChange ( false ) ; } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { org.eclipse.jface.viewers.IStructuredSelection selection = ( ( org.eclipse.jface.viewers.IStructuredSelection ) ( mSelectionTableViewer.getSelection ( ) ) ) ; java.lang.Object first = selection.getFirstElement ( ) ; if ( first instanceof com.android.ide.common.resources.configuration.ResourceQualifier ) { com.android.ide.common.resources.configuration.ResourceQualifier qualifier = ( ( com.android.ide.common.resources.configuration.ResourceQualifier ) ( first ) ) ; mSelectedConfiguration.removeQualifier ( qualifier ) ; mBaseConfiguration.addQualifier ( qualifier ) ; mFullTableViewer.refresh ( ) ; mSelectionTableViewer.refresh ( ) ; onChange ( false ) ; } }
Source:
private com.android.jack.library.InputJackLibrary getIncrementalInternalLibrary ( ) { try { return com.android.jack.library.JackLibraryFactory.getInputLibrary ( incrementalVfs ) ; } catch ( com.android.jack.library.NotJackLibraryException e ) { } catch ( com.android.jack.library.LibraryVersionException e ) { } catch ( com.android.jack.library.LibraryFormatException e ) { } return null ; }

Target:
private com.android.jack.library.InputJackLibrary getIncrementalInternalLibrary ( ) { com.android.sched.vfs.VFS incrementalVfs ; if ( ( com.android.sched.util.config.ThreadConfig.get ( Options.GENERATE_LIBRARY_FROM_INCREMENTAL_FOLDER ) . booleanValue ( ) ) || ( ( com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_CONTAINER_TYPE ) ) == ( com.android.sched.vfs.Container.ZIP ) ) ) { incrementalVfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_ZIP ) ; } else { incrementalVfs = com.android.sched.util.config.ThreadConfig.get ( Options.LIBRARY_OUTPUT_DIR ) ; } try { return com.android.jack.library.JackLibraryFactory.getInputLibrary ( incrementalVfs ) ; } catch ( com.android.jack.library.NotJackLibraryException e ) { } catch ( com.android.jack.library.LibraryVersionException e ) { } catch ( com.android.jack.library.LibraryFormatException e ) { } return null ; }
Source:
public com.android.server.wifi.scanner.WifiScannerImpl create ( android.content.Context context , android.os.Looper looper , com.android.server.wifi.Clock clock ) { com.android.server.wifi.WifiNative wifiNative = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiNative ( ) ; com.android.server.wifi.WifiMonitor wifiMonitor = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiMonitor ( ) ; if ( wifiNative.getScanCapabilities ( new com.android.server.wifi.WifiNative.ScanCapabilities ( ) ) ) { return new com.android.server.wifi.scanner.HalWifiScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } else { return new com.android.server.wifi.scanner.WificondScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } }

Target:
public com.android.server.wifi.scanner.WifiScannerImpl create ( android.content.Context context , android.os.Looper looper , com.android.server.wifi.Clock clock ) { com.android.server.wifi.WifiNative wifiNative = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiNative ( ) ; com.android.server.wifi.WifiMonitor wifiMonitor = com.android.server.wifi.WifiInjector.getInstance ( ) . getWifiMonitor ( ) ; if ( wifiNative.getBgScanCapabilities ( new com.android.server.wifi.WifiNative.ScanCapabilities ( ) ) ) { return new com.android.server.wifi.scanner.HalWifiScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } else { return new com.android.server.wifi.scanner.WificondScannerImpl ( context , wifiNative , wifiMonitor , looper , clock ) ; } }
Source:
public void createAnnotationPairs ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotationLiteral annotationLiteral , @ javax.annotation.Nonnull com.android.jack.dx.rop.annotation.Annotation ropAnnotation ) { for ( com.android.jack.ir.ast.JNameValuePair jPair : annotationLiteral.getNameValuePairs ( ) ) { ropAnnotation.add ( new com.android.jack.dx.rop.annotation.NameValuePair ( com.android.jack.backend.dex.rop.RopHelper.createString ( jPair.getName ( ) ) , parseLiteral ( jPair.getValue ( ) ) ) ) ; } }

Target:
public void createAnnotationPairs ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotation , @ javax.annotation.Nonnull com.android.jack.dx.rop.annotation.Annotation ropAnnotation ) { for ( com.android.jack.ir.ast.JNameValuePair jPair : annotation.getNameValuePairs ( ) ) { ropAnnotation.add ( new com.android.jack.dx.rop.annotation.NameValuePair ( com.android.jack.backend.dex.rop.RopHelper.createString ( jPair.getName ( ) ) , parseLiteral ( jPair.getValue ( ) ) ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; if ( ! ( isSupported ( ) ) ) return ; setMeteredNetwork ( ) ; setRestrictBackground ( false ) ; removeRestrictBackgroundWhitelist ( mUid ) ; removeRestrictBackgroundBlacklist ( mUid ) ; registerBroadcastReceiver ( ) ; assertRestrictBackgroundChangedReceived ( 0 ) ; }

Target:
protected boolean setUpActiveNetworkMeteringState ( ) throws java.lang.Exception { return setMeteredNetwork ( ) ; }
Source:
void readAllUsersPackageRestrictionsLPr ( ) { java.util.List < android.content.pm.UserInfo > users = getAllUsers ( ) ; if ( users == null ) { readPackageRestrictionsLPr ( 0 ) ; return ; } for ( android.content.pm.UserInfo user : users ) { readPackageRestrictionsLPr ( user.id ) ; } }

Target:
boolean removeIntentFilterVerificationLPw ( java.lang.String packageName , int userId ) { com.android.server.pm.PackageSetting ps = mPackages.get ( packageName ) ; if ( ps == null ) { if ( com.android.server.pm.PackageManagerService.DEBUG_DOMAIN_VERIFICATION ) { android.util.Slog.w ( PackageManagerService.TAG , ( "No package known: " + packageName ) ) ; } return false ; } ps.clearDomainVerificationStatusForUser ( userId ) ; return true ; }
Source:
public void testManifestIExistingE ( ) { int iFlags = PackageManager.INSTALL_EXTERNAL ; int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }

Target:
public void testFlagFExistingI ( ) { int iFlags = android.content.pm.PackageManager.INSTALL_INTERNAL ; int rFlags = ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) | ( android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }
Source:
void createBinaryTasks ( org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , org.gradle.platform.base.BinaryContainer binaries , com.android.build.gradle.model.AndroidComponentSpec spec , com.android.build.gradle.internal.TaskManager taskManager ) { com.android.build.gradle.internal.VariantManager variantManager = ( spec = DefaultAndroidComponentSpec ) . new binaries.withType ( ) . record ( ExecutionType.VARIANT_MANAGER_CREATE_TASKS_FOR_VARIANT , new com.android.builder.profile.Recorder.Block < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) throws java.lang.Exception { com.android.build.gradle.model.DefaultAndroidBinary binary = com.android.build.gradle.model.androidBinary ; com.android.build.gradle.model.DefaultAndroidBinary variantManager ; } } ) ; }

Target:
public void createBinaryTasks ( final org.gradle.model.collection.CollectionBuilder < org.gradle.api.Task > tasks , org.gradle.platform.base.BinaryContainer binaries , com.android.build.gradle.model.AndroidComponentSpec spec , com.android.build.gradle.internal.TaskManager taskManager ) { final com.android.build.gradle.internal.VariantManager variantManager = ( ( com.android.build.gradle.model.DefaultAndroidComponentSpec ) ( spec ) ) . getVariantManager ( ) ; binaries.withType ( com.android.build.gradle.model.AndroidBinary.class , new org.gradle.api.Action < com.android.build.gradle.model.AndroidBinary > ( ) { @ java.lang.Override public void execute ( com.android.build.gradle.model.AndroidBinary androidBinary ) { com.android.build.gradle.model.DefaultAndroidBinary binary = ( ( com.android.build.gradle.model.DefaultAndroidBinary ) ( androidBinary ) ) ; variantManager.createTasksForVariantData ( new com.android.build.gradle.model.TaskCollectionBuilderAdaptor ( tasks ) , binary.getVariantData ( ) ) ; } } ) ; }
Source:
public void testEmptyGeneration ( ) { final java.lang.String expectedOutput = "<?xml version='1.0' encoding='UTF-8' ?>" + ( ( ( "<testsuite name=\"test\" tests=\"0\" failures=\"0\" errors=\"0\" time=\"#TIMEVALUE#\" " + "timestamp=\"ignore\" hostname=\"localhost\"> " ) + "<properties />" ) + "</testsuite>" ) ; mResultReporter.testRunStarted ( "test" , 1 ) ; mResultReporter.testRunEnded ( 1 , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; java.lang.String output = getOutput ( ) ; java.lang.String time = getTime ( output ) ; assertNotNull ( time ) ; java.lang.String expectedTimedOutput = expectedOutput.replaceFirst ( "#TIMEVALUE#" , time ) ; assertEquals ( expectedTimedOutput , output ) ; }

Target:
public void testEmptyGeneration ( ) { final java.lang.String expectedOutput = "<?xml version='1.0' encoding='UTF-8' ?>" + ( ( ( ( "<testsuite name=\"test\" tests=\"0\" failures=\"0\" errors=\"0\" skipped=\"0\" " + "time=\"#TIMEVALUE#\" " ) + "timestamp=\"ignore\" hostname=\"localhost\"> " ) + "<properties />" ) + "</testsuite>" ) ; mResultReporter.testRunStarted ( "test" , 1 ) ; mResultReporter.testRunEnded ( 1 , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; java.lang.String output = getOutput ( ) ; java.lang.String time = getTime ( output ) ; assertNotNull ( time ) ; java.lang.String expectedTimedOutput = expectedOutput.replaceFirst ( "#TIMEVALUE#" , time ) ; assertEquals ( expectedTimedOutput , output ) ; }
Source:
com.google.common.collect.ImmutableMap < java.lang.String , com.android.manifmerger.ActionRecorder.DecisionTreeRecord > getAllRecords ( ) { return mRecords ; }

Target:
private java.util.List < com.android.manifmerger.Actions.AttributeRecord > getAttributeRecords ( com.android.manifmerger.XmlAttribute attribute ) { com.android.manifmerger.XmlElement originElement = attribute.getOwnerElement ( ) ; com.android.manifmerger.XmlNode.NodeKey storageKey = originElement.getId ( ) ; com.android.manifmerger.Actions.DecisionTreeRecord nodeDecisionTree = mRecords.get ( storageKey ) ; assert nodeDecisionTree != null ; java.util.List < com.android.manifmerger.Actions.AttributeRecord > attributeRecords = nodeDecisionTree.mAttributeRecords.get ( attribute.getName ( ) ) ; if ( attributeRecords == null ) { attributeRecords = new java.util.ArrayList < com.android.manifmerger.Actions.AttributeRecord > ( ) ; nodeDecisionTree.mAttributeRecords.put ( attribute.getName ( ) , attributeRecords ) ; } return attributeRecords ; }
Source:
public void testHasPackageMatches ( ) { android.content.Intent intent = new android.content.Intent ( ) . setPackage ( "com.foo.bar" ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasPackage ( "com.foo.bar" ) . matches ( intent ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasPackage ( org.hamcrest.Matchers.equalTo ( "com.foo.bar" ) ) . matches ( intent ) ) ; }

Target:
public void hasPackageNoPackage ( ) { android.content.Intent intent = new android.content.Intent ( ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasPackage ( "com.foo.bar" ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasPackage ( org.hamcrest.Matchers.equalTo ( "com.foo.bar" ) ) . matches ( intent ) ) ; }
Source:
public com.android.sched.scheduler.ComponentFilterSet getFilters ( @ javax.annotation.Nonnull com.android.sched.scheduler.FeatureSet features ) { if ( ( features.containsAll ( filtersIfAll ) ) && ( features.containsNone ( filtersUnlessOne ) ) ) { return neededFilters.clone ( ) ; } else { return scheduler.createComponentFilterSet ( ) ; } }

Target:
public com.android.sched.scheduler.ComponentFilterSet getFilters ( @ javax.annotation.Nonnull com.android.sched.scheduler.FeatureSet features ) { if ( ( features.containsAll ( filtersIfAll ) ) && ( features.containsNone ( filtersUnlessOne ) ) ) { return neededFilters.clone ( ) ; } else { return ( ( com.android.sched.scheduler.ComponentFilterSet ) ( scheduler.createComponentFilterSet ( ) . add ( com.android.sched.filter.NoFilter.class ) ) ) ; } }
Source:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision>1</r:revision> " ) + "<r:min-platform-tools-rev>1</r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision> <r:major>1</r:major> </r:revision> " ) + "<r:min-platform-tools-rev>1</r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
private static void testOatFilesUnloaded ( int pid ) throws java.lang.Exception { java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.FileReader ( ( ( "/proc/" + pid ) + "/maps" ) ) ) ; java.lang.String line ; int count = 0 ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.runFinalization ( ) ; while ( ( line = reader.readLine ( ) ) != null ) { if ( line.contains ( "@141-class-unload-ex.jar" ) ) { java.lang.System.out.println ( line ) ; ++ count ; } } java.lang.System.out.println ( ( "Number of loaded unload-ex maps " + count ) ) ; }

Target:
private static void testOatFilesUnloaded ( int pid ) throws java.lang.Exception { java.lang.System.loadLibrary ( Main.nativeLibraryName ) ; Main.stopJit ( ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.runFinalization ( ) ; java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.FileReader ( ( ( "/proc/" + pid ) + "/maps" ) ) ) ; java.lang.String line ; int count = 0 ; while ( ( line = reader.readLine ( ) ) != null ) { if ( line.contains ( "@141-class-unload-ex.jar" ) ) { java.lang.System.out.println ( line ) ; ++ count ; } } java.lang.System.out.println ( ( "Number of loaded unload-ex maps " + count ) ) ; Main.startJit ( ) ; }
Source:
public void testHasValueDoesNotMatch ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; android.os.Bundle value = new android.os.Bundle ( ) ; value.putString ( "hello" , "world" ) ; bundle.putBundle ( "key" , value ) ; assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( "not_world" ) ) . matches ( bundle ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( org.hamcrest.Matchers.equalTo ( "not_world" ) ) ) . matches ( bundle ) ) ; }

Target:
public void hasValueDoesNotMatch ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; android.os.Bundle value = new android.os.Bundle ( ) ; value.putString ( "hello" , "world" ) ; bundle.putBundle ( "key" , value ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( "not_world" ) ) . matches ( bundle ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasValue ( org.hamcrest.Matchers.equalTo ( "not_world" ) ) ) . matches ( bundle ) ) ; }
Source:
private void addAttr ( java.lang.String propertyName , com.android.ide.common.api.INode childNode , java.util.List < java.lang.String > infos ) { java.lang.String a = childNode.getStringAttr ( com.android.ide.common.layout.ANDROID_URI , ( "layout_" + propertyName ) ) ; if ( ( a != null ) && ( ( a.length ( ) ) > 0 ) ) { java.lang.String s = ( propertyName + ": " ) + a ; infos.add ( s ) ; } }

Target:
private void addAttr ( java.lang.String propertyName , com.android.ide.common.api.INode childNode , java.util.List < java.lang.String > infos ) { java.lang.String a = childNode.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , ( "layout_" + propertyName ) ) ; if ( ( a != null ) && ( ( a.length ( ) ) > 0 ) ) { java.lang.String s = ( propertyName + ": " ) + a ; infos.add ( s ) ; } }
Source:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.junit.Assume.assumeTrue ( "Ignore test when PbapClientService is not enabled" , mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_pbapclient ) ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }

Target:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.junit.Assume.assumeTrue ( "Ignore test when PbapClientService is not enabled" , mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_pbapclient ) ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; cleanupPhonebook ( ) ; }
Source:
protected static void rolloverCounters ( ) { com.android.bluetooth.pbap.BluetoothPbapUtils.mDbIdentifier.set ( java.util.Calendar.getInstance ( ) . getTimeInMillis ( ) ) ; com.android.bluetooth.pbap.BluetoothPbapUtils.primaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.primaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.primaryVersionCounter ; com.android.bluetooth.pbap.BluetoothPbapUtils.secondaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.secondaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.secondaryVersionCounter ; if ( com.android.bluetooth.pbap.BluetoothPbapUtils.V ) android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapUtils.TAG , ( "mDbIdentifier rolled over to:" + ( com.android.bluetooth.pbap.BluetoothPbapUtils.mDbIdentifier ) ) ) ; }

Target:
protected static void rolloverCounters ( ) { com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier.set ( java.util.Calendar.getInstance ( ) . getTimeInMillis ( ) ) ; com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ; com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ; if ( com.android.bluetooth.pbap.BluetoothPbapUtils.V ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapUtils.TAG , ( "mDbIdentifier rolled over to:" + ( com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier ) ) ) ; } }
Source:
private java.util.List < ? extends com.android.tools.idea.run.GoogleCloudTestingConfiguration > getDefaultConfigurations ( org.jetbrains.android.facet.AndroidFacet facet ) { com.google.gct.testing.GoogleCloudTestingConfigurationImpl allConfiguration = new com.google.gct.testing.GoogleCloudTestingConfigurationImpl ( GoogleCloudTestingConfigurationImpl.ALL_ID , "All" , icons.AndroidIcons.Display , facet ) ; allConfiguration.deviceDimension.enableAll ( ) ; allConfiguration.apiDimension.enableAll ( ) ; allConfiguration.languageDimension.enableAll ( ) ; allConfiguration.orientationDimension.enableAll ( ) ; allConfiguration.setNonEditable ( ) ; return com.google.common.collect.ImmutableList.of ( allConfiguration ) ; }

Target:
private java.util.List < ? extends com.android.tools.idea.run.CloudTestConfiguration > getDefaultConfigurations ( org.jetbrains.android.facet.AndroidFacet facet ) { com.google.gct.testing.CloudTestConfigurationImpl allConfiguration = new com.google.gct.testing.CloudTestConfigurationImpl ( CloudTestConfigurationImpl.ALL_ID , "All" , icons.AndroidIcons.Display , facet ) ; allConfiguration.deviceDimension.enableAll ( ) ; allConfiguration.apiDimension.enableAll ( ) ; allConfiguration.languageDimension.enableAll ( ) ; allConfiguration.orientationDimension.enableAll ( ) ; allConfiguration.setNonEditable ( ) ; return com.google.common.collect.ImmutableList.of ( allConfiguration ) ; }
Source:
private void setImageDescriptor ( ) { org.eclipse.jface.resource.ImageDescriptor desc = com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getImageDescriptor ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.PROJECT_LOGO_LARGE ) ; setDefaultPageImageDescriptor ( desc ) ; }

Target:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; }
Source:
public void onConfigurationChanged ( final android.content.res.Configuration newConfig ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onConfigurationChanged ( newConfig ) ; } } ) ; return ; } mAwContents.onConfigurationChanged ( newConfig ) ; }

Target:
public void onDetachedFromWindow ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDetachedFromWindow ( ) ; } } ) ; return ; } mAwContents.onDetachedFromWindow ( ) ; }
Source:
public V set ( int rowIndex , int columnIndex , @ javax.annotation.Nullable V value ) { V oldValue = array [ rowIndex ] [ columnIndex ] ; array [ rowIndex ] [ columnIndex ] = value ; return oldValue ; }

Target:
public V set ( int rowIndex , int columnIndex , @ javax.annotation.Nullable V value ) { com.google.common.base.Preconditions.checkElementIndex ( rowIndex , rowList.size ( ) ) ; com.google.common.base.Preconditions.checkElementIndex ( columnIndex , columnList.size ( ) ) ; V oldValue = array [ rowIndex ] [ columnIndex ] ; array [ rowIndex ] [ columnIndex ] = value ; return oldValue ; }
Source:
private boolean sendBroadcastToReceiver ( android.content.Intent intent ) { intent.putExtra ( CallIntentProcessor.KEY_IS_INCOMING_CALL , false ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setClass ( mContext , com.android.server.telecom.components.PrimaryCallReceiver.class ) ; com.android.server.telecom.Log.d ( this , "Sending broadcast as user to CallReceiver" ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.SYSTEM ) ; return true ; }

Target:
private boolean sendBroadcastToReceiver ( android.content.Intent intent ) { intent.putExtra ( CallIntentProcessor.KEY_IS_INCOMING_CALL , false ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setClass ( mContext , com.android.server.telecom.components.PrimaryCallReceiver.class ) ; android.telecom.Log.d ( this , "Sending broadcast as user to CallReceiver" ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.SYSTEM ) ; return true ; }
Source:
public boolean setVoiceMailNumber ( int subId , java.lang.String alphaTag , java.lang.String number ) { enforceCarrierPrivilege ( subId ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_SET_VOICEMAIL_NUMBER , new android.util.Pair < java.lang.String , java.lang.String > ( alphaTag , number ) , new java.lang.Integer ( subId ) ) ) ) ; return success ; }

Target:
public boolean setVoiceMailNumber ( int subId , java.lang.String alphaTag , java.lang.String number ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege ( subId , "setVoiceMailNumber" ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_SET_VOICEMAIL_NUMBER , new android.util.Pair < java.lang.String , java.lang.String > ( alphaTag , number ) , new java.lang.Integer ( subId ) ) ) ) ; return success ; }
Source:
public static double getJitterMean ( android.hardware.cts.helpers.TestSensorEvent [ ] events , java.util.Collection < java.lang.Double > jitterValues ) { java.util.ArrayList < java.lang.Long > timestampDelayValues = new java.util.ArrayList < java.lang.Long > ( ) ; double averageTimestampDelay = android.hardware.cts.helpers.SensorCtsHelper.getAverageTimestampDelayWithValues ( events , timestampDelayValues ) ; for ( long frequency : timestampDelayValues ) { jitterValues.add ( java.lang.Math.abs ( ( averageTimestampDelay - frequency ) ) ) ; } double jitterMean = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; return jitterMean ; }

Target:
public static double [ ] getStandardDeviations ( android.hardware.cts.helpers.TestSensorEvent [ ] events ) { double [ ] variances = android.hardware.cts.helpers.SensorCtsHelper.getVariances ( events ) ; double [ ] stdDevs = new double [ variances.length ] ; for ( int i = 0 ; i < ( variances.length ) ; i ++ ) { stdDevs [ i ] = java.lang.Math.sqrt ( variances [ i ] ) ; } return stdDevs ; }
Source:
protected void setUp ( ) throws java.io.IOException { java.io.File tempFile = java.io.File.createTempFile ( "OldZipFileTest" , "zip" ) ; tempFileName = tempFile.getAbsolutePath ( ) ; java.io.InputStream is = tests.support.resource.Support_Resources.getStream ( "hyts_ZipFile.zip" ) ; java.io.FileOutputStream fos = new java.io.FileOutputStream ( tempFile ) ; byte [ ] rbuf = getAllBytesFromStream ( is ) ; fos.write ( rbuf , 0 , rbuf.length ) ; is.close ( ) ; fos.close ( ) ; zfile = new java.util.zip.ZipFile ( tempFile ) ; }

Target:
protected void setUp ( ) throws java.io.IOException { java.io.File tempFile = java.io.File.createTempFile ( "OldZipFileTest" , "zip" ) ; tempFileName = tempFile.getAbsolutePath ( ) ; java.io.InputStream is = tests.support.resource.Support_Resources.getStream ( "hyts_ZipFile.zip" ) ; java.io.FileOutputStream fos = new java.io.FileOutputStream ( tempFile ) ; libcore.io.Streams.copy ( is , fos ) ; is.close ( ) ; fos.close ( ) ; zfile = new java.util.zip.ZipFile ( tempFile ) ; }
Source:
public synchronized void setData ( byte [ ] data , int offset , int byteCount ) { if ( ( ( ( offset | byteCount ) < 0 ) || ( offset > ( data.length ) ) ) || ( byteCount > ( ( data.length ) - offset ) ) ) { throw new java.lang.IllegalArgumentException ( ) ; } this . data = data ; this . offset = offset ; this . length = byteCount ; this . capacity = byteCount ; }

Target:
public synchronized void setData ( byte [ ] data , int offset , int byteCount ) { if ( ( ( ( offset | byteCount ) < 0 ) || ( offset > ( data.length ) ) ) || ( byteCount > ( ( data.length ) - offset ) ) ) { throw new java.lang.IllegalArgumentException ( ) ; } this . data = data ; this . offset = offset ; this . length = byteCount ; this . userSuppliedLength = byteCount ; }
Source:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }

Target:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.junit.Assume.assumeTrue ( "Ignore test when PbapClientService is not enabled" , mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_pbapclient ) ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }
Source:
protected android.content.res.ObbInfo getObbInfo ( ) throws java.io.IOException { android.content.res.ObbInfo obbInfo ; try { obbInfo = mContainerService.getObbInfo ( mObbState.ownerPath ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.d ( com.android.server.MountService.TAG , ( "Couldn't call DefaultContainerService to fetch OBB info for " + ( mObbState.ownerPath ) ) ) ; obbInfo = null ; } if ( obbInfo == null ) { throw new java.io.IOException ( ( "Couldn't read OBB file: " + ( mObbState.ownerPath ) ) ) ; } return obbInfo ; }

Target:
protected android.content.res.ObbInfo getObbInfo ( ) throws java.io.IOException { android.content.res.ObbInfo obbInfo ; try { obbInfo = mContainerService.getObbInfo ( mObbState.canonicalPath ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.d ( com.android.server.MountService.TAG , ( "Couldn't call DefaultContainerService to fetch OBB info for " + ( mObbState.canonicalPath ) ) ) ; obbInfo = null ; } if ( obbInfo == null ) { throw new java.io.IOException ( ( "Couldn't read OBB file: " + ( mObbState.canonicalPath ) ) ) ; } return obbInfo ; }
Source:
private com.android.server.wifi.NetworkUpdateResult verifyAddEphemeralNetworkToWifiConfigManager ( android.net.wifi.WifiConfiguration configuration ) throws java.lang.Exception { com.android.server.wifi.NetworkUpdateResult result = addNetworkToWifiConfigManager ( configuration ) ; assertTrue ( ( ( result.getNetworkId ( ) ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) ) ; assertTrue ( result.isNewNetwork ( ) ) ; assertTrue ( result.hasIpChanged ( ) ) ; assertTrue ( result.hasProxyChanged ( ) ) ; verifyNetworkAddBroadcast ( configuration ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) , any ( com.android.server.wifi.WifiConfigStoreData.class ) ) ; return result ; }

Target:
private void setupStoreDataForUserRead ( java.util.List < android.net.wifi.WifiConfiguration > userConfigurations , java.util.Set < java.lang.String > deletedEphemeralSsids ) { when ( mNetworkListStoreData.getUserConfigurations ( ) ) . thenReturn ( userConfigurations ) ; when ( mDeletedEphemeralSsidsStoreData.getSsidList ( ) ) . thenReturn ( deletedEphemeralSsids ) ; }
Source:
private android.hardware.cts.helpers.sensorverification.JitterVerification getVerification ( int threshold , long ... timestamps ) { android.hardware.cts.helpers.sensorverification.JitterVerification verification = new android.hardware.cts.helpers.sensorverification.JitterVerification ( threshold ) ; for ( long timestamp : timestamps ) { verification.addSensorEvent ( new android.hardware.cts.helpers.TestSensorEvent ( null , timestamp , 0 , null ) ) ; } return verification ; }

Target:
private static android.hardware.cts.helpers.sensorverification.JitterVerification getVerification ( int threshold , long ... timestamps ) { java.util.Collection < android.hardware.cts.helpers.TestSensorEvent > events = new java.util.ArrayList < > ( timestamps.length ) ; for ( long timestamp : timestamps ) { events.add ( new android.hardware.cts.helpers.TestSensorEvent ( null , timestamp , 0 , null ) ) ; } android.hardware.cts.helpers.sensorverification.JitterVerification verification = new android.hardware.cts.helpers.sensorverification.JitterVerification ( threshold ) ; verification.addSensorEvents ( events ) ; return verification ; }
Source:
public android.net.IpPrefix passThroughParcel ( android.net.IpPrefix p ) { android.os.Parcel parcel = android.os.Parcel.obtain ( ) ; android.net.IpPrefix p2 = null ; try { p.writeToParcel ( parcel , 0 ) ; parcel.setDataPosition ( 0 ) ; p2 = IpPrefix.CREATOR.createFromParcel ( parcel ) ; } finally { parcel.recycle ( ) ; } assertNotNull ( p2 ) ; return p2 ; }

Target:
public android.net.IpPrefix passThroughParcel ( android.net.IpPrefix p ) { android.os.Parcel parcel = android.os.Parcel.obtain ( ) ; android.net.IpPrefix p2 = null ; try { p.writeToParcel ( parcel , 0 ) ; parcel.setDataPosition ( 0 ) ; p2 = IpPrefix.CREATOR.createFromParcel ( parcel ) ; } finally { parcel.recycle ( ) ; } org.junit.Assert.assertNotNull ( p2 ) ; return p2 ; }
Source:
public void testGetExtendedKeyUsage ( ) throws java.lang.Exception { assertNull ( new tests.security.cert.X509Certificate2Test.MyX509Certificate ( ) . getExtendedKeyUsage ( ) ) ; java.security.cert.X509Certificate cert = generateCert ( tests.security.cert.X509Certificate2Test.CERT_CORRECT ) ; java.util.List < java.lang.String > l = cert.getExtendedKeyUsage ( ) ; assertNotNull ( l ) ; l.clear ( ) ; l.add ( "Test" ) ; assertEquals ( 1 , l.size ( ) ) ; l.remove ( 0 ) ; }

Target:
public void testGetExtendedKeyUsage ( ) throws java.lang.Exception { assertNull ( new tests.security.cert.X509Certificate2Test.MyX509Certificate ( ) . getExtendedKeyUsage ( ) ) ; java.security.cert.X509Certificate cert = generateCert ( tests.security.cert.X509Certificate2Test.CERT_CORRECT ) ; java.util.List < java.lang.String > l = cert.getExtendedKeyUsage ( ) ; assertNotNull ( l ) ; try { l.clear ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { l.add ( "Test" ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { l.remove ( 0 ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }
Source:
public boolean installCaCert ( @ android.annotation.Nullable android.content.ComponentName admin , byte [ ] certBuffer ) { throwIfParentInstance ( "installCaCert" ) ; if ( ( mService ) != null ) { try { return mService.installCaCert ( admin , certBuffer ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public boolean installCaCert ( @ android.annotation.Nullable android.content.ComponentName admin , byte [ ] certBuffer ) { throwIfParentInstance ( "installCaCert" ) ; if ( ( mService ) != null ) { try { return mService.installCaCert ( admin , mContext.getPackageName ( ) , certBuffer ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyWhenCommonFileChangesStrict ( ) throws java.lang.Exception { myPatchSpec.setStrict ( true ) ; com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.openapi.util.io.FileUtil.copy ( new java.io.File ( myOlderDir , "/lib/bootstrap.jar" ) , new java.io.File ( myOlderDir , "/lib/boot.jar" ) ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertEquals ( 1 , preparationResult.validationResults.size ( ) ) ; assertEquals ( new com.intellij.updater.ValidationResult ( ValidationResult.Kind.ERROR , "lib/boot.jar" , ValidationResult.Action.VALIDATE , ValidationResult.MODIFIED_MESSAGE , ValidationResult.Option.NONE ) , preparationResult.validationResults.get ( 0 ) ) ; }
Source:
public void TestCurrent ( ) { android.icu.text.RuleBasedBreakIterator rbbi = new android.icu.text.RuleBasedBreakIterator ( "" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.current ( ) ) != ( android.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "BreakIterator.DONE when the object has a fText of null." ) ) ; } rbbi.setText ( "dummy" ) ; if ( ( rbbi.current ( ) ) != 0 ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "0 when the object has a fText of dummy." ) ) ; } }

Target:
public void TestBug7547 ( ) { try { new android.icu.text.RuleBasedBreakIterator ( "" ) ; fail ( "TestBug7547: RuleBasedBreakIterator constructor failed to throw an exception with empty rules." ) ; } catch ( java.lang.IllegalArgumentException e ) { } catch ( java.lang.Exception e ) { fail ( ( "TestBug7547: Unexpected exception while creating RuleBasedBreakIterator: " + e ) ) ; } }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof com.android.ddmlib.testrunner.TestIdentifier ) ) { return false ; } com.android.ddmlib.testrunner.TestIdentifier otherTest = ( ( com.android.ddmlib.testrunner.TestIdentifier ) ( other ) ) ; return ( getClassName ( ) . equals ( otherTest.getClassName ( ) ) ) && ( getTestName ( ) . equals ( otherTest.getTestName ( ) ) ) ; }

Target:
public java.lang.String getDeviceName ( ) { return mDeviceName ; }
Source:
public void testSignature ( ) { try { org.xmlpull.v1.XmlPullParserFactory factory = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) ; org.xmlpull.v1.XmlPullParser parser = factory.newPullParser ( ) ; parser.setInput ( new java.io.FileInputStream ( new java.io.File ( android.signature.cts.SignatureTest.CURRENT_API_FILE ) ) , null ) ; start ( parser ) ; } catch ( java.lang.Exception e ) { mResultObserver.notifyFailure ( FailureType.CAUGHT_EXCEPTION , e.getMessage ( ) , e.getMessage ( ) ) ; } if ( mResultObserver.mDidFail ) { fail ( mResultObserver.mErrorString.toString ( ) ) ; } }

Target:
public void testSignature ( ) { try { org.xmlpull.v1.XmlPullParserFactory factory = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) ; org.xmlpull.v1.XmlPullParser parser = factory.newPullParser ( ) ; parser.setInput ( new java.io.FileInputStream ( new java.io.File ( android.signature.cts.CurrentApi.CURRENT_API_FILE ) ) , null ) ; start ( parser ) ; } catch ( java.lang.Exception e ) { mResultObserver.notifyFailure ( FailureType.CAUGHT_EXCEPTION , e.getMessage ( ) , e.getMessage ( ) ) ; } if ( mResultObserver.mDidFail ) { fail ( mResultObserver.mErrorString.toString ( ) ) ; } }
Source:
private static java.lang.String firstCharOnlyToUpper ( java.lang.String word ) { int length = word.length ( ) ; if ( length == 0 ) { return word ; } return new java.lang.StringBuilder ( length ) . append ( com.google.common.base.Ascii.toUpperCase ( word.charAt ( 0 ) ) ) . append ( com.google.common.base.Ascii.toLowerCase ( word.substring ( 1 ) ) ) . toString ( ) ; }

Target:
private static java.lang.String firstCharOnlyToUpper ( java.lang.String word ) { return word.isEmpty ( ) ? word : new java.lang.StringBuilder ( word.length ( ) ) . append ( com.google.common.base.Ascii.toUpperCase ( word.charAt ( 0 ) ) ) . append ( com.google.common.base.Ascii.toLowerCase ( word.substring ( 1 ) ) ) . toString ( ) ; }
Source:
public com.android.resources.Density getDensity ( ) { if ( ( mCurrentConfig ) != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier qual = mCurrentConfig.getPixelDensityQualifier ( ) ; if ( qual != null ) { com.android.resources.Density d = qual.getValue ( ) ; if ( d != ( com.android.resources.Density.NODPI ) ) { return d ; } } } return com.android.resources.Density.MEDIUM ; }

Target:
public com.android.resources.Density getDensity ( ) { if ( ( mCurrentConfig ) != null ) { com.android.ide.common.resources.configuration.PixelDensityQualifier qual = mCurrentConfig.getPixelDensityQualifier ( ) ; if ( qual != null ) { com.android.resources.Density d = qual.getValue ( ) ; if ( d != ( com.android.resources.Density.NODPI ) ) { return d ; } } } return com.android.resources.Density.MEDIUM ; }