auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean p2pReinvoke ( int netId , java.lang.String deviceAddress ) { if ( ( android.text.TextUtils.isEmpty ( deviceAddress ) ) || ( netId < 0 ) ) return false ; return doBooleanCommand ( ( ( ( "P2P_INVITE persistent=" + netId ) + " peer=" ) + deviceAddress ) ) ; }

Target:
public boolean p2pReinvoke ( int netId , java.lang.String deviceAddress ) { if ( ( android.text.TextUtils.isEmpty ( deviceAddress ) ) || ( netId < 0 ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.reinvoke ( netId , deviceAddress ) ; } else { return doBooleanCommand ( ( ( ( "P2P_INVITE persistent=" + netId ) + " peer=" ) + deviceAddress ) ) ; } }
Source:
public void mergeConference ( ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "merging conference calls without a connection service." ) ; } else if ( can ( Connection.CAPABILITY_MERGE_CONFERENCE ) ) { com.android.server.telecom.Log.event ( this , Log.Events.CONFERENCE_WITH ) ; mConnectionService.mergeConference ( this ) ; mWasConferencePreviouslyMerged = true ; } }

Target:
public void mergeConference ( ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "merging conference calls without a connection service." ) ; } else if ( can ( Connection.CAPABILITY_MERGE_CONFERENCE ) ) { android.telecom.Log.addEvent ( this , LogUtils.Events.CONFERENCE_WITH ) ; mConnectionService.mergeConference ( this ) ; mWasConferencePreviouslyMerged = true ; } }
Source:
protected java.lang.String getResizeUpdateMessage ( com.android.ide.common.layout.BaseLayoutRule.ResizeState resizeState , com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.Rect newBounds , com.android.ide.common.api.SegmentType horizontalEdge , com.android.ide.common.api.SegmentType verticalEdge ) { java.lang.String width = ( resizeState.wrapWidth ) ? com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT : java.lang.String.format ( com.android.ide.common.layout.LayoutConstants.VALUE_N_DP , mRulesEngine.pxToDp ( newBounds.w ) ) ; java.lang.String height = ( resizeState.wrapHeight ) ? com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT : java.lang.String.format ( com.android.ide.common.layout.LayoutConstants.VALUE_N_DP , mRulesEngine.pxToDp ( newBounds.h ) ) ; return java.lang.String.format ( "Resize to %s × %s" , width , height ) ; }

Target:
protected java.lang.String getResizeUpdateMessage ( com.android.ide.common.layout.ResizeState resizeState , com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.Rect newBounds , com.android.ide.common.api.SegmentType horizontalEdge , com.android.ide.common.api.SegmentType verticalEdge ) { java.lang.String width = resizeState.getWidthAttribute ( ) ; java.lang.String height = resizeState.getHeightAttribute ( ) ; return java.lang.String.format ( "Resize to %s × %s" , width , height ) ; }
Source:
public void testUpdate_recommendationsDisabled ( ) { java.util.ArrayList < com.android.server.wifi.ScanDetail > scanDetails = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.when ( mFrameworkFacade.getIntegerSetting ( mContext , Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED , 0 ) ) . thenReturn ( 0 ) ; mRecommendedNetworkEvaluator.mContentObserver.onChange ( false ) ; mRecommendedNetworkEvaluator.update ( scanDetails ) ; org.mockito.Mockito.verifyZeroInteractions ( mNetworkScoreManager ) ; org.mockito.Mockito.verify ( mWifiConfigManager ) . updateNetworkNotRecommended ( mTrustedWifiConfiguration.networkId , false ) ; }

Target:
public void testUpdate_recommendationsDisabled ( ) { java.util.ArrayList < com.android.server.wifi.ScanDetail > scanDetails = new java.util.ArrayList < > ( ) ; when ( mFrameworkFacade.getIntegerSetting ( mContext , Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED , 0 ) ) . thenReturn ( 0 ) ; mContentObserver.onChange ( false ) ; mRecommendedNetworkEvaluator.update ( scanDetails ) ; verifyZeroInteractions ( mNetworkScoreManager ) ; verify ( mWifiConfigManager ) . updateNetworkNotRecommended ( mTrustedWifiConfiguration.networkId , false ) ; }
Source:
public static void assertEquals ( java.lang.String message , java.lang.String expected , java.lang.String actual ) { if ( ( expected == null ) && ( actual == null ) ) return ; if ( ( expected != null ) && ( expected.equals ( actual ) ) ) return ; throw new junit.framework.ComparisonFailure ( message , expected , actual ) ; }

Target:
public static void assertEquals ( java.lang.String message , java.lang.String expected , java.lang.String actual ) { if ( ( expected == null ) && ( actual == null ) ) return ; if ( ( expected != null ) && ( expected.equals ( actual ) ) ) return ; java.lang.String cleanMessage = ( message == null ) ? "" : message ; throw new junit.framework.ComparisonFailure ( cleanMessage , expected , actual ) ; }
Source:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-15" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; }

Target:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-15" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; com.android.builder.model.JavaCompileOptions javaCompileOptions = model.getJavaCompileOptions ( ) ; assertEquals ( "1.6" , javaCompileOptions.getSourceCompatibility ( ) ) ; assertEquals ( "1.6" , javaCompileOptions.getTargetCompatibility ( ) ) ; }
Source:
public com.android.build.gradle.internal.variant.ApplicationVariantData createVariantData ( @ com.android.annotations.NonNull com.android.builder.core.VariantConfiguration variantConfiguration , @ com.android.annotations.NonNull java.util.Set < java.lang.String > densities , @ com.android.annotations.NonNull java.util.Set < java.lang.String > abis ) { com.android.build.gradle.internal.variant.ApplicationVariantData variant = new com.android.build.gradle.internal.variant.ApplicationVariantData ( basePlugin , variantConfiguration ) ; for ( java.lang.String density : densities ) { for ( java.lang.String abi : abis ) { variant.createOutput ( density , abi ) ; } } return variant ; }

Target:
public com.android.build.gradle.internal.variant.ApplicationVariantData createVariantData ( @ com.android.annotations.NonNull com.android.builder.core.VariantConfiguration variantConfiguration , @ com.android.annotations.NonNull java.util.Set < java.lang.String > densities , @ com.android.annotations.NonNull java.util.Set < java.lang.String > abis , @ com.android.annotations.NonNull java.util.Set < java.lang.String > compatibleScreens ) { com.android.build.gradle.internal.variant.ApplicationVariantData variant = new com.android.build.gradle.internal.variant.ApplicationVariantData ( basePlugin , variantConfiguration ) ; if ( ! ( densities.isEmpty ( ) ) ) { variant.setCompatibleScreens ( compatibleScreens ) ; } for ( java.lang.String density : densities ) { for ( java.lang.String abi : abis ) { variant.createOutput ( density , abi ) ; } } return variant ; }
Source:
public java.util.Set < vogar.tasks.Task > installTasks ( ) { java.util.Set < vogar.tasks.Task > result = new java.util.HashSet < vogar.tasks.Task > ( ) ; for ( java.io.File classpathElement : run.classpath.getElements ( ) ) { java.lang.String name = run.basenameOfJar ( classpathElement ) ; result.add ( new vogar.android.DexTask ( run.androidSdk , run.classpath , run.benchmark , name , classpathElement , null , run.localDexFile ( name ) ) ) ; } result.add ( new vogar.tasks.MkdirTask ( run.mkdir , dalvikCache ( ) ) ) ; return result ; }

Target:
public java.util.Set < vogar.tasks.Task > installTasks ( ) { java.util.Set < vogar.tasks.Task > result = new java.util.HashSet < vogar.tasks.Task > ( ) ; for ( java.io.File classpathElement : run.classpath.getElements ( ) ) { java.lang.String name = run.basenameOfJar ( classpathElement ) ; java.io.File localDex = run.localDexFile ( name ) ; result.add ( createCreateDexJarTask ( run.classpath , classpathElement , name , null , localDex ) ) ; } result.add ( new vogar.tasks.MkdirTask ( run.mkdir , dalvikCache ( ) ) ) ; return result ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , float [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFrom ( int off , int count , float [ ] d ) { validateIsFloat32 ( ) ; copy1DRangeFromUnchecked ( off , count , d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
public V2 apply ( V1 value ) { return transformer.transformEntry ( key , value ) ; }

Target:
java.util.Collection < V2 > transform ( K key , java.util.Collection < V1 > values ) { com.google.common.base.Function < ? super V1 , V2 > function = com.google.common.collect.Maps.asValueToValueFunction ( transformer , key ) ; if ( values instanceof java.util.List ) { return com.google.common.collect.Lists.transform ( ( ( java.util.List < V1 > ) ( values ) ) , function ) ; } else { return com.google.common.collect.Collections2.transform ( values , function ) ; } }
Source:
public void iccCloseLogicalChannel ( int channel , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_CLOSE_CHANNEL , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( channel ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void setCdmaBroadcastActivation ( boolean activate , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_BROADCAST_ACTIVATION , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( activate ? 0 : 1 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public void scrollTo ( int x , int y ) { if ( ( ( mScrollX ) != x ) || ( ( mScrollY ) != y ) ) { int oldX = mScrollX ; int oldY = mScrollY ; mScrollX = x ; mScrollY = y ; onScrollChanged ( mScrollX , mScrollY , oldX , oldY ) ; if ( ! ( awakenScrollBars ( ) ) ) { invalidate ( ) ; } } }

Target:
public void scrollTo ( int x , int y ) { if ( ( ( mScrollX ) != x ) || ( ( mScrollY ) != y ) ) { int oldX = mScrollX ; int oldY = mScrollY ; mScrollX = x ; mScrollY = y ; invalidateParentCaches ( ) ; onScrollChanged ( mScrollX , mScrollY , oldX , oldY ) ; if ( ! ( awakenScrollBars ( ) ) ) { invalidate ( true ) ; } } }
Source:
public void requestUninstall_asyncUninstallFail ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; com.android.server.timezone.CheckToken token = createArbitraryToken ( ) ; byte [ ] tokenBytes = token.toByteArray ( ) ; com.android.server.timezone.RulesManagerServiceTest.TestCallback callback = new com.android.server.timezone.RulesManagerServiceTest.TestCallback ( ) ; org.junit.Assert.assertEquals ( RulesManager.SUCCESS , mRulesManagerService.requestUninstall ( tokenBytes , callback ) ) ; verifyNoInstallerCallsMade ( ) ; callback.assertNoResultReceived ( ) ; configureStageUninstallExpectation ( false ) ; mFakeExecutor.simulateAsyncExecutionOfLastCommand ( ) ; verifyStageUninstallCalled ( ) ; verifyPackageTrackerCalled ( token , false ) ; callback.assertResultReceived ( Callback.ERROR_UNKNOWN_FAILURE ) ; }

Target:
public void requestUninstall_nullTokenBytes ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; com.android.server.timezone.RulesManagerServiceTest.TestCallback callback = new com.android.server.timezone.RulesManagerServiceTest.TestCallback ( ) ; org.junit.Assert.assertEquals ( RulesManager.SUCCESS , mRulesManagerService.requestUninstall ( null , callback ) ) ; verifyNoInstallerCallsMade ( ) ; callback.assertNoResultReceived ( ) ; configureStageUninstallExpectation ( TimeZoneDistroInstaller.UNINSTALL_SUCCESS ) ; mFakeExecutor.simulateAsyncExecutionOfLastCommand ( ) ; verifyStageUninstallCalled ( ) ; verifyPackageTrackerCalled ( null , true ) ; callback.assertResultReceived ( Callback.SUCCESS ) ; }
Source:
public void start ( org.osgi.framework.BundleContext context ) throws java.lang.Exception { super . start ( context ) ; com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin.plugin = this ; }

Target:
public void printAndPromptLog ( final com.android.ddmlib.Log.LogLevel logLevel , final java.lang.String tag , final java.lang.String message ) { printLog ( logLevel , tag , message ) ; org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { org.eclipse.swt.widgets.Shell shell = org.eclipse.swt.widgets.Display.getDefault ( ) . getActiveShell ( ) ; if ( logLevel == ( com.android.ddmlib.Log.LogLevel.ERROR ) ) { org.eclipse.jface.dialogs.MessageDialog.openError ( shell , tag , message ) ; } else { org.eclipse.jface.dialogs.MessageDialog.openWarning ( shell , tag , message ) ; } } } ) ; }
Source:
public com.google.common.collect.Multiset.Entry < E > get ( int index ) { return com.google.common.collect.RegularImmutableMultiset.entryFromMapEntry ( entryList.get ( index ) ) ; }

Target:
com.google.common.collect.Multiset.Entry < E > getEntry ( int index ) { java.util.Map.Entry < E , java.lang.Integer > mapEntry = map.entrySet ( ) . asList ( ) . get ( index ) ; return com.google.common.collect.Multisets.immutableEntry ( mapEntry.getKey ( ) , mapEntry.getValue ( ) ) ; }
Source:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( type ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) ; com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( definingClass , name , new com.android.jack.dx.rop.cst.CstString ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( method ) ) ) ; return methodRef ; }

Target:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( type ) , new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) , com.android.jack.backend.dex.rop.RopHelper.getPrototype ( method.getMethodId ( ) ) ) ; return methodRef ; }
Source:
boolean updateCurrentCarrierInProvider ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( r != null ) { try { android.net.Uri uri = android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , "current" ) ; android.content.ContentValues map = new android.content.ContentValues ( ) ; map.put ( Telephony.Carriers.NUMERIC , r.getOperatorNumeric ( ) ) ; mContext.getContentResolver ( ) . insert ( uri , map ) ; return true ; } catch ( android.database.SQLException e ) { android.util.Log.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Can't store current operator" , e ) ; } } return false ; }

Target:
boolean updateCurrentCarrierInProvider ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( r != null ) { try { android.net.Uri uri = android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , "current" ) ; android.content.ContentValues map = new android.content.ContentValues ( ) ; map.put ( Telephony.Carriers.NUMERIC , r.getOperatorNumeric ( ) ) ; mContext.getContentResolver ( ) . insert ( uri , map ) ; return true ; } catch ( android.database.SQLException e ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Can't store current operator" , e ) ; } } return false ; }
Source:
public void onLooperPrepared ( ) { mPhoneStateListenerUT = new android.telephony.PhoneStateListener ( ) { @ java.lang.Override public void onServiceStateChanged ( android.telephony.ServiceState serviceState ) { logd ( "Service State Changed" ) ; mServiceState.setVoiceRegState ( serviceState.getVoiceRegState ( ) ) ; mServiceState.setDataRegState ( serviceState.getDataRegState ( ) ) ; setReady ( true ) ; } @ java.lang.Override public void onUserMobileDataStateChanged ( boolean state ) { logd ( "User Mobile Data State Changed" ) ; mUserMobileDataState = true ; setReady ( true ) ; } } ; setReady ( true ) ; }

Target:
public void onPhysicalChannelConfigurationChanged ( java.util.List < android.telephony.PhysicalChannelConfig > configs ) { logd ( "PhysicalChannelConfig Changed" ) ; mPhysicalChannelConfigs = configs ; setReady ( true ) ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { if ( ( ( mConfirmationMode ) == ( com.android.phone.EditPhoneNumberPreference.CM_ACTIVATION ) ) && ( which == ( android.content.DialogInterface.BUTTON3 ) ) ) { setToggled ( ( ! ( isToggled ( ) ) ) ) ; } mButtonClicked = which ; super . onClick ( dialog , which ) ; }

Target:
public void onClick ( android.content.DialogInterface dialog , int which ) { if ( ( ( mConfirmationMode ) == ( com.android.phone.EditPhoneNumberPreference.CM_ACTIVATION ) ) && ( which == ( android.content.DialogInterface.BUTTON_NEUTRAL ) ) ) { setToggled ( ( ! ( isToggled ( ) ) ) ) ; } mButtonClicked = which ; super . onClick ( dialog , which ) ; }
Source:
void createNewUserLILPw ( int userHandle , java.io.File path ) { if ( ( mInstaller ) != null ) { mSettings.createNewUserLILPw ( mInstaller , userHandle , path ) ; } }

Target:
private boolean isPackageDeviceAdmin ( java.lang.String packageName , int userId ) { android.app.admin.IDevicePolicyManager dpm = IDevicePolicyManager.Stub.asInterface ( android.os.ServiceManager.getService ( Context.DEVICE_POLICY_SERVICE ) ) ; try { if ( ( dpm != null ) && ( ( dpm.packageHasActiveAdmins ( packageName , userId ) ) || ( dpm.isDeviceOwner ( packageName ) ) ) ) { return true ; } } catch ( android.os.RemoteException e ) { } return false ; }
Source:
public static lombok.ast.Node getCompilationUnit ( java.lang.String javaSource ) { com.android.tools.lint.detector.api.LintUtilsTest.TestContext context = new com.android.tools.lint.detector.api.LintUtilsTest.TestContext ( javaSource , new java.io.File ( "test" ) ) ; com.android.tools.lint.client.api.IJavaParser parser = new com.android.tools.lint.EcjParser ( new com.android.tools.lint.LintCliClient ( ) ) ; lombok.ast.Node compilationUnit = parser.parseJava ( context ) ; assertNotNull ( javaSource , compilationUnit ) ; return compilationUnit ; }

Target:
public java.lang.String readFile ( @ com.android.annotations.NonNull java.io.File file ) { if ( file.getPath ( ) . equals ( fullPath.getPath ( ) ) ) { return javaSource ; } return super . readFile ( file ) ; }
Source:
public void close ( ) throws java.io.IOException { ds.writeLock ( ) . lock ( ) ; try { if ( ds.closeImpl ( ) ) { sun.nio.fs.UnixNativeDispatcher.close ( dfd ) ; } } finally { ds.writeLock ( ) . unlock ( ) ; } }

Target:
public void close ( ) throws java.io.IOException { ds.writeLock ( ) . lock ( ) ; try { if ( ds.closeImpl ( ) ) { sun.nio.fs.UnixNativeDispatcher.close ( dfd ) ; } } finally { ds.writeLock ( ) . unlock ( ) ; } guard.close ( ) ; }
Source:
public void testUdpInvalidDstPort ( ) throws java.lang.Exception { final java.nio.ByteBuffer packet = java.nio.ByteBuffer.wrap ( com.android.internal.util.HexDump.hexStringToByteArray ( ( "9cd917000000001c2e0000000800" + ( ( ( ( ( ( ( ( ( ( ( "45a00148000040003d115087d18194fb0a0f7af2" + "0043aaaa01341268" ) + "02010600d628ba8200000000000000000a0f7af2000000000a0fc818" ) + "9cd91700000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "6382536335010236040a0169fc3304000151800104ffff000003040a0fc817060cd1818003d1819403" ) + "d18180060f0777766d2e6564751c040a0fffffff000000" ) ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , android.net.dhcp.ENCAP_L2 ) ; fail ( "Packet with invalid dst port did not throw ParseException" ) ; } catch ( android.net.dhcp.ParseException expected ) { } }

Target:
public void testUdpInvalidDstPort ( ) throws java.lang.Exception { final java.nio.ByteBuffer packet = java.nio.ByteBuffer.wrap ( com.android.internal.util.HexDump.hexStringToByteArray ( ( "9cd917000000001c2e0000000800" + ( ( ( ( ( ( ( ( ( ( ( "45a00148000040003d115087d18194fb0a0f7af2" + "0043aaaa01341268" ) + "02010600d628ba8200000000000000000a0f7af2000000000a0fc818" ) + "9cd91700000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "0000000000000000000000000000000000000000000000000000000000000000" ) + "6382536335010236040a0169fc3304000151800104ffff000003040a0fc817060cd1818003d1819403" ) + "d18180060f0777766d2e6564751c040a0fffffff000000" ) ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , android.net.dhcp.ENCAP_L2 ) ; org.junit.Assert.fail ( "Packet with invalid dst port did not throw ParseException" ) ; } catch ( android.net.dhcp.ParseException expected ) { } }
Source:
public void testAmbiguousViewMatcherException ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.base.DefaultFailureHandlerTest.withMatchesThatReturns ( true ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; } catch ( java.lang.RuntimeException e ) { assertTrue ( ( e instanceof android.support.test.espresso.AmbiguousViewMatcherException ) ) ; assertFailureStackContainsThisClass ( e ) ; } }

Target:
public void ambiguousViewMatcherException ( ) { expectedException.expect ( android.support.test.espresso.AmbiguousViewMatcherException.class ) ; expectedException.expect ( stackTraceContainsThisClass ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.base.DefaultFailureHandlerTest.withMatchesThatReturns ( true ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }
Source:
public void testUnlock ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertEquals ( KeyStore.State.UNLOCKED , mKeyStore.state ( ) ) ; mKeyStore.lock ( ) ; assertFalse ( mKeyStore.unlock ( android.security.KeyStoreTest.TEST_PASSWD2 ) ) ; assertTrue ( mKeyStore.unlock ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; }

Target:
public void testUnlock ( ) throws java.lang.Exception { mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertEquals ( KeyStore.State.UNLOCKED , mKeyStore.state ( ) ) ; mKeyStore.lock ( ) ; assertFalse ( mKeyStore.unlock ( android.security.KeyStoreTest.TEST_PASSWD2 ) ) ; assertTrue ( mKeyStore.unlock ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; }
Source:
public void mousePressed ( java.awt.event.MouseEvent e ) { if ( isOverLink ( e.getX ( ) , e.getY ( ) ) ) { javax.swing.tree.TreeModel model = myTree.getModel ( ) ; if ( model instanceof com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) { ( ( com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) ( model ) ) . setModelNeedsRefresh ( true ) ; } com.intellij.ide.BrowserUtil.browse ( "https://console.developers.google.com/project" ) ; com.google.gct.idea.stats.UsageTracker.getInstance ( ) . trackEvent ( GctTracking.CATEGORY , GctTracking.PROJECT_SELECTION , "create.new.project" , null ) ; } }

Target:
public void mousePressed ( java.awt.event.MouseEvent e ) { if ( isOverLink ( e.getX ( ) , e.getY ( ) ) ) { javax.swing.tree.TreeModel model = myTree.getModel ( ) ; if ( model instanceof com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) { ( ( com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) ( model ) ) . setModelNeedsRefresh ( true ) ; } com.intellij.ide.BrowserUtil.browse ( "https://console.developers.google.com/project" ) ; com.google.gct.login.stats.UsageTrackerService.getInstance ( ) . trackEvent ( GctTracking.CATEGORY , GctTracking.PROJECT_SELECTION , "create.new.project" , null ) ; } }
Source:
private void makeFakeSysImgInternal ( java.io.File imagesDir , java.lang.String abiType ) throws java.io.IOException { imagesDir.mkdirs ( ) ; new java.io.File ( imagesDir , "userdata.img" ) . createNewFile ( ) ; java.io.File sourceProp = new java.io.File ( imagesDir , com.android.SdkConstants.FN_SOURCE_PROP ) ; sourceProp.createNewFile ( ) ; java.io.FileWriter out = new java.io.FileWriter ( sourceProp ) ; out.write ( ( ( com.android.sdklib.repository.PkgProps.VERSION_API_LEVEL ) + "=0\n" ) ) ; out.write ( ( ( ( ( com.android.sdklib.repository.PkgProps.SYS_IMG_ABI ) + "=" ) + abiType ) + "\n" ) ) ; out.close ( ) ; }

Target:
private void makePlatformTools ( java.io.File platformToolsDir ) throws java.io.IOException { platformToolsDir.mkdir ( ) ; createSourceProps ( platformToolsDir , PkgProps.PKG_REVISION , "17.1.2" ) ; new java.io.File ( platformToolsDir , com.android.SdkConstants.FN_ADB ) . createNewFile ( ) ; }
Source:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; args.outFloor = ( ( float ) ( java.lang.StrictMath.floor ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.min ( ( ( args.inV ) - ( args.outFloor ) ) , 0.99999994F ) ) ) ; }

Target:
public static void computeFastLength ( android.renderscript.cts.TestFastLength.ArgumentsFloatFloat args ) { args.out = android.renderscript.cts.CoreMathVerifier.length ( new float [ ] { args.inV } , android.renderscript.cts.CoreMathVerifier.FAST_PRECISION , android.renderscript.cts.CoreMathVerifier.FAST_PRECISION ) ; }
Source:
public void run ( ) { try { while ( running ) { try { serverSocket.receive ( rdp ) ; if ( echo ) { serverSocket.send ( rdp ) ; } } catch ( java.io.InterruptedIOException e ) { } } } catch ( java.io.IOException e ) { fail ( ) ; } finally { serverSocket.close ( ) ; } }

Target:
public void close ( ) throws java.lang.Exception { running = false ; try { join ( ) ; } finally { serverSocket.close ( ) ; } }
Source:
public final void setAudioRoute ( java.lang.String connectionId , int audioRoute , android.telecom.Logging.Session.Info sessionInfo ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.argi1 = audioRoute ; args.arg2 = sessionInfo ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_AUDIO_ROUTE , args ) . sendToTarget ( ) ; }

Target:
public final void setAudioRoute ( java.lang.String connectionId , int audioRoute , java.lang.String bluetoothAddress , android.telecom.Logging.Session.Info sessionInfo ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.argi1 = audioRoute ; args.arg2 = bluetoothAddress ; args.arg3 = sessionInfo ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_AUDIO_ROUTE , args ) . sendToTarget ( ) ; }
Source:
private void checkAndUpdate ( com.android.resources.ResourceType type ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType folderType : folderTypes ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > folders = mFolderMap.get ( folderType ) ; if ( folders != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder folder : folders ) { if ( folder.isTouched ( ) ) { com.android.resources.ResourceType [ ] resTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedResourceTypes ( folderType ) ; for ( com.android.resources.ResourceType resType : resTypes ) { update ( resType ) ; } return ; } } } } }

Target:
private void checkAndUpdate ( com.android.resources.ResourceType type ) { com.android.resources.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.resources.ResourceFolderType folderType : folderTypes ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > folders = mFolderMap.get ( folderType ) ; if ( folders != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder folder : folders ) { if ( folder.isTouched ( ) ) { com.android.resources.ResourceType [ ] resTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedResourceTypes ( folderType ) ; for ( com.android.resources.ResourceType resType : resTypes ) { update ( resType ) ; } return ; } } } } }
Source:
java.util.Map.Entry < K , V2 > transform ( final java.util.Map.Entry < K , V1 > entry ) { return new com.google.common.collect.AbstractMapEntry < K , V2 > ( ) { @ java.lang.Override public K getKey ( ) { return entry.getKey ( ) ; } @ java.lang.Override public V2 getValue ( ) { return transformer.transformEntry ( entry.getKey ( ) , entry.getValue ( ) ) ; } } ; }

Target:
public java.util.Map.Entry < K , V2 > apply ( final java.util.Map.Entry < K , V1 > entry ) { return com.google.common.collect.Maps.transformEntry ( transformer , entry ) ; }
Source:
public void clearView ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearView ( ) ; } } ) ; return ; } mAwContents.clearView ( ) ; }

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:
private java.lang.String [ ] executeSuShellAdbCommand ( java.lang.String ... command ) throws com.android.tradefed.device.DeviceNotAvailableException { java.lang.String cmdString = java.lang.String.join ( " " , command ) ; java.lang.String output = mDevice.executeShellCommand ( ( "su root " + cmdString ) ) ; java.lang.String [ ] lines = ( output.equals ( "" ) ) ? new java.lang.String [ 0 ] : output.split ( "\n" ) ; return lines ; }

Target:
private java.lang.String [ ] executeSuShellAdbCommand ( java.lang.String ... command ) throws com.android.tradefed.device.DeviceNotAvailableException { java.lang.String cmdString = java.lang.String.join ( " " , command ) ; java.lang.String output = mDevice.executeShellCommand ( ( "su root " + cmdString ) ) ; java.lang.String [ ] lines = ( output.equals ( "" ) ) ? new java.lang.String [ 0 ] : output.split ( "\n" ) ; return filterAdbLines ( lines ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.FLOAT_32 , data.length ) ; }
Source:
private void expectSystemReady ( ) throws java.lang.Exception { mNetManager.setGlobalAlert ( org.easymock.EasyMock.anyLong ( ) ) ; org.easymock.EasyMock.expectLastCall ( ) . atLeastOnce ( ) ; expectNetworkStatsSummary ( buildEmptyStats ( ) ) ; expectBandwidthControlCheck ( ) ; }

Target:
private void expectNetworkStatsUidDetail ( android.net.NetworkStats detail , java.lang.String [ ] tetherIfacePairs , android.net.NetworkStats tetherStats ) throws java.lang.Exception { org.mockito.Mockito.when ( mNetManager.getNetworkStatsUidDetail ( android.net.NetworkStats.UID_ALL ) ) . thenReturn ( detail ) ; org.mockito.Mockito.when ( mNetManager.getNetworkStatsTethering ( ) ) . thenReturn ( tetherStats ) ; }
Source:
public void testDropTopEdge ( ) { com.android.ide.common.api.INode inserted = dragInto ( new com.android.ide.common.api.Rect ( 0 , 0 , 105 , 80 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , null , 2 , ( - 1 ) , "useStyle(DROP_RECIPIENT), drawRect(Rect[0,0,240,480])" , "useStyle(DROP_ZONE), drawRect(Rect[0,-10,240,20])" , "useStyle(DROP_ZONE_ACTIVE), fillRect(Rect[0,-10,240,20])" , "useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" , "useStyle(HELP), drawBoxedStrings(5,15,[alignParentTop])" , "useStyle(DROP_PREVIEW), drawRect(Rect[0,0,105,80])" ) ; assertEquals ( "true" , inserted.getStringAttr ( BaseLayout.ANDROID_URI , "layout_alignParentTop" ) ) ; }

Target:
public void testDropTopEdge ( ) { com.android.ide.common.api.INode inserted = dragInto ( new com.android.ide.common.api.Rect ( 0 , 0 , 105 , 80 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , null , 2 , ( - 1 ) , "useStyle(DROP_RECIPIENT), drawRect(Rect[0,0,240,480])" , "useStyle(DROP_ZONE), drawRect(Rect[0,-10,240,20])" , "useStyle(DROP_ZONE_ACTIVE), fillRect(Rect[0,-10,240,20])" , "useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" , "useStyle(HELP), drawBoxedStrings(5,15,[alignParentTop])" , "useStyle(DROP_PREVIEW), drawRect(Rect[0,0,105,80])" ) ; assertEquals ( "true" , inserted.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , "layout_alignParentTop" ) ) ; }
Source:
public java.lang.Long getResult ( ) { long result = checksum.getValue ( ) ; checksum.reset ( ) ; return result ; }

Target:
public int read ( ) throws java.io.IOException { if ( ( left ) == 0 ) { return - 1 ; } int result = in.read ( ) ; if ( result != ( - 1 ) ) { -- ( left ) ; } return result ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt ( int x , int y , com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { org.eclipse.swt.graphics.Rectangle r = canvasViewInfo.getSelectionRect ( ) ; if ( r.contains ( x , y ) ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : canvasViewInfo.getChildren ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo v = findViewInfoAt ( x , y , child ) ; if ( v != null ) { return v ; } } return canvasViewInfo ; } return null ; }

Target:
com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt ( int x , int y ) { if ( ( mLastValidViewInfoRoot ) == null ) { return null ; } else { return findViewInfoAt_Recursive ( x , y , mLastValidViewInfoRoot ) ; } }
Source:
public void windowsChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Refreshing windows" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.isViewServerRunning ( device ) ) ) { if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.startViewServer ( device ) ) ) { com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.HierarchyViewerDirector.TAG , ( "Unable to debug device " + device ) ) ; return ; } } com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateDevice ( device , windows ) ; } } ) ; }

Target:
public void focusChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Updating focus" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( device ) ; int focusedWindow = hvDevice.getFocusedWindow ( ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateFocusedWindow ( hvDevice , focusedWindow ) ; } } ) ; }
Source:
public int getPlaintextLimit ( int ciphertextLimit ) { int blockSize = encryptCipher.getBlockSize ( ) ; int macSize = writeMac.getSize ( ) ; int plaintextLimit = ciphertextLimit ; if ( useExplicitIV ) { plaintextLimit -= blockSize ; } if ( org.bouncycastle.crypto.tls.TlsBlockCipher.encryptThenMAC ) { plaintextLimit -= macSize ; plaintextLimit -= plaintextLimit % blockSize ; } else { plaintextLimit -= plaintextLimit % blockSize ; plaintextLimit -= macSize ; } -- plaintextLimit ; return plaintextLimit ; }

Target:
public int getPlaintextLimit ( int ciphertextLimit ) { int blockSize = encryptCipher.getBlockSize ( ) ; int macSize = writeMac.getSize ( ) ; int plaintextLimit = ciphertextLimit ; if ( useExplicitIV ) { plaintextLimit -= blockSize ; } if ( encryptThenMAC ) { plaintextLimit -= macSize ; plaintextLimit -= plaintextLimit % blockSize ; } else { plaintextLimit -= plaintextLimit % blockSize ; plaintextLimit -= macSize ; } -- plaintextLimit ; return plaintextLimit ; }
Source:
public com.android.builder.model.ApiVersion getTargetSdkVersion ( ) { if ( ( mTestedConfig ) != null ) { return mTestedConfig.getTargetSdkVersion ( ) ; } com.android.builder.model.ApiVersion targetSdkVersion = mMergedFlavor.getTargetSdkVersion ( ) ; if ( targetSdkVersion == null ) { java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; targetSdkVersion = com.android.builder.core.DefaultApiVersion.create ( com.android.builder.core.VariantConfiguration.sManifestParser.getTargetSdkVersion ( manifestLocation ) ) ; } return targetSdkVersion ; }

Target:
public com.android.builder.model.ApiVersion getTargetSdkVersion ( ) { if ( ( mTestedConfig ) != null ) { return mTestedConfig.getTargetSdkVersion ( ) ; } com.android.builder.model.ApiVersion targetSdkVersion = mMergedFlavor.getTargetSdkVersion ( ) ; if ( targetSdkVersion == null ) { java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; targetSdkVersion = com.android.builder.core.DefaultApiVersion.create ( sManifestParser.getTargetSdkVersion ( manifestLocation ) ) ; } return targetSdkVersion ; }
Source:
public void onAdvertisingSetStarted ( int advertiserId , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( status != ( AdvertisingSetCallback.ADVERTISE_SUCCESS ) ) { callback.onAdvertisingSetStarted ( null , status ) ; mCallbackWrappers.remove ( callback ) ; return ; } android.bluetooth.le.AdvertisingSet advertisingSet = new android.bluetooth.le.AdvertisingSet ( advertiserId , mBluetoothManager ) ; mAdvertisingSets.put ( advertiserId , advertisingSet ) ; callback.onAdvertisingSetStarted ( advertisingSet , status ) ; } } ) ; }

Target:
public void onAdvertisingSetStarted ( int advertiserId , int txPower , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( status != ( AdvertisingSetCallback.ADVERTISE_SUCCESS ) ) { callback.onAdvertisingSetStarted ( null , 0 , status ) ; mCallbackWrappers.remove ( callback ) ; return ; } android.bluetooth.le.AdvertisingSet advertisingSet = new android.bluetooth.le.AdvertisingSet ( advertiserId , mBluetoothManager ) ; mAdvertisingSets.put ( advertiserId , advertisingSet ) ; callback.onAdvertisingSetStarted ( advertisingSet , txPower , status ) ; } } ) ; }
Source:
public void test_getSubjectAlternativeNames ( ) { try { org.apache.harmony.security.x509.GeneralName san1 = new org.apache.harmony.security.x509.GeneralName ( 1 , "rfc@822.Name" ) ; org.apache.harmony.security.x509.GeneralName san2 = new org.apache.harmony.security.x509.GeneralName ( 2 , "dNSName" ) ; org.apache.harmony.security.x509.GeneralNames sans = new org.apache.harmony.security.x509.GeneralNames ( ) ; sans.addName ( san1 ) ; sans.addName ( san2 ) ; tests.security.cert.X509CertSelectorTest.TestCert cert_1 = new tests.security.cert.X509CertSelectorTest.TestCert ( sans ) ; java.security.cert.X509CertSelector selector = new java.security.cert.X509CertSelector ( ) ; assertNull ( "Selector should return null" , selector.getSubjectAlternativeNames ( ) ) ; selector.setSubjectAlternativeNames ( sans.getPairsList ( ) ) ; assertTrue ( "The certificate should match the selection criteria." , selector.match ( cert_1 ) ) ; selector.getSubjectAlternativeNames ( ) . clear ( ) ; assertTrue ( ( "The modification of initialization object " + ( "should not affect the modification " + "of internal object." ) ) , selector.match ( cert_1 ) ) ; } catch ( java.io.IOException e ) { e.printStackTrace ( ) ; fail ( "Unexpected IOException was thrown." ) ; } }

Target:
public void test_getSubjectAlternativeNames ( ) throws java.lang.Exception { org.apache.harmony.security.x509.GeneralName san1 = new org.apache.harmony.security.x509.GeneralName ( 1 , "rfc@822.Name" ) ; org.apache.harmony.security.x509.GeneralName san2 = new org.apache.harmony.security.x509.GeneralName ( 2 , "dNSName" ) ; org.apache.harmony.security.x509.GeneralNames sans = new org.apache.harmony.security.x509.GeneralNames ( ) ; sans.addName ( san1 ) ; sans.addName ( san2 ) ; tests.security.cert.X509CertSelectorTest.TestCert cert_1 = new tests.security.cert.X509CertSelectorTest.TestCert ( sans ) ; java.security.cert.X509CertSelector selector = new java.security.cert.X509CertSelector ( ) ; assertNull ( "Selector should return null" , selector.getSubjectAlternativeNames ( ) ) ; selector.setSubjectAlternativeNames ( sans.getPairsList ( ) ) ; assertTrue ( "The certificate should match the selection criteria." , selector.match ( cert_1 ) ) ; selector.getSubjectAlternativeNames ( ) . clear ( ) ; assertTrue ( ( "The modification of initialization object " + ( "should not affect the modification " + "of internal object." ) ) , selector.match ( cert_1 ) ) ; }
Source:
public boolean overlayHorizontalScrollbar ( ) { 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 overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }

Target:
public android.webkit.WebBackForwardList copyBackForwardList ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return copyBackForwardList ( ) ; } } ) ; return ret ; } return new com.android.webview.chromium.WebBackForwardListChromium ( mAwContents.getNavigationHistory ( ) ) ; }
Source:
private static int computeOpcode ( int deltaLines , int deltaAddress ) { if ( ( deltaLines < ( DBG_LINE_BASE ) ) || ( deltaLines > ( ( ( DBG_LINE_BASE ) + ( DBG_LINE_RANGE ) ) - 1 ) ) ) { throw new java.lang.RuntimeException ( "Parameter out of range" ) ; } return ( ( deltaLines - ( DBG_LINE_BASE ) ) + ( ( DBG_LINE_RANGE ) * deltaAddress ) ) + ( DBG_FIRST_SPECIAL ) ; }

Target:
private static int computeOpcode ( int deltaLines , int deltaAddress ) { if ( ( deltaLines < ( com.android.dx.dex.file.DebugInfoConstants.DBG_LINE_BASE ) ) || ( deltaLines > ( ( ( com.android.dx.dex.file.DebugInfoConstants.DBG_LINE_BASE ) + ( com.android.dx.dex.file.DebugInfoConstants.DBG_LINE_RANGE ) ) - 1 ) ) ) { throw new java.lang.RuntimeException ( "Parameter out of range" ) ; } return ( ( deltaLines - ( com.android.dx.dex.file.DebugInfoConstants.DBG_LINE_BASE ) ) + ( ( com.android.dx.dex.file.DebugInfoConstants.DBG_LINE_RANGE ) * deltaAddress ) ) + ( com.android.dx.dex.file.DebugInfoConstants.DBG_FIRST_SPECIAL ) ; }
Source:
private int readIndex ( com.android.dx.util.ByteInput in , int byteCount ) { int result = 0 ; int shift = 0 ; for ( int i = 0 ; i < byteCount ; i ++ ) { result += ( ( in.readByte ( ) ) & 255 ) << shift ; shift += 8 ; } return result ; }

Target:
private void checkType ( int expected ) { if ( ( peek ( ) ) != expected ) { throw new java.lang.IllegalStateException ( ( "Expected array but was " + ( java.lang.Integer.toHexString ( peek ( ) ) ) ) ) ; } }
Source:
private synchronized < T extends com.android.server.IpSecService.ManagedResource > void releaseManagedResource ( android.util.SparseArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.get ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }

Target:
private synchronized < T extends com.android.server.IpSecService.ManagedResource > void releaseManagedResource ( com.android.server.IpSecService.ManagedResourceArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.get ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }
Source:
private void setExceptionEdges ( @ javax.annotation.Nonnull com.android.jack.cfg.PeiBasicBlock peiBlock , @ javax.annotation.Nonnull com.android.jack.ir.ast.JStatement peiInst ) { for ( com.android.jack.ir.ast.JCatchBlock catchBlock : peiInst.getJCatchBlocks ( ) ) { forwardBranchResolver.addForwardBranch ( ForwardBranchKind.EXCEPTION , peiBlock , catchBlock ) ; } }

Target:
private void buildCfgForPei ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JStatement peiInst ) { com.android.jack.cfg.PeiBasicBlock peiBlock = new com.android.jack.cfg.PeiBasicBlock ( ( ( basicBlockId ) ++ ) , currentStmts ) ; setBlockOfStatement ( peiBlock ) ; com.android.jack.ir.ast.JStatement nextStatement = com.android.jack.util.ControlFlowHelper.getNextStatement ( peiInst ) ; forwardBranchResolver.addPeiBasicBlock ( peiBlock , nextStatement , peiInst.getJCatchBlocks ( ) ) ; }