auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static final com.ibm.icu.util.LocaleData.MeasurementSystem getMeasurementSystem ( com.ibm.icu.util.ULocale locale ) { com.ibm.icu.util.UResourceBundle sysBundle = com.ibm.icu.util.LocaleData.measurementTypeBundleForLocale ( locale , com.ibm.icu.util.LocaleData.MEASUREMENT_SYSTEM ) ; int system = sysBundle.getInt ( ) ; if ( com.ibm.icu.util.LocaleData.MeasurementSystem.US.equals ( system ) ) { return com.ibm.icu.util.LocaleData.MeasurementSystem.US ; } if ( com.ibm.icu.util.LocaleData.MeasurementSystem.SI.equals ( system ) ) { return com.ibm.icu.util.LocaleData.MeasurementSystem.SI ; } return null ; }

Target:
public static final com.ibm.icu.util.LocaleData.MeasurementSystem getMeasurementSystem ( com.ibm.icu.util.ULocale locale ) { com.ibm.icu.util.UResourceBundle sysBundle = com.ibm.icu.util.LocaleData.measurementTypeBundleForLocale ( locale , com.ibm.icu.util.LocaleData.MEASUREMENT_SYSTEM ) ; int system = sysBundle.getInt ( ) ; if ( com.ibm.icu.util.LocaleData.MeasurementSystem.US.equals ( system ) ) { return com.ibm.icu.util.LocaleData.MeasurementSystem.US ; } if ( com.ibm.icu.util.LocaleData.MeasurementSystem.UK.equals ( system ) ) { return com.ibm.icu.util.LocaleData.MeasurementSystem.UK ; } if ( com.ibm.icu.util.LocaleData.MeasurementSystem.SI.equals ( system ) ) { return com.ibm.icu.util.LocaleData.MeasurementSystem.SI ; } return null ; }
Source:
public void testNonBlockingRecv ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; try { dc.configureBlocking ( false ) ; dc.bind ( null ) ; assertNull ( dc.receive ( java.nio.ByteBuffer.allocate ( 2048 ) ) ) ; } finally { dc.close ( ) ; } }

Target:
public void testNonBlockingRecv ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; try { dc.configureBlocking ( false ) ; dc.socket ( ) . bind ( null ) ; assertNull ( dc.receive ( java.nio.ByteBuffer.allocate ( 2048 ) ) ) ; } finally { dc.close ( ) ; } }
Source:
public void requestUninstall_nullTokenBytes ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; com.android.server.timezone.RulesManagerServiceTest.TestCallback callback = new com.android.server.timezone.RulesManagerServiceTest.TestCallback ( ) ; org.junit.Assert.assertEquals ( RulesManager.SUCCESS , mRulesManagerService.requestUninstall ( null , callback ) ) ; verifyNoInstallerCallsMade ( ) ; callback.assertNoResultReceived ( ) ; configureStageUninstallExpectation ( true ) ; mFakeExecutor.simulateAsyncExecutionOfLastCommand ( ) ; verifyStageUninstallCalled ( ) ; verifyPackageTrackerCalled ( null , true ) ; callback.assertResultReceived ( Callback.SUCCESS ) ; }

Target:
public void requestUninstall_asyncNothingInstalled ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; com.android.server.timezone.CheckToken token = createArbitraryToken ( ) ; byte [ ] tokenBytes = token.toByteArray ( ) ; com.android.server.timezone.RulesManagerServiceTest.TestCallback callback = new com.android.server.timezone.RulesManagerServiceTest.TestCallback ( ) ; org.junit.Assert.assertEquals ( RulesManager.SUCCESS , mRulesManagerService.requestUninstall ( tokenBytes , callback ) ) ; callback.assertNoResultReceived ( ) ; verifyNoInstallerCallsMade ( ) ; verifyNoPackageTrackerCallsMade ( ) ; configureStageUninstallExpectation ( TimeZoneDistroInstaller.UNINSTALL_NOTHING_INSTALLED ) ; mFakeExecutor.simulateAsyncExecutionOfLastCommand ( ) ; verifyStageUninstallCalled ( ) ; verifyPackageTrackerCalled ( token , true ) ; callback.assertResultReceived ( Callback.SUCCESS ) ; }
Source:
private boolean isPrivilegedPackage ( java.lang.String packageName ) { final android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; try { android.content.pm.PackageInfo packInfo = pm.getPackageInfo ( packageName , 0 ) ; return ( ( packInfo.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_PRIVILEGED ) ) != 0 ; } catch ( android.content.pm.PackageManager e ) { return false ; } }

Target:
private boolean isPrivilegedPackage ( java.lang.String packageName ) { final android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; try { android.content.pm.PackageInfo packInfo = pm.getPackageInfo ( packageName , 0 ) ; return ( ( packInfo.applicationInfo.privateFlags ) & ( android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED ) ) != 0 ; } catch ( android.content.pm.PackageManager e ) { return false ; } }
Source:
public void test_ko ( ) throws java.lang.Exception { libcore.icu.ImmutableIndex ko = libcore.icu.AlphabeticIndexTest.createIndex ( java.util.Locale.KOREAN ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᄀ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ㄱ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᄁ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᅡ" , "ᄒ" ) ; }

Target:
public void test_ko ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex.ImmutableIndex ko = libcore.icu.AlphabeticIndexTest.createIndex ( java.util.Locale.KOREAN ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᄀ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ㄱ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᄁ" , "ᄀ" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( ko , "ᅡ" , "ᄒ" ) ; }
Source:
public void connectionServiceFocusGained ( ) { }

Target:
public void connectionServiceFocusGained ( ) { com.android.server.telecom.BindCallback callback = new com.android.server.telecom.BindCallback ( ) { @ java.lang.Override public void onSuccess ( ) { try { mServiceInterface.connectionServiceFocusGained ( android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { android.telecom.Log.d ( this , "failed to inform the focus gained event" ) ; } } @ java.lang.Override public void onFailure ( ) { } } ; mBinder.bind ( callback , null ) ; }
Source:
public com.android.sdklib.AndroidVersion getTargetSdkVersion ( ) { if ( ( mTargetSdkVersion ) == null ) { com.android.builder.model.ProductFlavor flavor = mProject.getDefaultConfig ( ) . getProductFlavor ( ) ; com.android.builder.model.ApiVersion targetSdk = flavor.getTargetSdkVersion ( ) ; if ( targetSdk != null ) { mTargetSdkVersion = com.android.tools.lint.detector.api.LintUtils.convertVersion ( targetSdk , mClient.getTargets ( ) ) ; } else { mTargetSdkVersion = super . getTargetSdkVersion ( ) ; } } return mTargetSdkVersion ; }

Target:
public com.android.sdklib.AndroidVersion getTargetSdkVersion ( ) { if ( ( mTargetSdkVersion ) == null ) { com.android.builder.model.ApiVersion targetSdk = mVariant.getMergedFlavor ( ) . getTargetSdkVersion ( ) ; if ( targetSdk == null ) { com.android.builder.model.ProductFlavor flavor = mProject.getDefaultConfig ( ) . getProductFlavor ( ) ; targetSdk = flavor.getTargetSdkVersion ( ) ; } if ( targetSdk != null ) { mTargetSdkVersion = com.android.tools.lint.detector.api.LintUtils.convertVersion ( targetSdk , mClient.getTargets ( ) ) ; } else { mTargetSdkVersion = super . getTargetSdkVersion ( ) ; } } return mTargetSdkVersion ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createMerge ( java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor > knownLayouts ) { java.lang.String xml_name = "merge" ; com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] viewLayoutAttribs = findViewLayoutAttributes ( SdkConstants.CLASS_FRAMELAYOUT , knownLayouts ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( xml_name , xml_name , null , "A root tag useful for XML layouts inflated using a ViewStub." , null , null , viewLayoutAttribs , null , false ) ; return desc ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor createMerge ( java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor > knownLayouts ) { java.lang.String xml_name = com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors.VIEW_MERGE ; com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] viewLayoutAttribs = findViewLayoutAttributes ( SdkConstants.CLASS_FRAMELAYOUT , knownLayouts ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( xml_name , xml_name , com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors.VIEW_MERGE , "A root tag useful for XML layouts inflated using a ViewStub." , null , null , viewLayoutAttribs , null , false ) ; return desc ; }
Source:
public void getCallForwardStatusResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_0.CallForwardInfo > var2 ) { }

Target:
public void getDataRegistrationStateResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.DataRegStateResult dataRegResponse ) { responseStrings ( responseInfo , java.lang.Integer.toString ( dataRegResponse.regState ) , java.lang.Integer.toString ( dataRegResponse.lac ) , java.lang.Integer.toString ( dataRegResponse.cid ) , java.lang.Integer.toString ( dataRegResponse.rat ) , java.lang.Integer.toString ( dataRegResponse.reasonDataDenied ) , java.lang.Integer.toString ( dataRegResponse.maxDataCalls ) , java.lang.Integer.toString ( dataRegResponse.tac ) , java.lang.Integer.toString ( dataRegResponse.phyCid ) , java.lang.Integer.toString ( dataRegResponse.eci ) , java.lang.Integer.toString ( dataRegResponse.csgid ) , java.lang.Integer.toString ( dataRegResponse.tadv ) ) ; }
Source:
private boolean isCurrentProgram ( com.android.tv.dvr.ScheduledRecording recording , com.android.tv.data.Program program ) { long currentPosition = mMainActivity.getCurrentPlayingPosition ( ) ; return ( ( ( recording.getType ( ) ) == ( com.android.tv.dvr.ScheduledRecording.TYPE_PROGRAM ) ) && ( ( recording.getProgramId ( ) ) == ( program.getId ( ) ) ) ) || ( ( ( ( recording.getType ( ) ) == ( com.android.tv.dvr.ScheduledRecording.TYPE_TIMED ) ) && ( currentPosition >= ( recording.getStartTimeMs ( ) ) ) ) && ( currentPosition <= ( recording.getEndTimeMs ( ) ) ) ) ; }

Target:
private boolean isCurrentProgram ( com.android.tv.dvr.data.ScheduledRecording recording , com.android.tv.data.Program program ) { long currentPosition = mMainActivity.getCurrentPlayingPosition ( ) ; return ( ( ( recording.getType ( ) ) == ( com.android.tv.dvr.data.ScheduledRecording.TYPE_PROGRAM ) ) && ( ( recording.getProgramId ( ) ) == ( program.getId ( ) ) ) ) || ( ( ( ( recording.getType ( ) ) == ( com.android.tv.dvr.data.ScheduledRecording.TYPE_TIMED ) ) && ( currentPosition >= ( recording.getStartTimeMs ( ) ) ) ) && ( currentPosition <= ( recording.getEndTimeMs ( ) ) ) ) ; }
Source:
private void addConflictingValueMessage ( com.android.manifmerger.MergingReport.Builder report , com.android.manifmerger.XmlAttribute higherPriority ) { java.lang.String error = java.lang.String.format ( ( "Attribute %1$s value=(%2$s) is also present at %3$s" + " value=(%4$s), use tools:replace to override it." ) , higherPriority.getId ( ) , higherPriority.getValue ( ) , printPosition ( ) , getValue ( ) ) ; report.addError ( error ) ; }

Target:
private void addIllegalImplicitOverrideMessage ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.AttributeModel attributeModel , @ com.android.annotations.NonNull com.android.manifmerger.XmlElement implicitNode ) { java.lang.String error = java.lang.String.format ( ( "Attribute %1$s value=(%2$s) at %3$s" + " cannot override implicit default value=(%4$s) at %5$s" ) , getId ( ) , getValue ( ) , printPosition ( ) , attributeModel.getDefaultValue ( ) , implicitNode.printPosition ( ) ) ; addMessage ( mergingReport , MergingReport.Record.Severity.ERROR , error ) ; }
Source:
public final int getBlockSize ( ) { return spiImpl.engineGetBlockSize ( ) ; }

Target:
private javax.crypto.CipherSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( spiImpl ) != null ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.Cipher.tryCombinations ( key , provider , transformParts ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( transformation ) ) ) ; } spiImpl = ( ( javax.crypto.CipherSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public void testDisplayTargetList ( ) { com.android.sdkmanager.Main main = new com.android.sdkmanager.Main ( ) ; main.setLogger ( getLog ( ) ) ; main.setSdkManager ( getSdkManager ( ) ) ; getLog ( ) . clear ( ) ; main.displayTargetList ( ) ; assertEquals ( ( "P Available Android targets:\n" + ( ( ( ( ( ( ( "P ----------\n" + "P id: 1 or \"android-0\"\n" ) + "P Name: Android 0.0\n" ) + "P Type: Platform\n" ) + "P API level: 0\n" ) + "P Revision: 1\n" ) + "P Skins: HVGA (default), Tag1ArmSkin, Tag1X86Skin\n" ) + "P Tag/ABIs : default/armeabi, tag-1/armeabi, tag-1/x86\n" ) ) , getLog ( ) . toString ( ) ) ; }

Target:
public void testDisplayTargetList ( ) { com.android.sdkmanager.Main main = new com.android.sdkmanager.Main ( ) ; main.setupForTest ( getSdkManager ( ) , getLog ( ) , null ) ; getLog ( ) . clear ( ) ; main.displayTargetList ( ) ; assertEquals ( ( "P Available Android targets:\n" + ( ( ( ( ( ( ( "P ----------\n" + "P id: 1 or \"android-0\"\n" ) + "P Name: Android 0.0\n" ) + "P Type: Platform\n" ) + "P API level: 0\n" ) + "P Revision: 1\n" ) + "P Skins: HVGA (default), Tag1ArmSkin, Tag1X86Skin\n" ) + "P Tag/ABIs : default/armeabi, tag-1/armeabi, tag-1/x86\n" ) ) , getLog ( ) . toString ( ) ) ; }
Source:
public static < E > java.util.LinkedList < E > newLinkedList ( java.lang.Iterable < ? extends E > elements ) { java.util.LinkedList < E > list = com.google.common.collect.Lists.newLinkedList ( ) ; for ( E element : elements ) { list.add ( element ) ; } return list ; }

Target:
public static < E > java.util.LinkedList < E > newLinkedList ( java.lang.Iterable < ? extends E > elements ) { java.util.LinkedList < E > list = com.google.common.collect.Lists.newLinkedList ( ) ; com.google.common.collect.Iterables.addAll ( list , elements ) ; return list ; }
Source:
public void connectionForDeprecatedGetRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedGet request = new com.android.volley.mock.TestRequest.DeprecatedGet ( ) ; assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "GET" , mMockConnection.getRequestMethod ( ) ) ; assertFalse ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mMockConnection.getOutputStream ( ) ) . thenReturn ( new java.io.ByteArrayOutputStream ( ) ) ; mHurlStack = new com.android.volley.toolbox.HurlStack ( ) { @ java.lang.Override protected java.net.HttpURLConnection createConnection ( java.net.URL url ) { return mMockConnection ; } } ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( "from" , "to" , 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.Patch patch = 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 test_getInstanceLjava_util_Locale ( ) { try { java.text.DateFormatSymbols.getInstance ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } assertEquals ( new java.text.DateFormatSymbols ( java.util.Locale.GERMANY ) , java.text.DateFormatSymbols.getInstance ( java.util.Locale.GERMANY ) ) ; java.util.Locale locale = new java.util.Locale ( "not exist language" , "not exist country" ) ; java.text.DateFormatSymbols symbols = java.text.DateFormatSymbols.getInstance ( locale ) ; assertNotNull ( symbols ) ; }

Target:
public void test_getInstanceLjava_util_Locale ( ) { try { java.text.DateFormatSymbols.getInstance ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } assertEquals ( new java.text.DateFormatSymbols ( java.util.Locale.GERMANY ) , java.text.DateFormatSymbols.getInstance ( java.util.Locale.GERMANY ) ) ; java.util.Locale locale = new java.util.Locale ( "not exist language" , "not exist country" ) ; java.text.DateFormatSymbols symbols = java.text.DateFormatSymbols.getInstance ( locale ) ; assertEquals ( java.text.DateFormatSymbols.getInstance ( java.util.Locale.ROOT ) , symbols ) ; }
Source:
public void add ( com.android.jack.dx.rop.annotation.Annotation annotation ) { throwIfImmutable ( ) ; if ( annotation == null ) { throw new java.lang.NullPointerException ( "annotation == null" ) ; } com.android.jack.dx.rop.cst.CstType type = annotation.getType ( ) ; if ( annotations.containsKey ( type ) ) { throw new java.lang.IllegalArgumentException ( ( "duplicate type: " + ( type.toHuman ( ) ) ) ) ; } annotations.put ( type , annotation ) ; }

Target:
public void add ( com.android.jack.dx.rop.annotation.Annotation annotation ) { throwIfImmutable ( ) ; if ( annotation == null ) { throw new java.lang.NullPointerException ( "annotation == null" ) ; } com.android.jack.dx.rop.type.Type type = annotation.getType ( ) ; if ( annotations.containsKey ( type ) ) { throw new java.lang.IllegalArgumentException ( ( "duplicate type: " + ( type.toHuman ( ) ) ) ) ; } annotations.put ( type , annotation ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( Intent.ACTION_BOOT_COMPLETED ) ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "Boot completed, initializing player lists" ) ; buildBrowsablePlayersList ( ) ; buildMediaPlayersList ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( Intent.ACTION_BOOT_COMPLETED ) ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "Boot completed, initializing player lists" ) ; new com.android.bluetooth.avrcp.Avrcp.BrowsablePlayerListBuilder ( ) . start ( ) ; } }
Source:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , mContentsClientAdapter , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } mAwContents.setLayerType ( mWebView.getLayerType ( ) , null ) ; }

Target:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , mWebView.getContext ( ) , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , mContentsClientAdapter , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } mAwContents.setLayerType ( mWebView.getLayerType ( ) , null ) ; }
Source:
public void testFailed ( com.android.ddmlib.testrunner.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( status.equals ( TestFailure.ERROR ) ) { mRunResult.reportTestFailure ( test , TestStatus.ERROR , trace ) ; } else { mRunResult.reportTestFailure ( test , TestStatus.FAILURE , trace ) ; } com.android.ddmlib.Log.d ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "%s %s: %s" , test , status , trace ) ) ; }

Target:
public void testRunStarted ( java.lang.String runName , int numTests ) { mRunResult = new com.android.ddmlib.testrunner.TestRunResult ( ) ; mRunResult.testRunStarted ( runName , numTests ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mSourcePackageName ) ) ) ; mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mTargetPackageName ) ) ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; if ( ! ( supportsDragAndDrop ( ) ) ) { return ; } mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mSourcePackageName ) ) ) ; mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mTargetPackageName ) ) ) ; }
Source:
public void run ( com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( com.android.jack.backend.dex.DexFileWriter.DEX_WRITING_POLICY ) ; try { writingTool.merge ( type ) ; } catch ( com.android.jack.backend.dex.DexWritingException e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } }

Target:
public void run ( com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( ! ( getFilter ( ) . accept ( this . getClass ( ) , type ) ) ) { return ; } com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( com.android.jack.backend.dex.DexFileWriter.DEX_WRITING_POLICY ) ; try { writingTool.merge ( type ) ; } catch ( com.android.jack.backend.dex.DexWritingException e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } }
Source:
public void test_getInstanceLjava_lang_StringLjava_security_Provider03 ( ) throws java.lang.Exception { for ( java.lang.String validValue : tests.api.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { javax.net.ssl.TrustManagerFactory trustMF = javax.net.ssl.TrustManagerFactory.getInstance ( validValue , tests.api.javax.net.ssl.TrustManagerFactory1Test.getDefaultProvider ( ) ) ; assertTrue ( "Not TrustManagerFactory object" , ( trustMF instanceof javax.net.ssl.TrustManagerFactory ) ) ; assertEquals ( "Invalid algorithm" , trustMF.getAlgorithm ( ) , validValue ) ; assertEquals ( "Invalid provider" , trustMF.getProvider ( ) , tests.api.javax.net.ssl.TrustManagerFactory1Test.getDefaultProvider ( ) ) ; } }

Target:
public void test_getInstanceLjava_lang_StringLjava_security_Provider03 ( ) throws java.lang.Exception { for ( java.lang.String validValue : org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getValidValues ( ) ) { javax.net.ssl.TrustManagerFactory trustMF = javax.net.ssl.TrustManagerFactory.getInstance ( validValue , org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getDefaultProvider ( ) ) ; assertTrue ( "Not TrustManagerFactory object" , ( trustMF instanceof javax.net.ssl.TrustManagerFactory ) ) ; assertEquals ( "Invalid algorithm" , trustMF.getAlgorithm ( ) , validValue ) ; assertEquals ( "Invalid provider" , trustMF.getProvider ( ) , org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.getDefaultProvider ( ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { com.android.jack.Options jackArgs = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestFromBinaryName ( classBinaryName ) ) ; jackArgs.addProperty ( Options.METHOD_FILTER.getName ( ) , "reject-all-methods" ) ; session = com.android.jack.TestTools.buildSession ( jackArgs ) ; junit.framework.Assert.assertNotNull ( session ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { com.android.jack.Options jackArgs = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestFromBinaryName ( com.android.jack.frontend.MethodModifierTest.classBinaryName ) ) ; jackArgs.addProperty ( Options.METHOD_FILTER.getName ( ) , "reject-all-methods" ) ; session = com.android.jack.TestTools.buildSession ( jackArgs ) ; junit.framework.Assert.assertNotNull ( session ) ; }
Source:
private int checkAccessPermission ( android.bluetooth.BluetoothDevice remoteDevice ) { com.android.bluetooth.hfp.AtPhonebook.log ( "checkAccessPermission" ) ; int permission = remoteDevice.getPhonebookAccessPermission ( ) ; if ( permission == ( android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ) ) { com.android.bluetooth.hfp.AtPhonebook.log ( "checkAccessPermission - ACTION_CONNECTION_ACCESS_REQUEST" ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST ) ; intent.setClassName ( com.android.bluetooth.hfp.AtPhonebook.ACCESS_AUTHORITY_PACKAGE , com.android.bluetooth.hfp.AtPhonebook.ACCESS_AUTHORITY_CLASS ) ; intent.putExtra ( BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE , BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , remoteDevice ) ; mContext.sendOrderedBroadcast ( intent , com.android.bluetooth.hfp.AtPhonebook.BLUETOOTH_ADMIN_PERM ) ; } return permission ; }

Target:
private int checkAccessPermission ( android.bluetooth.BluetoothDevice remoteDevice ) { com.android.bluetooth.hfp.AtPhonebook.log ( "checkAccessPermission" ) ; int permission = remoteDevice.getPhonebookAccessPermission ( ) ; if ( permission == ( android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ) ) { com.android.bluetooth.hfp.AtPhonebook.log ( "checkAccessPermission - ACTION_CONNECTION_ACCESS_REQUEST" ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST ) ; intent.setPackage ( mPairingPackage ) ; intent.putExtra ( BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE , BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , remoteDevice ) ; mContext.sendOrderedBroadcast ( intent , com.android.bluetooth.hfp.AtPhonebook.BLUETOOTH_ADMIN_PERM ) ; } return permission ; }
Source:
public void createDeleteRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.Delete request = new com.android.volley.mock.TestRequest.Delete ( ) ; assertEquals ( request.getMethod ( ) , Method.DELETE ) ; org.apache.http.client.methods.HttpUriRequest httpRequest = com.android.volley.toolbox.HttpClientStack.createHttpRequest ( request , null ) ; assertTrue ( ( httpRequest instanceof org.apache.http.client.methods.HttpDelete ) ) ; }

Target:
public void createDeleteRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.Delete request = new com.android.volley.mock.TestRequest.Delete ( ) ; org.junit.Assert.assertEquals ( request.getMethod ( ) , Method.DELETE ) ; org.apache.http.client.methods.HttpUriRequest httpRequest = com.android.volley.toolbox.HttpClientStack.createHttpRequest ( request , null ) ; org.junit.Assert.assertTrue ( ( httpRequest instanceof org.apache.http.client.methods.HttpDelete ) ) ; }
Source:
public void TestSyntaxErrors ( ) { try { com.ibm.icu.impl.SimplePatternFormatter.compile ( "{}" ) ; fail ( "Syntax error did not yield an exception." ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { com.ibm.icu.impl.SimplePatternFormatter.compile ( "{12d" ) ; fail ( "Syntax error did not yield an exception." ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void TestSyntaxErrors ( ) { try { com.ibm.icu.text.SimpleFormatter.compile ( "{}" ) ; fail ( "Syntax error did not yield an exception." ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { com.ibm.icu.text.SimpleFormatter.compile ( "{12d" ) ; fail ( "Syntax error did not yield an exception." ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public void onAudioBufferConsumed ( android.media.MediaSync sync , java.nio.ByteBuffer byteBuffer , int bufferIndex ) { android.media.cts.Decoder decoderAudio = mDecoderAudio ; if ( decoderAudio != null ) { decoderAudio.checkReturnedAudioBuffer ( byteBuffer , bufferIndex ) ; decoderAudio.releaseOutputBuffer ( bufferIndex , NO_TIMESTAMP ) ; synchronized ( condition ) { ++ ( mNumBuffersReturned ) ; if ( ( mNumBuffersReturned ) >= NUM_LOOPS ) { condition.notify ( ) ; } } } }

Target:
public void onAudioBufferConsumed ( android.media.MediaSync sync , java.nio.ByteBuffer byteBuffer , int bufferIndex ) { android.media.cts.MediaSyncTest.Decoder decoderAudio = mDecoderAudio ; if ( decoderAudio != null ) { decoderAudio.checkReturnedAudioBuffer ( byteBuffer , bufferIndex ) ; decoderAudio.releaseOutputBuffer ( bufferIndex , NO_TIMESTAMP ) ; synchronized ( condition ) { ++ ( mNumBuffersReturned ) ; if ( ( mNumBuffersReturned ) >= NUM_LOOPS ) { condition.notify ( ) ; } } } }
Source:
public void close ( ) throws java.io.IOException { try { addDirToZip ( zipOS , getRootInputOutputVDir ( ) ) ; } finally { zipOS.close ( ) ; com.android.sched.util.file.FileUtils.deleteDir ( dir ) ; } }

Target:
public synchronized void close ( ) throws java.io.IOException { if ( ! ( closed ) ) { try { addDirToZip ( zipOS , getRootInputOutputVDir ( ) ) ; } finally { zipOS.close ( ) ; com.android.sched.util.file.FileUtils.deleteDir ( dir ) ; closed = true ; } } }
Source:
private static org.eclipse.jdt.core.dom.CompilationUnit applyRewrite ( java.lang.Object documentId , org.eclipse.jdt.core.dom.ASTParser parser , org.eclipse.jface.text.Document document , org.eclipse.jdt.core.dom.rewrite.ASTRewrite rewrite ) throws org.eclipse.jface.text.BadLocationException { org.eclipse.text.edits.TextEdit textEdit = rewrite.rewriteAST ( document , null ) ; textEdit.apply ( document , TextEdit.UPDATE_REGIONS ) ; return com.google.currysrc.Main.parseDocument ( documentId , parser , document ) ; }

Target:
private static org.eclipse.jdt.core.dom.CompilationUnit applyRewrite ( java.lang.Object documentId , org.eclipse.jdt.core.dom.ASTParser parser , org.eclipse.jface.text.Document document , org.eclipse.jdt.core.dom.rewrite.ASTRewrite rewrite ) throws org.eclipse.jface.text.BadLocationException { org.eclipse.text.edits.TextEdit textEdit = rewrite.rewriteAST ( document , null ) ; textEdit.apply ( document , TextEdit.UPDATE_REGIONS ) ; return com.google.currysrc.Main.CompilationUnitHandler.parseDocument ( documentId , parser , document ) ; }
Source:
public static boolean matchByAddress ( int workaroundId , java.lang.String address ) { if ( ( address == null ) || ( address.isEmpty ( ) ) ) return false ; com.android.bluetooth.util.Interop.lazyInitInteropDatabase ( ) ; for ( com.android.bluetooth.util.Interop.Entry entry : com.android.bluetooth.util.Interop.entries ) { if ( ( ( entry.workaround_id ) == workaroundId ) && ( entry.address.startsWith ( address.toLowerCase ( ) ) ) ) { return true ; } } return false ; }

Target:
public static boolean matchByAddress ( int workaroundId , java.lang.String address ) { if ( ( address == null ) || ( address.isEmpty ( ) ) ) return false ; com.android.bluetooth.util.Interop.lazyInitInteropDatabase ( ) ; for ( com.android.bluetooth.util.Interop.Entry entry : com.android.bluetooth.util.Interop.sEntries ) { if ( ( ( entry.workaround_id ) == workaroundId ) && ( entry.address.startsWith ( address.toLowerCase ( ) ) ) ) { return true ; } } return false ; }
Source:
protected void renderBreadcrumbs ( org.gradle.api.internal.html.SimpleHtmlWriter htmlWriter ) throws java.io.IOException { htmlWriter.startElement ( "div" ) . attribute ( "class" , "breadcrumbs" ) ; htmlWriter.startElement ( "a" ) . attribute ( "href" , "index.html" ) . characters ( "all" ) . endElement ( ) ; htmlWriter.characters ( java.lang.String.format ( " > %s" , getResults ( ) . getName ( ) ) ) ; htmlWriter.endElement ( ) ; }

Target:
protected void renderBreadcrumbs ( com.android.build.gradle.internal.test.report.SimpleHtmlWriter htmlWriter ) throws java.io.IOException { htmlWriter.startElement ( "div" ) . attribute ( "class" , "breadcrumbs" ) ; htmlWriter.startElement ( "a" ) . attribute ( "href" , "index.html" ) . characters ( "all" ) . endElement ( ) ; htmlWriter.characters ( java.lang.String.format ( " > %s" , getResults ( ) . getName ( ) ) ) ; htmlWriter.endElement ( ) ; }
Source:
public static synchronized java.util.Set < com.ibm.icu.util.MeasureUnit > getAvailable ( java.lang.String type ) { java.util.Map < java.lang.String , com.ibm.icu.util.MeasureUnit > units = com.ibm.icu.util.MeasureUnit.cache.get ( type ) ; return units == null ? java.util.Collections.< com.ibm.icu.util.MeasureUnit > emptySet ( ) : java.util.Collections.unmodifiableSet ( new java.util.HashSet < com.ibm.icu.util.MeasureUnit > ( units.values ( ) ) ) ; }

Target:
public static synchronized java.util.Set < com.ibm.icu.util.MeasureUnit > getAvailable ( java.lang.String type ) { com.ibm.icu.util.MeasureUnit.populateCache ( ) ; java.util.Map < java.lang.String , com.ibm.icu.util.MeasureUnit > units = com.ibm.icu.util.MeasureUnit.cache.get ( type ) ; return units == null ? java.util.Collections.< com.ibm.icu.util.MeasureUnit > emptySet ( ) : java.util.Collections.unmodifiableSet ( new java.util.HashSet < com.ibm.icu.util.MeasureUnit > ( units.values ( ) ) ) ; }
Source:
private void unfreezePackage ( java.lang.String packageName ) { synchronized ( mPackages ) { final com.android.server.pm.PackageSetting ps = mSettings.mPackages.get ( packageName ) ; if ( ps != null ) { ps.frozen = false ; } } }

Target:
private void assertPackageKnown ( java.lang.String volumeUuid , java.lang.String packageName ) throws com.android.server.pm.PackageManagerException { synchronized ( mPackages ) { final com.android.server.pm.PackageSetting ps = mSettings.mPackages.get ( packageName ) ; if ( ps == null ) { throw new com.android.server.pm.PackageManagerException ( ( ( "Package " + packageName ) + " is unknown" ) ) ; } else if ( ! ( android.text.TextUtils.equals ( volumeUuid , ps.volumeUuid ) ) ) { throw new com.android.server.pm.PackageManagerException ( ( ( ( ( ( "Package " + packageName ) + " found on unknown volume " ) + volumeUuid ) + "; expected volume " ) + ( ps.volumeUuid ) ) ) ; } } }
Source:
public static com.android.newbubble.NewBubbleInfo.Action.Builder from ( @ android.support.annotation.NonNull com.android.newbubble.NewBubbleInfo.Action action ) { return com.android.newbubble.NewBubbleInfo.Action.builder ( ) . setIntent ( action.getIntent ( ) ) . setChecked ( action.isChecked ( ) ) . setCheckable ( action.isCheckable ( ) ) . setName ( action.getName ( ) ) . setIconDrawable ( action.getIconDrawable ( ) ) ; }

Target:
public static com.android.newbubble.NewBubbleInfo.Action.Builder from ( @ android.support.annotation.NonNull com.android.newbubble.NewBubbleInfo.Action action ) { return com.android.newbubble.NewBubbleInfo.Action.builder ( ) . setIntent ( action.getIntent ( ) ) . setChecked ( action.isChecked ( ) ) . setCheckable ( action.isCheckable ( ) ) . setName ( action.getName ( ) ) . setIconDrawable ( action.getIconDrawable ( ) ) . setSecondaryIconDrawable ( action.getSecondaryIconDrawable ( ) ) ; }
Source:
public int getAuthType ( ) { if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_PSK ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA_PSK ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA2_PSK ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA2_PSK ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ; } return android.net.wifi.WifiConfiguration.KeyMgmt.NONE ; }

Target:
public int getAuthType ( ) { if ( ( allowedKeyManagement.cardinality ( ) ) > 1 ) { throw new java.lang.IllegalStateException ( "More than one auth type set" ) ; } if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_PSK ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA_PSK ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA2_PSK ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA2_PSK ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ; } else if ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ) ) { return android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ; } return android.net.wifi.WifiConfiguration.KeyMgmt.NONE ; }
Source:
public boolean setInstallLocation ( int loc ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.WRITE_SECURE_SETTINGS , null ) ; if ( ( getInstallLocation ( ) ) == loc ) { return true ; } if ( ( ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_AUTO ) ) || ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_INTERNAL ) ) ) || ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_EXTERNAL ) ) ) { android.provider.Settings.System.putInt ( mContext.getContentResolver ( ) , android.provider.Settings.Secure.DEFAULT_INSTALL_LOCATION , loc ) ; return true ; } return false ; }

Target:
private boolean isVerificationEnabled ( int flags ) { if ( ! ( com.android.server.pm.PackageManagerService.DEFAULT_VERIFY_ENABLE ) ) { return false ; } if ( ( flags & ( android.content.pm.PackageManager.INSTALL_FROM_ADB ) ) != 0 ) { if ( android.app.ActivityManager.isRunningInTestHarness ( ) ) { return false ; } if ( ( android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB , 1 ) ) == 0 ) { return false ; } } return ( android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE , 1 ) ) == 1 ; }
Source:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }

Target:
public void testLibProguard ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libProguard" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/proguard/release" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_TEST_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "build" ) ; com.android.build.gradle.ManualBuildTest.checkFile ( fileOutput , "mapping.txt" , new java.lang.String [ ] { "int proguardInt -> a" } ) ; }
Source:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( new com.android.utils.PositionXmlParser ( ) , mSourceLocation , mKeyResolver , mElement ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }

Target:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( new com.android.utils.PositionXmlParser ( ) , mSourceLocation , mKeyResolver , mPropertyResolver , mElement ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }
Source:
public void testInvalidMajorDistroVersion_older ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion oldMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION ) - 1 ) , 1 , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , 1 ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( oldMajorDistroVersion ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 5 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }

Target:
public void testInvalidMajorDistroVersion_older ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion oldMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION ) - 1 ) , 1 , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , 1 ) ; byte [ ] distroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( oldMajorDistroVersion ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 5 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }
Source:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , AdtConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_AIDL , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_RENDERSCRIPT , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_ANDROID , IResource.DEPTH_ZERO , false ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.BUILDPATH_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; }

Target:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject , com.android.ide.eclipse.adt.internal.sdk.ProjectState projectState ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException , org.eclipse.core.runtime.CoreException { super . abortOnBadSetup ( javaProject , projectState ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , AdtConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_AIDL , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_RENDERSCRIPT , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AdtConstants.MARKER_ANDROID , IResource.DEPTH_ZERO , false ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.BUILDPATH_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; }
Source:
public boolean switchToLastInputMethod ( android.os.IBinder imeToken ) { synchronized ( mH ) { try { return mService.switchToLastInputMethod ( imeToken ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; return false ; } } }

Target:
public boolean setCurrentInputMethodSubtype ( android.view.inputmethod.InputMethodSubtype subtype ) { synchronized ( mH ) { try { return mService.setCurrentInputMethodSubtype ( subtype ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public final void testPkgTypeSysImg ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_SYS_IMAGES ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasTag ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeSysImg ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_SYS_IMAGE ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasTag ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void restoreconAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.restoreconAppData ( uuid , packageName , userId , flags , appId , seInfo ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }