auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onFinished ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; if ( DBG ) android.util.Log.d ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onFinished, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.remove ( preference.getKey ( ) ) ; if ( mBusyList.isEmpty ( ) ) { if ( reading ) { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } preference.setEnabled ( true ) ; }

Target:
public void onFinished ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; android.util.Log.i ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onFinished, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.remove ( preference.getKey ( ) ) ; if ( mBusyList.isEmpty ( ) ) { if ( reading ) { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } preference.setEnabled ( true ) ; }
Source:
public java.lang.String getIanaVersion ( ) { try ( java.io.Reader reader = xmlSource.get ( ) ) { org.xmlpull.v1.XmlPullParserFactory xmlPullParserFactory = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) ; xmlPullParserFactory.setNamespaceAware ( false ) ; org.xmlpull.v1.XmlPullParser parser = xmlPullParserFactory.newPullParser ( ) ; parser.setInput ( reader ) ; libcore.util.TimeZoneFinder.findRequiredStartTag ( parser , libcore.util.TimeZoneFinder.TIMEZONES_ELEMENT ) ; return parser.getAttributeValue ( null , libcore.util.TimeZoneFinder.IANA_VERSION_ATTRIBUTE ) ; } catch ( org.xmlpull.v1.XmlPullParserException e ) { return null ; } catch ( java.io.IOException e ) { return null ; } }

Target:
public java.lang.String getIanaVersion ( ) { try ( java.io.Reader reader = xmlSource.get ( ) ) { org.xmlpull.v1.XmlPullParserFactory xmlPullParserFactory = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) ; xmlPullParserFactory.setNamespaceAware ( false ) ; org.xmlpull.v1.XmlPullParser parser = xmlPullParserFactory.newPullParser ( ) ; parser.setInput ( reader ) ; libcore.util.TimeZoneFinder.findRequiredStartTag ( parser , libcore.util.TimeZoneFinder.TIMEZONES_ELEMENT ) ; return parser.getAttributeValue ( null , libcore.util.TimeZoneFinder.IANA_VERSION_ATTRIBUTE ) ; } catch ( org.xmlpull.v1.XmlPullParserException | java.io.IOException e ) { return null ; } }
Source:
public void put ( com.ibm.icu.impl.UResource.Key key , com.ibm.icu.impl.UResource.Value value ) { if ( key.contentEquals ( "dnam" ) ) { } else if ( key.contentEquals ( "per" ) ) { setFormatterIfAbsent ( com.ibm.icu.text.MeasureFormat.MeasureFormatData.PER_UNIT_INDEX , value , 0 ) ; } else { setFormatterIfAbsent ( com.ibm.icu.impl.StandardPlural.indexFromString ( key ) , value , 0 ) ; } }

Target:
public void put ( com.ibm.icu.impl.UResource.Key key , com.ibm.icu.impl.UResource.Value value ) { if ( key.contentEquals ( "dnam" ) ) { } else if ( key.contentEquals ( "per" ) ) { setFormatterIfAbsent ( com.ibm.icu.text.MeasureFormat.MeasureFormatData.PER_UNIT_INDEX , value , 1 ) ; } else { setFormatterIfAbsent ( com.ibm.icu.impl.StandardPlural.indexFromString ( key ) , value , 0 ) ; } }
Source:
private com.android.jack.ir.ast.JExpression maybeCast ( com.android.jack.ir.ast.JType expected , com.android.jack.ir.ast.JExpression expression ) { if ( ! ( expected.isSameType ( expression.getType ( ) ) ) ) { com.android.jack.ir.ast.JReferenceType toType = ( ( com.android.jack.ir.ast.JReferenceType ) ( expected ) ) ; return new com.android.jack.ir.ast.JDynamicCastOperation ( expression.getSourceInfo ( ) , expression , toType ) ; } else { return expression ; } }

Target:
private com.android.jack.ir.ast.JExpression maybeCast ( com.android.jack.ir.ast.JType expected , com.android.jack.ir.ast.JExpression expression ) { if ( ! ( expected.isSameType ( expression.getType ( ) ) ) ) { return new com.android.jack.ir.ast.JDynamicCastOperation ( expression.getSourceInfo ( ) , expression , expected ) ; } else { return expression ; } }
Source:
protected boolean isTestClass ( java.lang.Class < ? > testClass ) { return ( ( super . isTestClass ( testClass ) ) && ( ! ( testClass.getPackage ( ) . getName ( ) . startsWith ( FuncTests.FUNC_TEST_PACKAGE ) ) ) ) && ( ! ( testClass.getPackage ( ) . getName ( ) . startsWith ( GroovyTestsSuite.GROOVY_TEST_PACKAGE ) ) ) ; }

Target:
protected boolean isTestClass ( java.lang.Class < ? > testClass ) { return ( super . isTestClass ( testClass ) ) && ( ! ( testClass.getPackage ( ) . getName ( ) . startsWith ( FuncTests.FUNC_TEST_PACKAGE ) ) ) ; }
Source:
private void delayedVerifyMeasurements ( java.lang.String message , double ... expectations ) throws java.lang.Throwable { appendText ( java.lang.String.format ( "\n%s." , message ) ) ; appendText ( "A sound will be played once the verification is complete..." ) ; waitForUser ( ) ; java.lang.Thread.sleep ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 10 , java.util.concurrent.TimeUnit.SECONDS ) ) ; try { verifyMeasurements ( expectations ) ; } finally { playSound ( ) ; } }

Target:
private void delayedVerifyMeasurements ( java.lang.String message , float ... expectations ) throws java.lang.Throwable { appendText ( java.lang.String.format ( "\n%s." , message ) ) ; appendText ( "A sound will be played once the verification is complete..." ) ; waitForUser ( ) ; java.lang.Thread.sleep ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 10 , java.util.concurrent.TimeUnit.SECONDS ) ) ; try { verifyMeasurements ( expectations ) ; } finally { playSound ( ) ; } }
Source:
public void run ( ) { if ( ( wasRun ) == 0 ) startedAt = java.lang.System.currentTimeMillis ( ) ; lastDelta = ( java.lang.System.currentTimeMillis ( ) ) - ( ( startedAt ) + ( 100 * ( wasRun ) ) ) ; ( wasRun ) ++ ; if ( ( wasRun ) == 2 ) { try { java.lang.Thread.sleep ( 200 ) ; } catch ( java.lang.InterruptedException e ) { } } }

Target:
public void run ( ) { if ( ( wasRun ) == 0 ) startedAt = java.lang.System.currentTimeMillis ( ) ; lastDelta = ( java.lang.System.currentTimeMillis ( ) ) - ( ( startedAt ) + ( 100 * ( wasRun ) ) ) ; ( wasRun ) ++ ; if ( ( wasRun ) == 2 ) { try { java.lang.Thread.sleep ( 200 ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
static void native_setRotate ( int native_object , float degrees , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } d.mValues = android.graphics.Matrix_Delegate.getRotate ( degrees , px , py ) ; }

Target:
static void native_setRotate ( long native_object , float degrees , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } d.mValues = android.graphics.Matrix_Delegate.getRotate ( degrees , px , py ) ; }
Source:
public java.lang.String toString ( ) { if ( ( - 1 ) == ( prePosition ) ) { return super . toString ( ) ; } return type.get ( new java.util.MapEntry ( enumMap.keys [ prePosition ] , enumMap.values [ prePosition ] ) ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { if ( ( prePosition ) == ( - 1 ) ) { return super . toString ( ) ; } return type.get ( new java.util.MapEntry ( enumMap.keys [ prePosition ] , enumMap.values [ prePosition ] ) ) . toString ( ) ; }
Source:
public void test_ConstructorLjava_lang_Readable ( ) { s = new java.util.Scanner ( new java.io.StringReader ( "test string" ) ) ; assertNotNull ( s ) ; s.close ( ) ; try { s = new java.util.Scanner ( ( ( java.lang.Readable ) ( null ) ) ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void test_ConstructorLjava_lang_Readable ( ) { s = new java.util.Scanner ( new java.io.StringReader ( "test string" ) ) ; assertNotNull ( s ) ; s.close ( ) ; try { s = new java.util.Scanner ( ( ( java.lang.Readable ) ( null ) ) ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket$ ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } if ( libcore.io.BlockGuardOs.isInetSocket ( fd ) ) { untagSocket ( fd ) ; } } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }

Target:
public void close ( java.io.FileDescriptor fd ) throws android.system.ErrnoException { try { if ( fd.isSocket$ ( ) ) { if ( libcore.io.BlockGuardOs.isLingerSocket ( fd ) ) { dalvik.system.BlockGuard.getThreadPolicy ( ) . onNetwork ( ) ; } } } catch ( android.system.ErrnoException ignored ) { } os.close ( fd ) ; }
Source:
public boolean cancelDiscovery ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "cancelDiscovery() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.cancelDiscovery ( ) ; }

Target:
public boolean cancelDiscovery ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "cancelDiscovery() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.cancelDiscovery ( ) ; }
Source:
public void test_getDisplayNameLjava_util_Locale ( ) { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; assertEquals ( "Pacific Standard Time" , tz.getDisplayName ( new java.util.Locale ( "US" ) ) ) ; if ( tests.support.Support_Locale.isLocaleAvailable ( java.util.Locale.FRANCE ) ) { assertEquals ( "heure normale du Pacifique" , tz.getDisplayName ( java.util.Locale.FRANCE ) ) ; } }

Target:
public void test_getDisplayNameLjava_util_Locale ( ) { java.util.TimeZone tz = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; assertEquals ( "Pacific Standard Time" , tz.getDisplayName ( new java.util.Locale ( "US" ) ) ) ; assertEquals ( "heure normale du Pacifique" , tz.getDisplayName ( java.util.Locale.FRANCE ) ) ; }
Source:
public void testFailed ( com.android.ddmlib.testrunner.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( status.equals ( TestFailure.ERROR ) ) { mRunResult.reportTestFailure ( test , TestStatus.ERROR , trace ) ; } else { mRunResult.reportTestFailure ( test , TestStatus.FAILURE , trace ) ; } com.android.ddmlib.Log.d ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "%s %s: %s" , test , status , trace ) ) ; }

Target:
public void testFailed ( com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { mRunResult.testFailed ( test , trace ) ; }
Source:
public char getChar ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ( ) ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char x = ( ( char ) ( libcore.io.Memory.peekShort ( ix ( position ) , ( ! ( nativeByteOrder ) ) ) ) ) ; position = newPosition ; return x ; }

Target:
public final char getChar ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ( ) ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char x = ( ( char ) ( libcore.io.Memory.peekShort ( ix ( position ) , ( ! ( nativeByteOrder ) ) ) ) ) ; position = newPosition ; return x ; }
Source:
public void postInstallHook ( com.android.sdklib.internal.repository.Archive archive , com.android.sdklib.internal.repository.ITaskMonitor monitor , java.io.File installFolder ) { super . postInstallHook ( archive , monitor , installFolder ) ; if ( installFolder == null ) { return ; } java.lang.String h = computeContentHash ( installFolder ) ; saveContentHash ( installFolder , h ) ; }

Target:
public void postInstallHook ( com.android.sdklib.internal.repository.Archive archive , com.android.sdklib.internal.repository.ITaskMonitor monitor , java.io.File installFolder ) { super . postInstallHook ( archive , monitor , installFolder ) ; if ( installFolder != null ) { java.lang.String h = computeContentHash ( installFolder ) ; saveContentHash ( installFolder , h ) ; } }
Source:
public boolean isBlocked ( ) { if ( phoneLookupInfo.getSystemBlockedNumberInfo ( ) . hasBlockedState ( ) ) { return phoneLookupInfo.getSystemBlockedNumberInfo ( ) . getBlockedState ( ) . equals ( BlockedState.BLOCKED ) ; } return phoneLookupInfo.getDialerBlockedNumberInfo ( ) . getBlockedState ( ) . equals ( BlockedState.BLOCKED ) ; }

Target:
public boolean isBlocked ( ) { if ( phoneLookupInfo.getSystemBlockedNumberInfo ( ) . hasBlockedState ( ) ) { return phoneLookupInfo.getSystemBlockedNumberInfo ( ) . getBlockedState ( ) . equals ( BlockedState.BLOCKED ) ; } return false ; }
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.ide.common.resources.configuration.RegionQualifier qualifier = com.android.ide.common.resources.configuration.RegionQualifier.getQualifier ( value ) ; if ( qualifier != null ) { config.setRegionQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { if ( ( value.length ( ) ) != 3 ) { return false ; } com.android.ide.common.resources.configuration.RegionQualifier qualifier = com.android.ide.common.resources.configuration.RegionQualifier.getQualifier ( value ) ; if ( qualifier != null ) { config.setRegionQualifier ( qualifier ) ; return true ; } return false ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { com.android.jack.shrob.seed.SeedMarker marker = type.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( ( marker != null ) && ( ( marker.getModifier ( ) ) != ( com.android.jack.shrob.spec.KeepModifier.ALLOW_SHRINKING ) ) ) { tracer.trace ( type ) ; } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { tracer.run ( type ) ; }
Source:
private static com.intellij.openapi.vfs.VirtualFile findTargetContentRoot ( com.intellij.openapi.module.Module clientModule ) { com.intellij.openapi.vfs.VirtualFile [ ] contentRoots = com.intellij.openapi.roots.ModuleRootManager.getInstance ( clientModule ) . getContentRoots ( ) ; for ( com.intellij.openapi.vfs.VirtualFile contentRoot : contentRoots ) { if ( ( contentRoot.findChild ( GradleConstants.DEFAULT_SCRIPT_NAME ) ) != null ) { return contentRoot ; } } if ( ( contentRoots.length ) > 0 ) { return contentRoots [ 0 ] ; } return null ; }

Target:
private static com.intellij.openapi.vfs.VirtualFile findTargetContentRoot ( com.intellij.openapi.module.Module clientModule ) { final com.intellij.openapi.vfs.VirtualFile [ ] contentRoots = com.intellij.openapi.roots.ModuleRootManager.getInstance ( clientModule ) . getContentRoots ( ) ; for ( com.intellij.openapi.vfs.VirtualFile contentRoot : contentRoots ) { if ( ( contentRoot.findChild ( GradleConstants.DEFAULT_SCRIPT_NAME ) ) != null ) { return contentRoot ; } } return ( contentRoots.length ) > 0 ? contentRoots [ 0 ] : null ; }
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 = 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 ( false ) ; 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 java.nio.ByteBuffer put ( byte x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } put ( ix ( nextPutIndex ( ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer put ( byte x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } put ( ix ( nextPutIndex ( ) ) , x ) ; return this ; }
Source:
public void reportIgnored ( @ com.android.annotations.NonNull java.lang.String module , @ com.android.annotations.NonNull java.io.File file ) { java.util.List < java.io.File > list = mNotMigrated.get ( module ) ; if ( list == null ) { list = com.google.common.collect.Lists.newArrayList ( ) ; mNotMigrated.put ( module , list ) ; } list.add ( file ) ; }

Target:
public void reportIgnored ( @ com.android.annotations.NonNull java.lang.String module , @ com.android.annotations.NonNull java.lang.String path ) { java.util.List < java.lang.String > list = mNotMigrated.get ( module ) ; if ( list == null ) { list = com.google.common.collect.Lists.newArrayList ( ) ; mNotMigrated.put ( module , list ) ; } list.add ( path ) ; }
Source:
private static com.android.vts.entity.ProfilingPointRunEntity createProfilingReport ( java.lang.String [ ] labels , long [ ] values , com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode regressionMode ) { java.util.List < java.lang.String > labelList = java.util.Arrays.asList ( labels ) ; java.util.List < java.lang.Long > valueList = new java.util.ArrayList < > ( ) ; for ( long value : values ) { valueList.add ( value ) ; } return new com.android.vts.entity.ProfilingPointRunEntity ( com.google.appengine.api.datastore.KeyFactory.createKey ( TestEntity.KIND , "test" ) , "name" , 0 , regressionMode.getNumber ( ) , labelList , valueList , "" , "" ) ; }

Target:
private static com.android.vts.entity.ProfilingPointRunEntity createProfilingReport ( java.lang.String [ ] labels , long [ ] values , com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode regressionMode ) { java.util.List < java.lang.String > labelList = java.util.Arrays.asList ( labels ) ; java.util.List < java.lang.Long > valueList = new java.util.ArrayList < > ( ) ; for ( long value : values ) { valueList.add ( value ) ; } return new com.android.vts.entity.ProfilingPointRunEntity ( com.google.appengine.api.datastore.KeyFactory.createKey ( TestEntity.KIND , "test" ) , "name" , 0 , regressionMode.getNumber ( ) , labelList , valueList , "" , "" , null ) ; }
Source:
private void readOutstandingMessages ( ) { org.chromium.mojo.system.ResultAnd < java.lang.Boolean > result ; do { try { result = org.chromium.mojo.bindings.Connector.readAndDispatchMessage ( mMessagePipeHandle , mIncomingMessageReceiver ) ; } catch ( org.chromium.mojo.system.MojoException e ) { onError ( e ) ; return ; } } while ( result.getValue ( ) ) ; if ( ( result.getMojoResult ( ) ) == ( org.chromium.mojo.system.MojoResult.SHOULD_WAIT ) ) { registerAsyncWaiterForRead ( ) ; } else { onError ( new org.chromium.mojo.system.MojoException ( result.getMojoResult ( ) ) ) ; } }

Target:
private void readOutstandingMessages ( ) { org.chromium.mojo.system.ResultAnd < java.lang.Boolean > result ; do { try { result = org.chromium.mojo.bindings.Connector.readAndDispatchMessage ( mMessagePipeHandle , mIncomingMessageReceiver ) ; } catch ( org.chromium.mojo.system.MojoException e ) { onError ( e ) ; return ; } } while ( result.getValue ( ) ) ; if ( ( result.getMojoResult ( ) ) != ( org.chromium.mojo.system.MojoResult.SHOULD_WAIT ) ) { onError ( new org.chromium.mojo.system.MojoException ( result.getMojoResult ( ) ) ) ; } }
Source:
public void testSetWifiEnabledByAppDoesNotStopHotspot ( ) { if ( ! ( android.net.wifi.cts.WifiFeature.isWifiSupported ( getContext ( ) ) ) ) { return ; } if ( ! ( mWifiManager.isPortableHotspotSupported ( ) ) ) { return ; } boolean wifiEnabled = mWifiManager.isWifiEnabled ( ) ; android.net.wifi.cts.WifiManagerTest.TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot ( ) ; assertFalse ( mWifiManager.isWifiEnabled ( ) ) ; assertFalse ( mWifiManager.setWifiEnabled ( true ) ) ; stopLocalOnlyHotspot ( callback , wifiEnabled ) ; assertEquals ( wifiEnabled , mWifiManager.isWifiEnabled ( ) ) ; }

Target:
public void testSetWifiEnabledByAppDoesNotStopHotspot ( ) { if ( ! ( mWifiManager.isPortableHotspotSupported ( ) ) ) { return ; } boolean wifiEnabled = mWifiManager.isWifiEnabled ( ) ; android.net.wifi.cts.WifiManagerTest.TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot ( ) ; assertFalse ( mWifiManager.isWifiEnabled ( ) ) ; assertFalse ( mWifiManager.setWifiEnabled ( true ) ) ; stopLocalOnlyHotspot ( callback , wifiEnabled ) ; assertEquals ( wifiEnabled , mWifiManager.isWifiEnabled ( ) ) ; }
Source:
public com.android.jack.dx.dex.file.TypeIdItem intern ( com.android.jack.dx.rop.type.Type type ) { if ( type == null ) { throw new java.lang.NullPointerException ( "type == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.TypeIdItem result = typeIds.get ( type ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.TypeIdItem ( new com.android.jack.dx.rop.cst.CstType ( type ) ) ; typeIds.put ( type , result ) ; } return result ; }

Target:
public com.android.jack.dx.dex.file.TypeIdItem intern ( com.android.jack.dx.rop.type.Type type ) { if ( type == null ) { throw new java.lang.NullPointerException ( "type == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.TypeIdItem result = typeIds.get ( type ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.TypeIdItem ( type ) ; typeIds.put ( type , result ) ; } return result ; }
Source:
private static void checkAndUpdateBooleanAliases ( java.util.Map < java.lang.String , java.lang.reflect.Field > nameToFieldMap , java.util.Map < java.lang.String , java.lang.String > booleanAliasMap , java.lang.String optionName ) { com.google.devtools.common.options.IsolatedOptionsData.checkForCollisions ( nameToFieldMap , ( "no_" + optionName ) , "boolean option alias" ) ; com.google.devtools.common.options.IsolatedOptionsData.checkForCollisions ( nameToFieldMap , ( "no" + optionName ) , "boolean option alias" ) ; booleanAliasMap.put ( ( "no_" + optionName ) , optionName ) ; booleanAliasMap.put ( ( "no" + optionName ) , optionName ) ; }

Target:
private static void checkAndUpdateBooleanAliases ( java.util.Map < java.lang.String , java.lang.reflect.Field > nameToFieldMap , java.util.Map < java.lang.String , java.lang.String > booleanAliasMap , java.lang.String optionName ) { com.google.devtools.common.options.IsolatedOptionsData.checkForCollisions ( nameToFieldMap , ( "no" + optionName ) , "boolean option alias" ) ; booleanAliasMap.put ( ( "no" + optionName ) , optionName ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( ( address ) != null ) { dest.writeByte ( ( ( byte ) ( 1 ) ) ) ; dest.writeByteArray ( address.getAddress ( ) ) ; dest.writeInt ( prefixLength ) ; } else { dest.writeByte ( ( ( byte ) ( 0 ) ) ) ; } }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeByteArray ( address.getAddress ( ) ) ; dest.writeInt ( prefixLength ) ; }
Source:
public void testRequestBugreportAvailableIfAffiliated ( ) throws java.lang.Exception { if ( ! ( mHasFeature ) ) { return ; } if ( canCreateAdditionalUsers ( 1 ) ) { int secondaryUserId = setupManagedSecondaryUser ( ) ; setSameAffiliationId ( secondaryUserId ) ; } int profileUserId = setupManagedProfile ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_APK2 , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_ADMIN2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportThrowsSecurityException" , mPrimaryUserId ) ; setSameAffiliationId ( profileUserId , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportDoesNotThrowException" , mPrimaryUserId ) ; setDifferentAffiliationId ( profileUserId , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportThrowsSecurityException" , mPrimaryUserId ) ; }

Target:
public void testRequestBugreportAvailableIfAffiliated ( ) throws java.lang.Exception { if ( ! ( mHasFeature ) ) { return ; } if ( canCreateAdditionalUsers ( 2 ) ) { int secondaryUserId = setupManagedSecondaryUser ( ) ; setSameAffiliationId ( secondaryUserId ) ; } int profileUserId = setupManagedProfile ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_APK2 , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_ADMIN2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportThrowsSecurityException" , mPrimaryUserId ) ; setSameAffiliationId ( profileUserId , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportDoesNotThrowException" , mPrimaryUserId ) ; setDifferentAffiliationId ( profileUserId , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG2 ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.DEVICE_WIDE_LOGGING_TEST , "testRequestBugreportThrowsSecurityException" , mPrimaryUserId ) ; }
Source:
public static com.android.incallui.incall.protocol.PrimaryInfo createEmptyPrimaryInfo ( ) { return new com.android.incallui.incall.protocol.PrimaryInfo ( null , null , false , null , null , null , ContactPhotoType.DEFAULT_PLACEHOLDER , false , false , false , false , false , false , null , null , true , ( - 1 ) ) ; }

Target:
public static com.android.incallui.incall.protocol.PrimaryInfo createEmptyPrimaryInfo ( ) { return new com.android.incallui.incall.protocol.PrimaryInfo ( null , null , false , null , null , null , ContactPhotoType.DEFAULT_PLACEHOLDER , false , false , false , false , false , false , false , null , null , true , ( - 1 ) ) ; }
Source:
public static void saveFile ( java.lang.String filename , byte [ ] data ) { try { java.io.FileOutputStream fos = new java.io.FileOutputStream ( filename ) ; fos.write ( data ) ; fos.close ( ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.cts.verifier.audioquality.Utils.TAG , ( "Error writing to file " + filename ) ) ; } }

Target:
public static void saveFile ( java.lang.String filename , byte [ ] data ) { try { java.io.FileOutputStream fos = new java.io.FileOutputStream ( filename ) ; fos.write ( data ) ; fos.close ( ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.android.cts.verifier.audioquality.Utils.TAG , ( "Error writing to file " + filename ) , e ) ; } }
Source:
public static void setup ( ) throws java.lang.Exception { com.android.jack.toolchain.ToolchainTest.CORE_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "core-libart" ) ; com.android.jack.toolchain.ToolchainTest.BOUNCY_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.toolchain.ToolchainTest.JUNIT_SOURCELIST = com.android.jack.TestTools.getHostLibSourcelist ( "junit4-hostdex-jack" ) ; java.io.File coreOut = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "core" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) ; toolchain.srcToLib ( null , coreOut , true , com.android.jack.toolchain.ToolchainTest.CORE_SOURCELIST ) ; com.android.jack.toolchain.ToolchainTest.corePath = coreOut ; }

Target:
public static void setup ( ) throws java.lang.Exception { com.android.jack.toolchain.ToolchainTest.CORE_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "core-libart" ) ; com.android.jack.toolchain.ToolchainTest.BOUNCY_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.toolchain.ToolchainTest.JUNIT_SOURCELIST = com.android.jack.TestTools.getHostLibSourcelist ( "junit4-hostdex-jack" ) ; com.android.jack.toolchain.ToolchainTest.corePath = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "core" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) ; toolchain.srcToLib ( com.android.jack.toolchain.ToolchainTest.corePath , true , com.android.jack.toolchain.ToolchainTest.CORE_SOURCELIST ) ; }
Source:
private void assertNoDataTransmittedByClient ( ) throws java.lang.Exception { byte [ ] firstChunkFromClient ; try { firstChunkFromClient = getFirstReceivedChunkFuture ( ) . get ( 2 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.util.concurrent.TimeoutException expected ) { return ; } if ( ( firstChunkFromClient != null ) && ( ( firstChunkFromClient.length ) > 0 ) ) { fail ( ( ( ( "Client transmitted " + ( firstChunkFromClient.length ) ) + " bytes: " ) + ( new java.lang.String ( firstChunkFromClient , "US-ASCII" ) ) ) ) ; } }

Target:
private void assertNoDataTransmittedByClient ( ) throws java.lang.Exception { byte [ ] firstChunkFromClient ; try { firstChunkFromClient = getFirstReceivedChunkFuture ( ) . get ( 4 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.util.concurrent.TimeoutException expected ) { return ; } if ( ( firstChunkFromClient != null ) && ( ( firstChunkFromClient.length ) > 0 ) ) { fail ( ( ( ( "Client transmitted " + ( firstChunkFromClient.length ) ) + " bytes: " ) + ( new java.lang.String ( firstChunkFromClient , "US-ASCII" ) ) ) ) ; } }
Source:
private void writeJavaMethodBody ( ) throws java.io.IOException { if ( com.android.jill.frontend.java.AsmHelper.isInterface ( currentClass ) ) { throw new com.android.jill.JillException ( ( ( com.android.jill.frontend.java.AsmHelper.isStatic ( currentMethod ) ? "static" : "default" ) + " method into interface is not supported" ) ) ; } sourceInfoWriter.writeDebugBegin ( currentClass , startLine ) ; writer.writeKeyword ( Token.METHOD_BODY ) ; writer.writeOpen ( ) ; writeLocals ( ) ; writeBody ( ) ; sourceInfoWriter.writeDebugEnd ( currentClass , endLine ) ; writer.writeClose ( ) ; }

Target:
private void writeJavaMethodBody ( ) throws java.io.IOException { sourceInfoWriter.writeDebugBegin ( currentClass , startLine ) ; writer.writeKeyword ( Token.METHOD_BODY ) ; writer.writeOpen ( ) ; writeLocals ( ) ; writeBody ( ) ; sourceInfoWriter.writeDebugEnd ( currentClass , endLine ) ; writer.writeClose ( ) ; }
Source:
public static long $noinline$SubNeg3 ( long arg1 , long arg2 ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long res = 0 ; long temp = - arg1 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( temp - arg2 ) - i ; } return res ; }

Target:
public static long $noinline$SubNeg3 ( long arg1 , long arg2 ) { long res = 0 ; long temp = - arg1 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( temp - arg2 ) - i ; } return res ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { if ( ( ! ( jmethod.isStatic ( ) ) ) && ( ( jmethod.getEnclosingType ( ) ) instanceof com.android.jack.ir.ast.JDefinedClass ) ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; assert thisVar != null ; if ( ( thisVar.getMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) == null ) { thisVar.addMarker ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; if ( thisVar != null ) { assert thisVar != null ; if ( ( thisVar.getMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) == null ) { thisVar.addMarker ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }
Source:
public boolean next ( ) { if ( ( ( data ) == null ) || ( ( pos ) == ( data.length ) ) ) { throw new java.util.NoSuchElementException ( ) ; } pos += 3 ; return ( pos ) < ( data.length ) ; }

Target:
public boolean next ( ) { if ( ( data ) == null ) { return false ; } pos += 3 ; return ( pos ) < ( data.length ) ; }
Source:
public java.net.Socket createSocket ( java.lang.String host , int port , java.net.InetAddress localHost , int localPort ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( mDelegate.createSocket ( host , port , localHost , localPort ) ) ) ; configureSocket ( socket ) ; return socket ; }

Target:
public java.net.Socket createSocket ( java.lang.String host , int port , java.net.InetAddress localHost , int localPort ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( mDelegate.createSocket ( host , port , localHost , localPort ) ) ) ; return configureSocket ( socket ) ; }
Source:
public void testParcel ( ) { android.telephony.CellIdentityGsm ci = new android.telephony.CellIdentityGsm ( com.android.internal.telephony.CellIdentityGsmTest.LAC , com.android.internal.telephony.CellIdentityGsmTest.CID , com.android.internal.telephony.CellIdentityGsmTest.ARFCN , com.android.internal.telephony.CellIdentityGsmTest.BSIC , com.android.internal.telephony.CellIdentityGsmTest.MCC_STR , com.android.internal.telephony.CellIdentityGsmTest.MNC_STR , com.android.internal.telephony.CellIdentityGsmTest.ALPHA_LONG , com.android.internal.telephony.CellIdentityGsmTest.ALPHA_SHORT ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; ci.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.CellIdentityGsm newCi = CellIdentityGsm.CREATOR.createFromParcel ( p ) ; org.junit.Assert.assertEquals ( ci , newCi ) ; }

Target:
public void testParcel ( ) { android.telephony.CellIdentityGsm ci = new android.telephony.CellIdentityGsm ( com.android.internal.telephony.CellIdentityGsmTest.LAC , com.android.internal.telephony.CellIdentityGsmTest.CID , com.android.internal.telephony.CellIdentityGsmTest.ARFCN , com.android.internal.telephony.CellIdentityGsmTest.BSIC , com.android.internal.telephony.CellIdentityGsmTest.MCC_STR , com.android.internal.telephony.CellIdentityGsmTest.MNC_STR , com.android.internal.telephony.CellIdentityGsmTest.ALPHA_LONG , com.android.internal.telephony.CellIdentityGsmTest.ALPHA_SHORT ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; ci.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.CellIdentityGsm newCi = CellIdentityGsm.CREATOR.createFromParcel ( p ) ; assertEquals ( ci , newCi ) ; }
Source:
public void addContext ( java.lang.String str ) { if ( str == null ) { throw new java.lang.NullPointerException ( "str == null" ) ; } context.append ( str ) ; if ( ! ( str.endsWith ( "\n" ) ) ) { context.append ( '\n' ) ; } }

Target:
public void addContext ( java.lang.String str ) { assert str != null ; context.append ( str ) ; if ( ! ( str.endsWith ( "\n" ) ) ) { context.append ( '\n' ) ; } }
Source:
private void checkSignalStrength ( java.lang.String [ ] parts ) { assertEquals ( 9 , parts.length ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 4 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 5 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 6 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 7 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 8 ] ) ; }

Target:
private void checkSignalStrength ( java.lang.String [ ] parts ) { assertTrue ( ( ( parts.length ) >= 9 ) ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 4 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 5 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 6 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 7 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 8 ] ) ; }
Source:
private void waitForBroadcastIdle ( ) throws com.android.tradefed.device.DeviceNotAvailableException { com.android.tradefed.device.CollectingOutputReceiver receiver = new com.android.tradefed.device.CollectingOutputReceiver ( ) ; try { getDevice ( ) . executeShellCommand ( "am wait-for-broadcast-idle" , receiver , 8 , 4 , java.util.concurrent.TimeUnit.MINUTES , 0 ) ; } finally { java.lang.String output = receiver.getOutput ( ) ; com.android.tradefed.log.LogUtil.CLog.d ( "Output from 'am wait-for-broadcast-idle': %s" , output ) ; if ( ! ( output.contains ( "All broadcast queues are idle!" ) ) ) { fail ( "'am wait-for-broadcase-idle' did not complete." ) ; } } }

Target:
private void waitForBroadcastIdle ( ) throws java.lang.Exception { getDevice ( ) . executeShellCommand ( "am wait-for-broadcast-idle" ) ; }
Source:
public boolean setHwPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { synchronized ( mSettingsLock ) { if ( ( mPnoSettings ) != null ) { android.util.Log.w ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , "Already running a PNO scan" ) ; return false ; } mPnoEventHandler = eventHandler ; mPnoSettings = settings ; if ( ! ( setNetworkPriorities ( settings.networkList ) ) ) return false ; processPendingScans ( ) ; return true ; } }

Target:
public boolean setHwPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { synchronized ( mSettingsLock ) { if ( ( mPnoSettings ) != null ) { android.util.Log.w ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , "Already running a PNO scan" ) ; return false ; } mPnoEventHandler = eventHandler ; mPnoSettings = settings ; processPendingScans ( ) ; return true ; } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( ( method.getEnclosingType ( ) . isExternal ( ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( method ) ; com.android.jack.transformations.exceptions.ExceptionRuntimeValueAdder.Visitor rca = new com.android.jack.transformations.exceptions.ExceptionRuntimeValueAdder.Visitor ( tr ) ; rca.accept ( method ) ; tr.commit ( ) ; }

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.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( method ) ; com.android.jack.transformations.exceptions.ExceptionRuntimeValueAdder.Visitor rca = new com.android.jack.transformations.exceptions.ExceptionRuntimeValueAdder.Visitor ( tr ) ; rca.accept ( method ) ; tr.commit ( ) ; }
Source:
public void onResizeEnd ( @ com.android.annotations.Nullable com.android.ide.common.api.DropFeedback feedback , @ com.android.annotations.NonNull com.android.ide.common.api.INode child , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent , @ com.android.annotations.NonNull final com.android.ide.common.api.Rect newBounds ) { final com.android.ide.common.layout.relative.ResizeHandler state = ( ( com.android.ide.common.layout.relative.ResizeHandler ) ( feedback.userData ) ) ; child.editXml ( "Resize" , new com.android.ide.common.api.INodeHandler ( ) { @ java.lang.Override public void handle ( @ com.android.annotations.NonNull com.android.ide.common.api.INode n ) { state.removeCycles ( ) ; state.applyConstraints ( n ) ; } } ) ; }

Target:
public void onResizeEnd ( @ com.android.annotations.Nullable com.android.ide.common.api.DropFeedback feedback , @ com.android.annotations.NonNull com.android.ide.common.api.INode child , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent , @ com.android.annotations.NonNull final com.android.ide.common.api.Rect newBounds ) { if ( feedback == null ) { return ; } final com.android.ide.common.layout.relative.ResizeHandler state = ( ( com.android.ide.common.layout.relative.ResizeHandler ) ( feedback.userData ) ) ; child.editXml ( "Resize" , new com.android.ide.common.api.INodeHandler ( ) { @ java.lang.Override public void handle ( @ com.android.annotations.NonNull com.android.ide.common.api.INode n ) { state.removeCycles ( ) ; state.applyConstraints ( n ) ; } } ) ; }
Source:
static void native_drawText ( int nativeCanvas , java.lang.String text , int start , int end , float x , float y , final int flags , int paint ) { int count = end - start ; char [ ] buffer = android.graphics.TemporaryBuffer.obtain ( count ) ; android.text.TextUtils.getChars ( text , start , end , buffer , 0 ) ; android.graphics.Canvas_Delegate.native_drawText ( nativeCanvas , buffer , 0 , count , x , y , flags , paint ) ; }

Target:
static void native_drawText ( long nativeCanvas , java.lang.String text , int start , int end , float x , float y , final int flags , long paint ) { int count = end - start ; char [ ] buffer = android.graphics.TemporaryBuffer.obtain ( count ) ; android.text.TextUtils.getChars ( text , start , end , buffer , 0 ) ; android.graphics.Canvas_Delegate.native_drawText ( nativeCanvas , buffer , 0 , count , x , y , flags , paint ) ; }
Source:
private vogar.tasks.Task newCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex , java.io.File localTempDir ) { vogar.tasks.Task dex ; if ( ( run.toolchain ) == ( vogar.Toolchain.JACK ) ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } else { dex = new vogar.android.DexTask ( run.toolchain.getDexer ( ) , run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex , localTempDir , run.multidex ) ; } return dex ; }

Target:
private vogar.tasks.Task newCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex , java.io.File localTempDir ) { return new vogar.android.DexTask ( run.toolchain.getDexer ( ) , run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex , localTempDir , run.multidex ) ; }
Source:
public void testIssueUrls ( ) { com.android.tools.lint.detector.api.Implementation implementation = new com.android.tools.lint.detector.api.Implementation ( com.android.tools.lint.checks.AccessibilityDetector.class , Scope.RESOURCE_FILE_SCOPE ) ; com.android.tools.lint.detector.api.Issue issue = com.android.tools.lint.detector.api.Issue.create ( "MyId" , "ShortDesc" , "Desc" , "Explanation" , Category.CORRECTNESS , 10 , Severity.ERROR , implementation ) ; assertTrue ( issue.getMoreInfo ( ) . isEmpty ( ) ) ; java.lang.String url1 = "http://tools.android.com" ; java.lang.String url2 = "http://tools.android.com/recent" ; issue.addMoreInfo ( url1 ) ; assertEquals ( java.util.Collections.singletonList ( url1 ) , issue.getMoreInfo ( ) ) ; issue.addMoreInfo ( url2 ) ; assertEquals ( java.util.Arrays.asList ( url1 , url2 ) , issue.getMoreInfo ( ) ) ; }

Target:
public void testIssueUrls ( ) { com.android.tools.lint.detector.api.Implementation implementation = new com.android.tools.lint.detector.api.Implementation ( com.android.tools.lint.checks.AccessibilityDetector.class , Scope.RESOURCE_FILE_SCOPE ) ; com.android.tools.lint.detector.api.Issue issue = com.android.tools.lint.detector.api.Issue.create ( "MyId" , "ShortDesc" , "Explanation" , Category.CORRECTNESS , 10 , Severity.ERROR , implementation ) ; assertTrue ( issue.getMoreInfo ( ) . isEmpty ( ) ) ; java.lang.String url1 = "http://tools.android.com" ; java.lang.String url2 = "http://tools.android.com/recent" ; issue.addMoreInfo ( url1 ) ; assertEquals ( java.util.Collections.singletonList ( url1 ) , issue.getMoreInfo ( ) ) ; issue.addMoreInfo ( url2 ) ; assertEquals ( java.util.Arrays.asList ( url1 , url2 ) , issue.getMoreInfo ( ) ) ; }
Source:
boolean stop ( ) { if ( ( mStarted ) == false ) { return false ; } mDeviceMonitor.stop ( ) ; mDeviceMonitor = null ; if ( ( stopAdb ( ) ) == false ) { return false ; } mStarted = false ; return true ; }

Target:
boolean stop ( ) { if ( ! ( mStarted ) ) { return false ; } mDeviceMonitor.stop ( ) ; mDeviceMonitor = null ; if ( ! ( stopAdb ( ) ) ) { return false ; } mStarted = false ; return true ; }
Source:
private synchronized void markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node , @ javax.annotation.Nonnull com.android.jack.shrob.spec.KeepModifier modifier ) { com.android.jack.shrob.seed.SeedMarker marker = node.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( marker == null ) { node.addMarker ( new com.android.jack.shrob.seed.SeedMarker ( modifier ) ) ; } else { com.android.jack.shrob.spec.KeepModifier previousModifier = marker.getModifier ( ) ; if ( previousModifier != modifier ) { marker.setModifier ( KeepModifier.NONE ) ; } } }

Target:
private synchronized void markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node , @ javax.annotation.Nonnull com.android.jack.shrob.spec.KeepModifier modifier ) { com.android.jack.shrob.seed.SeedMarker marker = node.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( marker == null ) { node.addMarker ( new com.android.jack.shrob.seed.SeedMarker ( modifier ) ) ; } else { com.android.jack.shrob.spec.KeepModifier previousModifier = marker.getModifier ( ) ; if ( previousModifier != modifier ) { marker.setModifier ( new com.android.jack.shrob.spec.KeepModifier ( ) ) ; } } }