auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void startFilterLookup ( com.android.server.telecom.Call call , com.android.server.telecom.callfiltering.CallFilterResultCallback callback ) { if ( mHasFinished ) { com.android.server.telecom.Log.w ( this , "Attempting to reuse CallScreeningServiceFilter. Ignoring." ) ; return ; } com.android.server.telecom.Log.event ( call , Log.Events.SCREENING_SENT ) ; mCall = call ; mCallback = callback ; if ( ! ( bindService ( ) ) ) { com.android.server.telecom.Log.i ( this , "Could not bind to call screening service" ) ; finishCallScreening ( ) ; } }

Target:
public void startFilterLookup ( com.android.server.telecom.Call call , com.android.server.telecom.callfiltering.CallFilterResultCallback callback ) { if ( mHasFinished ) { android.telecom.Log.w ( this , "Attempting to reuse CallScreeningServiceFilter. Ignoring." ) ; return ; } android.telecom.Log.addEvent ( call , LogUtils.Events.SCREENING_SENT ) ; mCall = call ; mCallback = callback ; if ( ! ( bindService ( ) ) ) { android.telecom.Log.i ( this , "Could not bind to call screening service" ) ; finishCallScreening ( ) ; } }
Source:
public boolean setAlias ( java.lang.String alias ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set Remote Device name" ) ; return false ; } try { return android.bluetooth.BluetoothDevice.sService.setRemoteAlias ( this , alias ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean setAlias ( java.lang.String alias ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set Remote Device name" ) ; return false ; } try { return service.setRemoteAlias ( this , alias ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public void shouldStartSupplicantWhenConnectModeRequested ( ) throws java.lang.Exception { when ( mWifiNative.startHal ( ) ) . thenReturn ( true ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "InitialState" , getCurrentState ( ) . getName ( ) ) ; org.junit.Assert.assertEquals ( WifiStateMachine.CONNECT_MODE , mWsm.getOperationalModeForTest ( ) ) ; mWsm.setOperationalMode ( WifiStateMachine.CONNECT_MODE ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "SupplicantStartingState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void shouldStartSupplicantWhenConnectModeRequested ( ) throws java.lang.Exception { when ( mWifiNative.startHal ( anyBoolean ( ) ) ) . thenReturn ( true ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "InitialState" , getCurrentState ( ) . getName ( ) ) ; org.junit.Assert.assertEquals ( WifiStateMachine.CONNECT_MODE , mWsm.getOperationalModeForTest ( ) ) ; mWsm.setOperationalMode ( WifiStateMachine.CONNECT_MODE ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "SupplicantStartingState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
private void showPopup ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.google.gct.login.ui.GoogleLoginUsersPanel usersPanel = new com.google.gct.login.ui.GoogleLoginUsersPanel ( ) ; com.intellij.openapi.ui.popup.ComponentPopupBuilder popup = com.intellij.openapi.ui.popup.JBPopupFactory.getInstance ( ) . createComponentPopupBuilder ( usersPanel , usersPanel.getList ( ) ) ; com.intellij.openapi.actionSystem.impl.ActionButton source = ( ( com.intellij.openapi.actionSystem.impl.ActionButton ) ( e.getInputEvent ( ) . getSource ( ) ) ) ; popup.createPopup ( ) . show ( new com.intellij.ui.awt.RelativePoint ( source , new java.awt.Point ( 0 , ( ( source.getHeight ( ) ) - 1 ) ) ) ) ; }

Target:
private void showPopup ( com.google.gct.login.ui.AnActionEvent e ) { com.google.gct.login.ui.GoogleLoginUsersPanel usersPanel = new com.google.gct.login.ui.GoogleLoginUsersPanel ( ) ; com.intellij.openapi.ui.popup.ComponentPopupBuilder popup = com.intellij.openapi.ui.popup.JBPopupFactory.getInstance ( ) . createComponentPopupBuilder ( usersPanel , usersPanel.getList ( ) ) ; javax.swing.JComponent source = ( ( javax.swing.JComponent ) ( e.getInputEvent ( ) . getSource ( ) ) ) ; popup.createPopup ( ) . show ( new com.intellij.ui.awt.RelativePoint ( source , new java.awt.Point ( 0 , ( ( source.getHeight ( ) ) - 1 ) ) ) ) ; }
Source:
private android.graphics.drawable.Drawable getCallProviderIcon ( com.android.incallui.Call call ) { android.telecom.PhoneAccount account = getAccountForCall ( call ) ; if ( ( account != null ) && ( getTelecomManager ( ) . hasMultipleCallCapableAccounts ( ) ) ) { return account.getIcon ( mContext ) ; } return null ; }

Target:
private android.graphics.drawable.Drawable getConferencePhoto ( com.android.incallui.Call call ) { boolean isGenericConference = call.can ( PhoneCapabilities.GENERIC_CONFERENCE ) ; com.android.incallui.Log.v ( this , ( "getConferencePhoto: " + isGenericConference ) ) ; final int resId = ( isGenericConference ) ? R.drawable.img_phone : R.drawable.img_conference ; android.graphics.drawable.Drawable photo = mContext.getResources ( ) . getDrawable ( resId ) ; photo.setAutoMirrored ( true ) ; return photo ; }
Source:
public boolean overlayVerticalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayVerticalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayVerticalScrollbar ( ) ; }

Target:
public android.net.http.SslCertificate getCertificate ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.net.http.SslCertificate ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.net.http.SslCertificate > ( ) { @ java.lang.Override public android.net.http.SslCertificate call ( ) { return getCertificate ( ) ; } } ) ; return ret ; } return mAwContents.getCertificate ( ) ; }
Source:
public static void deleteContents ( java.io.File dir ) throws java.io.IOException { java.io.File [ ] files = dir.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { if ( file.isDirectory ( ) ) { com.android.cts.externalstorageapp.CommonExternalStorageTest.deleteContents ( file ) ; } assertTrue ( file.delete ( ) ) ; } assertEquals ( 0 , dir.listFiles ( ) . length ) ; } }

Target:
public static void deleteContents ( java.io.File dir ) throws java.io.IOException { java.io.File [ ] files = dir.listFiles ( ) ; files = com.android.cts.externalstorageapp.CommonExternalStorageTest.removeWhiteList ( files ) ; if ( files != null ) { for ( java.io.File file : files ) { if ( file.isDirectory ( ) ) { com.android.cts.externalstorageapp.CommonExternalStorageTest.deleteContents ( file ) ; } assertTrue ( file.delete ( ) ) ; } java.io.File [ ] dirs = com.android.cts.externalstorageapp.CommonExternalStorageTest.removeWhiteList ( dir.listFiles ( ) ) ; assertEquals ( 0 , dirs.length ) ; } }
Source:
public com.android.builder.model.AndroidProject getSingleModel ( boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , emulateStudio_1_0 ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }

Target:
public com.android.builder.model.AndroidProject getSingleModel ( boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }
Source:
public boolean isValid ( ) { return ( templates [ 0 ] ) != null ; }

Target:
public android.icu.impl.SimplePatternFormatter getByVariant ( java.lang.CharSequence variant ) { assert isValid ( ) ; int idx = android.icu.impl.StandardPlural.indexOrOtherIndexFromString ( variant ) ; android.icu.impl.SimplePatternFormatter template = templates [ idx ] ; return ( template == null ) && ( idx != ( android.icu.impl.StandardPlural.OTHER_INDEX ) ) ? templates [ android.icu.impl.StandardPlural.OTHER_INDEX ] : template ; }
Source:
public void testResourceConfigMerge ( ) { com.android.builder.model.ProductFlavor productflavor = mCustom.mergeOver ( mCustom2 ) ; java.util.Collection < java.lang.String > configs = productflavor.getResourceConfigurations ( ) ; assertEquals ( 2 , configs.size ( ) ) ; assertTrue ( configs.contains ( "hdpi" ) ) ; assertTrue ( configs.contains ( "ldpi" ) ) ; }

Target:
public void testResourceConfigMerge ( ) { com.android.builder.model.ProductFlavor flavor = com.android.builder.core.DefaultProductFlavor.mergeFlavors ( mCustom2 , mCustom ) ; java.util.Collection < java.lang.String > configs = flavor.getResourceConfigurations ( ) ; assertEquals ( 2 , configs.size ( ) ) ; assertTrue ( configs.contains ( "hdpi" ) ) ; assertTrue ( configs.contains ( "ldpi" ) ) ; }
Source:
public boolean checkPassword ( java.lang.String password , int userId ) throws android.os.RemoteException { checkPasswordReadPermission ( userId ) ; byte [ ] hash = mLockPatternUtils.passwordToHash ( password , userId ) ; byte [ ] storedHash = mStorage.readPasswordHash ( userId ) ; if ( storedHash == null ) { return true ; } boolean matched = java.util.Arrays.equals ( hash , storedHash ) ; if ( matched && ( ! ( android.text.TextUtils.isEmpty ( password ) ) ) ) { maybeUpdateKeystore ( password , userId ) ; } return matched ; }

Target:
public boolean checkPassword ( java.lang.String password , int userId ) throws android.os.RemoteException { checkPasswordReadPermission ( userId ) ; byte [ ] hash = mLockPatternUtils.passwordToHash ( password , userId ) ; byte [ ] storedHash = mStorage.readPasswordHash ( userId ) ; if ( storedHash == null ) { return true ; } boolean matched = java.util.Arrays.equals ( hash , storedHash ) ; if ( matched && ( ! ( android.text.TextUtils.isEmpty ( password ) ) ) ) { unlockKeystore ( password , userId ) ; } return matched ; }
Source:
private static void processFailLoadAndGc ( ) throws Main.TestFailed { try { Main.BrokenDexLoader loader ; loader = new Main.BrokenDexLoader ( java.lang.ClassLoader.getSystemClassLoader ( ) ) ; loader.findBrokenClass ( ) ; java.lang.System.err.println ( "ERROR: Inaccessible was accessible" ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { java.lang.Throwable cause = ite.getCause ( ) ; if ( cause instanceof java.lang.NullPointerException ) { java.lang.System.err.println ( "Got expected ITE/NPE" ) ; } else { java.lang.System.err.println ( "Got unexpected ITE" ) ; ite.printStackTrace ( ) ; } } }

Target:
private static void processFailLoadAndGc ( ) throws Main.TestFailed { try { Main.BrokenDexLoader loader ; loader = new Main.BrokenDexLoader ( java.lang.ClassLoader.getSystemClassLoader ( ) ) ; loader.findBrokenClass ( ) ; java.lang.System.out.println ( "ERROR: Inaccessible was accessible" ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { java.lang.Throwable cause = ite.getCause ( ) ; if ( cause instanceof java.lang.NullPointerException ) { java.lang.System.out.println ( "Got expected ITE/NPE" ) ; } else { java.lang.System.out.println ( "Got unexpected ITE" ) ; ite.printStackTrace ( java.lang.System.out ) ; } } }
Source:
public int compare ( com.android.traceview.ThreadData td1 , com.android.traceview.ThreadData td2 ) { if ( ( td2.getCpuTime ( ) ) > ( td1.getCpuTime ( ) ) ) return 1 ; if ( ( td2.getCpuTime ( ) ) < ( td1.getCpuTime ( ) ) ) return - 1 ; return td2.getName ( ) . compareTo ( td1.getName ( ) ) ; }

Target:
public int compare ( com.android.traceview.ThreadData td1 , com.android.traceview.ThreadData td2 ) { if ( ( timeBase.getTime ( td2 ) ) > ( timeBase.getTime ( td1 ) ) ) return 1 ; if ( ( timeBase.getTime ( td2 ) ) < ( timeBase.getTime ( td1 ) ) ) return - 1 ; return td2.getName ( ) . compareTo ( td1.getName ( ) ) ; }
Source:
private void broadcastCatCmdIntent ( com.android.internal.telephony.cat.CatCmdMessage cmdMsg ) { android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_CMD_ACTION ) ; intent.putExtra ( "STK CMD" , cmdMsg ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; com.android.internal.telephony.cat.CatLog.d ( this , ( ( ( "Sending CmdMsg: " + cmdMsg ) + " on slotid:" ) + ( mSlotId ) ) ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }

Target:
private void broadcastCatCmdIntent ( com.android.internal.telephony.cat.CatCmdMessage cmdMsg ) { android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_CMD_ACTION ) ; intent.putExtra ( "STK CMD" , cmdMsg ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; intent.setComponent ( com.android.internal.telephony.cat.AppInterface.getDefaultSTKApplication ( ) ) ; com.android.internal.telephony.cat.CatLog.d ( this , ( ( ( "Sending CmdMsg: " + cmdMsg ) + " on slotid:" ) + ( mSlotId ) ) ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { setDeviceRotation ( 0 ) ; launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes orientationASizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; setDeviceRotation ( 1 ) ; final android.server.cts.ReportedSizes orientationBSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesRotate ( orientationASizes , orientationBSizes ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes orientationASizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; setDeviceRotation ( 1 ) ; final android.server.cts.ReportedSizes orientationBSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesRotate ( orientationASizes , orientationBSizes ) ; }
Source:
public void focusOut ( android.view.View view ) { synchronized ( mH ) { if ( android.view.inputmethod.InputMethodManager.DEBUG ) android.util.Log.v ( android.view.inputmethod.InputMethodManager.TAG , ( ( ( ( ( "focusOut: " + view ) + " mServedView=" ) + ( mServedView ) ) + " winFocus=" ) + ( view.hasWindowFocus ( ) ) ) ) ; if ( ( mServedView ) != view ) { if ( false && ( view.hasWindowFocus ( ) ) ) { mNextServedView = null ; android.view.inputmethod.InputMethodManager.scheduleCheckFocusLocked ( view ) ; } } } }

Target:
public void onViewDetachedFromWindow ( android.view.View view ) { synchronized ( mH ) { if ( android.view.inputmethod.InputMethodManager.DEBUG ) android.util.Log.v ( android.view.inputmethod.InputMethodManager.TAG , ( ( ( "onViewDetachedFromWindow: view=" + ( android.view.inputmethod.InputMethodManager.dumpViewInfo ( view ) ) ) + " mServedView=" ) + ( android.view.inputmethod.InputMethodManager.dumpViewInfo ( mServedView ) ) ) ) ; if ( ( mServedView ) == view ) { mNextServedView = null ; android.view.inputmethod.InputMethodManager.scheduleCheckFocusLocked ( view ) ; } } }
Source:
public java.util.List < android.net.wifi.WifiConfiguration > getPrivilegedConfiguredNetworks ( ) { enforceReadCredentialPermission ( ) ; enforceAccessPermission ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetPrivilegedConfiguredNetwork ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return null ; } }

Target:
public java.util.List < android.net.wifi.WifiConfiguration > getPrivilegedConfiguredNetworks ( ) { enforceReadCredentialPermission ( ) ; enforceAccessPermission ( ) ; mLog.trace ( "getPrivilegedConfiguredNetworks uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetPrivilegedConfiguredNetwork ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return null ; } }
Source:
public final void testAddAttributes1 ( ) { com.android.ide.common.layout.BaseLayout layout = new com.android.ide.common.layout.BaseLayout ( ) ; com.android.ide.common.api.IDragElement oldElement = com.android.ide.common.layout.TestDragElement.create ( "a.w.B" ) . id ( "@+id/foo" ) ; com.android.ide.common.api.INode newNode = com.android.ide.common.layout.TestNode.create ( "a.w.B" ) . id ( "@+id/foo" ) . set ( "u" , "key" , "value" ) . set ( "u" , "nothidden" , "nothiddenvalue" ) ; com.android.ide.common.layout.BaseLayout.AttributeFilter filter = null ; java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > idMap = null ; layout.addAttributes ( newNode , oldElement , idMap , filter ) ; assertEquals ( "value" , newNode.getStringAttr ( "u" , "key" ) ) ; assertEquals ( "nothiddenvalue" , newNode.getStringAttr ( "u" , "nothidden" ) ) ; }

Target:
public final void testAddAttributes1 ( ) { com.android.ide.common.layout.BaseLayoutRule layout = new com.android.ide.common.layout.BaseLayoutRule ( ) ; com.android.ide.common.api.IDragElement oldElement = com.android.ide.common.layout.TestDragElement.create ( "a.w.B" ) . id ( "@+id/foo" ) ; com.android.ide.common.api.INode newNode = com.android.ide.common.layout.TestNode.create ( "a.w.B" ) . id ( "@+id/foo" ) . set ( "u" , "key" , "value" ) . set ( "u" , "nothidden" , "nothiddenvalue" ) ; com.android.ide.common.layout.BaseLayoutRule.AttributeFilter filter = null ; java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > idMap = null ; layout.addAttributes ( newNode , oldElement , idMap , filter ) ; assertEquals ( "value" , newNode.getStringAttr ( "u" , "key" ) ) ; assertEquals ( "nothiddenvalue" , newNode.getStringAttr ( "u" , "nothidden" ) ) ; }
Source:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }

Target:
public boolean pageDown ( final boolean bottom ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return pageDown ( bottom ) ; } } ) ; return ret ; } return mAwContents.pageDown ( bottom ) ; }
Source:
public org.eclipse.swt.graphics.Color getBackground ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.NEW_AVAILABLE ) ) { } else if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.UPDATE_AVAILABLE ) ) { return mColorUpdate ; } } return null ; }

Target:
public org.eclipse.swt.graphics.Color getBackground ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.HAS_UPDATE ) ) { return mColorUpdate ; } } return null ; }
Source:
public java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedClass cls ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findClass ( cls ) ; if ( c == null ) { return null ; } return c.annotations ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedClass cls , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findClass ( cls ) ; if ( c == null ) { return null ; } java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = c.getAnnotations ( ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }
Source:
private static int indexOf ( java.lang.Object o , java.lang.Object [ ] elements , int index , int fence ) { if ( o == null ) { for ( int i = index ; i < fence ; i ++ ) if ( ( elements [ i ] ) == null ) return i ; } else { for ( int i = index ; i < fence ; i ++ ) if ( o.equals ( elements [ i ] ) ) return i ; } return - 1 ; }

Target:
public E remove ( int index ) { synchronized ( this ) { slice.checkElementIndex ( index ) ; slice.checkConcurrentModification ( elements ) ; E removed = this . remove ( ( ( slice.from ) + index ) ) ; slice = new java.util.concurrent.CopyOnWriteArrayList.Slice ( elements , slice.from , ( ( slice.to ) - 1 ) ) ; return removed ; } }
Source:
public boolean canReportAsInvalidNumber ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return false ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo peopleApiInfo = phoneLookupInfo.getPeopleApiInfo ( ) ; return ( ( peopleApiInfo.getInfoType ( ) ) != ( com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo.InfoType.UNKNOWN ) ) && ( ! ( peopleApiInfo.getPersonId ( ) . isEmpty ( ) ) ) ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public boolean canReportAsInvalidNumber ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PHONE_NUMBER_CACHE : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return false ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo peopleApiInfo = phoneLookupInfo.getPeopleApiInfo ( ) ; return ( ( peopleApiInfo.getInfoType ( ) ) != ( com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo.InfoType.UNKNOWN ) ) && ( ! ( peopleApiInfo.getPersonId ( ) . isEmpty ( ) ) ) ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
private static boolean willWorkForMulticast ( java.net.NetworkInterface iface ) throws java.io.IOException { return ( ( ( ( iface.isUp ( ) ) && ( ! ( iface.isLoopback ( ) ) ) ) && ( ! ( iface.isPointToPoint ( ) ) ) ) && ( iface.supportsMulticast ( ) ) ) && ( iface.getInetAddresses ( ) . hasMoreElements ( ) ) ; }

Target:
private static boolean willWorkForMulticast ( java.net.NetworkInterface iface ) throws java.io.IOException { return ( ( ( ( ( iface.isUp ( ) ) && ( ( ( org.apache.harmony.tests.java.net.MulticastSocketTest.getOsFlags ( iface ) ) & ( android.system.OsConstants.IFF_RUNNING ) ) != 0 ) ) && ( ! ( iface.isLoopback ( ) ) ) ) && ( ! ( iface.isPointToPoint ( ) ) ) ) && ( iface.supportsMulticast ( ) ) ) && ( iface.getInetAddresses ( ) . hasMoreElements ( ) ) ; }
Source:
public boolean apply ( @ com.android.annotations.Nullable java.io.File file ) { return ( file != null ) && ( ! ( SdkConstants.FN_FRAMEWORK_LIBRARY.equals ( file.getName ( ) ) ) ) ; }

Target:
private void createUnitTestTask ( @ com.android.annotations.NonNull com.android.build.gradle.internal.TaskFactory tasks , @ com.android.annotations.NonNull final com.android.build.gradle.internal.scope.VariantScope variantScope ) { final com.android.build.gradle.internal.scope.AndroidTask < org.gradle.api.tasks.testing.Test > runtTestsTask = androidTasks.create ( tasks , new com.android.build.gradle.tasks.factory.UnitTestConfigAction ( variantScope ) ) ; runtTestsTask.dependsOn ( tasks , variantScope.getVariantData ( ) . assembleVariantTask ) ; tasks.named ( JavaPlugin.TEST_TASK_NAME , new org.gradle.api.Action < org.gradle.api.Task > ( ) { @ java.lang.Override public void execute ( org.gradle.api.Task test ) { test.dependsOn ( runtTestsTask.getName ( ) ) ; } } ) ; }
Source:
public void addLayoutActions ( java.util.List < com.android.ide.common.api.MenuAction > actions , final com.android.ide.common.api.INode parentNode , final java.util.List < ? extends com.android.ide.common.api.INode > children ) { super . addLayoutActions ( actions , parentNode , children ) ; actions.add ( com.android.ide.common.api.MenuAction.createSeparator ( 25 ) ) ; actions.add ( createMarginAction ( parentNode , children ) ) ; if ( ( children.size ( ) ) > 0 ) { actions.add ( createGravityAction ( children ) ) ; } }

Target:
public void addLayoutActions ( java.util.List < com.android.ide.common.api.MenuAction > actions , final com.android.ide.common.api.INode parentNode , final java.util.List < ? extends com.android.ide.common.api.INode > children ) { super . addLayoutActions ( actions , parentNode , children ) ; actions.add ( com.android.ide.common.api.MenuAction.createSeparator ( 25 ) ) ; actions.add ( createMarginAction ( parentNode , children ) ) ; if ( ( children.size ( ) ) > 0 ) { actions.add ( createGravityAction ( children , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_GRAVITY ) ) ; } }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; int retCode = - 1 ; synchronized ( mInstallLock ) { retCode = mInstaller.freeCache ( volumeUuid , freeStorageSize ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "Couldn't clear application caches" ) ; } } if ( observer != null ) { try { observer.onRemoveCompleted ( null , ( retCode >= 0 ) ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "RemoveException when invoking call back" ) ; } } }

Target:
public void run ( ) { mHandler.removeCallbacks ( this ) ; boolean success = true ; synchronized ( mInstallLock ) { try { mInstaller.freeCache ( volumeUuid , freeStorageSize ) ; } catch ( com.android.internal.os.InstallerConnection.InstallerException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( "Couldn't clear application caches: " + e ) ) ; success = false ; } } if ( observer != null ) { try { observer.onRemoveCompleted ( null , success ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "RemoveException when invoking call back" ) ; } } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( BluetoothAdapter.ACTION_STATE_CHANGED ) ) { switch ( intent.getIntExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.ERROR ) ) { case android.bluetooth.BluetoothAdapter.STATE_ON : if ( com.android.bluetooth.opp.BluetoothOppService.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppService.TAG , "Receiver BLUETOOTH_STATE_CHANGED_ACTION, BLUETOOTH_STATE_ON" ) ; startSocketListener ( ) ; break ; case android.bluetooth.BluetoothAdapter.STATE_TURNING_OFF : if ( com.android.bluetooth.opp.BluetoothOppService.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppService.TAG , "Receiver DISABLED_ACTION " ) ; mHandler.sendMessage ( mHandler.obtainMessage ( com.android.bluetooth.opp.BluetoothOppService.STOP_LISTENER ) ) ; break ; } } }

Target:
private void unregisterReceivers ( ) { try { if ( ( mObserver ) != null ) { getContentResolver ( ) . unregisterContentObserver ( mObserver ) ; mObserver = null ; } unregisterReceiver ( mBluetoothReceiver ) ; } catch ( java.lang.IllegalArgumentException e ) { android.util.Log.w ( com.android.bluetooth.opp.BluetoothOppService.TAG , ( "unregisterReceivers already " + ( e.toString ( ) ) ) ) ; } }
Source:
public void onResume ( ) { super . onResume ( ) ; boolean conn = checkNow ( this . getApplicationContext ( ) ) ; android.content.Intent returnIntent = new android.content.Intent ( ) ; returnIntent.putExtra ( com.android.tests.connectivity.uid.ConnectivityTestActivity.RESULT , conn ) ; setResult ( com.android.tests.connectivity.uid.RESULT_OK , returnIntent ) ; finish ( ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.os.StrictMode.ThreadPolicy policy = new android.os.StrictMode.ThreadPolicy.Builder ( ) . permitAll ( ) . build ( ) ; android.os.StrictMode.setThreadPolicy ( policy ) ; mContext = this . getApplicationContext ( ) ; mConnectivityManager = ( ( android.net.ConnectivityManager ) ( mContext.getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mDownloadManager = ( ( android.app.DownloadManager ) ( mContext.getSystemService ( Context.DOWNLOAD_SERVICE ) ) ) ; }
Source:
private synchronized void onGetReport ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onApplicationStateChangedFromNative ( android.bluetooth.BluetoothDevice device , boolean registered ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onApplicationStateChanged(): registered=" + registered ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_APPLICATION_STATE_CHANGED ) ; msg.obj = device ; msg.arg1 = ( registered ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; }
Source:
private void sendResponse ( int resId , boolean confirmed ) { android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( StkAppService.OPCODE , StkAppService.OP_RESPONSE ) ; args.putInt ( StkAppService.RES_ID , resId ) ; args.putBoolean ( StkAppService.CONFIRMATION , confirmed ) ; startService ( new android.content.Intent ( this , com.android.stk.StkAppService.class ) . putExtras ( args ) ) ; }

Target:
private void sendResponse ( int resId , boolean confirmed ) { android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( StkAppService.OPCODE , StkAppService.OP_RESPONSE ) ; args.putInt ( StkAppService.RES_ID , resId ) ; args.putBoolean ( StkAppService.CONFIRMATION , confirmed ) ; startService ( new android.content.Intent ( this , com.android.stk.StkAppService.class ) . putExtras ( args ) ) ; mIsResponseSent = true ; }
Source:
public com.android.sdklib.IAndroidTarget resolveTarget ( java.lang.String target , com.android.utils.ILogger logger ) { com.android.sdklib.SdkManager manager = com.android.sdklib.SdkManager.createManager ( mSdkLocation , logger ) ; if ( manager != null ) { return manager.getTargetFromHashString ( target ) ; } else { throw new java.lang.RuntimeException ( "failed to parse SDK!" ) ; } }

Target:
public com.android.sdklib.IAndroidTarget resolveTarget ( java.lang.String target , com.android.utils.ILogger logger ) { if ( ( mManager ) == null ) { mManager = com.android.sdklib.SdkManager.createManager ( mSdkLocation , logger ) ; if ( ( mManager ) == null ) { throw new java.lang.RuntimeException ( "failed to parse SDK!" ) ; } } return mManager.getTargetFromHashString ( target ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeString ( realm ) ; dest.writeParcelable ( userCredential , flags ) ; dest.writeParcelable ( certCredential , flags ) ; dest.writeParcelable ( simCredential , flags ) ; android.net.wifi.ParcelUtil.writeCertificate ( dest , caCertificate ) ; android.net.wifi.ParcelUtil.writeCertificates ( dest , clientCertificateChain ) ; android.net.wifi.ParcelUtil.writePrivateKey ( dest , clientPrivateKey ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeLong ( creationTimeInMs ) ; dest.writeLong ( expirationTimeInMs ) ; dest.writeString ( realm ) ; dest.writeInt ( ( checkAAAServerCertStatus ? 1 : 0 ) ) ; dest.writeParcelable ( userCredential , flags ) ; dest.writeParcelable ( certCredential , flags ) ; dest.writeParcelable ( simCredential , flags ) ; android.net.wifi.ParcelUtil.writeCertificate ( dest , caCertificate ) ; android.net.wifi.ParcelUtil.writeCertificates ( dest , clientCertificateChain ) ; android.net.wifi.ParcelUtil.writePrivateKey ( dest , clientPrivateKey ) ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mView = new android.opengl.GLSurfaceView ( this ) ; mView.setEGLContextClientVersion ( 2 ) ; mView.setRenderer ( new android.graphics.cts.CameraGpuCtsActivity.Renderer ( ) ) ; mView.setRenderMode ( GLSurfaceView.RENDERMODE_CONTINUOUSLY ) ; mFinishedRendering = new java.util.concurrent.CountDownLatch ( 100 ) ; requestWindowFeature ( Window.FEATURE_NO_TITLE ) ; setContentView ( mView ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mNativeRendererInitialized = new java.util.concurrent.Semaphore ( 0 ) ; mView = new android.opengl.GLSurfaceView ( this ) ; mView.setEGLContextClientVersion ( 2 ) ; mView.setRenderer ( new android.graphics.cts.CameraGpuCtsActivity.Renderer ( ) ) ; mView.setRenderMode ( GLSurfaceView.RENDERMODE_CONTINUOUSLY ) ; mFinishedRendering = new java.util.concurrent.CountDownLatch ( 100 ) ; requestWindowFeature ( Window.FEATURE_NO_TITLE ) ; setContentView ( mView ) ; }
Source:
private void sendIntentToReceiver ( final java.lang.String intentName , final java.lang.String extraName , final boolean extraValue ) { android.content.Intent intent = new android.content.Intent ( intentName ) ; intent.setClassName ( BluetoothPbapService.THIS_PACKAGE_NAME , com.android.bluetooth.pbap.BluetoothPbapReceiver.class . getName ( ) ) ; if ( extraName != null ) { intent.putExtra ( extraName , extraValue ) ; } sendBroadcast ( intent ) ; }

Target:
private void sendIntentToReceiver ( final java.lang.String intentName , final java.lang.String extraName , final boolean extraValue ) { android.content.Intent intent = new android.content.Intent ( intentName ) ; intent.setPackage ( BluetoothPbapService.THIS_PACKAGE_NAME ) ; if ( extraName != null ) { intent.putExtra ( extraName , extraValue ) ; } sendBroadcast ( intent ) ; }
Source:
public void testVFE17 ( ) { try { new dot.junit.opcodes.invoke_direct.d.T_invoke_direct_13 ( ) . run ( ) ; fail ( "expected NoSuchMethodError or verification exception" ) ; } catch ( java.lang.NoSuchMethodError t ) { } catch ( java.lang.Throwable t ) { dot.junit.DxUtil.checkVerifyException ( t ) ; } }

Target:
public void testVFE15 ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "dot.junit.opcodes.invoke_direct.d.T_invoke_direct_11" ) ; java.lang.Object o = c.newInstance ( ) ; java.lang.reflect.Method m = c.getDeclaredMethod ( "run" ) ; m.invoke ( o ) ; fail ( "expected an invocation target exception with an incompatible class change error" ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { if ( ! ( ( ite.getCause ( ) ) instanceof java.lang.IncompatibleClassChangeError ) ) { fail ( "expected an incompatible class change error" ) ; } } catch ( java.lang.Throwable t ) { throw new java.lang.RuntimeException ( t ) ; } }
Source:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } return ( ( com.android.ims.ImsManager.isVtEnabledByPlatform ( mPhone.getContext ( ) ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( mPhone.getContext ( ) ) ) ) && ( com.android.ims.ImsManager.isVtEnabledByUser ( mPhone.getContext ( ) ) ) ; }

Target:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }
Source:
protected sun.util.locale.BaseLocale createObject ( sun.util.locale.BaseLocale.Key key ) { return new sun.util.locale.BaseLocale ( key.lang , key.scrt , key.regn , key.vart ) ; }

Target:
protected sun.util.locale.BaseLocale.Key normalizeKey ( sun.util.locale.BaseLocale.Key key ) { assert ( ( ( ( key.lang.get ( ) ) != null ) && ( ( key.scrt.get ( ) ) != null ) ) && ( ( key.regn.get ( ) ) != null ) ) && ( ( key.vart.get ( ) ) != null ) ; return sun.util.locale.BaseLocale.Key.normalize ( key ) ; }
Source:
public boolean checkForCondition ( ) { android.support.test.uiautomator.UiObject skipButton = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.GOOGLE_NOW_WELCOME_SKIP_RES ) ) ; try { if ( skipButton.exists ( ) ) { skipButton.clickAndWaitForNewWindow ( ) ; return true ; } else { return false ; } } catch ( java.lang.Exception e ) { junit.framework.Assert.fail ( e.getStackTrace ( ) . toString ( ) ) ; return false ; } }

Target:
public boolean checkForCondition ( ) { android.support.test.uiautomator.UiObject skipButton = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.GOOGLE_NOW_WELCOME_SKIP_RES ) ) ; try { if ( skipButton.exists ( ) ) { skipButton.clickAndWaitForNewWindow ( ) ; return true ; } else { return false ; } } catch ( java.lang.Exception e ) { org.junit.Assert.fail ( e.getStackTrace ( ) . toString ( ) ) ; return false ; } }
Source:
public void testExtraPathWithSlash ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:extra> <r:revision>1</r:revision> <r:path>path/cannot\\contain\\segments</r:path> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:extra>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-pattern-valid: Value \'path/cannot\\\\contain\\\\segments\' is not facet-valid with respect to pattern.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testIncompleteContentXml ( ) throws java.lang.Exception { java.lang.String document = ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:platform> <r:api-level>1</r:api-level> <r:libs /> </r:platform>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-complex-type.2.4.a: Invalid content was found.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
public int await ( ) { try { return super . await ( ( 2 * ( jsr166.JSR166TestCase.LONG_DELAY_MS ) ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.util.concurrent.TimeoutException e ) { throw new jsr166.AssertionFailedError ( "timed out" ) ; } catch ( java.lang.Exception e ) { jsr166.AssertionFailedError afe = new jsr166.AssertionFailedError ( ( "Unexpected exception: " + e ) ) ; afe.initCause ( e ) ; throw afe ; } }

Target:
public int await ( ) { try { return super . await ( ( 2 * ( jsr166.JSR166TestCase.LONG_DELAY_MS ) ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.util.concurrent.TimeoutException timedOut ) { throw new junit.framework.AssertionFailedError ( "timed out" ) ; } catch ( java.lang.Exception fail ) { junit.framework.AssertionFailedError afe = new junit.framework.AssertionFailedError ( ( "Unexpected exception: " + fail ) ) ; afe.initCause ( fail ) ; throw afe ; } }
Source:
private boolean isReplaceableAppend ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node ) { if ( node instanceof com.android.jack.ir.ast.JMethodCall ) { com.android.jack.ir.ast.JMethodCall call = ( ( com.android.jack.ir.ast.JMethodCall ) ( node ) ) ; return ( ( call.getMethodName ( ) . equals ( com.android.jack.transformations.ast.ConcatRemover.APPEND_METHOD_NAME ) ) && ( call.getType ( ) . equals ( stringBuilder ) ) ) && ( call.getReceiverType ( ) . equals ( stringBuilder ) ) ; } else { return false ; } }

Target:
private boolean isReplaceableAppend ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node ) { if ( node instanceof com.android.jack.ir.ast.JMethodCall ) { com.android.jack.ir.ast.JMethodCall call = ( ( com.android.jack.ir.ast.JMethodCall ) ( node ) ) ; return ( ( call.getMethodName ( ) . equals ( com.android.jack.transformations.ast.ConcatRemover.APPEND_METHOD_NAME ) ) && ( call.getType ( ) . isSameType ( getStringBuilder ( ) ) ) ) && ( call.getReceiverType ( ) . isSameType ( getStringBuilder ( ) ) ) ; } else { return false ; } }
Source:
public void testRegisterAppConfiguration ( ) { com.android.bluetooth.hdp.HealthService testService = new com.android.bluetooth.hdp.HealthService ( ) ; testService.attach ( getInstrumentation ( ) . getContext ( ) , null , null , null , null , null ) ; assertEquals ( false , testService.registerAppConfiguration ( null , null ) ) ; }

Target:
public void testRegisterAppConfiguration ( ) { org.junit.Assert.assertEquals ( false , mService.registerAppConfiguration ( null , null ) ) ; }
Source:
public void fillOval ( int x1 , int y1 , int x2 , int y2 ) { checkGC ( ) ; int x = mHScale.translate ( x1 ) ; int y = mVScale.translate ( y1 ) ; int w = mHScale.scale ( ( x2 - x1 ) ) ; int h = mVScale.scale ( ( y2 - y1 ) ) ; getGc ( ) . fillOval ( x , y , w , h ) ; }

Target:
public void fillOval ( com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r ) { checkGC ( ) ; useFillAlpha ( ) ; int x = mHScale.translate ( r.x ) ; int y = mVScale.translate ( r.y ) ; int w = mHScale.scale ( r.w ) ; int h = mVScale.scale ( r.h ) ; getGc ( ) . fillOval ( x , y , w , h ) ; }
Source:
public com.android.internal.telephony.UiccCardApplication getUiccCardApplication ( int family ) { if ( ( mUiccCard ) != null ) { return mUiccCard.getApplication ( family ) ; } return null ; }

Target:
public com.android.internal.telephony.uicc.IccFileHandler getIccFileHandler ( int family ) { synchronized ( com.android.internal.telephony.uicc.UiccController.mLock ) { if ( ( mUiccCard ) != null ) { com.android.internal.telephony.uicc.UiccCardApplication app = mUiccCard.getApplication ( family ) ; if ( app != null ) { return app.getIccFileHandler ( ) ; } } return null ; } }
Source:
public int patchoat ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.patchoat ( apkPath , uid , isPublic , pkgName , instructionSet ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet , int dexoptNeeded ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , instructionSet , dexoptNeeded ) ; }