auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean areEqual ( @ com.android.annotations.Nullable org.objectweb.asm.tree.AnnotationNode first , @ com.android.annotations.Nullable org.objectweb.asm.tree.AnnotationNode second ) { return ( ( first == null ) && ( second == null ) ) || ( ( ( first != null ) && ( second != null ) ) && ( ( com.android.build.gradle.internal.incremental.InstantRunVerifier.OBJECT_COMPARATOR.areEqual ( first.desc , second.desc ) ) && ( ( com.android.build.gradle.internal.incremental.InstantRunVerifier.diffList ( first.values , second.values , com.android.build.gradle.internal.incremental.InstantRunVerifier.OBJECT_COMPARATOR ) ) == ( com.android.build.gradle.internal.incremental.InstantRunVerifier.Diff.NONE ) ) ) ) ; }

Target:
public boolean areEqual ( @ com.android.annotations.Nullable org.objectweb.asm.tree.AnnotationNode first , @ com.android.annotations.Nullable org.objectweb.asm.tree.AnnotationNode second ) { if ( ( first == null ) || ( second == null ) ) { return first == second ; } if ( ! ( com.android.build.gradle.internal.incremental.InstantRunVerifier.OBJECT_COMPARATOR.areEqual ( first.desc , second.desc ) ) ) { return false ; } java.util.List firstEntries = com.android.build.gradle.internal.incremental.InstantRunVerifier.splitToEntries ( first.values ) ; java.util.List secondEntries = com.android.build.gradle.internal.incremental.InstantRunVerifier.splitToEntries ( second.values ) ; return ( com.android.build.gradle.internal.incremental.InstantRunVerifier.diffList ( firstEntries , secondEntries , com.android.build.gradle.internal.incremental.InstantRunVerifier.OBJECT_COMPARATOR ) ) == ( com.android.build.gradle.internal.incremental.InstantRunVerifier.Diff.NONE ) ; }
Source:
private static java.lang.String whereStatement ( ) { return ( ( ( ( ( ( ( ( ( ( android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER ) + " IS NOT NULL" ) + " AND " ) + ( android.provider.ContactsContract.Data.MIMETYPE ) ) + " IN (\'" ) + ( android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE ) ) + "\')" ; }

Target:
private static java.lang.String whereStatement ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( android.provider.ContactsContract.CommonDataKinds.Phone.NUMBER ) + " IS NOT NULL" ) + " AND " ) + ( ( android.provider.ContactsContract.Data.DISPLAY_NAME_PRIMARY ) + " IS NOT NULL" ) ) + " AND " ) + ( android.provider.ContactsContract.Data.MIMETYPE ) ) + " IN (\'" ) + ( android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE ) ) + "\', \'" ) + ( android.provider.ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE ) ) + "\')" ; }
Source:
public void hangupWaitingOrBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }

Target:
public void hangupWaitingOrBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }
Source:
public boolean contains ( java.lang.Object o ) { return containsKey ( o ) ; }

Target:
public boolean remove ( java.lang.Object o ) { return ( com.google.common.collect.Iterables.removeFirstMatching ( unfiltered.entrySet ( ) , com.google.common.base.Predicates.< java.util.Map.Entry < K , V > > and ( predicate , com.google.common.collect.Maps.< V > valuePredicateOnEntries ( com.google.common.base.Predicates.equalTo ( o ) ) ) ) ) != null ; }
Source:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( ( android.text.TextUtils.isEmpty ( photoInfo.getLookupUri ( ) ) ? com.android.dialer.glidephotomanager.impl.DefaultLookupUriGenerator.generateUri ( photoInfo ) : com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.getLookupUri ( ) ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }

Target:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( ( android.text.TextUtils.isEmpty ( photoInfo.getLookupUri ( ) ) ? com.android.dialer.glidephotomanager.impl.DefaultLookupUriGenerator.generateUri ( photoInfo ) : com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.getLookupUri ( ) ) ) ) ; badge.setOverlay ( null ) ; loadContactPhoto ( badge , photoInfo ) ; }
Source:
public boolean LoadVendorConfig ( com.android.tradefed.build.IBuildInfo buildInfo ) throws java.lang.RuntimeException { java.util.Map < java.lang.String , java.lang.String > attrs = buildInfo.getBuildAttributes ( ) ; if ( attrs.containsKey ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_DEFAULT_TYPE ) ) { mDefaultType = attrs.get ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_DEFAULT_TYPE ) ; } else { com.android.tradefed.log.LogUtil.CLog.i ( "No default vendor test configuration provided. Defaulting to prod." ) ; } mVendorConfigFilePath = attrs.get ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_FILE_PATH ) ; return LoadVendorConfig ( mDefaultType , mVendorConfigFilePath ) ; }

Target:
public boolean LoadVendorConfig ( com.android.tradefed.build.IBuildInfo buildInfo ) throws java.lang.RuntimeException { java.util.Map < java.lang.String , java.lang.String > attrs = buildInfo.getBuildAttributes ( ) ; if ( attrs.containsKey ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_DEFAULT_TYPE ) ) { mDefaultType = attrs.get ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_DEFAULT_TYPE ) ; } else { com.android.tradefed.log.LogUtil.CLog.d ( "No default vendor test configuration provided. Defaulting to prod." ) ; } mVendorConfigFilePath = attrs.get ( com.android.tradefed.util.VtsVendorConfigFileUtil.KEY_VENDOR_TEST_CONFIG_FILE_PATH ) ; return LoadVendorConfig ( mDefaultType , mVendorConfigFilePath ) ; }
Source:
public static final char [ ] toChars ( int cp ) { if ( cp >= 0 ) { if ( cp < ( android.icu.lang.UCharacter.MIN_SUPPLEMENTARY_CODE_POINT ) ) { return new char [ ] { ( ( char ) ( cp ) ) } ; } if ( cp <= ( android.icu.lang.UCharacter.MAX_CODE_POINT ) ) { return new char [ ] { android.icu.text.UTF16.getLeadSurrogate ( cp ) , android.icu.text.UTF16.getTrailSurrogate ( cp ) } ; } } throw new java.lang.IllegalArgumentException ( ) ; }

Target:
public static final char [ ] toChars ( int cp ) { return java.lang.Character.toChars ( cp ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; if ( mShouldTestTelecom ) { setupConnectionService ( null , ( ( FLAG_REGISTER ) | ( FLAG_ENABLE ) ) ) ; } }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; if ( mShouldTestTelecom ) { setupConnectionService ( null , ( ( FLAG_REGISTER ) | ( FLAG_ENABLE ) ) ) ; mTelecomManager.registerPhoneAccount ( TestUtils.TEST_SELF_MANAGED_PHONE_ACCOUNT_1 ) ; } }
Source:
public void testMalformedI18NameBytes ( ) { for ( byte [ ] malformedBytes : com.android.server.wifi.hotspot2.anqp.I18NameTest.MALFORMED_I18_NAME_BYTES ) { try { com.android.server.wifi.hotspot2.anqp.I18Name i18Name = new com.android.server.wifi.hotspot2.anqp.I18Name ( java.nio.ByteBuffer.wrap ( malformedBytes ) . order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ) ; } catch ( java.net.ProtocolException e ) { continue ; } fail ( ( "Expected exception while parsing malformed I18 Name bytes: " + malformedBytes ) ) ; } }

Target:
public void parseBufferWithLengthLessThanMinimum ( ) throws java.lang.Exception { byte [ ] data = getDefaultTestData ( ) ; com.android.server.wifi.hotspot2.anqp.I18Name.parse ( getTestBuffer ( data , ( ( I18Name.MINIMUM_LENGTH ) - 1 ) ) ) ; }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String value = attribute.getNodeValue ( ) ; if ( value.startsWith ( "@*android:" ) ) { context.report ( com.android.tools.lint.checks.PrivateResourceDetector.ISSUE , attribute , context.getLocation ( attribute ) , ( "Illegal resource reference: `@*android` resources are private and " + "not always present" ) ) ; } }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String value = attribute.getNodeValue ( ) ; if ( context.getProject ( ) . isGradleProject ( ) ) { com.android.ide.common.resources.ResourceUrl url = com.android.ide.common.resources.ResourceUrl.parse ( value ) ; if ( com.android.tools.lint.checks.PrivateResourceDetector.isPrivate ( context , url ) ) { java.lang.String message = com.android.tools.lint.checks.PrivateResourceDetector.createUsageErrorMessage ( context , url.type , url.name ) ; context.report ( com.android.tools.lint.checks.PrivateResourceDetector.ISSUE , attribute , context.getValueLocation ( attribute ) , message ) ; } } }
Source:
private static void killProcessGroup ( int uid , int pid ) { android.os.Trace.traceBegin ( Trace.TRACE_TAG_ACTIVITY_MANAGER , "killProcessGroup" ) ; java.lang.Process.killProcessGroup ( uid , pid ) ; android.os.Trace.traceEnd ( Trace.TRACE_TAG_ACTIVITY_MANAGER ) ; }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.server.am.ActivityManagerService.KillHandler.KILL_PROCESS_GROUP_MSG : { android.os.Trace.traceBegin ( Trace.TRACE_TAG_ACTIVITY_MANAGER , "killProcessGroup" ) ; java.lang.Process.killProcessGroup ( msg.arg1 , msg.arg2 ) ; android.os.Trace.traceEnd ( Trace.TRACE_TAG_ACTIVITY_MANAGER ) ; } break ; default : super . handleMessage ( msg ) ; } }
Source:
public void float32 ( float v ) throws java.io.IOException { int32 ( java.lang.Float.floatToIntBits ( v ) ) ; }

Target:
public void float32 ( float v ) throws java.io.IOException { int bits = java.lang.Float.floatToIntBits ( v ) ; int shuffled = ( ( ( ( bits & 255 ) << 24 ) | ( ( bits & 65280 ) << 8 ) ) | ( ( bits & 16711680 ) > > 8 ) ) | ( ( bits & - 16777216 ) > > > 24 ) ; uintv ( shuffled ) ; }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { com.android.tools.perflib.heap.ClassObj theClass = mHeap.getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
private void notifyAddressRemoved ( java.lang.String iface , android.net.LinkAddress address ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . addressRemoved ( iface , address ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyAddressRemoved ( java.lang.String iface , android.net.LinkAddress address ) { invokeForAllObservers ( ( o ) -> o.addressRemoved ( iface , address ) ) ; }
Source:
public void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay1" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay1" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
public static com.google.gct.testing.CloudTestConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.CloudTestConfiguration configuration : com.google.gct.testing.CloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getTestingConfigurations ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.CloudTestConfigurationImpl ) ( configuration ) ) ; } } return null ; }

Target:
public static com.google.gct.testing.CloudConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.CloudConfiguration configuration : com.google.gct.testing.CloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getAllCloudConfigurations ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.CloudConfigurationImpl ) ( configuration ) ) ; } } return null ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , long [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 8 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copyFrom ( byte [ ] d ) { validateIsInt8 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
private static void waitForCondition ( java.util.function.BooleanSupplier condition ) throws java.lang.Exception { int count = 0 ; while ( ( ( count ++ ) < 30 ) && ( ! ( condition.getAsBoolean ( ) ) ) ) { java.lang.Thread.sleep ( 1000 ) ; } assertTrue ( ( "Failed condition: " + condition ) , condition.getAsBoolean ( ) ) ; }

Target:
private static void waitForCondition ( java.util.function.BooleanSupplier condition ) throws java.lang.Exception { int count = 0 ; boolean lastResult ; while ( ( ! ( lastResult = condition.getAsBoolean ( ) ) ) && ( ( count ++ ) < 30 ) ) { java.lang.Thread.sleep ( 1000 ) ; } assertTrue ( ( "Failed condition: " + condition ) , lastResult ) ; }
Source:
public java.lang.String getLine1AlphaTagForDisplay ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getLine1AlphaTagForDisplay" ) ) ) { return null ; } java.lang.String iccId = getIccId ( subId ) ; if ( iccId != null ) { java.lang.String alphaTagPrefKey = ( com.android.phone.PhoneInterfaceManager.PREF_CARRIERS_ALPHATAG_PREFIX ) + iccId ; return mTelephonySharedPreferences.getString ( alphaTagPrefKey , null ) ; } return null ; }

Target:
public java.lang.String getLine1AlphaTagForDisplay ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getLine1AlphaTagForDisplay" ) ) ) { return null ; } java.lang.String iccId = getIccId ( subId ) ; if ( iccId != null ) { java.lang.String alphaTagPrefKey = ( com.android.phone.PhoneInterfaceManager.PREF_CARRIERS_ALPHATAG_PREFIX ) + iccId ; return mTelephonySharedPreferences.getString ( alphaTagPrefKey , null ) ; } return null ; }
Source:
public void testLayout3 ( ) throws java.lang.Exception { com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences prefs = com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences.create ( ) ; prefs.oneAttributeOnFirstLine = true ; checkFormat ( prefs , "res/layout-land/layout3.xml" , "<LinearLayout><Button foo=\"bar\"></Button></LinearLayout>" , ( "<LinearLayout>\n" + ( ( ( ( "\n" + " <Button foo=\"bar\" >\n" ) + " </Button>\n" ) + "\n" ) + "</LinearLayout>" ) ) ) ; }

Target:
public void testLayout3 ( ) throws java.lang.Exception { com.android.ide.eclipse.adt.internal.editors.formatting.EclipseXmlFormatPreferences prefs = com.android.ide.eclipse.adt.internal.editors.formatting.EclipseXmlFormatPreferences.create ( ) ; prefs.oneAttributeOnFirstLine = true ; checkFormat ( prefs , "res/layout-land/layout3.xml" , "<LinearLayout><Button foo=\"bar\"></Button></LinearLayout>" , ( "<LinearLayout>\n" + ( ( ( ( "\n" + " <Button foo=\"bar\" >\n" ) + " </Button>\n" ) + "\n" ) + "</LinearLayout>" ) ) ) ; }
Source:
public java.lang.String [ ] getIsimImpu ( ) { com.android.internal.telephony.Phone phone = getPhone ( getDefaultSubscription ( ) ) ; mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimImpu ( ) ; } else { return null ; } }

Target:
public java.lang.String [ ] getIsimImpu ( int subId ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimImpu ( ) ; } else { return null ; } } else { loge ( ( "getIsimImpu phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private void switchToRadioState ( com.android.internal.telephony.RadioState newState ) { setRadioState ( newState ) ; }

Target:
public void explicitCallTransfer ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_EXPLICIT_CALL_TRANSFER , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.explicitCallTransfer ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "explicitCallTransfer" , e ) ; } } }
Source:
protected void _initWith ( @ com.android.annotations.NonNull com.android.builder.model.BaseConfig that ) { setBuildConfigFields ( that.getBuildConfigFields ( ) ) ; setResValues ( that.getResValues ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; mConsumerProguardFiles.clear ( ) ; mConsumerProguardFiles.addAll ( that.getConsumerProguardFiles ( ) ) ; mManifestPlaceholders.clear ( ) ; mManifestPlaceholders.putAll ( that.getManifestPlaceholders ( ) ) ; }

Target:
protected void _initWith ( @ com.android.annotations.NonNull com.android.builder.model.BaseConfig that ) { setBuildConfigFields ( that.getBuildConfigFields ( ) ) ; setResValues ( that.getResValues ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; mConsumerProguardFiles.clear ( ) ; mConsumerProguardFiles.addAll ( that.getConsumerProguardFiles ( ) ) ; mManifestPlaceholders.clear ( ) ; mManifestPlaceholders.putAll ( that.getManifestPlaceholders ( ) ) ; mMultiDex = that.getMultiDex ( ) ; }
Source:
protected void switchUser ( int userId ) throws java.lang.Exception { java.lang.String command = "am switch-user " + userId ; com.android.tradefed.log.LogUtil.CLog.d ( ( "Starting command " + command ) ) ; java.lang.String commandOutput = getDevice ( ) . executeShellCommand ( command ) ; com.android.tradefed.log.LogUtil.CLog.d ( ( ( ( "Output for command " + command ) + ": " ) + commandOutput ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; assertNotNull ( mBuildInfo ) ; mSupportsMultiUser = ( getDevice ( ) . getMaxNumberOfUsersSupported ( ) ) > 1 ; mIsSplitSystemUser = checkIfSplitSystemUser ( ) ; mPrimaryUserId = getDevice ( ) . getPrimaryUserId ( ) ; mFixedUsers = new java.util.ArrayList ( ) ; mFixedUsers.add ( mPrimaryUserId ) ; if ( ( mPrimaryUserId ) != ( android.host.multiuser.BaseMultiUserTest.USER_SYSTEM ) ) { mFixedUsers.add ( android.host.multiuser.BaseMultiUserTest.USER_SYSTEM ) ; } getDevice ( ) . switchUser ( mPrimaryUserId ) ; removeTestUsers ( ) ; }
Source:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierIdProvider.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierIdProvider.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( java.lang.Exception e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertTrue ( ( e instanceof android.database.SQLException ) ) ; assertFalse ( mContentObserver.changed ) ; } }

Target:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierIdentification.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierIdentification.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( java.lang.Exception e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertTrue ( ( e instanceof android.database.SQLException ) ) ; assertFalse ( mContentObserver.changed ) ; } }
Source:
public void testCancelServiceDiscovery_exception ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyInt ( ) ) ) . thenThrow ( mRemoteException ) ; assertFalse ( mDut.cancelServiceDiscovery ( "1234" ) ) ; assertFalse ( mDut.isInitializationComplete ( ) ) ; }

Target:
public void testCancelServiceDiscovery_exception ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; org.mockito.Mockito.when ( mISupplicantP2pIfaceMock.cancelServiceDiscovery ( anyLong ( ) ) ) . thenThrow ( mRemoteException ) ; assertFalse ( mDut.cancelServiceDiscovery ( "1234" ) ) ; assertFalse ( mDut.isInitializationComplete ( ) ) ; }
Source:
private void assertFailureStackContainsThisClass ( java.lang.Throwable e ) { assertTrue ( com.google.common.base.Throwables.getStackTraceAsString ( e ) . contains ( getClass ( ) . getSimpleName ( ) . toString ( ) ) ) ; }

Target:
public void customAssertionError ( ) { expectedException.expect ( junit.framework.AssertionFailedError.class ) ; expectedException.expectCause ( stackTraceContainsThisClass ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( new android.support.test.espresso.ViewAssertion ( ) { @ java.lang.Override public void check ( android.view.View view , android.support.test.espresso.NoMatchingViewException noViewFoundException ) { org.junit.Assert.assertFalse ( true ) ; } } ) ; }
Source:
public void testIsGraphicCharSequence() { org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("printable characters")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\u2028\u2029\u0085\u0d00\ud800 ")); org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("a\u2028\u2029\u0085\u0d00\ud800 ")); org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("\ud83d\udc0c")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udb40\udc01")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udb3d")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udc0c")); }

Target:
public void testIsGraphicCharSequence() { org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("printable characters")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\u2028\u2029\u0085\uffff\ud800 ")); org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("a\u2028\u2029\u0085\uffff\ud800 ")); org.junit.Assert.assertTrue(android.text.TextUtils.isGraphic("\ud83d\udc0c")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udb40\udc01")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udb3d")); org.junit.Assert.assertFalse(android.text.TextUtils.isGraphic("\udc0c")); }
Source:
public void testRunNormalInput ( ) { mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockRunUtil ( "which" , "python" , CommandStatus.SUCCESS ) ) ; try { mTest.run ( mMockInvocationListener ) ; } catch ( java.lang.IllegalArgumentException e ) { fail ( ) ; e.printStackTrace ( ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }

Target:
public void testRunNormalInput ( ) { mProcessHelper = com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockProcessHelper ( CommandStatus.SUCCESS ) ; mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( createMockRunUtil ( "which" ) ) ; try { mTest.run ( mMockInvocationListener ) ; } catch ( java.lang.IllegalArgumentException e ) { fail ( ) ; e.printStackTrace ( ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }
Source:
private java.lang.String getLabel ( android.media.tv.TvTrackInfo track ) { if ( ( track.getLanguage ( ) ) != null ) { return new java.util.Locale ( track.getLanguage ( ) ) . getDisplayName ( ) ; } return getString ( R.string.default_language ) ; }

Target:
private java.lang.String getLabel ( android.media.tv.TvTrackInfo track , int trackIndex ) { if ( ( track.getLanguage ( ) ) != null ) { return new java.util.Locale ( track.getLanguage ( ) ) . getDisplayName ( ) ; } return getString ( R.string.closed_caption_unknown_language , ( trackIndex + 1 ) ) ; }
Source:
public void test_with_adjustment_OffsetDateTime ( ) { java.time.OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with ( java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2012 , 9 , 3 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2012 , 9 , 3 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }

Target:
public void test_with_adjustment_OffsetDateTime ( ) { java.time.OffsetDateTime test = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.with ( java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2012 , 9 , 3 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2012 , 9 , 3 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }
Source:
private boolean restoreDefaultApn ( ) { showDialog ( com.android.settings.ApnSettings.DIALOG_RESTORE_DEFAULTAPN ) ; com.android.settings.ApnSettings.mRestoreDefaultApnMode = true ; if ( ( mRestoreApnUiHandler ) == null ) { mRestoreApnUiHandler = new com.android.settings.ApnSettings.RestoreApnUiHandler ( ) ; } if ( ( mRestoreApnProcessHandler ) == null ) { android.os.HandlerThread restoreDefaultApnThread = new android.os.HandlerThread ( "Restore default APN Handler: Process Thread" ) ; restoreDefaultApnThread.start ( ) ; mRestoreApnProcessHandler = new com.android.settings.ApnSettings.RestoreApnProcessHandler ( restoreDefaultApnThread.getLooper ( ) , mRestoreApnUiHandler ) ; } mRestoreApnProcessHandler.sendEmptyMessage ( com.android.settings.ApnSettings.EVENT_RESTORE_DEFAULTAPN_START ) ; return true ; }

Target:
private boolean restoreDefaultApn ( ) { showDialog ( com.android.settings.ApnSettings.DIALOG_RESTORE_DEFAULTAPN ) ; com.android.settings.ApnSettings.mRestoreDefaultApnMode = true ; if ( ( mRestoreApnUiHandler ) == null ) { mRestoreApnUiHandler = new com.android.settings.ApnSettings.RestoreApnUiHandler ( ) ; } if ( ( ( mRestoreApnProcessHandler ) == null ) || ( ( mRestoreDefaultApnThread ) == null ) ) { mRestoreDefaultApnThread = new android.os.HandlerThread ( "Restore default APN Handler: Process Thread" ) ; mRestoreDefaultApnThread.start ( ) ; mRestoreApnProcessHandler = new com.android.settings.ApnSettings.RestoreApnProcessHandler ( mRestoreDefaultApnThread.getLooper ( ) , mRestoreApnUiHandler ) ; } mRestoreApnProcessHandler.sendEmptyMessage ( com.android.settings.ApnSettings.EVENT_RESTORE_DEFAULTAPN_START ) ; return true ; }
Source:
public void test_getLong_TemporalField ( ) { org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR ) , 2008 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.MONTH_OF_YEAR ) , 6 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR_OF_ERA ) , 2008 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.ERA ) , 1 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.PROLEPTIC_MONTH ) , ( ( ( 2008 * 12 ) + 6 ) - 1 ) ) ; }

Target:
public void test_get_TemporalField ( ) { org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.get ( java.time.temporal.ChronoField.YEAR ) , 2008 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.get ( java.time.temporal.ChronoField.MONTH_OF_YEAR ) , 6 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.get ( java.time.temporal.ChronoField.YEAR_OF_ERA ) , 2008 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.get ( java.time.temporal.ChronoField.ERA ) , 1 ) ; }
Source:
public static com.ibm.icu.util.ULocale forLocale ( java.util.Locale loc ) { if ( loc == null ) { return null ; } com.ibm.icu.util.ULocale result = com.ibm.icu.util.ULocale.CACHE.get ( loc ) ; if ( result == null ) { result = com.ibm.icu.util.ULocale.JDKLocaleHelper.toULocale ( loc ) ; com.ibm.icu.util.ULocale.CACHE.put ( loc , result ) ; } return result ; }

Target:
protected com.ibm.icu.util.ULocale createInstance ( java.util.Locale key , java.lang.Void unused ) { return com.ibm.icu.util.ULocale.JDKLocaleHelper.toULocale ( key ) ; }
Source:
public final void testPreload ( ) throws java.lang.Exception { java.util.Map < java.lang.String , com.android.ide.eclipse.adt.internal.resources.DeclareStyleableInfo > styleableList = preloadAndGetStyleables ( ) ; assertEquals ( ( "[AndroidManifest, " + ( ( ( ( ( "AndroidManifestActivityAlias, " + "AndroidManifestApplication, " ) + "AndroidManifestNewElement, " ) + "AndroidManifestNewParent, " ) + "AndroidManifestPermission" ) + "]" ) ) , java.util.Arrays.toString ( styleableList.keySet ( ) . toArray ( ) ) ) ; }

Target:
public final void testPreload ( ) throws java.lang.Exception { java.util.Map < java.lang.String , com.android.ide.common.resources.platform.DeclareStyleableInfo > styleableList = preloadAndGetStyleables ( ) ; assertEquals ( ( "[AndroidManifest, " + ( ( ( ( ( "AndroidManifestActivityAlias, " + "AndroidManifestApplication, " ) + "AndroidManifestNewElement, " ) + "AndroidManifestNewParent, " ) + "AndroidManifestPermission" ) + "]" ) ) , java.util.Arrays.toString ( styleableList.keySet ( ) . toArray ( ) ) ) ; }
Source:
public java.lang.Object getTargetSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { return com.android.xml.AndroidManifest.getTargetSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return - 1 ; }

Target:
public synchronized java.lang.Object getMinSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { if ( ( mMinSdkVersion ) == null ) { try { mMinSdkVersion = com.google.common.base.Optional.fromNullable ( com.android.xml.AndroidManifest.getMinSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } } return mMinSdkVersion.or ( 1 ) ; }
Source:
static synchronized java.util.logging.Level.KnownLevel findByLocalizedName ( java.lang.String name ) { for ( java.util.List < java.util.logging.Level.KnownLevel > levels : java.util.logging.Level.KnownLevel.nameToLevels.values ( ) ) { for ( java.util.logging.Level.KnownLevel l : levels ) { java.lang.String lname = l.levelObject.getLocalizedName ( ) ; if ( name.equals ( lname ) ) { return l ; } } } return null ; }

Target:
final java.lang.String getCachedLocalizedLevelName ( ) { if ( ( localizedLevelName ) != null ) { if ( ( cachedLocale ) != null ) { if ( cachedLocale.equals ( java.util.Locale.getDefault ( ) ) ) { return localizedLevelName ; } } } if ( ( resourceBundleName ) == null ) { return name ; } return null ; }
Source:
public void testOnMove ( ) { mTestAbstractCursor.resetOnMoveRet ( ) ; assertFalse ( mTestAbstractCursor.getOnMoveRet ( ) ) ; mTestAbstractCursor.moveToFirst ( ) ; mTestAbstractCursor.moveToPosition ( 5 ) ; assertTrue ( mTestAbstractCursor.getOnMoveRet ( ) ) ; assertEquals ( 0 , mTestAbstractCursor.getOldPos ( ) ) ; assertEquals ( 5 , mTestAbstractCursor.getNewPos ( ) ) ; }

Target:
public void testOnMove ( ) { assertFalse ( mTestAbstractCursor.getOnMoveRet ( ) ) ; mTestAbstractCursor.moveToFirst ( ) ; assertTrue ( mTestAbstractCursor.getOnMoveRet ( ) ) ; assertEquals ( 1 , mTestAbstractCursor.getRowsMovedSum ( ) ) ; mTestAbstractCursor.moveToPosition ( 5 ) ; assertTrue ( mTestAbstractCursor.getOnMoveRet ( ) ) ; assertEquals ( 6 , mTestAbstractCursor.getRowsMovedSum ( ) ) ; assertEquals ( 0 , mTestAbstractCursor.getOldPos ( ) ) ; assertEquals ( 5 , mTestAbstractCursor.getNewPos ( ) ) ; }
Source:
public boolean isMatchFor ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration referenceConfig ) { if ( referenceConfig == null ) { return false ; } for ( int i = 0 ; i < ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier testQualifier = mQualifiers [ i ] ; com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier referenceQualifier = referenceConfig.mQualifiers [ i ] ; if ( ( ( testQualifier != null ) && ( referenceQualifier != null ) ) && ( ( testQualifier.isMatchFor ( referenceQualifier ) ) == false ) ) { return false ; } } return true ; }

Target:
public boolean isMatchFor ( com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { if ( referenceConfig == null ) { return false ; } for ( int i = 0 ; i < ( com.android.ide.common.resources.configuration.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { com.android.ide.common.resources.configuration.ResourceQualifier testQualifier = mQualifiers [ i ] ; com.android.ide.common.resources.configuration.ResourceQualifier referenceQualifier = referenceConfig.mQualifiers [ i ] ; if ( ( ( testQualifier != null ) && ( referenceQualifier != null ) ) && ( ( testQualifier.isMatchFor ( referenceQualifier ) ) == false ) ) { return false ; } } return true ; }
Source:
public void queryCLIP ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_QUERY_CLIP , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getClip ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "queryCLIP" , e ) ; } } }

Target:
public void stopDtmf ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_DTMF_STOP , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.stopDtmf ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "stopDtmf" , e ) ; } } }
Source:
private android.bluetooth.BluetoothGattCharacteristic getCharacteristic ( java.util.UUID uuid ) { android.bluetooth.BluetoothGattService service = getService ( ) ; if ( service == null ) return null ; android.bluetooth.BluetoothGattCharacteristic characteristic = service.getCharacteristic ( uuid ) ; if ( characteristic == null ) { showMessage ( "Characteristic not found" ) ; return null ; } return characteristic ; }

Target:
private android.bluetooth.BluetoothGattService getService ( java.util.UUID serverUid ) { android.bluetooth.BluetoothGattService service = null ; if ( ( mBluetoothGatt ) != null ) { service = mBluetoothGatt.getService ( serverUid ) ; if ( service == null ) { showMessage ( "Service not found" ) ; } } return service ; }
Source:
public static byte [ ] macAddressToByteArray ( java.lang.String macStr ) { if ( macStr == null ) { throw new java.lang.IllegalArgumentException ( "null mac string" ) ; } if ( com.android.server.wifi.util.NativeUtil.ANY_MAC_STR.equals ( macStr ) ) return com.android.server.wifi.util.NativeUtil.ANY_MAC_BYTES ; java.lang.String cleanMac = macStr.replace ( ":" , "" ) ; if ( ( cleanMac.length ( ) ) != ( ( com.android.server.wifi.util.NativeUtil.MAC_LENGTH ) * 2 ) ) { throw new java.lang.IllegalArgumentException ( ( "invalid mac string length: " + cleanMac ) ) ; } return libcore.util.HexEncoding.decode ( cleanMac.toCharArray ( ) , false ) ; }

Target:
public static byte [ ] macAddressToByteArray ( java.lang.String macStr ) { if ( ( android.text.TextUtils.isEmpty ( macStr ) ) || ( com.android.server.wifi.util.NativeUtil.ANY_MAC_STR.equals ( macStr ) ) ) return com.android.server.wifi.util.NativeUtil.ANY_MAC_BYTES ; java.lang.String cleanMac = macStr.replace ( ":" , "" ) ; if ( ( cleanMac.length ( ) ) != ( ( com.android.server.wifi.util.NativeUtil.MAC_LENGTH ) * 2 ) ) { throw new java.lang.IllegalArgumentException ( ( "invalid mac string length: " + cleanMac ) ) ; } return libcore.util.HexEncoding.decode ( cleanMac.toCharArray ( ) , false ) ; }
Source:
public void testInstallWithBadlyFormedRulesVersion ( ) throws java.lang.Exception { final java.lang.String invalidRulesVersion = "203Bc" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( BundleVersion.FULL_BUNDLE_FORMAT_VERSION , invalidRulesVersion , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { final java.lang.String invalidRulesVersion = "203Bc" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( BundleVersion.FULL_BUNDLE_FORMAT_VERSION , invalidRulesVersion , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
private static java.lang.String createSettingsXmlContent ( java.lang.String content ) { java.lang.String mirror = java.lang.System.getProperty ( "idea.maven.test.mirror" , "http://maven.labs.intellij.net/remote-repos/" ) ; return ( ( ( ( ( ( ( ( ( ( "<settings>" + content ) + "<mirrors>" ) + " <mirror>" ) + " <id>jb-central-proxy</id>" ) + " <url>" ) + mirror ) + "</url>" ) + " <mirrorOf>*</mirrorOf>" ) + " </mirror>" ) + "</mirrors>" ) + "</settings>" ; }

Target:
private static java.lang.String createSettingsXmlContent ( java.lang.String content ) { java.lang.String mirror = java.lang.System.getProperty ( "idea.maven.test.mirror" , "http://maven.labs.intellij.net/repo" ) ; return ( ( ( ( ( ( ( ( ( ( "<settings>" + content ) + "<mirrors>" ) + " <mirror>" ) + " <id>jb-central-proxy</id>" ) + " <url>" ) + mirror ) + "</url>" ) + " <mirrorOf>external:*</mirrorOf>" ) + " </mirror>" ) + "</mirrors>" ) + "</settings>" ; }
Source:
private static int hash ( int h ) { h += ( h << 15 ) ^ - 12931 ; h ^= h > > > 10 ; h += h << 3 ; h ^= h > > > 6 ; h += ( h << 2 ) + ( h << 14 ) ; return h ^ ( h > > > 16 ) ; }

Target:
static final int spread ( int h ) { return ( h ^ ( h > > > 16 ) ) & ( java.util.concurrent.ConcurrentHashMap.HASH_BITS ) ; }
Source:
void addExtraAttributes ( org.w3c.dom.Document document , org.w3c.dom.Node node , java.lang.String namespaceUri ) { com.android.ide.common.res2.NodeUtils.addAttribute ( document , node , namespaceUri , com.android.ide.common.res2.ResourceFile.ATTR_QUALIFIER , getQualifiers ( ) ) ; }

Target:
void addExtraAttributes ( org.w3c.dom.Document document , org.w3c.dom.Node node , java.lang.String namespaceUri ) { com.android.ide.common.res2.NodeUtils.addAttribute ( document , node , namespaceUri , com.android.ide.common.res2.ResourceFile.ATTR_QUALIFIER , getQualifiers ( ) ) ; if ( ( getType ( ) ) == ( FileType.GENERATED_FILES ) ) { com.android.ide.common.res2.NodeUtils.addAttribute ( document , node , namespaceUri , SdkConstants.ATTR_PREPROCESSING , "true" ) ; } }
Source:
public void force ( boolean metadata ) throws java.io.IOException { checkOpen ( ) ; if ( ( ( mode ) & ( O_ACCMODE ) ) != ( O_RDONLY ) ) { try { if ( metadata ) { Libcore.os.fsync ( fd ) ; } else { Libcore.os.fdatasync ( fd ) ; } } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } }

Target:
public void force ( boolean metadata ) throws java.io.IOException { checkOpen ( ) ; if ( ( ( mode ) & ( O_ACCMODE ) ) != ( O_RDONLY ) ) { try { if ( metadata ) { Libcore.os.fsync ( fd ) ; } else { Libcore.os.fdatasync ( fd ) ; } } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , android.support.v8.renderscript.Allocation data , int dataXoff , int dataYoff ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data.getID ( mRS ) , dataXoff , dataYoff , data.mSelectedLOD , data.mSelectedFace.mID ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , long [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 8 ) ) ; }
Source:
private boolean simpleLaunch ( com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo , com.android.ddmlib.IDevice device ) { if ( ( checkBuildInfo ( launchInfo , device ) ) == false ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , "Launch canceled!" ) ; stopLaunch ( launchInfo ) ; return false ; } if ( ( syncApp ( launchInfo , device ) ) == false ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , "Launch canceled!" ) ; stopLaunch ( launchInfo ) ; return false ; } launchApp ( launchInfo , device ) ; return true ; }

Target:
private boolean simpleLaunch ( com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo , com.android.ddmlib.IDevice device ) { if ( ! ( doPreLaunchActions ( launchInfo , device ) ) ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , "Launch canceled!" ) ; stopLaunch ( launchInfo ) ; return false ; } launchApp ( launchInfo , device ) ; return true ; }
Source:
public void testStateTransition_DisconnectedToConnecting_Connect ( ) { mHeadsetStateMachine.sendMessage ( HeadsetStateMachine.CONNECT , mTestDevice ) ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.ASYNC_CALL_TIMEOUT_MILLIS ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetStateMachineTest.verifyConnectionStateBroadcast ( mTestDevice , BluetoothProfile.STATE_CONNECTING , BluetoothProfile.STATE_DISCONNECTED , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.Connecting.class ) ) ; }

Target:
public void testStateTransition_DisconnectedToConnecting_Connect ( ) { mHeadsetStateMachine.sendMessage ( HeadsetStateMachine.CONNECT , mTestDevice ) ; verify ( mHeadsetService , timeout ( com.android.bluetooth.hfp.HeadsetStateMachineTest.ASYNC_CALL_TIMEOUT_MILLIS ) ) . sendBroadcastAsUser ( mIntentArgument.capture ( ) , eq ( UserHandle.ALL ) , eq ( HeadsetService.BLUETOOTH_PERM ) ) ; com.android.bluetooth.hfp.HeadsetTestUtils.verifyConnectionStateBroadcast ( mTestDevice , BluetoothProfile.STATE_CONNECTING , BluetoothProfile.STATE_DISCONNECTED , mIntentArgument.getValue ( ) ) ; org.junit.Assert.assertThat ( mHeadsetStateMachine.getCurrentState ( ) , org.hamcrest.core.IsInstanceOf.instanceOf ( HeadsetStateMachine.Connecting.class ) ) ; }
Source:
public void setView ( int type , int i ) { float [ ] f = new float [ ] { } ; view = new android.opengl.cts.OpenGLES20ActivityTwo.OpenGLES20View ( this , type , i , f , mLatch ) ; setContentView ( view ) ; }

Target:
public void setView ( int type , int i , float [ ] vertexColors ) { android.view.Window window = getWindow ( ) ; window.addFlags ( ( ( ( ( ( WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD ) | ( WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON ) ) | ( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON ) ) | ( WindowManager.LayoutParams.FLAG_FULLSCREEN ) ) | ( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED ) ) ) ; view = new android.opengl.cts.OpenGLES20ActivityTwo.OpenGLES20View ( this , type , i , vertexColors , mLatch ) ; setContentView ( view ) ; }