auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private int parseFormatByte ( byte [ ] atrBytes , int index ) { if ( index >= ( atrBytes.length ) ) { com.android.internal.telephony.uicc.AnswerToReset.loge ( "Failed to read the format byte." ) ; return - 1 ; } mFormatByte = atrBytes [ index ] ; mHistoricalBytes = new byte [ ( mFormatByte ) & ( com.android.internal.telephony.uicc.AnswerToReset.T_MASK ) ] ; if ( com.android.internal.telephony.uicc.AnswerToReset.VDBG ) com.android.internal.telephony.uicc.AnswerToReset.log ( ( "mHistoricalBytesLength: " + ( mHistoricalBytes.length ) ) ) ; return index + 1 ; }

Target:
private int parseFormatByte ( byte [ ] atrBytes , int index ) { if ( index >= ( atrBytes.length ) ) { com.android.internal.telephony.uicc.AnswerToReset.loge ( "Failed to read the format byte." ) ; return - 1 ; } mFormatByte = atrBytes [ index ] ; if ( com.android.internal.telephony.uicc.AnswerToReset.VDBG ) com.android.internal.telephony.uicc.AnswerToReset.log ( ( "mHistoricalBytesLength: " + ( ( mFormatByte ) & ( com.android.internal.telephony.uicc.AnswerToReset.T_MASK ) ) ) ) ; return index + 1 ; }
Source:
private void handleStartAdvertising ( com.android.bluetooth.gatt.AdvertiseClient client ) { com.android.bluetooth.Utils.enforceAdminPermission ( mService ) ; int advertiserId = client.advertiserId ; if ( mAdvertiseClients.contains ( client ) ) { postCallback ( advertiserId , AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED ) ; return ; } if ( ! ( mAdvertiseNative.startAdverising ( client ) ) ) { postCallback ( advertiserId , AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR ) ; return ; } mAdvertiseClients.add ( client ) ; }

Target:
private void handleStartAdvertising ( com.android.bluetooth.gatt.AdvertiseClient client ) { com.android.bluetooth.Utils.enforceAdminPermission ( mService ) ; int advertiserId = client.advertiserId ; if ( mAdvertiseClients.contains ( client ) ) { postCallback ( advertiserId , AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED ) ; return ; } mAdvertiseNative.startAdverising ( client ) ; mAdvertiseClients.add ( client ) ; }
Source:
public void setSkins ( java.lang.String [ ] skins , java.lang.String defaultSkin ) { mDefaultSkin = defaultSkin ; java.util.HashSet < java.lang.String > skinSet = new java.util.HashSet < java.lang.String > ( ) ; skinSet.addAll ( java.util.Arrays.asList ( skins ) ) ; skinSet.addAll ( java.util.Arrays.asList ( mBasePlatform.getSkins ( ) ) ) ; mSkins = skinSet.toArray ( new java.lang.String [ skinSet.size ( ) ] ) ; }

Target:
public void setSkins ( @ com.android.annotations.NonNull java.io.File [ ] skins , @ com.android.annotations.NonNull java.io.File defaultSkin ) { mDefaultSkin = defaultSkin ; java.util.HashSet < java.io.File > skinSet = new java.util.HashSet < java.io.File > ( ) ; skinSet.addAll ( java.util.Arrays.asList ( skins ) ) ; skinSet.addAll ( java.util.Arrays.asList ( mBasePlatform.getSkins ( ) ) ) ; mSkins = skinSet.toArray ( new java.io.File [ skinSet.size ( ) ] ) ; }
Source:
public void run ( ) { while ( true ) { java.lang.Runnable r = null ; synchronized ( mThingsToLoad ) { if ( ( mThingsToLoad.size ( ) ) == 0 ) { try { mThingsToLoad.wait ( ) ; } catch ( java.lang.InterruptedException ex ) { } } if ( ( mThingsToLoad.size ( ) ) > 0 ) { r = mThingsToLoad.remove ( 0 ) ; } } if ( r != null ) { r.run ( ) ; } } }

Target:
public void run ( ) { while ( true ) { java.lang.Runnable r = null ; synchronized ( mThingsToLoad ) { if ( ( mThingsToLoad.size ( ) ) == 0 ) { try { mThingsToLoad.wait ( ) ; } catch ( java.lang.InterruptedException ex ) { break ; } } if ( ( mThingsToLoad.size ( ) ) > 0 ) { r = mThingsToLoad.remove ( 0 ) ; } } if ( r != null ) { r.run ( ) ; } } }
Source:
public void testMethodInsnNode ( ) { org.objectweb.asm.tree.MethodInsnNode mn = new org.objectweb.asm.tree.MethodInsnNode ( INVOKESTATIC , "owner" , "name" , "I" ) ; mn.setOpcode ( org.objectweb.asm.tree.INVOKESPECIAL ) ; assertEquals ( org.objectweb.asm.tree.INVOKESPECIAL , mn.getOpcode ( ) ) ; assertEquals ( AbstractInsnNode.METHOD_INSN , mn.getType ( ) ) ; }

Target:
public void testMethodInsnNode ( ) { org.objectweb.asm.tree.MethodInsnNode mn = new org.objectweb.asm.tree.MethodInsnNode ( INVOKESTATIC , "owner" , "name" , "I" , false ) ; mn.setOpcode ( org.objectweb.asm.tree.INVOKESPECIAL ) ; assertEquals ( org.objectweb.asm.tree.INVOKESPECIAL , mn.getOpcode ( ) ) ; assertEquals ( AbstractInsnNode.METHOD_INSN , mn.getType ( ) ) ; }
Source:
private void createDocumentRoot ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleElement [ ] elements ) { if ( ( ( elements == null ) || ( ( elements.length ) < 1 ) ) || ( ( elements [ 0 ] ) == null ) ) { return ; } java.lang.String rootFqcn = elements [ 0 ] . getFqcn ( ) ; mCanvas.createDocumentRoot ( rootFqcn ) ; }

Target:
private void createDocumentRoot ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleElement [ ] elements ) { if ( ( ( elements == null ) || ( ( elements.length ) < 1 ) ) || ( ( elements [ 0 ] ) == null ) ) { return ; } mCanvas.createDocumentRoot ( elements [ 0 ] ) ; }
Source:
private java.io.File getWrittenResources ( ) throws com.android.ide.common.res2.MergingException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , mPngCruncher , false , false ) ; resourceMerger.mergeData ( writer , false ) ; return folder ; }

Target:
private java.io.File getWrittenResources ( ) throws com.android.ide.common.res2.MergingException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , mPngCruncher , false , false , null ) ; resourceMerger.mergeData ( writer , false ) ; return folder ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "EuiccProfileInfo (nickname=" + ( mNickname ) ) + ", serviceProviderName=" ) + ( mServiceProviderName ) ) + ", profileName=" ) + ( mProfileName ) ) + ", profileClass=" ) + ( mProfileClass ) ) + ", state=" ) + ( mState ) ) + ", CarrierIdentifier=" ) + ( mCarrierIdentifier.toString ( ) ) ) + ", policyRules=" ) + ( mPolicyRules ) ) + ", accessRules=" ) + ( java.util.Arrays.toString ( mAccessRules ) ) ) + ")" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "EuiccProfileInfo (nickname=" + ( mNickname ) ) + ", serviceProviderName=" ) + ( mServiceProviderName ) ) + ", profileName=" ) + ( mProfileName ) ) + ", profileClass=" ) + ( mProfileClass ) ) + ", state=" ) + ( mState ) ) + ", CarrierIdentifier=" ) + ( mCarrierIdentifier ) ) + ", policyRules=" ) + ( mPolicyRules ) ) + ", accessRules=" ) + ( java.util.Arrays.toString ( mAccessRules ) ) ) + ")" ; }
Source:
public void testReplacedLayout ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > mergedMap = merger.getDataMap ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > values = mergedMap.get ( "layout/main" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem mainLayout = values.get ( 1 ) ; com.android.ide.common.res2.ResourceFile sourceFile = mainLayout.getSource ( ) ; assertTrue ( sourceFile.getFile ( ) . getAbsolutePath ( ) . endsWith ( getPlatformPath ( "overlay/layout/main.xml" ) ) ) ; }

Target:
public void testReplacedLayout ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > mergedMap = merger.getDataMap ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > values = mergedMap.get ( "layout/main" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem mainLayout = values.get ( 1 ) ; com.android.ide.common.res2.ResourceFile sourceFile = mainLayout.getSource ( ) ; assertTrue ( sourceFile.getFile ( ) . getAbsolutePath ( ) . endsWith ( com.android.ide.common.res2.ResourceMergerTest.getPlatformPath ( "overlay/layout/main.xml" ) ) ) ; }
Source:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( p == null ) { return false ; } p.mLastPackageUsageTimeInMills = java.lang.System.currentTimeMillis ( ) ; mPackageUsage.write ( ) ; if ( p.mDexOptUnneeded ) { return false ; } } synchronized ( mInstallLock ) { return ( performDexOptLI ( p , false , false , true ) ) == ( com.android.server.pm.PackageManagerService.DEX_OPT_PERFORMED ) ; } }

Target:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; return performDexOpt ( packageName , true ) ; }
Source:
public java.io.InputStream getInputStream ( ) { if ( ( file ) == null ) { return new com.android.sched.util.stream.UncloseableInputStream ( java.lang.System.in ) ; } else { clearRemover ( ) ; try { return new java.io.FileInputStream ( file ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } }

Target:
public java.io.InputStream getInputStream ( ) { if ( ( in ) != null ) { return new com.android.sched.util.stream.UncloseableInputStream ( in ) ; } else { clearRemover ( ) ; try { return new java.io.FileInputStream ( file ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { com.android.jack.ir.ast.JDefinedClassOrInterface enclosingType = method.getEnclosingType ( ) ; if ( ( ( ( enclosingType.isExternal ( ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.analysis.DefinitionMarkerAdder.Visitor visitor = new com.android.jack.analysis.DefinitionMarkerAdder.Visitor ( ) ; visitor.accept ( method ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.analysis.DefinitionMarkerAdder.Visitor visitor = new com.android.jack.analysis.DefinitionMarkerAdder.Visitor ( ) ; visitor.accept ( method ) ; }
Source:
public boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.replyReport ( device , type , id , data ) ; }

Target:
public boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; } com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.replyReport ( device , type , id , data ) ; }
Source:
public org.jetbrains.plugins.gradle.model.data.WebResource fun ( org.jetbrains.plugins.gradle.model.web.WebConfiguration.WebResource resource ) { if ( resource == null ) return null ; final org.jetbrains.plugins.gradle.model.data.WarDirectory warDirectory = org.jetbrains.plugins.gradle.model.data.WarDirectory.fromPath ( resource.getWarDirectory ( ) ) ; if ( warDirectory == null ) return null ; return new org.jetbrains.plugins.gradle.model.data.WebResource ( warDirectory , resource.getRelativePath ( ) , resource.getFile ( ) ) ; }

Target:
public org.jetbrains.plugins.gradle.model.data.WebResource fun ( org.jetbrains.plugins.gradle.model.web.WebConfiguration.WebResource resource ) { if ( resource == null ) return null ; final org.jetbrains.plugins.gradle.model.data.WarDirectory warDirectory = org.jetbrains.plugins.gradle.model.data.WarDirectory.fromPath ( resource.getWarDirectory ( ) ) ; return new org.jetbrains.plugins.gradle.model.data.WebResource ( warDirectory , resource.getRelativePath ( ) , resource.getFile ( ) ) ; }
Source:
protected org.eclipse.swt.widgets.Composite createChildContainer ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Composite composite = super . createChildContainer ( parent ) ; if ( mPaletteMode.isPreview ( ) ) { composite.setBackground ( mBackground ) ; } addMenu ( composite ) ; return composite ; }

Target:
protected org.eclipse.swt.widgets.Composite createChildContainer ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Composite composite = super . createChildContainer ( parent ) ; if ( ( mPaletteMode.isPreview ( ) ) && ( ( mBackground ) != null ) ) { composite.setBackground ( mBackground ) ; } addMenu ( composite ) ; return composite ; }
Source:
public static void create ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.Location location ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.FileAlreadyExistsException { assert file != null ; if ( file.exists ( ) ) { throw new com.android.sched.util.file.FileAlreadyExistsException ( location ) ; } if ( file.mkdir ( ) ) { com.android.sched.util.file.Directory.logger.log ( java.util.logging.Level.FINE , "Create {0} (''{1}'')" , new java.lang.Object [ ] { location.getDescription ( ) , file.getAbsoluteFile ( ) } ) ; } else { if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.CannotCreateFileException ( location ) ; } } }

Target:
public static void create ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.Location location ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.FileAlreadyExistsException { if ( file.mkdir ( ) ) { com.android.sched.util.file.Directory.logger.log ( java.util.logging.Level.FINE , "Create {0} (''{1}'')" , new java.lang.Object [ ] { location.getDescription ( ) , file.getAbsoluteFile ( ) } ) ; } else { if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.CannotCreateFileException ( location ) ; } else { throw new com.android.sched.util.file.FileAlreadyExistsException ( location ) ; } } }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.AdvertisingSetCallback callback ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , callback , new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) ) ; }

Target:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.AdvertisingSetCallback callback ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , 0 , callback , new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) ) ; }
Source:
private void loadFrom ( java.io.InputStream in ) throws java.io.IOException { java.io.ByteArrayOutputStream bytesOut = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 8192 ] ; int count ; while ( ( count = in.read ( buffer ) ) != ( - 1 ) ) { bytesOut.write ( buffer , 0 , count ) ; } in.close ( ) ; this . data = bytesOut.toByteArray ( ) ; this . length = data.length ; this . tableOfContents.readFrom ( this ) ; }

Target:
private void loadFrom ( java.io.InputStream in ) throws java.io.IOException { java.io.ByteArrayOutputStream bytesOut = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 8192 ] ; int count ; while ( ( count = in.read ( buffer ) ) != ( - 1 ) ) { bytesOut.write ( buffer , 0 , count ) ; } this . data = bytesOut.toByteArray ( ) ; this . length = data.length ; this . tableOfContents.readFrom ( this ) ; }
Source:
public void copyFromUnchecked ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFromUnchecked ( float [ ] d ) { copyFromUnchecked ( d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JExpression expr = pop ( x.expression ) ; com.android.jack.ir.ast.JReferenceType testType = ( ( com.android.jack.ir.ast.JReferenceType ) ( getTypeMap ( ) . get ( x.type.resolvedType ) ) ) ; push ( new com.android.jack.ir.ast.JInstanceOf ( info , testType , expr ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JExpression expr = pop ( x.expression ) ; com.android.jack.ir.ast.JReferenceType testType = ( ( com.android.jack.ir.ast.JReferenceType ) ( getTypeMap ( ) . get ( x.type.resolvedType ) ) ) ; push ( new com.android.jack.ir.ast.JInstanceOf ( info , testType , expr ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public void handle ( @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { com.android.jack.server.JackSimpleServer.logger.log ( java.util.logging.Level.INFO , ( ( "Unknown request for '" + ( request.getPath ( ) . getPath ( ) ) ) + "'" ) ) ; response.setStatus ( Status.NOT_FOUND ) ; try { response.close ( ) ; } catch ( java.io.IOException e ) { com.android.jack.server.JackSimpleServer.logger.log ( java.util.logging.Level.SEVERE , "Exception during close: " , e ) ; } }

Target:
public void handle ( @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { response.setStatus ( status ) ; try { response.close ( ) ; } catch ( java.io.IOException e ) { com.android.jack.server.JackSimpleServer.logger.log ( java.util.logging.Level.SEVERE , "Exception during close: " , e ) ; } }
Source:
static void setBoolean ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , boolean value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }

Target:
static void setBoolean ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , boolean value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( expectFailure , exceptionThrown ) ; }
Source:
public void add ( com.android.jack.dx.rop.annotation.NameValuePair pair ) { throwIfImmutable ( ) ; if ( pair == null ) { throw new java.lang.NullPointerException ( "pair == null" ) ; } com.android.jack.dx.rop.cst.CstString name = pair.getName ( ) ; if ( ( elements.get ( name ) ) != null ) { throw new java.lang.IllegalArgumentException ( ( "name already added: " + name ) ) ; } elements.put ( name , pair ) ; }

Target:
public void add ( com.android.jack.dx.rop.annotation.NameValuePair pair ) { assert pair != null ; throwIfImmutable ( ) ; com.android.jack.dx.rop.cst.CstString name = pair.getName ( ) ; if ( ( elements.get ( name ) ) != null ) { throw new java.lang.IllegalArgumentException ( ( "name already added: " + name ) ) ; } elements.put ( name , pair ) ; }
Source:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ( ( android.bluetooth.BluetoothDevice.sService ) == null ) || ( ( isBluetoothEnabled ( ) ) == false ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get remote device Uuids" ) ; return null ; } try { return android.bluetooth.BluetoothDevice.sService.getRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ( ( android.bluetooth.BluetoothDevice.sService ) == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get remote device Uuids" ) ; return null ; } try { return android.bluetooth.BluetoothDevice.sService.getRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }
Source:
public synchronized void maybeInit ( ) { if ( initialized ) { return ; } initialized = true ; if ( ( zipDir ) == null ) { return ; } try { urlHandler = new libcore.io.ClassPathURLStreamHandler ( path.getPath ( ) ) ; } catch ( java.io.IOException ioe ) { java.lang.System.logE ( ( "Unable to open zip file: " + ( path ) ) , ioe ) ; urlHandler = null ; } }

Target:
public synchronized void maybeInit ( ) { if ( initialized ) { return ; } if ( ( zipDir ) == null ) { initialized = true ; return ; } try { urlHandler = new libcore.io.ClassPathURLStreamHandler ( path.getPath ( ) ) ; } catch ( java.io.IOException ioe ) { java.lang.System.logE ( ( "Unable to open zip file: " + ( path ) ) , ioe ) ; urlHandler = null ; } initialized = true ; }
Source:
public void test_sigDigitPatterns ( ) throws java.lang.Exception { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( java.util.Locale.US ) ) ) ; format.applyPattern ( "@@@" ) ; assertEquals ( "sigDigit doesn't work" , "12300" , format.format ( 12345 ) ) ; assertEquals ( "sigDigit doesn't work" , "0.123" , format.format ( 0.12345 ) ) ; format.applyPattern ( "@@##" ) ; assertEquals ( "sigDigit doesn't work" , "3.142" , format.format ( 3.14159 ) ) ; assertEquals ( "sigDigit doesn't work" , "1.23" , format.format ( 1.23004 ) ) ; format.applyPattern ( "@@###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; format.applyPattern ( "0.0###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; try { format.applyPattern ( "@00" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@00\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } try { format.applyPattern ( "@.###" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@.###\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } }

Target:
public void test_sigDigitPatterns ( ) throws java.lang.Exception { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( java.util.Locale.US ) ) ) ; format.applyPattern ( "@@@" ) ; assertEquals ( "sigDigit doesn't work" , "12300" , format.format ( 12345 ) ) ; assertEquals ( "sigDigit doesn't work" , "0.123" , format.format ( 0.12345 ) ) ; format.applyPattern ( "@@##" ) ; assertEquals ( "sigDigit doesn't work" , "3.142" , format.format ( 3.14159 ) ) ; assertEquals ( "sigDigit doesn't work" , "1.23" , format.format ( 1.23004 ) ) ; format.applyPattern ( "@@###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; format.applyPattern ( "0.0###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; try { format.applyPattern ( "@00" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@00\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } }
Source:
public void TestJB3879 ( ) { try { com.ibm.icu.util.UResourceBundle bundle = ( ( com.ibm.icu.util.UResourceBundle ) ( com.ibm.icu.util.UResourceBundle.getBundleInstance ( "com/ibm/icu/dev/data/testdata" , com.ibm.icu.util.ULocale.getDefault ( ) . toString ( ) , com.ibm.icu.dev.test.util.ICUResourceBundleTest.testLoader ) ) ) ; if ( bundle == null ) { errln ( "could not create the resource bundle" ) ; } } catch ( java.util.MissingResourceException ex ) { warnln ( ( "could not load test data: " + ( ex.getMessage ( ) ) ) ) ; } }

Target:
public void TestJB3879 ( ) { try { com.ibm.icu.util.UResourceBundle bundle = ( ( com.ibm.icu.util.UResourceBundle ) ( com.ibm.icu.util.UResourceBundle.getBundleInstance ( "com/ibm/icu/dev/data/testdata" , com.ibm.icu.util.ULocale.getDefault ( ) , com.ibm.icu.dev.test.util.ICUResourceBundleTest.testLoader ) ) ) ; if ( bundle == null ) { errln ( "could not create the resource bundle" ) ; } } catch ( java.util.MissingResourceException ex ) { warnln ( ( "could not load test data: " + ( ex.getMessage ( ) ) ) ) ; } }
Source:
private static byte [ ] readAsset ( android.content.Context context , java.lang.String filename ) { android.content.res.AssetManager assetManager = context.getAssets ( ) ; java.io.InputStream ais ; try { ais = assetManager.open ( filename ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.cts.verifier.audioquality.AudioAssets.TAG , ( "Cannot load asset " + filename ) ) ; return null ; } byte [ ] buffer = com.android.cts.verifier.audioquality.Utils.readFile ( ais ) ; return buffer ; }

Target:
private static byte [ ] readAsset ( android.content.Context context , java.lang.String filename ) { android.content.res.AssetManager assetManager = context.getAssets ( ) ; java.io.InputStream ais ; try { ais = assetManager.open ( filename ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.cts.verifier.audioquality.AudioAssets.TAG , ( "Cannot load asset " + filename ) , e ) ; return null ; } byte [ ] buffer = com.android.cts.verifier.audioquality.Utils.readFile ( ais ) ; return buffer ; }
Source:
protected void addSensorEventInternal ( android.hardware.cts.helpers.TestSensorEvent event ) { if ( ( mPreviousEvent ) == null ) { mMaxTimestamp = event.timestamp ; } else { if ( ( event.timestamp ) < ( mMaxTimestamp ) ) { mOutOfOrderEvents.add ( new android.hardware.cts.helpers.sensorverification.IndexedEventPair ( mIndex , event , mPreviousEvent ) ) ; } else if ( ( event.timestamp ) > ( mMaxTimestamp ) ) { mMaxTimestamp = event.timestamp ; } } mPreviousEvent = event ; ( mIndex ) ++ ; }

Target:
protected void addSensorEventInternal ( android.hardware.cts.helpers.TestSensorEvent event ) { if ( ( mPreviousEvent ) == null ) { mMaxTimestamp = event.timestamp ; } else { if ( ( event.timestamp ) <= ( mMaxTimestamp ) ) { mOutOfOrderEvents.add ( new android.hardware.cts.helpers.sensorverification.IndexedEventPair ( mIndex , event , mPreviousEvent ) ) ; } else { mMaxTimestamp = event.timestamp ; } } mPreviousEvent = event ; ( mIndex ) ++ ; }
Source:
public void testConcreteClassRedeclaresBridges ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.Impl.class . getName ( ) ) ; com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester tester = new com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester ( ) ; reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( tester , null ) , 0 ) ; com.google.common.truth.Truth.assertThat ( tester.version ) . isEqualTo ( Opcodes.V1_7 ) ; com.google.common.truth.Truth.assertThat ( tester.bridgeMethods ) . isEqualTo ( 2 ) ; }

Target:
public void testConcreteClassRedeclaresBridges ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.Impl.class . getName ( ) ) ; com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester tester = new com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester ( ) ; reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( tester , null , null ) , 0 ) ; com.google.common.truth.Truth.assertThat ( tester.version ) . isEqualTo ( Opcodes.V1_7 ) ; com.google.common.truth.Truth.assertThat ( tester.bridgeMethods ) . isEqualTo ( 2 ) ; }
Source:
private com.android.jill.frontend.java.Variable getVariable ( @ javax.annotation.Nonnull java.lang.String id , @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull org.objectweb.asm.Type type , @ javax.annotation.CheckForNull java.lang.String signature ) { com.android.jill.frontend.java.Variable var = nameToVar.get ( id ) ; if ( var == null ) { var = new com.android.jill.frontend.java.Variable ( id , name , type , signature ) ; nameToVar.put ( id , var ) ; } return var ; }

Target:
private com.android.jill.frontend.java.Variable getVariable ( @ javax.annotation.Nonnull java.lang.String id , @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull org.objectweb.asm.Type type ) { com.android.jill.frontend.java.Variable var = nameToVar.get ( id ) ; if ( var == null ) { var = new com.android.jill.frontend.java.Variable ( id , name , type ) ; nameToVar.put ( id , var ) ; } return var ; }
Source:
public void test_removeAll ( ) throws java.net.URISyntaxException { assertTrue ( cookieStore.removeAll ( ) ) ; java.net.URI uri1 = new java.net.URI ( "http://removeAll1.test.com" ) ; java.net.HttpCookie cookie1 = new java.net.HttpCookie ( "cookie_name1" , "cookie_value1" ) ; cookieStore.add ( uri1 , cookie1 ) ; java.net.URI uri2 = new java.net.URI ( "http://removeAll2.test.com" ) ; java.net.HttpCookie cookie2 = new java.net.HttpCookie ( "cookie_name2" , "cookie_value2" ) ; cookieStore.add ( uri2 , cookie2 ) ; assertTrue ( cookieStore.removeAll ( ) ) ; assertTrue ( cookieStore.getURIs ( ) . isEmpty ( ) ) ; assertTrue ( cookieStore.getCookies ( ) . isEmpty ( ) ) ; assertTrue ( cookieStore.removeAll ( ) ) ; }

Target:
public void test_removeAll ( ) throws java.net.URISyntaxException { assertFalse ( cookieStore.removeAll ( ) ) ; java.net.URI uri1 = new java.net.URI ( "http://removeAll1.test.com" ) ; java.net.HttpCookie cookie1 = new java.net.HttpCookie ( "cookie_name1" , "cookie_value1" ) ; cookieStore.add ( uri1 , cookie1 ) ; java.net.URI uri2 = new java.net.URI ( "http://removeAll2.test.com" ) ; java.net.HttpCookie cookie2 = new java.net.HttpCookie ( "cookie_name2" , "cookie_value2" ) ; cookieStore.add ( uri2 , cookie2 ) ; assertTrue ( cookieStore.removeAll ( ) ) ; assertTrue ( cookieStore.getURIs ( ) . isEmpty ( ) ) ; assertTrue ( cookieStore.getCookies ( ) . isEmpty ( ) ) ; assertFalse ( cookieStore.removeAll ( ) ) ; }
Source:
private static void addModuleForAccessingCallDetails ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }

Target:
private static void addModuleForAccessingCallDetails ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( context , row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }
Source:
public void testBreakpoint ( ) { logWriter.println ( "testBreakpoint started" ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; if ( ! ( checkCanUseInstanceFilterCapability ( ) ) ) { synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; return ; } byte typeTag = JDWPConstants.TypeTag.CLASS ; org.apache.harmony.jpda.tests.framework.Breakpoint breakpoint = new org.apache.harmony.jpda.tests.framework.Breakpoint ( org.apache.harmony.jpda.tests.jdwp.EventModifiers.InstanceOnlyModifierTest.TEST_CLASS_SIGNATURE , org.apache.harmony.jpda.tests.jdwp.EventModifiers.InstanceOnlyModifierTest.METHOD_NAME , 0 ) ; org.apache.harmony.jpda.tests.framework.jdwp.EventBuilder builder = createBreakpointEventBuilder ( typeTag , breakpoint ) ; testEventWithInstanceOnlyModifier ( builder ) ; logWriter.println ( "testBreakpoint done" ) ; }

Target:
public void testBreakpoint ( ) { logWriter.println ( "testBreakpoint started" ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; byte typeTag = JDWPConstants.TypeTag.CLASS ; org.apache.harmony.jpda.tests.framework.Breakpoint breakpoint = new org.apache.harmony.jpda.tests.framework.Breakpoint ( org.apache.harmony.jpda.tests.jdwp.EventModifiers.InstanceOnlyModifierTest.TEST_CLASS_SIGNATURE , org.apache.harmony.jpda.tests.jdwp.EventModifiers.InstanceOnlyModifierTest.METHOD_NAME , 0 ) ; org.apache.harmony.jpda.tests.framework.jdwp.EventBuilder builder = createBreakpointEventBuilder ( typeTag , breakpoint ) ; testEventWithInstanceOnlyModifier ( builder ) ; logWriter.println ( "testBreakpoint done" ) ; }
Source:
private void cleanUpTonePlayer ( ) { mMainThreadHandler.post ( new java.lang.Runnable ( "ICTP.cUTP" ) { @ java.lang.Override public void loggedRun ( ) { synchronized ( mLock ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { android.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } } } } . prepare ( ) ) ; }

Target:
private void cleanUpTonePlayer ( ) { mMainThreadHandler.post ( new java.lang.Runnable ( "ICTP.cUTP" , mLock ) { @ java.lang.Override public void loggedRun ( ) { if ( ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) == 0 ) { android.telecom.Log.wtf ( this , "Over-releasing focus for tone player." ) ; } else if ( ( -- ( com.android.server.telecom.InCallTonePlayer.sTonesPlaying ) ) == 0 ) { mCallAudioManager.setIsTonePlaying ( false ) ; } } } . prepare ( ) ) ; }
Source:
public static void ReturnValuesTest ( ) throws java.lang.Throwable { Main.$opt$ReturnBooleanTest ( ) ; Main.$opt$ReturnCharTest ( ) ; Main.$opt$ReturnByteTest ( ) ; Main.$opt$ReturnShortTest ( ) ; Main.$opt$ReturnIntTest ( ) ; Main.$opt$ReturnLongTest ( ) ; Main.$opt$ReturnFloatTest ( ) ; Main.$opt$ReturnDoubleTest ( ) ; Main.$opt$ReturnStringTest ( ) ; java.lang.System.err.println ( "ReturnValuesTest done." ) ; }

Target:
public static void ReturnValuesTest ( ) throws java.lang.Throwable { Main.$opt$ReturnBooleanTest ( ) ; Main.$opt$ReturnCharTest ( ) ; Main.$opt$ReturnByteTest ( ) ; Main.$opt$ReturnShortTest ( ) ; Main.$opt$ReturnIntTest ( ) ; Main.$opt$ReturnLongTest ( ) ; Main.$opt$ReturnFloatTest ( ) ; Main.$opt$ReturnDoubleTest ( ) ; Main.$opt$ReturnStringTest ( ) ; java.lang.System.out.println ( "ReturnValuesTest done." ) ; }
Source:
private void sendNowPlayingListChanged ( ) { if ( ( mMediaInterface ) == null ) return ; if ( com.android.bluetooth.avrcp.AddressedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , "sendNowPlayingListChanged()" ) ; mMediaInterface.uidsChangedRsp ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED ) ; mMediaInterface.nowPlayingChangedRsp ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED ) ; BRANCH ( 6 ) ; com.android.bluetooth.avrcp.adb89 Merge ; of ( 2940345 , 2938007 , 2940429 , 2939599 , 29 ) ; }

Target:
private void sendNowPlayingListChanged ( ) { if ( ( mMediaInterface ) == null ) return ; if ( com.android.bluetooth.avrcp.AddressedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , "sendNowPlayingListChanged()" ) ; mMediaInterface.uidsChangedRsp ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED ) ; mMediaInterface.nowPlayingChangedRsp ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED ) ; }
Source:
private java.lang.String getSelectedLayout ( ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager selectionManager = mCanvas.getSelectionManager ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem item : selectionManager.getSelections ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode node = item.getViewInfo ( ) . getUiViewNode ( ) ; java.lang.String layout = com.android.ide.eclipse.adt.internal.editors.layout.gle2.FragmentMenu.getFragmentLayout ( node.getXmlNode ( ) ) ; if ( layout != null ) { return layout ; } } return null ; }

Target:
private java.lang.String getSelectedLayout ( ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager selectionManager = mCanvas.getSelectionManager ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem item : selectionManager.getSelections ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode node = item.getViewInfo ( ) . getUiViewNode ( ) ; if ( node != null ) { java.lang.String layout = com.android.ide.eclipse.adt.internal.editors.layout.gle2.FragmentMenu.getFragmentLayout ( node.getXmlNode ( ) ) ; if ( layout != null ) { return layout ; } } } return null ; }
Source:
private boolean isCmdInteractive ( com.android.internal.telephony.cat.CatCmdMessage cmd ) { switch ( cmd.getCmdType ( ) ) { case SEND_DTMF : case SEND_SMS : case SEND_SS : case SEND_USSD : case SET_UP_IDLE_MODE_TEXT : case SET_UP_MENU : case REFRESH : case CLOSE_CHANNEL : case RECEIVE_DATA : case SEND_DATA : return false ; } return true ; }

Target:
private boolean isCmdInteractive ( com.android.internal.telephony.cat.CatCmdMessage cmd ) { switch ( cmd.getCmdType ( ) ) { case SEND_DTMF : case SEND_SMS : case SEND_SS : case SEND_USSD : case SET_UP_IDLE_MODE_TEXT : case SET_UP_MENU : case CLOSE_CHANNEL : case RECEIVE_DATA : case SEND_DATA : return false ; } return true ; }
Source:
static void getDouble ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , double value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { final double got = ( v == null ) ? ( ( double ) ( m.invokeExact ( ) ) ) : ( ( double ) ( m.invokeExact ( v ) ) ) ; Main.Tester.assertTrue ( ( got == value ) ) ; } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertActualAndExpectedMatch ( exceptionThrown , expectFailure ) ; }

Target:
static void getDouble ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , double value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { final double got = ( v == null ) ? ( ( double ) ( m.invokeExact ( ) ) ) : ( ( double ) ( m.invokeExact ( v ) ) ) ; Main.Tester.assertTrue ( ( got == value ) ) ; } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }
Source:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }

Target:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res , densityDpi ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }
Source:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; java.io.File folder = com.android.ide.common.res2.ResourceMergerTest.getWrittenResources ( ) ; com.android.ide.common.res2.ResourceSet writtenSet = new com.android.ide.common.res2.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( logger ) ; compareResourceMaps ( merger , writtenSet , false ) ; checkLogger ( logger ) ; }

Target:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; java.io.File folder = getWrittenResources ( ) ; com.android.ide.common.res2.ResourceSet writtenSet = new com.android.ide.common.res2.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( logger ) ; compareResourceMaps ( merger , writtenSet , false ) ; checkLogger ( logger ) ; }
Source:
public void setAppOrientation ( android.view.IApplicationToken token , int requestedOrientation ) { if ( ! ( checkCallingPermission ( android.Manifest.permission.MANAGE_APP_TOKENS , "setAppOrientation()" ) ) ) { throw new java.lang.SecurityException ( "Requires MANAGE_APP_TOKENS permission" ) ; } synchronized ( mWindowMap ) { com.android.server.WindowManagerService.AppWindowToken wtoken = findAppWindowToken ( token.asBinder ( ) ) ; if ( wtoken == null ) { android.util.Log.w ( com.android.server.WindowManagerService.TAG , ( "Attempted to set orientation of non-existing app token: " + token ) ) ; return ; } wtoken.requestedOrientation = requestedOrientation ; } }

Target:
public void setAppOrientation ( android.view.IApplicationToken token , int requestedOrientation ) { if ( ! ( checkCallingPermission ( android.Manifest.permission.MANAGE_APP_TOKENS , "setAppOrientation()" ) ) ) { throw new java.lang.SecurityException ( "Requires MANAGE_APP_TOKENS permission" ) ; } synchronized ( mWindowMap ) { com.android.server.WindowManagerService.AppWindowToken wtoken = findAppWindowToken ( token.asBinder ( ) ) ; if ( wtoken == null ) { android.util.Slog.w ( com.android.server.WindowManagerService.TAG , ( "Attempted to set orientation of non-existing app token: " + token ) ) ; return ; } wtoken.requestedOrientation = requestedOrientation ; } }
Source:
public static org.bouncycastle.asn1.x9.DHValidationParms getInstance ( java.lang.Object obj ) { if ( ( obj == null ) || ( obj instanceof org.bouncycastle.asn1.x9.DHDomainParameters ) ) { return ( ( org.bouncycastle.asn1.x9.DHValidationParms ) ( obj ) ) ; } if ( obj instanceof org.bouncycastle.asn1.ASN1Sequence ) { return new org.bouncycastle.asn1.x9.DHValidationParms ( ( ( org.bouncycastle.asn1.ASN1Sequence ) ( obj ) ) ) ; } throw new java.lang.IllegalArgumentException ( ( "Invalid DHValidationParms: " + ( obj.getClass ( ) . getName ( ) ) ) ) ; }

Target:
public static org.bouncycastle.asn1.x9.DHValidationParms getInstance ( java.lang.Object obj ) { if ( obj instanceof org.bouncycastle.asn1.x9.DHValidationParms ) { return ( ( org.bouncycastle.asn1.x9.DHValidationParms ) ( obj ) ) ; } else if ( obj != null ) { return new org.bouncycastle.asn1.x9.DHValidationParms ( org.bouncycastle.asn1.ASN1Sequence.getInstance ( obj ) ) ; } return null ; }
Source:
public android.app.admin.DevicePolicyManager getParentProfileInstance ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getParentProfileInstance" ) ; try { if ( ! ( mService.isManagedProfile ( admin ) ) ) { throw new java.lang.SecurityException ( "The current user does not have a parent profile." ) ; } return new android.app.admin.DevicePolicyManager ( mContext , true ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public android.app.admin.DevicePolicyManager getParentProfileInstance ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getParentProfileInstance" ) ; try { if ( ! ( mService.isManagedProfile ( admin ) ) ) { throw new java.lang.SecurityException ( "The current user does not have a parent profile." ) ; } return new android.app.admin.DevicePolicyManager ( mContext , mService , true ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }