auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void frameworkFromJill ( ) throws java.lang.Exception { java.io.File frameworkJackZip = com.android.jill.JillTestTools.createTempFile ( "framework" , ".zip" ) ; com.android.jill.JillTestTools.runJillToZip ( com.android.jill.NoClasspathTest.FRAMEWORK_JAR , frameworkJackZip ) ; java.io.File frameworkDex = com.android.jill.JillTestTools.createTempFile ( "framework" , ".dex" ) ; com.android.jill.JillTestTools.compileJackToDex ( new com.android.jill.Options ( ) , frameworkJackZip , frameworkDex , false ) ; }

Target:
public void frameworkFromJill ( ) throws java.lang.Exception { java.io.File frameworkJackZip = com.android.jill.JillTestTools.createTempFile ( "framework" , ".zip" ) ; com.android.jill.JillTestTools.runJillToZip ( com.android.jill.NoClasspathTest.FRAMEWORK_JAR , frameworkJackZip ) ; java.io.File frameworkDex = com.android.jill.JillTestTools.createTempDir ( "framework" , "dex" ) ; com.android.jill.JillTestTools.compileJackToDex ( new com.android.jill.Options ( ) , frameworkJackZip , frameworkDex , false ) ; }
Source:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JReinterpretCastOperation jReinterpretCastOperation = ( ( com.android.jack.ir.ast.JReinterpretCastOperation ) ( node ) ) ; castType = com.android.jack.jayce.v0002.io.ImportHelper.getSignatureName ( jReinterpretCastOperation.getCastType ( ) ) ; expr = ( ( com.android.jack.jayce.v0002.nodes.NExpression ) ( loader.load ( jReinterpretCastOperation.getExpr ( ) ) ) ) ; sourceInfo = loader.load ( jReinterpretCastOperation.getSourceInfo ( ) ) ; }

Target:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JReinterpretCastOperation jReinterpretCastOperation = ( ( com.android.jack.ir.ast.JReinterpretCastOperation ) ( node ) ) ; castType = com.android.jack.jayce.v0002.io.ImportHelper.getSignatureName ( jReinterpretCastOperation.getType ( ) ) ; expr = ( ( com.android.jack.jayce.v0002.nodes.NExpression ) ( loader.load ( jReinterpretCastOperation.getExpr ( ) ) ) ) ; sourceInfo = loader.load ( jReinterpretCastOperation.getSourceInfo ( ) ) ; }
Source:
public void testGetPath_PathAndApiClassResourceSet ( ) { initializePsiClass ( "\"\"" , "\"res\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"boo\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "boo" , path ) ; }

Target:
public void testGetPath_PathAndApiClassResourceSet ( ) { initializePsiClass ( "\"\"" , "\"res\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"boo\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "boo" , path ) ; }
Source:
public java.lang.String getPackageConfigurationName ( ) { if ( name.equals ( SourceSet.MAIN_SOURCE_SET_NAME ) ) { return "apk" ; } else { return java.lang.String.format ( "%sApk" , name ) ; } }

Target:
public java.lang.String getPackageConfigurationName ( ) { if ( isLibrary ) { if ( name.equals ( SourceSet.MAIN_SOURCE_SET_NAME ) ) { return "publish" ; } else { return java.lang.String.format ( "%sPublish" , name ) ; } } if ( name.equals ( SourceSet.MAIN_SOURCE_SET_NAME ) ) { return "apk" ; } else { return java.lang.String.format ( "%sApk" , name ) ; } }
Source:
public static com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent toProto ( android.net.metrics.WakeupStats in ) { com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.WakeupStats wakeupStats = new com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.WakeupStats ( ) ; in.updateDuration ( ) ; wakeupStats.durationSec = in.durationSec ; wakeupStats.totalWakeups = in.totalWakeups ; wakeupStats.rootWakeups = in.rootWakeups ; wakeupStats.systemWakeups = in.systemWakeups ; wakeupStats.nonApplicationWakeups = in.nonApplicationWakeups ; wakeupStats.applicationWakeups = in.applicationWakeups ; wakeupStats.unroutedWakeups = in.unroutedWakeups ; final com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent out = com.android.server.connectivity.IpConnectivityEventBuilder.buildEvent ( 0 , 0 , in.iface ) ; out.setWakeupStats ( wakeupStats ) ; return out ; }

Target:
public static com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent toProto ( android.net.metrics.WakeupStats in ) { com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.WakeupStats wakeupStats = new com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.WakeupStats ( ) ; in.updateDuration ( ) ; wakeupStats.durationSec = in.durationSec ; wakeupStats.totalWakeups = in.totalWakeups ; wakeupStats.rootWakeups = in.rootWakeups ; wakeupStats.systemWakeups = in.systemWakeups ; wakeupStats.nonApplicationWakeups = in.nonApplicationWakeups ; wakeupStats.applicationWakeups = in.applicationWakeups ; wakeupStats.noUidWakeups = in.noUidWakeups ; final com.android.server.connectivity.metrics.nano.IpConnectivityLogClass.IpConnectivityEvent out = com.android.server.connectivity.IpConnectivityEventBuilder.buildEvent ( 0 , 0 , in.iface ) ; out.setWakeupStats ( wakeupStats ) ; return out ; }
Source:
public synchronized void onPlaybackStateChanged ( android.media.session.PlaybackState state ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: state " + ( state.toString ( ) ) ) ) ; updatePlaybackState ( state ) ; byte stateBytes = ( ( byte ) ( convertPlayStateToBytes ( state.getState ( ) ) ) ) ; com.android.bluetooth.avrcp.MediaPlayerInfo player = getAddressedPlayerInfo ( ) ; if ( player != null ) { player.setPlayStatus ( stateBytes ) ; } else { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: no addressed player (id " + ( mCurrAddrPlayerID ) ) ) ; } }

Target:
public synchronized void onPlaybackStateChanged ( android.media.session.PlaybackState state ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: state " + ( state.toString ( ) ) ) ) ; updatePlaybackState ( state ) ; byte stateBytes = ( ( byte ) ( convertPlayStateToBytes ( state.getState ( ) ) ) ) ; com.android.bluetooth.avrcp.MediaPlayerInfo player = getAddressedPlayerInfo ( ) ; if ( player != null ) { player.setPlayStatus ( stateBytes ) ; } else { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: no addressed player id=" + ( mCurrAddrPlayerID ) ) ) ; } }
Source:
public java.lang.String getMountPoint ( java.lang.String name ) { return mMountPoints.get ( name ) ; }

Target:
public java.lang.String getMountPoint ( @ com.android.annotations.NonNull java.lang.String name ) { java.lang.String mount = mMountPoints.get ( name ) ; if ( mount == null ) { try { mount = queryMountPoint ( name ) ; mMountPoints.put ( name , mount ) ; } catch ( com.android.ddmlib.TimeoutException ignored ) { } catch ( com.android.ddmlib.AdbCommandRejectedException ignored ) { } catch ( com.android.ddmlib.ShellCommandUnresponsiveException ignored ) { } catch ( java.io.IOException ignored ) { } } return mount ; }
Source:
public boolean hasSource ( com.android.sdklib.internal.repository.SdkSource source ) { for ( com.android.sdklib.internal.repository.SdkSource s : mSources ) { if ( s.equals ( source ) ) { return true ; } } return false ; }

Target:
public boolean hasSourceUrl ( com.android.sdklib.internal.repository.SdkSource source ) { for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource s : list ) { if ( s.equals ( source ) ) { return true ; } } } return false ; }
Source:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void testAdd1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testGet2_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.get ( list.size ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void notifyPendingSystemUpdate ( long updateReceivedTime ) { throwIfParentInstance ( "notifyPendingSystemUpdate" ) ; if ( ( mService ) != null ) { try { mService.notifyPendingSystemUpdate ( updateReceivedTime ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }

Target:
public void notifyPendingSystemUpdate ( long updateReceivedTime ) { throwIfParentInstance ( "notifyPendingSystemUpdate" ) ; if ( ( mService ) != null ) { try { mService.notifyPendingSystemUpdate ( android.app.admin.SystemUpdateInfo.of ( updateReceivedTime ) ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }
Source:
void onScrollChange ( android.view.View v , int scrollX , int scrollY , int oldScrollX , int oldScrollY ) ;

Target:
static void offsetRects ( java.util.List < android.graphics.RectF > rects , float offsetX , float offsetY ) { final int rectCount = rects.size ( ) ; for ( int i = 0 ; i < rectCount ; i ++ ) { android.graphics.RectF intersection = rects.get ( i ) ; intersection.offset ( offsetX , offsetY ) ; } }
Source:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { org.junit.Assert.assertTrue ( ( ! ( getBase ( owner ) . equals ( com.android.tools.layoutlib.create.AsmGeneratorTest.JAVA_CLASS_NAME ) ) ) ) ; org.junit.Assert.assertTrue ( testType ( org.objectweb.asm.Type.getType ( desc ) ) ) ; super . visitMethodInsn ( opcode , owner , name , desc ) ; }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { org.junit.Assert.assertTrue ( ( ! ( getBase ( owner ) . equals ( com.android.tools.layoutlib.create.AsmGeneratorTest.JAVA_CLASS_NAME ) ) ) ) ; org.junit.Assert.assertTrue ( testType ( org.objectweb.asm.Type.getType ( desc ) ) ) ; super . visitMethodInsn ( opcode , owner , name , desc , itf ) ; }
Source:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }

Target:
private void sendDisplayPinIntent ( byte [ ] address , int pin , int variant ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mRemoteDevices.getDevice ( address ) ) ; if ( pin != 0 ) { intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_KEY , pin ) ; } intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , variant ) ; intent.setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.setPackage ( com.android.bluetooth.btservice.BondStateMachine.PAIRING_REQUEST_PACKAGE ) ; mAdapterService.sendOrderedBroadcast ( intent , mAdapterService.BLUETOOTH_ADMIN_PERM ) ; }
Source:
protected static void appendOperator ( java.lang.StringBuilder sb , lombok.ast.BinaryOperator operator ) { sb.append ( ' ' ) ; if ( operator == ( lombok.ast.BinaryOperator.LOGICAL_AND ) ) { sb.append ( "and" ) ; } else if ( operator == ( lombok.ast.BinaryOperator.LOGICAL_OR ) ) { sb.append ( "or" ) ; } else { assert operator == ( lombok.ast.BinaryOperator.BITWISE_XOR ) : operator ; sb.append ( "xor" ) ; } sb.append ( ' ' ) ; }

Target:
protected static void appendOperator ( java.lang.StringBuilder sb , com.intellij.psi.tree.IElementType operator ) { sb.append ( ' ' ) ; if ( operator == ( com.intellij.psi.JavaTokenType.ANDAND ) ) { sb.append ( "and" ) ; } else if ( operator == ( com.intellij.psi.JavaTokenType.OROR ) ) { sb.append ( "or" ) ; } else { assert operator == ( com.intellij.psi.JavaTokenType.XOR ) : operator ; sb.append ( "xor" ) ; } sb.append ( ' ' ) ; }
Source:
public void testGetTvInputList ( ) throws java.lang.Exception { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getContext ( ) ) ) ) { return ; } java.util.List < android.media.tv.TvInputInfo > list = mManager.getTvInputList ( ) ; for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.VALID_TV_INPUT_SERVICES ) { assertNotNull ( ( "getTvInputList() doesn't contain valid input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.INVALID_TV_INPUT_SERVICES ) { assertNull ( ( "getTvInputList() contains invalind input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } }

Target:
public void testGetTvInputInfo ( ) throws java.lang.Exception { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getActivity ( ) ) ) ) { return ; } assertEquals ( mManager.getTvInputInfo ( mStubId ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( mManager.getTvInputList ( ) , android.media.tv.cts.StubTunerTvInputService.class . getName ( ) ) ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nAllocationRead ( long id , java.lang.Object d , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead ( mContext , id , d , dt.mID ) ; }
Source:
public void TestFormatReplaceOptimization ( ) { android.icu.impl.SimplePatternFormatter fmt = android.icu.impl.SimplePatternFormatter.compile ( "{2}, {0}, {1} and {3}" ) ; int [ ] offsets = new int [ 4 ] ; java.lang.StringBuilder result = new java.lang.StringBuilder ( "original" ) ; assertEquals ( "format" , "original, freddy, frog and by" , fmt.formatAndReplace ( result , offsets , "freddy" , "frog" , result , "by" ) . toString ( ) ) ; int [ ] expectedOffsets = new int [ ] { 10 , 18 , 0 , 27 } ; verifyOffsets ( expectedOffsets , offsets ) ; }

Target:
public void TestFormatReplaceOptimization ( ) { android.icu.text.SimpleFormatter fmt = android.icu.text.SimpleFormatter.compile ( "{2}, {0}, {1} and {3}" ) ; int [ ] offsets = new int [ 4 ] ; java.lang.StringBuilder result = new java.lang.StringBuilder ( "original" ) ; assertEquals ( "format" , "original, freddy, frog and by" , fmt.formatAndReplace ( result , offsets , "freddy" , "frog" , result , "by" ) . toString ( ) ) ; int [ ] expectedOffsets = new int [ ] { 10 , 18 , 0 , 27 } ; verifyOffsets ( expectedOffsets , offsets ) ; }
Source:
public final int generateSecret ( byte [ ] sharedSecret , int offset ) throws java.lang.IllegalStateException , javax.crypto.ShortBufferException { return spiImpl.engineGenerateSecret ( sharedSecret , offset ) ; }

Target:
private javax.crypto.KeyAgreementSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.KeyAgreement.tryAlgorithm ( key , specifiedProvider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( javax.crypto.KeyAgreementSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public synchronized void fillSwitchMapClass ( @ javax.annotation.Nonnull com.android.jack.transformations.enums.OptimizationUtil supportUtil , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass switchMapClass ) { this . enumType = enumType ; this . supportUtil = supportUtil ; this . switchMapClass = switchMapClass ; com.android.jack.transformations.request.TransformationRequest transformRequest = new com.android.jack.transformations.request.TransformationRequest ( switchMapClass ) ; if ( com.android.jack.transformations.enums.opt.SyntheticClassManager.isSyntheticSwitchMapClass ( switchMapClass ) ) { createInstanceInitIfNotExists ( transformRequest ) ; } if ( ! ( addSyntheticInitializerIfNotExists ( transformRequest ) ) ) { throw new java.lang.AssertionError ( ( "Fails adding synthetic switch map initializer to class: " + switchMapClass ) ) ; } transformRequest.commit ( ) ; }

Target:
public synchronized void fillSwitchMapClass ( @ javax.annotation.Nonnull com.android.jack.transformations.enums.OptimizationUtil supportUtil , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass switchMapClass ) { this . enumType = enumType ; this . supportUtil = supportUtil ; this . switchMapClass = switchMapClass ; com.android.jack.transformations.request.TransformationRequest transformRequest = new com.android.jack.transformations.request.TransformationRequest ( switchMapClass ) ; if ( com.android.jack.transformations.enums.opt.SyntheticClassManager.isSyntheticSwitchMapClass ( switchMapClass ) ) { createInstanceInitIfNotExists ( transformRequest ) ; } if ( ! ( createOrUpdateSyntheticInitializer ( transformRequest ) ) ) { throw new java.lang.AssertionError ( ( "Fails adding synthetic switch map initializer to class: " + switchMapClass ) ) ; } transformRequest.commit ( ) ; }
Source:
public final java.nio.MappedByteBuffer force ( ) { if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toInt ( ) , block.getSize ( ) , java.nio.MS_SYNC ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }

Target:
public final java.nio.MappedByteBuffer force ( ) { checkIsMapped ( ) ; if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toInt ( ) , block.getSize ( ) , java.nio.MS_SYNC ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }
Source:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME ) ; launchActivity ( false , false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingWhileDocked ( ) throws java.lang.Exception { if ( ( ( ! ( supportsScreenRotation ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) || ( ! ( supportsMultiWindowMode ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation nor multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME ) ; launchActivity ( false , false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }
Source:
public void testCannotSetChunkedStreamingModeAfterFixedLengthStreamingMode ( ) throws java.lang.Exception { server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setFixedLengthStreamingMode ( 1 ) ; try { connection.setChunkedStreamingMode ( 1 ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }

Target:
public java.util.Map < java.lang.String , java.util.List < java.lang.String > > get ( java.net.URI uri , java.util.Map < java.lang.String , java.util.List < java.lang.String > > map ) throws java.io.IOException { java.util.Map < java.lang.String , java.util.List < java.lang.String > > result = super . get ( uri , map ) ; connectionHolder.get ( ) . disconnect ( ) ; return result ; }
Source:
public java.io.OutputStream openWrite ( ) throws java.io.FileNotFoundException { return new java.io.FileOutputStream ( file ) ; }

Target:
public java.io.OutputStream openWrite ( ) throws java.io.FileNotFoundException { if ( ( vfsRoot ) instanceof com.android.sched.vfs.SequentialOutputVDir ) { if ( ( ( com.android.sched.vfs.SequentialOutputVDir ) ( vfsRoot ) ) . notifyVFileOpenAndReturnPreviousState ( ) ) { throw new java.lang.AssertionError ( ( ( getLocation ( ) . getDescription ( ) ) + " cannot be written to because a previous stream has not been closed." ) ) ; } } return new com.android.sched.vfs.direct.DirectFile.VFileOutputStream ( new java.io.FileOutputStream ( file ) , vfsRoot ) ; }
Source:
private android.view.View findScrollingChild ( android.view.View view ) { if ( view instanceof android.support.v4.view.NestedScrollingChild ) { return view ; } if ( view instanceof android.view.ViewGroup ) { android.view.ViewGroup group = ( ( android.view.ViewGroup ) ( view ) ) ; for ( int i = 0 , count = group.getChildCount ( ) ; i < count ; i ++ ) { android.view.View scrollingChild = findScrollingChild ( group.getChildAt ( i ) ) ; if ( scrollingChild != null ) { return scrollingChild ; } } } return null ; }

Target:
android.view.View findScrollingChild ( android.view.View view ) { if ( android.support.v4.view.ViewCompat.isNestedScrollingEnabled ( view ) ) { return view ; } if ( view instanceof android.view.ViewGroup ) { android.view.ViewGroup group = ( ( android.view.ViewGroup ) ( view ) ) ; for ( int i = 0 , count = group.getChildCount ( ) ; i < count ; i ++ ) { android.view.View scrollingChild = findScrollingChild ( group.getChildAt ( i ) ) ; if ( scrollingChild != null ) { return scrollingChild ; } } } return null ; }
Source:
protected java.lang.String getTestName ( com.android.ddmlib.testrunner.TestIdentifier testId ) { return java.lang.String.format ( "%1$s[%2$s]" , testId.getTestName ( ) , mDeviceName ) ; }

Target:
protected void setPropertiesAttributes ( org.kxml2.io.KXmlSerializer serializer , java.lang.String namespace ) throws java.io.IOException { super . setPropertiesAttributes ( serializer , namespace ) ; serializer.attribute ( null , "device" , mDeviceName ) ; serializer.attribute ( null , "flavor" , mFlavorName ) ; serializer.attribute ( null , "project" , mProjectName ) ; }
Source:
public void computeDominators ( ) { if ( ( mDominators ) == null ) { mTopSort = com.android.tools.perflib.heap.analysis.TopologicalSort.compute ( getGCRoots ( ) ) ; mDominators = new com.android.tools.perflib.heap.analysis.Dominators ( this , mTopSort ) ; mDominators.computeRetainedSizes ( ) ; } }

Target:
public void computeDominators ( ) { if ( ( mDominators ) == null ) { mTopSort = com.android.tools.perflib.heap.analysis.TopologicalSort.compute ( getGCRoots ( ) ) ; mDominators = new com.android.tools.perflib.heap.analysis.Dominators ( this , mTopSort ) ; mDominators.computeRetainedSizes ( ) ; com.android.tools.perflib.heap.analysis.ShortestDistanceVisitor shortestDistanceVisitor = new com.android.tools.perflib.heap.analysis.ShortestDistanceVisitor ( ) ; shortestDistanceVisitor.doVisit ( getGCRoots ( ) ) ; } }
Source:
public void imageLoaded ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { loadImage ( ) ; crosshairLocation = model.getCrosshairLocation ( ) ; zoom = model.getZoom ( ) ; } } } ) ; doRedraw ( ) ; }

Target:
public void imageLoaded ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { loadImage ( ) ; crosshairLocation = model.getCrosshairLocation ( ) ; zoom = model.getZoom ( ) ; overlayImage = model.getOverlayImage ( ) ; } } } ) ; doRedraw ( ) ; }
Source:
public void testPlus ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.PLUS ) ; assertEquals ( ( "" + ( ( ( "build.gradle:9: Warning: Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (com.android.support:appcompat-v7:+) [GradleDynamicVersion]\n" + " compile \'com.android.support:appcompat-v7:+\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( "gradle/Plus.gradle=>build.gradle" ) ) ; }

Target:
public void testPlus ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.PLUS ) ; assertEquals ( ( "" + ( ( ( ( ( ( "build.gradle:9: Warning: Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (com.android.support:appcompat-v7:+) [GradleDynamicVersion]\n" + " compile \'com.android.support:appcompat-v7:+\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:10: Warning: Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (com.android.support:support-v4:21.0.+) [GradleDynamicVersion]\n" ) + " compile group: \'com.android.support\', name: \'support-v4\', version: \'21.0.+\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "gradle/Plus.gradle=>build.gradle" ) ) ; }
Source:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { libcore.tzdata.shared2.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { libcore.tzdata.shared2.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { libcore.tzdata.shared2.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }
Source:
public void testVerifyAppStats ( ) throws java.lang.Exception { for ( int user : mUsers ) { runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testAllocate" , user ) ; } getDevice ( ) . executeShellCommand ( "sync" ) ; for ( int user : mUsers ) { runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testVerifySpaceManual" , user ) ; runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testVerifySpaceApi" , user ) ; } }

Target:
public void testVerifyAppStats ( ) throws java.lang.Exception { for ( int user : mUsers ) { runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testAllocate" , user ) ; } java.lang.Thread.sleep ( 10000 ) ; getDevice ( ) . executeShellCommand ( "sync" ) ; for ( int user : mUsers ) { runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testVerifySpaceManual" , user ) ; runDeviceTests ( android.appsecurity.cts.StorageHostTest.PKG_A , android.appsecurity.cts.StorageHostTest.CLASS , "testVerifySpaceApi" , user ) ; } }
Source:
void dispatch ( final java.lang.Object event , final com.google.common.eventbus.EventHandler handler ) { executor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override @ java.lang.SuppressWarnings ( value = "synthetic-access" ) public void run ( ) { com.google.common.eventbus.AsyncEventBus.super . dispatch ( event , handler ) ; } } ) ; }

Target:
void dispatch ( final java.lang.Object event , final com.google.common.eventbus.EventSubscriber subscriber ) { com.google.common.base.Preconditions.checkNotNull ( event ) ; com.google.common.base.Preconditions.checkNotNull ( subscriber ) ; executor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.google.common.eventbus.AsyncEventBus.super . dispatch ( event , subscriber ) ; } } ) ; }
Source:
public boolean isNonTtyOrTtyOnVolteEnabledForSlot ( ) { if ( getBooleanCarrierConfigForSlot ( CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL ) ) { return true ; } return ( Settings.Secure.getInt ( mContext.getContentResolver ( ) , Settings.Secure.PREFERRED_TTY_MODE , TelecomManager.TTY_MODE_OFF ) ) == ( android.telecom.TelecomManager.TTY_MODE_OFF ) ; }

Target:
public boolean isNonTtyOrTtyOnVolteEnabledForSlot ( ) { if ( getBooleanCarrierConfigForSlot ( CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL ) ) { return true ; } android.telecom.TelecomManager tm = ( ( android.telecom.TelecomManager ) ( mContext.getSystemService ( Context.TELECOM_SERVICE ) ) ) ; if ( tm == null ) { android.util.Log.w ( com.android.ims.ImsManager.TAG , "isNonTtyOrTtyOnVolteEnabledForSlot: telecom not available" ) ; return true ; } return ( tm.getCurrentTtyMode ( ) ) == ( android.telecom.TelecomManager.TTY_MODE_OFF ) ; }
Source:
public void run ( ) { byte [ ] digest = null ; try { digest = getPackageContentsDigest ( ) ; } catch ( java.io.IOException e ) { android.util.Log.w ( com.android.packageinstaller.InstallFlowAnalytics.TAG , "Failed to hash APK contents" , e ) ; } finally { java.lang.String digestHex = ( digest != null ) ? com.android.packageinstaller.IntegralToString.bytesToHexString ( digest , false ) : "" ; com.android.packageinstaller.EventLogTags.writeInstallPackageAttempt ( resultAndFlags , totalElapsedTime , elapsedTimeTillPackageInfoObtained , elapsedTimeTillInstallButtonClick , digestHex ) ; } }

Target:
public void run ( ) { byte [ ] digest = null ; try { digest = getPackageContentsDigest ( ) ; } catch ( java.io.IOException e ) { android.util.Log.w ( com.android.packageinstaller.InstallFlowAnalytics.TAG , "Failed to hash APK contents" , e ) ; } finally { java.lang.String digestHex = ( digest != null ) ? com.android.internal.util.HexDump.toHexString ( digest , false ) : "" ; com.android.packageinstaller.EventLogTags.writeInstallPackageAttempt ( resultAndFlags , totalElapsedTime , elapsedTimeTillPackageInfoObtained , elapsedTimeTillInstallButtonClick , digestHex ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) { Main.testSingleInt ( ) ; Main.testSingle ( ) ; Main.testMultiInt ( ) ; Main.testMulti ( ) ; java.lang.System.out.println ( "ReflectArrayTest passed" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.testSingleInt ( ) ; Main.testSingleChar ( ) ; Main.testSingleShort ( ) ; Main.testSingleLong ( ) ; Main.testSingle ( ) ; Main.testMultiInt ( ) ; Main.testMulti ( ) ; java.lang.System.out.println ( "ReflectArrayTest passed" ) ; }
Source:
private void addStatusBarWindow ( ) { final int height = getStatusBarHeight ( ) ; final android.view.WindowManager.LayoutParams lp = new android.view.WindowManager.LayoutParams ( android.view.ViewGroup.LayoutParams.MATCH_PARENT , height , android.view.ViewGroup.LayoutParams.TYPE_STATUS_BAR , ( ( ( android.view.ViewGroup.LayoutParams.FLAG_NOT_FOCUSABLE ) | ( android.view.ViewGroup.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_SPLIT_TOUCH ) ) , android.graphics.PixelFormat.TRANSLUCENT ) ; lp.flags |= android.view.ViewGroup.LayoutParams.FLAG_HARDWARE_ACCELERATED ; lp.gravity = getStatusBarGravity ( ) ; lp.setTitle ( "StatusBar" ) ; lp.packageName = mContext.getPackageName ( ) ; makeStatusBarView ( ) ; mWindowManager.addView ( mStatusBarWindow , lp ) ; }

Target:
private void addStatusBarWindow ( ) { final int height = getStatusBarHeight ( ) ; final android.view.WindowManager.LayoutParams lp = new android.view.WindowManager.LayoutParams ( android.view.ViewGroup.LayoutParams.MATCH_PARENT , height , android.view.ViewGroup.LayoutParams.TYPE_STATUS_BAR , ( ( ( ( android.view.ViewGroup.LayoutParams.FLAG_NOT_FOCUSABLE ) | ( android.view.ViewGroup.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_SPLIT_TOUCH ) ) | ( android.view.ViewGroup.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH ) ) , android.graphics.PixelFormat.TRANSLUCENT ) ; lp.flags |= android.view.ViewGroup.LayoutParams.FLAG_HARDWARE_ACCELERATED ; lp.gravity = getStatusBarGravity ( ) ; lp.setTitle ( "StatusBar" ) ; lp.packageName = mContext.getPackageName ( ) ; makeStatusBarView ( ) ; mWindowManager.addView ( mStatusBarWindow , lp ) ; }
Source:
public java.lang.String getDensityFilter ( ) { return densityFilter ; }

Target:
public java.util.Collection < java.lang.String > getFilterTypes ( ) { com.google.common.collect.ImmutableList.Builder < java.lang.String > splitTypeBuilder = com.google.common.collect.ImmutableList.builder ( ) ; if ( ( densityFilter ) != null ) { splitTypeBuilder.add ( OutputFile.DENSITY ) ; } if ( ( abiFilter ) != null ) { splitTypeBuilder.add ( OutputFile.ABI ) ; } return splitTypeBuilder.build ( ) ; }
Source:
protected void addUserInputPages ( ) { com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeRefactoring ref = ( ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeRefactoring ) ( getRefactoring ( ) ) ) ; java.lang.String initialName = ref.getInitialName ( ) ; addPage ( new com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeWizard.InputPage ( mEditor.getProject ( ) , initialName ) ) ; }

Target:
protected void addUserInputPages ( ) { com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeRefactoring ref = ( ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeRefactoring ) ( getRefactoring ( ) ) ) ; java.lang.String initialName = ref.getInitialName ( ) ; org.eclipse.core.resources.IFile sourceFile = ref.getSourceFile ( ) ; addPage ( new com.android.ide.eclipse.adt.internal.editors.layout.refactoring.ExtractIncludeWizard.InputPage ( mEditor.getProject ( ) , sourceFile , initialName ) ) ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding targetType = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( x.qualification.resolvedType ) ) ; push ( makeThisReference ( info , targetType , true , scope ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding targetType = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( x.qualification.resolvedType ) ) ; push ( makeThisReference ( info , targetType , true , scope ) ) ; } catch ( com.android.jack.ir.ast.JTypeLookupException e ) { throw translateException ( x , e ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
protected void displayNetworkSelectionSucceeded ( ) { java.lang.String status = getContext ( ) . getResources ( ) . getString ( R.string.registration_done ) ; final com.android.phone.PhoneGlobals app = com.android.phone.PhoneGlobals.getInstance ( ) ; app.notificationMgr.postTransientNotification ( NotificationMgr.NETWORK_SELECTION_NOTIFICATION , status ) ; }

Target:
protected void displayNetworkSelectionSucceeded ( int msgArg1 ) { java.lang.String status = null ; if ( msgArg1 == ( com.android.phone.NetworkOperators.ALREADY_IN_AUTO_SELECTION ) ) { status = getContext ( ) . getResources ( ) . getString ( R.string.already_auto ) ; } else { status = getContext ( ) . getResources ( ) . getString ( R.string.registration_done ) ; } final com.android.phone.PhoneGlobals app = com.android.phone.PhoneGlobals.getInstance ( ) ; app.notificationMgr.postTransientNotification ( NotificationMgr.NETWORK_SELECTION_NOTIFICATION , status ) ; }
Source:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { gre.callClosure ( ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getClosure ( ) , a2 , key , ( ! isChecked ) ) ; } } }

Target:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { try { ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getCallback ( ) . action ( a2 , key , ( ! isChecked ) ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine gre = mCanvas.getRulesEngine ( ) ; gre.logError ( "XML edit operation failed: %s" , e.toString ( ) ) ; } } } }
Source:
static java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > convertHalDcList ( java.util.ArrayList < android.hardware.radio.V1_0.SetupDataCallResult > dcList ) { java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > dcResponseList = new java.util.ArrayList ( dcList.size ( ) ) ; for ( android.hardware.radio.V1_0.SetupDataCallResult dc : dcList ) { com.android.internal.telephony.dataconnection.DataCallResponse dcResponse = com.android.internal.telephony.RIL.convertHalDc ( dc ) ; dcResponseList.add ( dcResponse ) ; } return dcResponseList ; }

Target:
public static java.util.ArrayList < java.lang.Byte > primitiveArrayToArrayList ( byte [ ] arr ) { java.util.ArrayList < java.lang.Byte > arrayList = new java.util.ArrayList < > ( arr.length ) ; for ( byte b : arr ) { arrayList.add ( b ) ; } return arrayList ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { com.android.sdkuilib.internal.widgets.DeviceCreationDialog dlg = new com.android.sdkuilib.internal.widgets.DeviceCreationDialog ( mShell , mDeviceManager , mUpdaterData.getImageFactory ( ) , null ) ; if ( ( dlg.open ( ) ) == ( org.eclipse.jface.window.Window.OK ) ) { setupDevices ( menuBarDevices ) ; } }

Target:
private void createContents ( ) { org.eclipse.swt.widgets.TabFolder tabFolder = new org.eclipse.swt.widgets.TabFolder ( mShell , org.eclipse.swt.SWT.NONE ) ; com.android.sdkuilib.ui.GridDataBuilder.create ( tabFolder ) . fill ( ) . grab ( ) . hSpan ( 2 ) ; org.eclipse.swt.widgets.TabItem avdTabItem = new org.eclipse.swt.widgets.TabItem ( tabFolder , org.eclipse.swt.SWT.NONE ) ; avdTabItem.setText ( "Android Virtual Devices" ) ; createAvdTab ( tabFolder , avdTabItem ) ; org.eclipse.swt.widgets.TabItem devTabItem = new org.eclipse.swt.widgets.TabItem ( tabFolder , org.eclipse.swt.SWT.NONE ) ; devTabItem.setText ( "Device Definitions" ) ; createDeviceTab ( tabFolder , devTabItem ) ; }
Source:
public void canBeTetheredAsUsb ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_USB ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED , com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mTetherHelper , mNMService ) ; inOrder.verify ( mNMService ) . getInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mNMService ) . setInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mInterfaceConfiguration ) ; inOrder.verify ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }

Target:
public void canUnrequestTethering ( ) throws java.lang.Exception { initTetheredStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH , null ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mNMService , mStatsService , mTetherHelper ) ; inOrder.verify ( mNMService ) . untetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . updateInterfaceState ( mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; inOrder.verify ( mTetherHelper ) . updateLinkProperties ( org.mockito.Matchers.eq ( mTestedSm ) , org.mockito.Matchers.any ( android.net.LinkProperties.class ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }
Source:
public java.util.List < com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction > callGetContextMenu ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy selectedNode ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( selectedNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.getContextMenu ( selectedNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.getContextMenu() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }

Target:
public java.util.List < com.android.ide.common.api.MenuAction > callGetContextMenu ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy selectedNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( selectedNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.getContextMenu ( selectedNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.getContextMenu() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
private int getParameterWordCount ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int wordCount = ( method.isStatic ( ) ) ? 0 : Type.OBJECT.getWordCount ( ) ; for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( param.getMarker ( com.android.jack.transformations.lambda.CapturedVariable.class ) ) != null ) { continue ; } wordCount += com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( param.getType ( ) ) . getWordCount ( ) ; } return wordCount ; }

Target:
private int getParameterWordCount ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int wordCount = ( method.isStatic ( ) ) ? 0 : Type.OBJECT.getWordCount ( ) ; for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( param.getMarker ( com.android.jack.transformations.lambda.CapturedVariable.class ) ) != null ) { continue ; } wordCount += com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( param.getType ( ) , ( ( param.getMarker ( com.android.jack.transformations.lambda.ForceClosureMarker.class ) ) != null ) ) . getWordCount ( ) ; } return wordCount ; }
Source:
public int getApplicationEnabledSetting ( java.lang.String packageName ) { synchronized ( mPackages ) { return mSettings.getApplicationEnabledSettingLPr ( packageName ) ; } }

Target:
public int getApplicationEnabledSetting ( java.lang.String packageName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { return mSettings.getApplicationEnabledSettingLPr ( packageName , userId ) ; } }
Source:
private static void testClassVersion ( ) { java.lang.System.out.println ( java.util.Arrays.toString ( art.Test912.getClassVersion ( art.Main.class ) ) ) ; }

Target:
private static void testClassVersion ( ) throws java.lang.Exception { java.lang.Class < ? > class_loader_class = java.lang.Class.forName ( "dalvik.system.InMemoryDexClassLoader" ) ; java.lang.reflect.Constructor < ? > ctor = class_loader_class.getConstructor ( java.nio.ByteBuffer.class , java.lang.ClassLoader.class ) ; java.lang.Class target = ( ( java.lang.ClassLoader ) ( ctor.newInstance ( java.nio.ByteBuffer.wrap ( art.Test912.DEX_BYTES ) , art.Test912.class . getClassLoader ( ) ) ) ) . loadClass ( "Transform" ) ; java.lang.System.out.println ( java.util.Arrays.toString ( art.Test912.getClassVersion ( target ) ) ) ; }