auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void copyFrom ( float [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFrom ( java.lang.Object array ) { copyFromUnchecked ( array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void onChildInserted ( com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onChildInserted ( child , parent , insertType ) ; java.lang.String fillParent = getFillParentValueName ( ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , fillParent ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , fillParent ) ; }

Target:
public void onChildInserted ( com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onChildInserted ( child , parent , insertType ) ; java.lang.String fillParent = getFillParentValueName ( ) ; child.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , fillParent ) ; child.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , fillParent ) ; }
Source:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mUsesRtlAttributes ) && ( ( mEnabledRtlSupport ) == null ) ) && ( rtlApplies ( context ) ) ) { java.io.File manifestFile = context.getMainProject ( ) . getManifestFile ( ) ; if ( manifestFile != null ) { com.android.tools.lint.detector.api.Location location = com.android.tools.lint.detector.api.Location.create ( manifestFile ) ; context.report ( com.android.tools.lint.checks.RtlDetector.ENABLED , location , ( "The project references RTL attributes, but does not explicitly enable " + "or disable RTL support with android:supportsRtl in the manifest" ) , null ) ; } } }

Target:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mUsesRtlAttributes ) && ( ( mEnabledRtlSupport ) == null ) ) && ( rtlApplies ( context ) ) ) { java.util.List < java.io.File > manifestFile = context.getMainProject ( ) . getManifestFiles ( ) ; if ( ! ( manifestFile.isEmpty ( ) ) ) { com.android.tools.lint.detector.api.Location location = com.android.tools.lint.detector.api.Location.create ( manifestFile.get ( 0 ) ) ; context.report ( com.android.tools.lint.checks.RtlDetector.ENABLED , location , ( "The project references RTL attributes, but does not explicitly enable " + "or disable RTL support with android:supportsRtl in the manifest" ) , null ) ; } } }
Source:
public static final android.content.pm.IPackageManager main ( android.content.Context context , boolean factoryTest , boolean onlyCore ) { com.android.server.pm.PackageManagerService m = new com.android.server.pm.PackageManagerService ( context , factoryTest , onlyCore ) ; android.os.ServiceManager.addService ( "package" , m ) ; return m ; }

Target:
public static final android.content.pm.IPackageManager main ( android.content.Context context , com.android.server.pm.Installer installer , boolean factoryTest , boolean onlyCore ) { com.android.server.pm.PackageManagerService m = new com.android.server.pm.PackageManagerService ( context , installer , factoryTest , onlyCore ) ; android.os.ServiceManager.addService ( "package" , m ) ; return m ; }
Source:
private com.android.jack.jayce.MethodNode getNNode ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod loaded ) throws com.android.jack.jayce.JayceFormatException , com.android.jack.jayce.JayceVersionException , java.io.IOException { com.android.jack.jayce.MethodNode methodNode = nnode.get ( ) ; if ( ( methodNode == null ) || ( ( methodNode.getLevel ( ) ) != ( NodeLevel.FULL ) ) ) { com.android.jack.jayce.DeclaredTypeNode declaredTypeNode = enclosingClassLoader.getNNode ( NodeLevel.FULL ) ; methodNode = declaredTypeNode.getMethodNode ( loaded ) ; } return methodNode ; }

Target:
private com.android.jack.jayce.MethodNode getNNode ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod loaded ) throws com.android.jack.jayce.JayceFormatException , com.android.jack.jayce.JayceVersionException , java.io.IOException { com.android.jack.jayce.MethodNode methodNode = nnode.get ( ) ; if ( ( methodNode == null ) || ( ( methodNode.getLevel ( ) ) != ( NodeLevel.FULL ) ) ) { com.android.jack.jayce.DeclaredTypeNode declaredTypeNode = enclosingClassLoader.getNNode ( NodeLevel.FULL , loaded.getEnclosingType ( ) . getSession ( ) . getUserLogger ( ) ) ; methodNode = declaredTypeNode.getMethodNode ( loaded ) ; } return methodNode ; }
Source:
private static java.lang.String toUnsignedString0 ( long i , int shift ) { char [ ] buf = new char [ 64 ] ; int charPos = 64 ; int radix = 1 << shift ; long mask = radix - 1 ; do { buf [ ( -- charPos ) ] = java.lang.Integer.digits [ ( ( int ) ( i & mask ) ) ] ; i >>>= shift ; } while ( i != 0 ) ; return new java.lang.String ( buf , charPos , ( 64 - charPos ) ) ; }

Target:
static int formatUnsignedLong ( long val , int shift , char [ ] buf , int offset , int len ) { int charPos = len ; int radix = 1 << shift ; int mask = radix - 1 ; do { buf [ ( offset + ( -- charPos ) ) ] = java.lang.Integer.digits [ ( ( ( int ) ( val ) ) & mask ) ] ; val >>>= shift ; } while ( ( val != 0 ) && ( charPos > 0 ) ) ; return charPos ; }
Source:
public void testNoGoodFile ( ) throws java.lang.Exception { java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( emptyFilePath ) ; assertEquals ( "missing" , data.getVersion ( ) ) ; assertEquals ( 1 , data.getAvailableIDs ( ) . length ) ; assertEquals ( "GMT" , data.getAvailableIDs ( ) [ 0 ] ) ; }

Target:
public void testLoadTzDataWithFallback_noGoodFile ( ) throws java.lang.Exception { java.lang.String emptyFilePath = libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) . getPath ( ) ; libcore.util.ZoneInfoDB.TzData data = ZoneInfoDB.TzData.loadTzDataWithFallback ( emptyFilePath ) ; assertEquals ( "missing" , data.getVersion ( ) ) ; assertEquals ( 1 , data.getAvailableIDs ( ) . length ) ; assertEquals ( "GMT" , data.getAvailableIDs ( ) [ 0 ] ) ; }
Source:
public boolean removeUser ( int userId ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can remove users" ) ; if ( ( userId == 0 ) || ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) ) { return false ; } cleanUpUser ( userId ) ; if ( com.android.server.pm.PackageManagerService.sUserManager.removeUser ( userId ) ) { android.content.Intent addedIntent = new android.content.Intent ( android.content.Intent.ACTION_USER_REMOVED ) ; addedIntent.putExtra ( Intent.EXTRA_USERID , userId ) ; mContext.sendBroadcast ( addedIntent , android.Manifest.permission.MANAGE_ACCOUNTS ) ; } com.android.server.pm.PackageManagerService.sUserManager.removePackageFolders ( userId ) ; return true ; }

Target:
void schedulePackageCleaning ( java.lang.String packageName , int userId , boolean andCode ) { if ( false ) { java.lang.RuntimeException here = new java.lang.RuntimeException ( "here" ) ; here.fillInStackTrace ( ) ; android.util.Slog.d ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( ( "Schedule cleaning " + packageName ) + " user=" ) + userId ) + " andCode=" ) + andCode ) , here ) ; } mHandler.sendMessage ( mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.START_CLEANING_PACKAGE , userId , ( andCode ? 1 : 0 ) , packageName ) ) ; }
Source:
protected java.util.Map getBaseParameters ( org.bouncycastle.asn1.ASN1ObjectIdentifier contentType , org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId , byte [ ] hash ) { java.util.Map param = new java.util.HashMap ( ) ; param.put ( CMSAttributeTableGenerator.CONTENT_TYPE , contentType ) ; param.put ( CMSAttributeTableGenerator.DIGEST_ALGORITHM_IDENTIFIER , digAlgId ) ; param.put ( CMSAttributeTableGenerator.DIGEST , hash.clone ( ) ) ; return param ; }

Target:
protected java.util.Map getBaseParameters ( org.bouncycastle.asn1.ASN1ObjectIdentifier contentType , org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId , byte [ ] hash ) { java.util.Map param = new java.util.HashMap ( ) ; param.put ( CMSAttributeTableGenerator.CONTENT_TYPE , contentType ) ; param.put ( CMSAttributeTableGenerator.DIGEST_ALGORITHM_IDENTIFIER , digAlgId ) ; param.put ( CMSAttributeTableGenerator.DIGEST , org.bouncycastle.util.Arrays.clone ( hash ) ) ; return param ; }
Source:
public static int InlineWithControlFlow ( boolean cond ) { int x ; int const1 ; int const3 ; int const5 ; const1 = 1 ; const3 = 3 ; const5 = 5 ; if ( cond ) { x = Main.returnAdd ( const1 , const3 ) ; } else { x = Main.returnSub ( const5 , const3 ) ; } return x ; }

Target:
public static int InlineWithControlFlow ( boolean cond ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Smali" ) ; java.lang.reflect.Method m = c.getMethod ( "InlineWithControlFlow" , boolean . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , cond ) ) ) ; } catch ( java.lang.Throwable t ) { throw new java.lang.RuntimeException ( t ) ; } }
Source:
public void testCompile022 ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test022.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; { input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; } checkCompiledCode ( packageName , input ) ; }

Target:
public void testCompile020a ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test020.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , false ) ) ; input.put ( "Switch2" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , false ) ) ; input.put ( "SyntheticSwitchmapClass-*" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; compileCode ( packageName , input ) ; }
Source:
private void writeObject ( java.io.ObjectOutputStream s ) throws java.io.IOException { s.defaultWriteObject ( ) ; java.lang.Object [ ] elements = getArray ( ) ; s.writeInt ( elements.length ) ; for ( java.lang.Object element : elements ) s.writeObject ( element ) ; }

Target:
public E set ( int index , E object ) { synchronized ( this ) { slice.checkElementIndex ( index ) ; slice.checkConcurrentModification ( elements ) ; E result = this . set ( ( index + ( slice.from ) ) , object ) ; slice = new java.util.concurrent.CopyOnWriteArrayList.Slice ( elements , slice.from , slice.to ) ; return result ; } }
Source:
public android.net.IpSecTransform buildTunnelModeTransform ( java.net.InetAddress localAddress , java.net.InetAddress remoteAddress ) { mConfig.setLocalAddress ( localAddress.getHostAddress ( ) ) ; mConfig.setRemoteAddress ( remoteAddress.getHostAddress ( ) ) ; mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( java.net.InetAddress localAddress , java.net.InetAddress remoteAddress ) { if ( localAddress == null ) { throw new java.lang.IllegalArgumentException ( "Local address may not be null or empty!" ) ; } if ( remoteAddress == null ) { throw new java.lang.IllegalArgumentException ( "Remote address may not be null or empty!" ) ; } mConfig.setLocalAddress ( localAddress.getHostAddress ( ) ) ; mConfig.setRemoteAddress ( remoteAddress.getHostAddress ( ) ) ; mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }
Source:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , "getConnectedDevices()" ) ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { return service.getConnectedDevices ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { android.util.Log.v ( android.bluetooth.BluetoothHidDevice.TAG , "getConnectedDevices()" ) ; final android.bluetooth.IBluetoothHidDevice service = mService ; if ( service != null ) { try { return service.getConnectedDevices ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHidDevice.TAG , "Proxy not attached to service" ) ; } return new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; }
Source:
public static java.lang.annotation.Annotation createAnnotation ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationType , org.apache.harmony.lang.annotation.AnnotationMember [ ] elements ) { org.apache.harmony.lang.annotation.AnnotationFactory antn = new org.apache.harmony.lang.annotation.AnnotationFactory ( annotationType , elements ) ; return ( ( java.lang.annotation.Annotation ) ( java.lang.reflect.Proxy.newProxyInstance ( annotationType.getClassLoader ( ) , new java.lang.Class [ ] { annotationType } , antn ) ) ) ; }

Target:
public static java.lang.annotation.Annotation createAnnotation ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationType , org.apache.harmony.lang.annotation.AnnotationMember [ ] elements ) { org.apache.harmony.lang.annotation.AnnotationFactory factory = new org.apache.harmony.lang.annotation.AnnotationFactory ( annotationType , elements ) ; return ( ( java.lang.annotation.Annotation ) ( java.lang.reflect.Proxy.newProxyInstance ( annotationType.getClassLoader ( ) , new java.lang.Class [ ] { annotationType } , factory ) ) ) ; }
Source:
public boolean registerRemoteController ( android.media.IRemoteControlDisplay rcd , int w , int h , android.content.ComponentName listenerComp ) { return mMediaFocusControl.registerRemoteController ( rcd , w , h , listenerComp ) ; }

Target:
private boolean volumeAdjustmentAllowedByDnd ( int streamTypeAlias , int flags ) { if ( ( ( mNm.getZenMode ( ) ) == ( Settings.Global.ZEN_MODE_NO_INTERRUPTIONS ) ) && ( isStreamMutedByRingerMode ( streamTypeAlias ) ) ) { if ( ! ( ( ( flags & ( android.media.AudioManager.FLAG_ALLOW_RINGER_MODES ) ) != 0 ) || ( streamTypeAlias == ( getUiSoundsStreamType ( ) ) ) ) ) { return false ; } } return true ; }
Source:
static final < K , V > java.util.concurrent.ConcurrentHashMap.Segment < K , V > [ ] newArray ( int i ) { return new java.util.concurrent.ConcurrentHashMap.Segment [ i ] ; }

Target:
static final < K , V > java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > entryAt ( java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > [ ] tab , int i ) { return tab == null ? null : ( ( java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > ) ( java.util.concurrent.ConcurrentHashMap.UNSAFE.getObjectVolatile ( tab , ( ( ( ( long ) ( i ) ) << ( java.util.concurrent.ConcurrentHashMap.TSHIFT ) ) + ( java.util.concurrent.ConcurrentHashMap.TBASE ) ) ) ) ) ; }
Source:
final void updateTransitLocked ( int transit , android.os.Bundle options ) { if ( options != null ) { com.android.server.am.ActivityRecord r = topRunningActivityLocked ( null ) ; if ( ( r != null ) && ( ( r.state ) != ( com.android.server.am.ActivityStack.ActivityState.RESUMED ) ) ) { r.updateOptionsLocked ( options ) ; } else { android.app.ActivityOptions.abort ( options ) ; } } mService.mWindowManager.prepareAppTransition ( transit , false ) ; }

Target:
final void updateTransitLocked ( int transit , android.os.Bundle options ) { if ( options != null ) { com.android.server.am.ActivityRecord r = topRunningActivityLocked ( null ) ; if ( ( r != null ) && ( ( r.state ) != ( com.android.server.am.ActivityStack.ActivityState.RESUMED ) ) ) { r.updateOptionsLocked ( options ) ; } else { android.app.ActivityOptions.abort ( options ) ; } } mWindowManager.prepareAppTransition ( transit , false ) ; }
Source:
public boolean mergeProfiles ( int uid , java.lang.String packageName ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.mergeProfiles ( uid , packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public boolean mergeProfiles ( int uid , java.lang.String packageName ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.mergeProfiles ( uid , packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
private com.android.tools.lint.checks.TestFile getManifestWithPermissions ( int targetSdk , java.lang.String ... permissions ) { java.lang.StringBuilder permissionBlock = new java.lang.StringBuilder ( ) ; for ( java.lang.String permission : permissions ) { permissionBlock.append ( " <uses-permission android:name=\"" ) . append ( permission ) . append ( "\" />\n" ) ; } return xml ( "AndroidManifest.xml" , ( ( ( ( ( ( ( ( ( ( ( ( "" + ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"foo.bar2\"\n" ) + " android:versionCode=\"1\"\n" ) + " android:versionName=\"1.0\" >\n" ) + "\n" ) + " <uses-sdk android:minSdkVersion=\"14\" android:targetSdkVersion=\"" ) ) + targetSdk ) + "\" />\n" ) + "\n" ) + ( permissionBlock.toString ( ) ) ) + "\n" ) + " <application\n" ) + " android:icon=\"@drawable/ic_launcher\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " </application>\n" ) + "\n" ) + "</manifest>" ) ) ; }

Target:
private com.android.tools.lint.checks.TestFile getManifestWithPermissions ( int minSdk , int targetSdk , java.lang.String ... permissions ) { java.lang.StringBuilder permissionBlock = new java.lang.StringBuilder ( ) ; for ( java.lang.String permission : permissions ) { permissionBlock.append ( " <uses-permission android:name=\"" ) . append ( permission ) . append ( "\" />\n" ) ; } return xml ( "AndroidManifest.xml" , ( ( ( ( ( ( ( ( ( ( ( ( "" + ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"foo.bar2\"\n" ) + " android:versionCode=\"1\"\n" ) + " android:versionName=\"1.0\" >\n" ) + "\n" ) + " <uses-sdk android:minSdkVersion=\"14\" android:targetSdkVersion=\"" ) ) + targetSdk ) + "\" />\n" ) + "\n" ) + ( permissionBlock.toString ( ) ) ) + "\n" ) + " <application\n" ) + " android:icon=\"@drawable/ic_launcher\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " </application>\n" ) + "\n" ) + "</manifest>" ) ) ; }
Source:
private void onUpChanged ( boolean isUp ) { if ( isUp == ( mIfaceIsUp ) ) { return ; } mIfaceIsUp = isUp ; if ( isUp ) { android.util.Log.d ( com.android.server.wifi.SoftApManager.TAG , "SoftAp is ready for use" ) ; updateApState ( WifiManager.WIFI_AP_STATE_ENABLED , 0 ) ; } else { } }

Target:
private void onUpChanged ( boolean isUp ) { if ( isUp == ( mIfaceIsUp ) ) { return ; } mIfaceIsUp = isUp ; if ( isUp ) { android.util.Log.d ( com.android.server.wifi.SoftApManager.TAG , "SoftAp is ready for use" ) ; updateApState ( WifiManager.WIFI_AP_STATE_ENABLED , 0 ) ; mWifiMetrics.incrementSoftApStartResult ( true , 0 ) ; } else { } }
Source:
public void test_ConstructorLjava_lang_String ( ) { java.lang.ThreadGroup newGroup = null ; java.lang.ThreadGroup initial = getInitialThreadGroup ( ) ; final java.lang.String name = "Test name" ; newGroup = new java.lang.ThreadGroup ( name ) ; assertTrue ( "Has to be possible to create a subgroup of current group using simple constructor" , ( ( newGroup.getParent ( ) ) == initial ) ) ; assertTrue ( "Name has to be correct" , newGroup.getName ( ) . equals ( name ) ) ; newGroup.destroy ( ) ; }

Target:
public void test_ConstructorLjava_lang_String ( ) { java.lang.ThreadGroup initial = initialThreadGroup ; final java.lang.String name = "Test name" ; java.lang.ThreadGroup newGroup = new java.lang.ThreadGroup ( name ) ; assertTrue ( "Has to be possible to create a subgroup of current group using simple constructor" , ( ( newGroup.getParent ( ) ) == initial ) ) ; assertTrue ( "Name has to be correct" , newGroup.getName ( ) . equals ( name ) ) ; newGroup.destroy ( ) ; }
Source:
public void testInstall_withNewerBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) . setBundleVersionForTests ( "002.001" ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withNewerBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_FORMAT_VERSION , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public org.objectweb.asm.tree.analysis.SourceValue newOperation ( org.objectweb.asm.tree.AbstractInsnNode insn ) { if ( ( insn.getOpcode ( ) ) == ( org.objectweb.asm.Opcodes.NEW ) ) { java.lang.String desc = ( ( org.objectweb.asm.tree.TypeInsnNode ) ( insn ) ) . desc ; return new com.android.tools.lint.checks.JavaScriptInterfaceDetector.TypeValue ( 1 , desc ) ; } return super . newOperation ( insn ) ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedClass getType ( ) { lombok.ast.Expression first = mTargetCall.astArguments ( ) . first ( ) ; com.android.tools.lint.client.api.JavaParser.ResolvedClass resolvedClass = mTypes.get ( first ) ; if ( resolvedClass == null ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = mContext.resolve ( first ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedVariable ) { resolvedClass = mVariableTypes.get ( resolved ) ; if ( resolvedClass == null ) { return ( ( com.android.tools.lint.client.api.JavaParser.ResolvedVariable ) ( resolved ) ) . getType ( ) . getTypeClass ( ) ; } } } return resolvedClass ; }
Source:
public void tearDown ( ) { if ( ( mReceiver ) != null ) mReceiver.stop ( ) ; mReceiver = null ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ( mReceiver ) != null ) { mHandlerThread.getThreadHandler ( ) . post ( ( ) -> { mReceiver.stop ( ) ; } ) ; waitForActivity ( ) ; } mReceiver = null ; mHandlerThread.quit ( ) ; mHandlerThread = null ; }
Source:
public void setLayerType ( final int layerType , final android.graphics.Paint paint ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setLayerType ( layerType , paint ) ; } } ) ; return ; } mAwContents.setLayerType ( layerType , paint ) ; }

Target:
public int computeHorizontalScrollRange ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeHorizontalScrollRange ( ) ; } } ) ; return ret ; } return mAwContents.computeHorizontalScrollRange ( ) ; }
Source:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc ( ) ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode ( ) ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }

Target:
public boolean isValidShortNumberForRegion ( java.lang.String shortNumber , java.lang.String regionDialingFrom ) { com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc generalDesc = phoneMetadata.generalDesc ; if ( ! ( matchesPossibleNumberAndNationalNumber ( shortNumber , generalDesc ) ) ) { return false ; } com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc shortNumberDesc = phoneMetadata.shortCode ; return matchesPossibleNumberAndNationalNumber ( shortNumber , shortNumberDesc ) ; }
Source:
public static < E extends java.lang.Enum < E > > java.util.EnumSet < E > range ( E start , E end ) { if ( ( start.compareTo ( end ) ) > 0 ) { throw new java.lang.IllegalArgumentException ( ) ; } java.util.EnumSet < E > set = java.util.EnumSet.noneOf ( start.getDeclaringClass ( ) ) ; set.setRange ( start , end ) ; return set ; }

Target:
public static < E extends java.lang.Enum < E > > java.util.EnumSet < E > range ( E start , E end ) { if ( ( start.compareTo ( end ) ) > 0 ) { throw new java.lang.IllegalArgumentException ( "start is behind end" ) ; } java.util.EnumSet < E > set = java.util.EnumSet.noneOf ( start.getDeclaringClass ( ) ) ; set.setRange ( start , end ) ; return set ; }
Source:
public void testEnded ( com.android.ddmlib.testrunner.TestIdentifier test ) { ( mNumTestsRun ) ++ ; assertEquals ( "Unexpected class name" , mSuiteName , test.getClassName ( ) ) ; assertEquals ( "Unexpected test ended" , mTestName , test.getTestName ( ) ) ; }

Target:
public void testEnded ( com.android.ddmlib.testrunner.TestIdentifier test , java.util.Map < java.lang.String , java.lang.String > testMetrics ) { ( mNumTestsRun ) ++ ; mTestMetrics = testMetrics ; assertEquals ( "Unexpected class name" , mSuiteName , test.getClassName ( ) ) ; assertEquals ( "Unexpected test ended" , mTestName , test.getTestName ( ) ) ; }
Source:
boolean rejectIncomingConnect ( android.bluetooth.BluetoothDevice device ) { return false ; }

Target:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { return false ; } return ( stateMachine.getAudioState ( ) ) == ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ; } }
Source:
public java.lang.String performSanityCheck ( com.intellij.openapi.project.Project project , java.lang.String cloudProjectId ) { com.google.api.services.storage.model.Buckets buckets = null ; java.lang.String message = null ; try { com.google.api.services.storage.Storage.Buckets.List listBuckets = com.google.gct.testing.launcher.CloudAuthenticator.getStorage ( ) . buckets ( ) . list ( cloudProjectId ) ; buckets = listBuckets.execute ( ) ; } catch ( java.lang.Throwable t ) { message = t.getMessage ( ) ; } finally { if ( buckets == null ) { return ( "Failed to authorize to Google Cloud project! Please select a project you are authorized to use.\n" + "Exception while performing a pre-trigger sanity check\n\n" ) + message ; } } return null ; }

Target:
public java.lang.String validateCloudProject ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.project.Project project , @ org.jetbrains.annotations.NotNull java.lang.String cloudProjectId ) { com.google.api.services.storage.model.Buckets buckets = null ; java.lang.String message = null ; try { com.google.api.services.storage.Storage.Buckets.List listBuckets = com.google.gct.testing.launcher.CloudAuthenticator.getStorage ( ) . buckets ( ) . list ( cloudProjectId ) ; buckets = listBuckets.execute ( ) ; } catch ( java.lang.Throwable t ) { message = t.getMessage ( ) ; } finally { if ( buckets == null ) { return ( "Failed to authorize to Google Cloud project! Please select a project you are authorized to use.\n" + "Exception while performing a pre-trigger sanity check\n\n" ) + message ; } } return null ; }
Source:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }

Target:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } if ( com.intellij.ide.actions.ShowStructureSettingsAction.isGradleProject ( project ) ) { com.intellij.openapi.ui.Messages.showInfoMessage ( ( "We will provide a UI to configure project settings later. " + "Until then, please manually edit your build.gradle file(s.)" ) , "Project Structure" ) ; return ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "BaseConfigImpl{" + "mBuildConfigFields=" ) + ( mBuildConfigFields ) ) + ", mResValues=" ) + ( mResValues ) ) + ", mProguardFiles=" ) + ( mProguardFiles ) ) + ", mConsumerProguardFiles=" ) + ( mConsumerProguardFiles ) ) + ", mManifestPlaceholders=" ) + ( mManifestPlaceholders ) ) + ", mMultiDexEnabled=" ) + ( mMultiDexEnabled ) ) + '}' ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "BaseConfigImpl{" + "mBuildConfigFields=" ) + ( mBuildConfigFields ) ) + ", mResValues=" ) + ( mResValues ) ) + ", mProguardFiles=" ) + ( mProguardFiles ) ) + ", mConsumerProguardFiles=" ) + ( mConsumerProguardFiles ) ) + ", mManifestPlaceholders=" ) + ( mManifestPlaceholders ) ) + ", mMultiDexEnabled=" ) + ( mMultiDexEnabled ) ) + ", mMultiDexKeepFile=" ) + ( mMultiDexKeepFile ) ) + ", mMultiDexKeepProguard=" ) + ( mMultiDexKeepProguard ) ) + '}' ; }
Source:
public java.lang.String getMessage ( ) { return "Duplicate files at the same path inside the APK: " + ( mArchivePath ) ; }

Target:
public java.lang.String getMessage ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "Duplicate files copied in APK " ) . append ( mArchivePath ) . append ( '\n' ) ; sb.append ( "\tFile 1: " ) . append ( mFile1 ) . append ( '\n' ) ; sb.append ( "\tFile 2: " ) . append ( mFile1 ) . append ( '\n' ) ; return sb.toString ( ) ; }
Source:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { considerName ( owner ) ; considerDesc ( desc ) ; if ( com.android.tools.layoutlib.create.ReplaceMethodCallsAdapter.isReplacementNeeded ( owner , name , desc , mOwnerClass ) ) { mReplaceMethodCallClasses.add ( mOwnerClass ) ; } }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { considerName ( owner ) ; considerDesc ( desc ) ; if ( com.android.tools.layoutlib.create.ReplaceMethodCallsAdapter.isReplacementNeeded ( owner , name , desc , mOwnerClass ) ) { mReplaceMethodCallClasses.add ( mOwnerClass ) ; } }
Source:
public boolean hangupRemote ( int connectionId , int failCause ) { com.android.internal.telephony.ril_proto.RilCtrlCmds.CtrlHangupConnRemote req = new com.android.internal.telephony.ril_proto.RilCtrlCmds.CtrlHangupConnRemote ( ) ; req.setConnectionId ( connectionId ) ; req.setCallFailCause ( failCause ) ; if ( ! ( sendCtrlCommand ( RilCtrlCmds.CTRL_CMD_HANGUP_CONN_REMOTE , 0 , 0 , req ) ) ) { android.util.Log.v ( com.android.internal.telephony.mockril.MockRilController.TAG , "send CTRL_CMD_HANGUP_CONN_REMOTE request failed" ) ; return false ; } return true ; }

Target:
public boolean hangupRemote ( int connectionId , int failCause ) { com.android.internal.telephony.ril_proto.RilCtrlCmds.CtrlHangupConnRemote req = new com.android.internal.telephony.ril_proto.RilCtrlCmds.CtrlHangupConnRemote ( ) ; req.setConnectionId ( connectionId ) ; req.setCallFailCause ( failCause ) ; if ( ! ( sendCtrlCommand ( RilCtrlCmds.CTRL_CMD_HANGUP_CONN_REMOTE , 0 , 0 , req ) ) ) { android.telephony.Rlog.v ( com.android.internal.telephony.mockril.MockRilController.TAG , "send CTRL_CMD_HANGUP_CONN_REMOTE request failed" ) ; return false ; } return true ; }
Source:
public void validateSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; cred.simCredential.imsi = "dummy" ; cred.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateCredentialWithUserAndSimCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithUserCredential ( ) ; android.net.wifi.hotspot2.pps.Credential.SimCredential simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; simCredential.setImsi ( "1234*" ) ; simCredential.setEapType ( EAPConstants.EAP_SIM ) ; cred.setSimCredential ( simCredential ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
private void onInterfaceAddressChangeLocal ( byte [ ] mac ) { if ( com.android.server.wifi.nan.WifiNanStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.nan.WifiNanStateManager.TAG , ( "onInterfaceAddressChange: mac=" + ( java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ) ) ; } mCurrentDiscoveryInterfaceMac = mac ; for ( int i = 0 ; i < ( mClients.size ( ) ) ; ++ i ) { com.android.server.wifi.nan.WifiNanClientState client = mClients.valueAt ( i ) ; client.onInterfaceAddressChange ( mac ) ; } }

Target:
private void onInterfaceAddressChangeLocal ( byte [ ] mac ) { if ( com.android.server.wifi.aware.WifiAwareStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareStateManager.TAG , ( "onInterfaceAddressChange: mac=" + ( java.lang.String.valueOf ( libcore.util.HexEncoding.encode ( mac ) ) ) ) ) ; } mCurrentDiscoveryInterfaceMac = mac ; for ( int i = 0 ; i < ( mClients.size ( ) ) ; ++ i ) { com.android.server.wifi.aware.WifiAwareClientState client = mClients.valueAt ( i ) ; client.onInterfaceAddressChange ( mac ) ; } }
Source:
public boolean reset ( ) { checkSystemCaller ( ) ; removeAllGrants ( mDatabaseHelper.getWritableDatabase ( ) ) ; boolean ok = true ; synchronized ( mTrustedCertificateStore ) { for ( java.lang.String alias : mTrustedCertificateStore.aliases ( ) ) { if ( org.apache.harmony.xnet.provider.jsse.TrustedCertificateStore.isUser ( alias ) ) { if ( ! ( deleteCertificateEntry ( alias ) ) ) { ok = false ; } } } } broadcastStorageChange ( ) ; return ok ; }

Target:
public boolean reset ( ) { checkSystemCaller ( ) ; removeAllGrants ( mDatabaseHelper.getWritableDatabase ( ) ) ; boolean ok = true ; synchronized ( mTrustedCertificateStore ) { for ( java.lang.String alias : mTrustedCertificateStore.aliases ( ) ) { if ( com.android.org.conscrypt.TrustedCertificateStore.isUser ( alias ) ) { if ( ! ( deleteCertificateEntry ( alias ) ) ) { ok = false ; } } } } broadcastStorageChange ( ) ; return ok ; }
Source:
private void loadUrlOnUiThread ( final org.chromium.content.browser.LoadUrlParams loadUrlParams ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { assert ( mAppTargetSdkVersion ) < ( Build.VERSION_CODES.JELLY_BEAN_MR2 ) ; mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mAwContents.loadUrl ( loadUrlParams ) ; } } ) ; return ; } mAwContents.loadUrl ( loadUrlParams ) ; }

Target:
private void loadUrlOnUiThread ( final org.chromium.content_public.browser.LoadUrlParams loadUrlParams ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { assert ( mAppTargetSdkVersion ) < ( Build.VERSION_CODES.JELLY_BEAN_MR2 ) ; mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mAwContents.loadUrl ( loadUrlParams ) ; } } ) ; return ; } mAwContents.loadUrl ( loadUrlParams ) ; }
Source:
private void loadTestProperties ( @ javax.annotation.Nonnull java.util.Properties properties ) throws java.io.FileNotFoundException , java.io.IOException { for ( com.android.jack.test.runtime.RuntimeTestInfo info : runtimeTestInfos ) { java.io.File propertyFile = new java.io.File ( info.directory , info.propertyFileName ) ; if ( propertyFile.exists ( ) ) { if ( ( runtimeTestInfos.length ) > 1 ) { throw new java.lang.AssertionError ( ( "Not a regression test: " + ( info.directory.getAbsolutePath ( ) ) ) ) ; } properties.load ( new java.io.FileInputStream ( propertyFile ) ) ; break ; } } }

Target:
private void loadTestProperties ( @ javax.annotation.Nonnull java.util.Properties properties ) throws java.io.FileNotFoundException , java.io.IOException { for ( com.android.jack.test.runtime.RuntimeTestInfo info : runtimeTestInfos ) { java.io.File propertyFile = new java.io.File ( info.directory , info.propertyFileName ) ; if ( propertyFile.exists ( ) ) { if ( ( runtimeTestInfos.length ) > 1 ) { throw new java.lang.AssertionError ( ( "Not a regression test: " + ( info.directory.getAbsolutePath ( ) ) ) ) ; } com.android.jack.test.helper.RuntimeTestHelper.loadTestProperties ( propertyFile , properties ) ; break ; } } }
Source:
private synchronized void addMediaPlayerBrowsable ( java.lang.String packageName ) { com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( null , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getPlayStateBytes ( null ) , getFeatureBitMask ( packageName ) , packageName , getAppLabel ( packageName ) ) ; addMediaPlayerInfo ( info ) ; }

Target:
private synchronized boolean addMediaPlayerController ( com.android.bluetooth.avrcp.MediaController controller ) { java.lang.String packageName = controller.getPackageName ( ) ; com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( com.android.bluetooth.avrcp.MediaController.wrap ( controller ) , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getPlayStateBytes ( controller.getPlaybackState ( ) ) , getFeatureBitMask ( packageName ) , controller.getPackageName ( ) , getAppLabel ( packageName ) ) ; return addMediaPlayerInfo ( info ) ; }
Source:
void sendAndConsume ( com.android.ddmlib.JdwpPacket packet , com.android.ddmlib.ChunkHandler replyHandler ) throws java.io.IOException { if ( ( mChan ) == null ) { com.android.ddmlib.Log.v ( "ddms" , "Not sending packet -- client is closed" ) ; return ; } if ( replyHandler != null ) { addRequestId ( packet.getId ( ) , replyHandler ) ; } synchronized ( mChan ) { try { packet.writeAndConsume ( mChan ) ; } catch ( java.io.IOException ioe ) { removeRequestId ( packet.getId ( ) ) ; throw ioe ; } } }

Target:
void sendAndConsume ( com.android.ddmlib.JdwpPacket packet , com.android.ddmlib.ChunkHandler replyHandler ) throws java.io.IOException { java.nio.channels.SocketChannel chan = mChan ; if ( chan == null ) { com.android.ddmlib.Log.v ( "ddms" , "Not sending packet -- client is closed" ) ; return ; } if ( replyHandler != null ) { addRequestId ( packet.getId ( ) , replyHandler ) ; } synchronized ( chan ) { try { packet.writeAndConsume ( chan ) ; } catch ( java.io.IOException ioe ) { removeRequestId ( packet.getId ( ) ) ; throw ioe ; } } }
Source:
public void onProgressChanged ( int progress ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onProgressChanged=" + progress ) ) ; mWebChromeClient.onProgressChanged ( mWebView , progress ) ; } org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void onProgressChanged ( int progress ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onProgressChanged=" + progress ) ) ; mWebChromeClient.onProgressChanged ( mWebView , progress ) ; } org.chromium.base.TraceEvent.end ( ) ; }
Source:
synchronized int getAudioState ( ) { com.android.internal.util.IState state = getCurrentState ( ) ; if ( state == ( mAudioConnecting ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; } else if ( ( state == ( mAudioDisconnecting ) ) || ( state == ( mAudioOn ) ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; } else { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; } }

Target:
int getAudioStateInt ( ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; }
Source:
public synchronized int getConnectionState ( ) { com.android.internal.util.IState currentState = getCurrentState ( ) ; if ( currentState == ( mConnecting ) ) { return android.bluetooth.BluetoothProfile.STATE_CONNECTING ; } else if ( currentState instanceof com.android.bluetooth.hfp.HeadsetStateMachine.ConnectedBase ) { return android.bluetooth.BluetoothProfile.STATE_CONNECTED ; } else if ( currentState == ( mDisconnecting ) ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTING ; } return android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; }

Target:
int getConnectionStateInt ( ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTING ; }
Source:
private static boolean isThisYear ( java.util.Calendar c ) { java.util.Calendar now = java.util.Calendar.getInstance ( c.getTimeZone ( ) ) ; return ( c.get ( java.util.Calendar.YEAR ) ) == ( now.get ( java.util.Calendar.YEAR ) ) ; }

Target:
private static boolean isThisYear ( com.ibm.icu.util.Calendar c ) { com.ibm.icu.util.Calendar now = ( ( com.ibm.icu.util.Calendar ) ( c.clone ( ) ) ) ; now.setTimeInMillis ( java.lang.System.currentTimeMillis ( ) ) ; return ( c.get ( Calendar.YEAR ) ) == ( now.get ( Calendar.YEAR ) ) ; }
Source:
public static java.lang.String getSanitizedSensorName ( android.hardware.Sensor sensor ) throws java.io.IOException { java.lang.String sensorType = sensor.getStringType ( ) ; java.lang.String sanitizedSensorType = sensorType.replaceAll ( "[^a-zA-Z0-9_\\-]" , "_" ) ; if ( sanitizedSensorType.matches ( "_*" ) ) { throw new java.io.IOException ( ( ( ( "Unable to sanitize sensor type (" + sensorType ) + "). This is a" ) + " 'test framework' issue and the sanitation routine must be fixed." ) ) ; } return sanitizedSensorType ; }

Target:
public static java.lang.String getSanitizedSensorName ( android.hardware.Sensor sensor ) throws android.hardware.cts.helpers.SensorTestPlatformException { return android.hardware.cts.helpers.SensorCtsHelper.sanitizeStringForFileName ( sensor.getStringType ( ) ) ; }
Source:
public void test_with_adjustment_ZoneOffset ( ) { java.time.OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with ( tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 11 , 30 , 59 , 500 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }

Target:
public void test_with_adjustment_ZoneOffset ( ) { java.time.OffsetDateTime test = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.with ( tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 11 , 30 , 59 , 500 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }
Source:
public void testTrySetupDataEmergencyApn ( ) throws java.lang.Exception { initApns ( PhoneConstants.APN_TYPE_EMERGENCY , new java.lang.String [ ] { com.android.internal.telephony.PhoneConstants.APN_TYPE_ALL } ) ; mDct.sendMessage ( mDct.obtainMessage ( DctConstants.EVENT_TRY_SETUP_DATA , mApnContext ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 200 ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier , org.mockito.Mockito.times ( 1 ) ) . setupDataCall ( org.mockito.Matchers.eq ( mServiceState.getRilDataRadioTechnology ( ) ) , org.mockito.Matchers.any ( com.android.internal.telephony.dataconnection.DataProfile.class ) , org.mockito.Matchers.eq ( false ) , org.mockito.Matchers.eq ( false ) , org.mockito.Matchers.any ( android.os.Message.class ) ) ; }

Target:
public void testTrySetupDataEmergencyApn ( ) throws java.lang.Exception { initApns ( PhoneConstants.APN_TYPE_EMERGENCY , new java.lang.String [ ] { com.android.internal.telephony.PhoneConstants.APN_TYPE_ALL } ) ; mDct.sendMessage ( mDct.obtainMessage ( DctConstants.EVENT_TRY_SETUP_DATA , mApnContext ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 200 ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier , org.mockito.Mockito.times ( 1 ) ) . setupDataCall ( org.mockito.Matchers.eq ( mServiceState.getRilDataRadioTechnology ( ) ) , org.mockito.Matchers.any ( android.telephony.data.DataProfile.class ) , org.mockito.Matchers.eq ( false ) , org.mockito.Matchers.eq ( false ) , org.mockito.Matchers.any ( android.os.Message.class ) ) ; }