auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { for ( vogar.target.RunnerFactory runnerFactory : runnerFactories ) { vogar.target.Runner runner = runnerFactory.newRunner ( monitor , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds , profile , args ) ; if ( runner != null ) { return runner ; } } return null ; }

Target:
public vogar.target.TargetRunner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { for ( vogar.target.RunnerFactory runnerFactory : runnerFactories ) { vogar.target.TargetRunner targetRunner = runnerFactory.newRunner ( monitor , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds , profile , args ) ; if ( targetRunner != null ) { return targetRunner ; } } return null ; }
Source:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( ( ( ( ( ( "" + ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1.0 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: " ) ) + ( com.android.sdklib.SdkVersionInfo.HIGHEST_KNOWN_STABLE_API ) ) + ".0.2 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }

Target:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1.0 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: 21.0.2 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_32 , data.length ) ; }
Source:
private java.util.Set < java.lang.Long > findContactIdsIn ( com.google.common.collect.ImmutableMap < com.android.dialer.DialerPhoneNumber , com.android.dialer.phonelookup.PhoneLookupInfo > map ) { java.util.Set < java.lang.Long > contactIds = new android.support.v4.util.ArraySet ( ) ; for ( com.android.dialer.phonelookup.PhoneLookupInfo info : map.values ( ) ) { for ( com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info.Cp2ContactInfo cp2ContactInfo : info.getCp2Info ( ) . getCp2ContactInfoList ( ) ) { contactIds.add ( cp2ContactInfo.getContactId ( ) ) ; } } return contactIds ; }

Target:
private java.util.Set < java.lang.Long > findContactIdsIn ( com.google.common.collect.ImmutableMap < com.android.dialer.DialerPhoneNumber , com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info > map ) { java.util.Set < java.lang.Long > contactIds = new android.support.v4.util.ArraySet ( ) ; for ( com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info info : map.values ( ) ) { for ( com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info.Cp2ContactInfo cp2ContactInfo : info.getCp2ContactInfoList ( ) ) { contactIds.add ( cp2ContactInfo.getContactId ( ) ) ; } } return contactIds ; }
Source:
public void testSaveProperties ( ) { java.util.Properties props = createProps ( ) ; com.android.sdklib.internal.repository.packages.PlatformPackage p = createPlatformPackage ( props ) ; java.util.Properties props2 = new java.util.Properties ( ) ; p.saveProperties ( props2 ) ; assertEquals ( props2.toString ( ) , props.toString ( ) ) ; assertEquals ( props2 , props ) ; }

Target:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.PlatformPackage p = createPlatformPackage ( expected ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }
Source:
public void receive ( java.net.DatagramPacket packet ) throws java.io.IOException { if ( ! ( channelImpl.isBlocking ( ) ) ) { throw new java.nio.channels.IllegalBlockingModeException ( ) ; } super . receive ( packet ) ; }

Target:
public void receive ( java.net.DatagramPacket packet ) throws java.io.IOException { if ( ! ( channelImpl.isBlocking ( ) ) ) { throw new java.nio.channels.IllegalBlockingModeException ( ) ; } boolean wasBound = isBound ( ) ; super . receive ( packet ) ; if ( ! wasBound ) { channelImpl.onBind ( false ) ; } }
Source:
public void testPnoScanResultEvent ( ) throws java.lang.Exception { android.net.wifi.IWifiScannerImpl scanner = setupClientInterfaceAndCreateMockWificondScanner ( ) ; org.mockito.ArgumentCaptor < android.net.wifi.IPnoScanEvent > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.wifi.IPnoScanEvent.class ) ; org.mockito.Mockito.verify ( scanner ) . subscribePnoScanEvents ( messageCaptor.capture ( ) ) ; android.net.wifi.IPnoScanEvent pnoScanEvent = messageCaptor.getValue ( ) ; org.junit.Assert.assertNotNull ( pnoScanEvent ) ; pnoScanEvent.OnPnoNetworkFound ( ) ; org.mockito.Mockito.verify ( mWifiMonitor ) . broadcastScanResultEvent ( org.mockito.Mockito.any ( java.lang.String.class ) ) ; }

Target:
public void testPnoScanResultEvent ( ) throws java.lang.Exception { android.net.wifi.IWifiScannerImpl scanner = setupClientInterfaceAndCreateMockWificondScanner ( ) ; org.mockito.ArgumentCaptor < android.net.wifi.IPnoScanEvent > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.wifi.IPnoScanEvent.class ) ; org.mockito.Mockito.verify ( scanner ) . subscribePnoScanEvents ( messageCaptor.capture ( ) ) ; android.net.wifi.IPnoScanEvent pnoScanEvent = messageCaptor.getValue ( ) ; org.junit.Assert.assertNotNull ( pnoScanEvent ) ; pnoScanEvent.OnPnoNetworkFound ( ) ; org.mockito.Mockito.verify ( mWifiMonitor ) . broadcastPnoScanResultEvent ( org.mockito.Mockito.any ( java.lang.String.class ) ) ; }
Source:
private boolean haveArtifact ( java.lang.String groupId ) { for ( com.android.tools.gradle.eclipse.ImportModule module : mModules ) { for ( com.android.ide.common.repository.GradleCoordinate dependency : module.getDependencies ( ) ) { if ( groupId.equals ( dependency.getGroupId ( ) ) ) { return true ; } } } return false ; }

Target:
int getModuleCount ( ) { int moduleCount = 0 ; for ( com.android.tools.gradle.eclipse.ImportModule module : mModules ) { if ( ! ( module.isReplacedWithDependency ( ) ) ) { moduleCount ++ ; } } return moduleCount ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getGroupIdLevel1 ( ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getGroupIdLevel1ForSubscriber ( getSubId ( ) , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
public com.android.jack.test.toolchain.LegacyToolchain build ( ) { return new com.android.jack.test.toolchain.LegacyToolchain ( com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "legacy-java-compiler" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuiltsAsClasspath ( "legacy-java-compiler.bootclasspath" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "jarjar" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "proguard" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "dx" ) , isDesugarEnabled ) ; }

Target:
public com.android.jack.test.toolchain.LegacyToolchain build ( ) { return isDesugarEnabled ? new com.android.jack.test.toolchain.LegacyToolchain ( com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "legacy-java-compiler" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuiltsAsClasspath ( "legacy-java-compiler.bootclasspath" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "jarjar" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "proguard" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "dx" ) ) : new com.android.jack.test.toolchain.LegacyNoDesugarToolchain ( com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "legacy-java-compiler" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuiltsAsClasspath ( "legacy-java-compiler.bootclasspath" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "jarjar" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "proguard" ) , com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "dx" ) ) ; }
Source:
public int hashCode ( ) { int sum = 0 ; for ( E e : this ) { sum += ( e == null ? 0 : e.hashCode ( ) ) ^ 1 ; } return sum ; }

Target:
protected com.google.common.collect.Multiset.Entry < E > computeNext ( ) { while ( iterator1.hasNext ( ) ) { com.google.common.collect.Multiset.Entry < E > entry1 = iterator1.next ( ) ; E element = entry1.getElement ( ) ; int count = ( entry1.getCount ( ) ) - ( multiset2.count ( element ) ) ; if ( count > 0 ) { return com.google.common.collect.Multisets.immutableEntry ( element , count ) ; } } return endOfData ( ) ; }
Source:
public com.android.build.gradle.api.BaseVariant createVariantApi ( @ com.android.annotations.NonNull com.android.build.gradle.internal.variant.BaseVariantData < ? extends com.android.build.gradle.internal.variant.BaseVariantOutputData > variantData ) { com.android.build.gradle.internal.api.ApplicationVariantImpl variant = basePlugin.getInstantiator ( ) . newInstance ( com.android.build.gradle.internal.api.ApplicationVariantImpl.class , variantData , basePlugin ) ; com.android.build.gradle.internal.variant.ApplicationVariantFactory.createApkOutputApiObjects ( basePlugin , variantData , variant ) ; return variant ; }

Target:
public com.android.build.gradle.api.BaseVariant createVariantApi ( @ com.android.annotations.NonNull com.android.build.gradle.internal.variant.BaseVariantData < ? extends com.android.build.gradle.internal.variant.BaseVariantOutputData > variantData , @ com.android.annotations.NonNull com.android.build.gradle.internal.api.ReadOnlyObjectProvider readOnlyObjectProvider ) { com.android.build.gradle.internal.api.ApplicationVariantImpl variant = basePlugin.getInstantiator ( ) . newInstance ( com.android.build.gradle.internal.api.ApplicationVariantImpl.class , variantData , basePlugin , readOnlyObjectProvider ) ; com.android.build.gradle.internal.variant.ApplicationVariantFactory.createApkOutputApiObjects ( basePlugin , variantData , variant ) ; return variant ; }
Source:
private static boolean isMidnight ( java.util.Calendar c ) { return ( ( ( ( c.get ( java.util.Calendar.HOUR_OF_DAY ) ) == 0 ) && ( ( c.get ( java.util.Calendar.MINUTE ) ) == 0 ) ) && ( ( c.get ( java.util.Calendar.SECOND ) ) == 0 ) ) && ( ( c.get ( java.util.Calendar.MILLISECOND ) ) == 0 ) ; }

Target:
private static boolean isMidnight ( com.ibm.icu.util.Calendar c ) { return ( ( ( ( c.get ( Calendar.HOUR_OF_DAY ) ) == 0 ) && ( ( c.get ( Calendar.MINUTE ) ) == 0 ) ) && ( ( c.get ( Calendar.SECOND ) ) == 0 ) ) && ( ( c.get ( Calendar.MILLISECOND ) ) == 0 ) ; }
Source:
public static void doTest ( ) throws java.lang.Exception { Main.testField ( java.lang.Math.class , "PI" ) ; Main.testField ( java.lang.Integer.class , "value" ) ; Main.testField ( Main.Foo.class , "this$0" ) ; Main.testField ( Main.Bar.class , "VAL" ) ; }

Target:
public static void doTest ( ) throws java.lang.Exception { Main.testField ( java.lang.Math.class , "PI" ) ; Main.testField ( java.lang.Integer.class , "value" ) ; Main.testField ( Main.Foo.class , "this$0" ) ; Main.testField ( Main.Bar.class , "VAL" ) ; Main.testField ( Main.Generics.class , "generics" ) ; }
Source:
public static android.graphics.Rect unflattenFromString ( java.lang.String str ) { java.util.regex.Matcher matcher = android.graphics.Rect.FLATTENED_PATTERN.matcher ( str ) ; if ( ! ( matcher.matches ( ) ) ) { return null ; } return new android.graphics.Rect ( java.lang.Integer.parseInt ( matcher.group ( 1 ) ) , java.lang.Integer.parseInt ( matcher.group ( 2 ) ) , java.lang.Integer.parseInt ( matcher.group ( 3 ) ) , java.lang.Integer.parseInt ( matcher.group ( 4 ) ) ) ; }

Target:
public static android.graphics.Rect unflattenFromString ( java.lang.String str ) { java.util.regex.Matcher matcher = android.graphics.Rect.UnflattenHelper.getMatcher ( str ) ; if ( ! ( matcher.matches ( ) ) ) { return null ; } return new android.graphics.Rect ( java.lang.Integer.parseInt ( matcher.group ( 1 ) ) , java.lang.Integer.parseInt ( matcher.group ( 2 ) ) , java.lang.Integer.parseInt ( matcher.group ( 3 ) ) , java.lang.Integer.parseInt ( matcher.group ( 4 ) ) ) ; }
Source:
private void installTemplate ( java.lang.String templateName , java.io.File destFile , java.util.Map < java.lang.String , java.lang.String > placeholderMap , com.android.sdklib.IAndroidTarget target ) throws com.android.sdklib.internal.project.ProjectCreator.ProjectCreateException { java.lang.String templateFolder = target.getPath ( IAndroidTarget.TEMPLATES ) ; final java.lang.String sourcePath = ( templateFolder + ( java.io.File.separator ) ) + templateName ; installFullPathTemplate ( sourcePath , destFile , placeholderMap ) ; }

Target:
private void installTargetTemplate ( java.lang.String templateName , java.io.File destFile , java.util.Map < java.lang.String , java.lang.String > placeholderMap , com.android.sdklib.IAndroidTarget target ) throws com.android.sdklib.internal.project.ProjectCreator.ProjectCreateException { java.lang.String templateFolder = target.getPath ( IAndroidTarget.TEMPLATES ) ; final java.lang.String sourcePath = ( templateFolder + ( java.io.File.separator ) ) + templateName ; installFullPathTemplate ( sourcePath , destFile , placeholderMap ) ; }
Source:
static void testFailLoadAndGc ( ) throws Main.TestFailed { try { Main.BrokenDexLoader loader ; loader = new Main.BrokenDexLoader ( java.lang.ClassLoader.getSystemClassLoader ( ) ) ; loader.findBrokenClass ( ) ; java.lang.System.err.println ( "ERROR: Inaccessible was accessible" ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { java.lang.Throwable cause = ite.getCause ( ) ; if ( cause instanceof java.lang.NullPointerException ) { java.lang.System.err.println ( "Got expected ITE/NPE" ) ; } else { java.lang.System.err.println ( "Got unexpected ITE" ) ; ite.printStackTrace ( ) ; } } }

Target:
static void testFailLoadAndGc ( ) throws Main.TestFailed { try { Main.BrokenDexLoader loader ; loader = new Main.BrokenDexLoader ( java.lang.ClassLoader.getSystemClassLoader ( ) ) ; loader.findBrokenClass ( ) ; java.lang.System.out.println ( "ERROR: Inaccessible was accessible" ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { java.lang.Throwable cause = ite.getCause ( ) ; if ( cause instanceof java.lang.NullPointerException ) { java.lang.System.out.println ( "Got expected ITE/NPE" ) ; } else { java.lang.System.out.println ( "Got unexpected ITE" ) ; ite.printStackTrace ( java.lang.System.out ) ; } } }
Source:
private static void deleteOldFilesFromJavaFiles ( @ javax.annotation.Nonnull com.android.jack.analysis.dependency.file.FileDependencies fileDependencies , @ javax.annotation.Nonnull java.lang.String javaFileName ) throws com.android.jack.experimental.incremental.IncrementalException { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalOutputLibrary ) != null ; for ( java.lang.String typeNameToRemove : fileDependencies.getTypeNames ( javaFileName ) ) { if ( ! ( com.android.jack.experimental.incremental.JackIncremental.deletedTypes.contains ( typeNameToRemove ) ) ) { com.android.jack.experimental.incremental.JackIncremental.deletedTypes.add ( typeNameToRemove ) ; com.android.sched.vfs.VPath vpath = new com.android.sched.vfs.VPath ( typeNameToRemove , com.android.jack.experimental.incremental.JackIncremental.fileSeparator ) ; com.android.jack.experimental.incremental.JackIncremental.deleteFile ( FileType.JAYCE , vpath ) ; com.android.jack.experimental.incremental.JackIncremental.deleteFile ( FileType.DEX , vpath ) ; } } }

Target:
private static void deleteOldFilesFromJavaFiles ( @ javax.annotation.Nonnull com.android.jack.analysis.dependency.file.FileDependencies fileDependencies , @ javax.annotation.Nonnull java.lang.String javaFileName ) throws com.android.jack.experimental.incremental.IncrementalException { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary ) != null ; for ( java.lang.String typeNameToRemove : fileDependencies.getTypeNames ( javaFileName ) ) { if ( ! ( com.android.jack.experimental.incremental.JackIncremental.deletedTypes.contains ( typeNameToRemove ) ) ) { com.android.jack.experimental.incremental.JackIncremental.deletedTypes.add ( typeNameToRemove ) ; com.android.sched.vfs.VPath vpath = new com.android.sched.vfs.VPath ( typeNameToRemove , com.android.jack.experimental.incremental.JackIncremental.fileSeparator ) ; com.android.jack.experimental.incremental.JackIncremental.deleteFile ( FileType.JAYCE , vpath ) ; com.android.jack.experimental.incremental.JackIncremental.deleteFile ( FileType.DEX , vpath ) ; } } }
Source:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { if ( ! ( isMethodCallTargeted ( opcode , owner , name , desc ) ) ) { super . visitMethodInsn ( opcode , owner , name , desc , itf ) ; return ; } numOfTryWithResourcesInvoked.incrementAndGet ( ) ; super . visitMethodInsn ( org.objectweb.asm.Opcodes.INVOKESTATIC , com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXTENSION_INTERNAL_NAME , name , com.google.devtools.build.android.desugar.TryWithResourcesRewriter.METHOD_DESC_MAP.get ( desc ) , false ) ; }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc , boolean itf ) { if ( ! ( isMethodCallTargeted ( opcode , owner , name , desc ) ) ) { super . visitMethodInsn ( opcode , owner , name , desc , itf ) ; return ; } numOfTryWithResourcesInvoked.incrementAndGet ( ) ; visitedExceptionTypes.add ( com.google.common.base.Preconditions.checkNotNull ( owner ) ) ; super . visitMethodInsn ( org.objectweb.asm.Opcodes.INVOKESTATIC , com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXTENSION_INTERNAL_NAME , name , com.google.devtools.build.android.desugar.TryWithResourcesRewriter.METHOD_DESC_MAP.get ( desc ) , false ) ; }
Source:
private static void deleteRecursive ( java.io.File root ) { if ( root.exists ( ) ) { if ( root.isDirectory ( ) ) { java.io.File [ ] files = root.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { com.android.test.common.fixture.GradleTestProject.deleteRecursive ( file ) ; } } } org.junit.Assert.assertTrue ( root.delete ( ) ) ; } }

Target:
private static void deleteRecursive ( java.io.File root ) { if ( root.exists ( ) ) { if ( root.isDirectory ( ) ) { java.io.File [ ] files = root.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { com.android.build.gradle.integration.common.fixture.GradleTestProject.deleteRecursive ( file ) ; } } } org.junit.Assert.assertTrue ( root.delete ( ) ) ; } }
Source:
public long getContentLengthLong ( ) { try { connect ( ) ; if ( ( jarEntry ) == null ) { return jarFileURLConnection.getContentLengthLong ( ) ; } return getJarEntry ( ) . getSize ( ) ; } catch ( java.io.IOException e ) { } return - 1 ; }

Target:
public int getContentLength ( ) { try { connect ( ) ; if ( ( jarEntry ) == null ) { return jarFileURLConnection.getContentLength ( ) ; } return ( ( int ) ( getJarEntry ( ) . getSize ( ) ) ) ; } catch ( java.io.IOException e ) { } return - 1 ; }
Source:
private void revertToNitzTimeZone ( ) { if ( ( Settings.Global.getInt ( mCr , Settings.Global.AUTO_TIME_ZONE , 0 ) ) == 0 ) { return ; } if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( "Reverting to NITZ TimeZone: tz='" + ( mSavedTimeZone ) ) ) ; if ( ( mSavedTimeZone ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZone ) ; } }

Target:
private void revertToNitzTimeZone ( ) { if ( ( Settings.Global.getInt ( mCr , Settings.Global.AUTO_TIME_ZONE , 0 ) ) == 0 ) { return ; } java.lang.String tmpLog = "Reverting to NITZ TimeZone: tz=" + ( mSavedTimeZone ) ; if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( tmpLog ) ; mTimeZoneLog.log ( tmpLog ) ; if ( ( mSavedTimeZone ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZone ) ; } }
Source:
public E take ( ) throws java.lang.InterruptedException { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == 0 ) notEmpty.await ( ) ; return extract ( ) ; } finally { lock.unlock ( ) ; } }

Target:
public E take ( ) throws java.lang.InterruptedException { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == 0 ) notEmpty.await ( ) ; return dequeue ( ) ; } finally { lock.unlock ( ) ; } }
Source:
public boolean isImsRegistered ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return false ; return telephony.isImsRegistered ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public boolean switchSlots ( int [ ] physicalSlots ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) { return false ; } return telephony.switchSlots ( physicalSlots ) ; } catch ( android.os.RemoteException e ) { return false ; } }
Source:
private void doUnmount ( ) { android.widget.Toast.makeText ( getActivity ( ) , R.string.unmount_inform_text , Toast.LENGTH_SHORT ) . show ( ) ; android.os.storage.IMountService mountService = getMountService ( ) ; try { mLastClickedMountToggle.setEnabled ( false ) ; mLastClickedMountToggle.setTitle ( mResources.getString ( R.string.sd_ejecting_title ) ) ; mLastClickedMountToggle.setSummary ( mResources.getString ( R.string.sd_ejecting_summary ) ) ; mountService.unmountVolume ( mClickedMountPoint , true , false ) ; } catch ( android.os.RemoteException e ) { showDialogInner ( com.android.settings.deviceinfo.Memory.DLG_ERROR_UNMOUNT ) ; } }

Target:
private void doUnmount ( ) { android.widget.Toast.makeText ( getActivity ( ) , R.string.unmount_inform_text , Toast.LENGTH_SHORT ) . show ( ) ; android.os.storage.IMountService mountService = getMountService ( ) ; try { com.android.settings.deviceinfo.Memory.mLastClickedMountToggle.setEnabled ( false ) ; com.android.settings.deviceinfo.Memory.mLastClickedMountToggle.setTitle ( mResources.getString ( R.string.sd_ejecting_title ) ) ; com.android.settings.deviceinfo.Memory.mLastClickedMountToggle.setSummary ( mResources.getString ( R.string.sd_ejecting_summary ) ) ; mountService.unmountVolume ( com.android.settings.deviceinfo.Memory.mClickedMountPoint , true , false ) ; } catch ( android.os.RemoteException e ) { showDialogInner ( com.android.settings.deviceinfo.Memory.DLG_ERROR_UNMOUNT ) ; } }
Source:
public void testAesCbcHmacMd5Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1000 ) ; }
Source:
private void notifyInterfaceAdded ( java.lang.String iface ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . interfaceAdded ( iface ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyInterfaceAdded ( java.lang.String iface ) { invokeForAllObservers ( ( o ) -> o.interfaceAdded ( iface ) ) ; }
Source:
public com.android.sdklib.internal.repository.SdkSource [ ] getSources ( ) { return mSources.toArray ( new com.android.sdklib.internal.repository.SdkSource [ mSources.size ( ) ] ) ; }

Target:
public void add ( com.android.sdklib.internal.repository.SdkSourceCategory category , com.android.sdklib.internal.repository.SdkSource source ) { java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list = mSources.get ( category ) ; if ( list == null ) { list = new java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > ( ) ; mSources.put ( category , list ) ; } list.add ( source ) ; }
Source:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200376c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( "3742453657269616c697a61626c65436f6e7461696e657200000000000000000200014c000e756e7" + "3657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616c697a6" ) + "174696f6e546573742457617353657269616c697a61626c653b787070" ) ; libcore.java.io.SerializationTest.serializableContainerInitializedFlag = false ; libcore.java.io.SerializationTest.wasSerializableInitializedFlag = false ; libcore.java.io.SerializationTest.SerializableContainer sc = ( ( libcore.java.io.SerializationTest.SerializableContainer ) ( libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainerInitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( ( "3742453657269616c697a61626c65436f6e7461696e65723200000000000000000200014c000e7" + "56e73657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616" ) + "c697a6174696f6e546573742457617353657269616c697a61626c653b7870737200316c6962636" ) + "f72652e6a6176612e696f2e53657269616c697a6174696f6e546573742457617353657269616c6" ) + "97a61626c65000000000000000002000149000169787000000000" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertTrue ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }
Source:
final void get ( double [ ] dst , int dstOffset , int doubleCount ) { checkNotFreed ( ) ; int byteCount = checkGetBounds ( SizeOf.DOUBLE , dst.length , dstOffset , doubleCount ) ; this . block.peekDoubleArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( double [ ] dst , int dstOffset , int doubleCount ) { checkIsAccessible ( ) ; int byteCount = checkGetBounds ( SizeOf.DOUBLE , dst.length , dstOffset , doubleCount ) ; this . block.peekDoubleArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }
Source:
public java.lang.Object clone ( ) { try { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.concurrent.CopyOnWriteArrayList < E > clone = ( ( java.util.concurrent.CopyOnWriteArrayList < E > ) ( super . clone ( ) ) ) ; clone.resetLock ( ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( ) ; } }

Target:
public synchronized E remove ( int index ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E removed = ( ( E ) ( elements [ index ] ) ) ; removeRange ( index , ( index + 1 ) ) ; return removed ; }
Source:
private void destroySurface ( ) { if ( ( mLayer ) != null ) { mSurface.detachFromGLContext ( ) ; mLayer.clearStorage ( ) ; boolean shouldRelease = true ; if ( ( mListener ) != null ) { shouldRelease = mListener.onSurfaceTextureDestroyed ( mSurface ) ; } synchronized ( mNativeWindowLock ) { nDestroyNativeWindow ( ) ; } mLayer.destroy ( ) ; if ( shouldRelease ) mSurface.release ( ) ; mSurface = null ; mLayer = null ; mHadSurface = true ; } }

Target:
private void destroySurface ( ) { if ( ( mLayer ) != null ) { mLayer.detachSurfaceTexture ( ) ; boolean shouldRelease = true ; if ( ( mListener ) != null ) { shouldRelease = mListener.onSurfaceTextureDestroyed ( mSurface ) ; } synchronized ( mNativeWindowLock ) { nDestroyNativeWindow ( ) ; } mLayer.destroy ( ) ; if ( shouldRelease ) mSurface.release ( ) ; mSurface = null ; mLayer = null ; mHadSurface = true ; } }
Source:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = getResourceContents ( apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }

Target:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride , java.lang.Integer maxSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = com.android.apksig.internal.util.Resources.toByteArray ( getClass ( ) , apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } if ( maxSdkVersionOverride != null ) { builder.setMaxCheckedPlatformVersion ( maxSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }
Source:
public void removeTransportModeTransforms ( java.io.FileDescriptor socket , android.net.IpSecTransform transform ) throws java.io.IOException { try ( android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.dup ( socket ) ) { removeTransportModeTransforms ( pfd , transform ) ; } }

Target:
public void removeTransportModeTransforms ( java.io.FileDescriptor socket , android.net.IpSecTransform transform ) throws java.io.IOException { try ( android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.dup ( socket ) ) { mService.removeTransportModeTransforms ( pfd , transform.getResourceId ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
protected void checkReportedError ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.Nullable java.lang.Object data ) { assertNotNull ( message , com.android.tools.lint.checks.WrongCaseDetector.getOldValue ( message ) ) ; assertNotNull ( message , com.android.tools.lint.checks.WrongCaseDetector.getNewValue ( message ) ) ; }

Target:
protected void checkReportedError ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.Nullable java.lang.Object data ) { assertNotNull ( message , com.android.tools.lint.checks.WrongCaseDetector.getOldValue ( message , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertNotNull ( message , com.android.tools.lint.checks.WrongCaseDetector.getNewValue ( message , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; }
Source:
public boolean getBooleanProperty ( java.lang.String key , boolean defVal ) { java.lang.String s = getProperty ( key ) ; if ( s != null ) { if ( ( s.equalsIgnoreCase ( "yes" ) ) || ( s.equals ( "true" ) ) ) { return true ; } if ( ( s.equalsIgnoreCase ( "no" ) ) || ( s.equalsIgnoreCase ( "false" ) ) ) { return false ; } } return defVal ; }

Target:
protected static boolean getBooleanProperty ( java.lang.String key ) { return android.icu.dev.test.TestFmwk.getParams ( ) . getBooleanProperty ( key ) ; }
Source:
public int getMTU ( ) throws java.net.SocketException { java.io.FileDescriptor fd = null ; try { fd = Libcore.os.socket ( java.net.AF_INET , java.net.SOCK_DGRAM , 0 ) ; return Libcore.os.ioctlMTU ( fd , name ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsSocketException ( ) ; } catch ( java.lang.Exception ex ) { throw new java.net.SocketException ( ex ) ; } finally { libcore.io.IoUtils.closeQuietly ( fd ) ; } }

Target:
public int getMTU ( ) throws java.net.SocketException { java.io.FileDescriptor fd = null ; try { fd = Libcore.rawOs.socket ( java.net.AF_INET , java.net.SOCK_DGRAM , 0 ) ; return Libcore.rawOs.ioctlMTU ( fd , name ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsSocketException ( ) ; } catch ( java.lang.Exception ex ) { throw new java.net.SocketException ( ex ) ; } finally { libcore.io.IoUtils.closeQuietly ( fd ) ; } }
Source:
public static void openDrawer ( int drawerLayoutId , int gravity ) { if ( android.support.test.espresso.contrib.DrawerActions.checkDrawer ( drawerLayoutId , android.support.test.espresso.contrib.DrawerMatchers.isOpen ( gravity ) ) ) { return ; } android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.registerListener ( ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.actionOpenDrawer ( gravity ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.unregisterListener ( ) ) ; }

Target:
protected org.hamcrest.Matcher < android.view.View > checkAction ( ) { return android.support.test.espresso.contrib.DrawerMatchers.isOpen ( gravity ) ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget_byte.d.T_aget_byte_1 t = new dot.junit.opcodes.aget_byte.d.T_aget_byte_1 ( ) ; byte [ ] arr = new byte [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE3 ( ) { loadAndRun ( "dot.junit.opcodes.aget_byte.d.T_aget_byte_1" , java.lang.ArrayIndexOutOfBoundsException.class , new byte [ 2 ] , ( - 1 ) ) ; }
Source:
private void init ( ) { android.content.Intent intent = getIntent ( ) ; mLog = new android.aidl.tests.TestServiceClient.Logger ( ) ; mLog.log ( "Reading sentinels from intent..." ) ; mSuccessSentinel = intent.getStringExtra ( "sentinel.success" ) ; mFailureSentinel = intent.getStringExtra ( "sentinel.failure" ) ; if ( ( ( mSuccessSentinel ) == null ) || ( ( mFailureSentinel ) == null ) ) { java.lang.String message = "Failed to read intent extra input." ; android.util.Log.e ( android.aidl.tests.TestServiceClient.TAG , message ) ; mLog.close ( ) ; throw new java.lang.RuntimeException ( message ) ; } }

Target:
private void init ( ) { android.content.Intent intent = getIntent ( ) ; mLog = new android.aidl.tests.TestLogger ( this ) ; mLog.log ( "Reading sentinels from intent..." ) ; mSuccessSentinel = intent.getStringExtra ( "sentinel.success" ) ; mFailureSentinel = intent.getStringExtra ( "sentinel.failure" ) ; if ( ( ( mSuccessSentinel ) == null ) || ( ( mFailureSentinel ) == null ) ) { java.lang.String message = "Failed to read intent extra input." ; android.util.Log.e ( android.aidl.tests.TestServiceClient.TAG , message ) ; mLog.close ( ) ; throw new java.lang.RuntimeException ( message ) ; } }
Source:
public static java.lang.String map2OID ( java.lang.String algName ) { return org.apache.harmony.security.utils.AlgNameMapper.alg2OidMap.get ( algName.toUpperCase ( java.util.Locale.US ) ) ; }

Target:
public static java.lang.String map2OID ( java.lang.String algName ) { java.lang.String result = org.apache.harmony.security.utils.AlgNameMapper.alg2OidMap.get ( algName.toUpperCase ( java.util.Locale.US ) ) ; if ( result != null ) { return result ; } org.apache.harmony.security.utils.AlgNameMapperSource s = org.apache.harmony.security.utils.AlgNameMapper.source ; if ( s != null ) { return s.mapNameToOid ( algName ) ; } return null ; }
Source:
public void setVisible ( boolean visible ) { if ( visible != ( mVisible ) ) { mVisible = visible ; if ( mVisible ) { if ( ( mDirty ) != 0 ) { configurationChanged ( mDirty ) ; } else { updateForkStatus ( ) ; } } } }

Target:
public void setVisible ( boolean visible ) { if ( visible != ( mVisible ) ) { mVisible = visible ; if ( mVisible ) { if ( ( mDirty ) != 0 ) { configurationChanged ( mDirty ) ; } else { updateForkStatus ( ) ; mManager.scheduleRender ( this ) ; } } else { dispose ( ) ; } } }
Source:
public boolean unlock ( java.lang.String password ) { return unlock ( android.security.KeyStore.getPasswordBytes ( password ) ) ; }

Target:
public boolean unlock ( java.lang.String password ) { try { mError = mBinder.unlock ( password ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void run ( final com.android.cts.TestDevice device , final java.lang.String javaPkgName , com.android.cts.TestSessionLog sessionLog ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , com.android.cts.InvalidApkPathException , com.android.cts.InvalidNameSpaceException , java.io.IOException { if ( isAllTestsRun ( ) ) { return ; } setup ( device , javaPkgName ) ; runImpl ( javaPkgName ) ; }

Target:
public void run ( final com.android.cts.TestDevice device , final java.lang.String javaPkgName , com.android.cts.TestSessionLog sessionLog ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , com.android.cts.InvalidApkPathException , com.android.cts.InvalidNameSpaceException , java.io.IOException { if ( isAllTestsRun ( ) ) { return ; } setup ( device , javaPkgName ) ; runImpl ( javaPkgName , sessionLog.getProfile ( ) ) ; }
Source:
public static java.awt.image.BufferedImage cropBlank ( java.awt.image.BufferedImage image ) { return com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.crop ( image , new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter ( ) { public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { int rgb = bufferedImage.getRGB ( x , y ) ; return ( rgb & - 16777216 ) == 0 ; } } ) ; }

Target:
public static java.awt.image.BufferedImage cropBlank ( java.awt.image.BufferedImage image , com.android.ide.common.api.Rect initialCrop ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter filter = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter ( ) { public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { int rgb = bufferedImage.getRGB ( x , y ) ; return ( rgb & - 16777216 ) == 0 ; } } ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.crop ( image , filter , initialCrop ) ; }
Source:
public static void doTest ( ) throws java.lang.Exception { java.lang.reflect.Method say_hi_method = art.Test986.Transform.class . getDeclaredMethod ( "sayHi" ) ; art.Main.bindAgentJNIForClass ( art.Test986.Transform.class ) ; art.Test986.Transform.sayHi ( ) ; art.Test986.setNativeTransform ( say_hi_method , "NoReallySayGoodbye" ) ; art.Main.bindAgentJNIForClass ( art.Test986.Transform.class ) ; art.Test986.Transform.sayHi ( ) ; art.Main.bindAgentJNIForClass ( art.Main.class ) ; art.Main.bindAgentJNIForClass ( art.Test986.class ) ; }

Target:
public static void doTest ( ) throws java.lang.Exception { java.lang.reflect.Method say_hi_method = art.Test986.Transform.class . getDeclaredMethod ( "sayHi" ) ; art.Test986.Transform.sayHi2 ( ) ; art.Test986.setNativeTransform ( say_hi_method , "NoReallySayGoodbye" ) ; art.Test986.Transform.sayHi ( ) ; art.Test986.setNativeTransform ( say_hi_method , "Java_art_Test986_00024Transform_sayHi2" ) ; art.Test986.rebindTransformClass ( ) ; art.Test986.Transform.sayHi ( ) ; art.Test986.removeNativeTransform ( say_hi_method ) ; art.Test986.rebindTransformClass ( ) ; art.Test986.Transform.sayHi ( ) ; }
Source:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . notifyFeatureRemoved ( org.mockito.Matchers.eq ( 0 ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; }

Target:
public void testCallMethodOnCreatedFeature ( ) throws android.os.RemoteException { com.android.ims.internal.IImsMMTelFeature f = mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; f.isConnected ( 0 , 0 ) ; junit.framework.Assert.assertTrue ( mTestImsService.mTestMMTelFeature.isConnectedCalled ) ; }
Source:
public void earlyStartup ( ) { if ( isFirstTime ( ) ) { showWelcomeWizard ( ) ; } else if ( mStore.isPingOptIn ( ) ) { sendUsageStats ( ) ; } initializeWindowCoordinator ( ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . workbenchStarted ( ) ; }

Target:
public void earlyStartup ( ) { if ( com.android.ide.eclipse.base.InstallDetails.isAndroidIdePackage ( ) ) { useBundledSdk ( ) ; } if ( isFirstTime ( ) ) { showWelcomeWizard ( ) ; } else if ( mStore.isPingOptIn ( ) ) { sendUsageStats ( ) ; } initializeWindowCoordinator ( ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . workbenchStarted ( ) ; }
Source:
public static java.lang.String pii ( java.lang.Object pii ) { if ( ( pii == null ) || ( com.android.services.telephony.Log.VERBOSE ) ) { return java.lang.String.valueOf ( pii ) ; } return ( "[" + ( com.android.services.telephony.Log.secureHash ( java.lang.String.valueOf ( pii ) . getBytes ( ) ) ) ) + "]" ; }

Target:
public static java.lang.String pii ( java.lang.Object pii ) { return android.telecom.Log.pii ( pii ) ; }
Source:
private static boolean isValidInterfaceName ( java.lang.String interfaceName ) { for ( java.lang.String validName : new java.io.File ( "/sys/class/net" ) . list ( ) ) { if ( interfaceName.equals ( validName ) ) { return true ; } } return false ; }

Target:
private static boolean isValidInterfaceName ( java.lang.String interfaceName ) { final java.lang.String [ ] interfaceList = java.net.NetworkInterface.SYS_CLASS_NET.list ( ) ; if ( interfaceList == null ) { return false ; } for ( java.lang.String validName : interfaceList ) { if ( interfaceName.equals ( validName ) ) { return true ; } } return false ; }
Source:
protected android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo runRenderSpec ( android.uirendering.cts.testinfrastructure.TestCase testCase ) { android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo testPositionInfo = getActivity ( ) . enqueueRenderSpecAndWait ( testCase.layoutID , testCase.canvasClient , testCase.viewInitializer , testCase.useHardware , testCase.usePicture ) ; testCase.wasTestRan = true ; if ( ( testCase.readyFence ) != null ) { try { testCase.readyFence.await ( 5 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( "readyFence didn't signal within 5 seconds" ) ; } } return testPositionInfo ; }

Target:
protected android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo runRenderSpec ( android.uirendering.cts.testinfrastructure.ActivityTestBase.TestCase testCase ) { android.uirendering.cts.testinfrastructure.ActivityTestBase.TestPositionInfo testPositionInfo = getActivity ( ) . enqueueRenderSpecAndWait ( testCase.layoutID , testCase.canvasClient , testCase.viewInitializer , testCase.useHardware , testCase.usePicture ) ; testCase.wasTestRan = true ; if ( ( testCase.readyFence ) != null ) { try { testCase.readyFence.await ( 5 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( "readyFence didn't signal within 5 seconds" ) ; } } return testPositionInfo ; }