auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier.TouchScreenType type = com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier.TouchScreenType.getEnum ( value ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier ( ) ; qualifier.mValue = type ; config.setTouchTypeQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.sdklib.resources.TouchScreen type = com.android.sdklib.resources.TouchScreen.getEnum ( value ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier ( ) ; qualifier.mValue = type ; config.setTouchTypeQualifier ( qualifier ) ; return true ; } return false ; }
Source:
public void test_getFirst ( ) { assertTrue ( "Returned incorrect first element" , ll.getFirst ( ) . equals ( objArray [ 0 ] ) ) ; ll.clear ( ) ; try { ll.getFirst ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_peek ( ) { java.util.LinkedList list = new java.util.LinkedList ( ) ; assertNull ( "Should return null if this list is empty" , list.peek ( ) ) ; assertEquals ( "Returned incorrect first element" , ll.peek ( ) , objArray [ 0 ] ) ; assertEquals ( "Peek remove the head (first element) of this list" , ll.getFirst ( ) , objArray [ 0 ] ) ; }
Source:
private static java.lang.String getImsServiceName ( int phoneId ) { return com.android.ims.ImsManager.IMS_SERVICE ; }

Target:
private void createImsService ( ) { if ( ! ( mConfigDynamicBind ) ) { android.telephony.Rlog.i ( com.android.ims.ImsManager.TAG , "Creating ImsService using ServiceManager" ) ; mImsServiceProxy = getServiceProxyCompat ( ) ; } else { android.telephony.Rlog.i ( com.android.ims.ImsManager.TAG , "Creating ImsService using ImsResolver" ) ; mImsServiceProxy = getServiceProxy ( ) ; } }
Source:
public void test_setBeginIndexI ( ) { java.text.FieldPosition fpos = new java.text.FieldPosition ( 1 ) ; fpos.setBeginIndex ( 2 ) ; fpos.setEndIndex ( 3 ) ; assertEquals ( "beginIndex should have been set to 2" , 2 , fpos.getBeginIndex ( ) ) ; }

Target:
public void test_setBeginIndexI ( ) { java.text.FieldPosition fpos = new java.text.FieldPosition ( 1 ) ; fpos.setBeginIndex ( 2 ) ; fpos.setEndIndex ( 3 ) ; assertEquals ( "beginIndex should have been set to 2" , 2 , fpos.getBeginIndex ( ) ) ; fpos.setBeginIndex ( java.lang.Integer.MAX_VALUE ) ; assertEquals ( "beginIndex should have been set to Integer.MAX_VALUE" , java.lang.Integer.MAX_VALUE , fpos.getBeginIndex ( ) ) ; fpos.setBeginIndex ( ( - 1 ) ) ; assertEquals ( "beginIndex should have been set to -1" , ( - 1 ) , fpos.getBeginIndex ( ) ) ; }
Source:
public int compare ( java.util.Map.Entry < java.lang.Long , com.android.tools.perflib.vmtrace.MethodInfo > o1 , java.util.Map.Entry < java.lang.Long , com.android.tools.perflib.vmtrace.MethodInfo > o2 ) { long diff = ( o2.getValue ( ) . getInclusiveThreadTimes ( ) ) - ( o1.getValue ( ) . getInclusiveThreadTimes ( ) ) ; return com.google.common.primitives.Ints.saturatedCast ( diff ) ; }

Target:
public int compare ( java.util.Map.Entry < java.lang.Long , com.android.tools.perflib.vmtrace.MethodInfo > o1 , java.util.Map.Entry < java.lang.Long , com.android.tools.perflib.vmtrace.MethodInfo > o2 ) { long diff = ( o2.getValue ( ) . getInclusiveTime ( threadName , ClockType.THREAD ) ) - ( o1.getValue ( ) . getInclusiveTime ( threadName , ClockType.THREAD ) ) ; return com.google.common.primitives.Ints.saturatedCast ( diff ) ; }
Source:
synchronized com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode findBrowseNodeByID ( java.lang.String parentID ) { com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode bn = mBrowseMap.get ( parentID ) ; if ( bn == null ) { android.util.Log.e ( com.android.bluetooth.avrcpcontroller.BrowseTree.TAG , ( ( "folder " + parentID ) + " not found!" ) ) ; return null ; } if ( com.android.bluetooth.avrcpcontroller.BrowseTree.DBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.BrowseTree.TAG , ( "Browse map: " + ( mBrowseMap ) ) ) ; } return bn ; }

Target:
synchronized com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode findBrowseNodeByID ( java.lang.String parentID ) { com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode bn = mBrowseMap.get ( parentID ) ; if ( bn == null ) { android.util.Log.e ( com.android.bluetooth.avrcpcontroller.BrowseTree.TAG , ( ( "folder " + parentID ) + " not found!" ) ) ; return null ; } if ( com.android.bluetooth.avrcpcontroller.BrowseTree.VDBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.BrowseTree.TAG , ( "Browse map: " + ( mBrowseMap ) ) ) ; } return bn ; }
Source:
public void testInterfaceCountersUdp4UdpEncap ( ) 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 , true , 1000 , false ) ; }

Target:
public void testAesGcm128Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }
Source:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDONS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDONS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
private boolean denyIfQueueLimitReached ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { if ( ( mPendingTrackerCount ) >= ( com.android.internal.telephony.SMSDispatcher.MO_MSG_QUEUE_LIMIT ) ) { try { tracker.mSentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED ) ; } catch ( android.app.PendingIntent.CanceledException ex ) { android.util.Log.e ( com.android.internal.telephony.SMSDispatcher.TAG , "failed to send back RESULT_ERROR_LIMIT_EXCEEDED" ) ; } return true ; } ( mPendingTrackerCount ) ++ ; return false ; }

Target:
private boolean denyIfQueueLimitReached ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { if ( ( mPendingTrackerCount ) >= ( com.android.internal.telephony.SMSDispatcher.MO_MSG_QUEUE_LIMIT ) ) { try { if ( ( tracker.mSentIntent ) != null ) { tracker.mSentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED ) ; } } catch ( android.app.PendingIntent.CanceledException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.SMSDispatcher.TAG , "failed to send back RESULT_ERROR_LIMIT_EXCEEDED" ) ; } return true ; } ( mPendingTrackerCount ) ++ ; return false ; }
Source:
private void finish ( ) { org.bouncycastle.crypto.util.Pack.longToLittleEndian ( ( ( byteCount ) * 8 ) , L , 0 ) ; while ( ( xBufOff ) != 0 ) { update ( ( ( byte ) ( 0 ) ) ) ; } processBlock ( L , 0 ) ; processBlock ( Sum , 0 ) ; }

Target:
private void finish ( ) { org.bouncycastle.util.Pack.longToLittleEndian ( ( ( byteCount ) * 8 ) , L , 0 ) ; while ( ( xBufOff ) != 0 ) { update ( ( ( byte ) ( 0 ) ) ) ; } processBlock ( L , 0 ) ; processBlock ( Sum , 0 ) ; }
Source:
public E getFirst ( ) { E x = elements [ head ] ; if ( x == null ) throw new java.util.NoSuchElementException ( ) ; return x ; }

Target:
public E getLast ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E result = ( ( E ) ( elements [ ( ( ( tail ) - 1 ) & ( ( elements.length ) - 1 ) ) ] ) ) ; if ( result == null ) throw new java.util.NoSuchElementException ( ) ; return result ; }
Source:
private void writeDescriptor ( java.lang.String writeValue ) { android.bluetooth.BluetoothGattDescriptor descriptor = getDescriptor ( ) ; if ( descriptor == null ) return ; descriptor.setValue ( writeValue.getBytes ( ) ) ; mBluetoothGatt.writeDescriptor ( descriptor ) ; }

Target:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( java.util.UUID cuid , java.util.UUID duid ) { android.bluetooth.BluetoothGattDescriptor descriptor = null ; android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( cuid ) ; if ( characteristic != null ) { descriptor = characteristic.getDescriptor ( duid ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; } } return descriptor ; }
Source:
public boolean releaseActivityInstance ( android.os.IBinder token ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r == null ) { return false ; } return r.task.stack.safelyDestroyActivityLocked ( r , "app-req" ) ; } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }

Target:
public final void finishSubActivity ( android.os.IBinder token , java.lang.String resultWho , int requestCode ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r != null ) { r.task.stack.finishSubActivityLocked ( r , resultWho , requestCode ) ; } android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public com.android.build.gradle.integration.common.truth.CollectionIssueSubject issues ( ) { return new com.android.build.gradle.integration.common.truth.CollectionIssueSubject ( failureStrategy , getSubject ( ) . getSyncIssues ( ) ) ; }

Target:
public com.android.builder.model.SyncIssue hasSingleIssue ( int severity , int type ) { java.util.Collection < com.android.builder.model.SyncIssue > subject = getSubject ( ) . getSyncIssues ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( subject ) . hasSize ( 1 ) ; com.android.builder.model.SyncIssue issue = subject.iterator ( ) . next ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . isNotNull ( ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . hasSeverity ( severity ) ; com.android.build.gradle.integration.common.truth.TruthHelper.assertThat ( issue ) . hasType ( type ) ; return issue ; }
Source:
public void reset ( ) { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = getSavedSettings ( ) . getState ( ) ; fakeBucketNameField.setText ( ( state == null ? "" : state.fakeBucketName ) ) ; useFakeBucketCheckbox.setSelected ( ( state == null ? false : state.shouldUseFakeBucket ) ) ; }

Target:
public void reset ( ) { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = getSavedSettings ( ) . getState ( ) ; fakeBucketNameField.setText ( ( state == null ? "" : state.fakeBucketName ) ) ; useFakeBucketCheckbox.setSelected ( ( state == null ? false : state.shouldUseFakeBucket ) ) ; setUrlChoice ( ( state == null ? 0 : state.urlChoice ) ) ; customUrlField.setText ( ( state == null ? "" : state.customUrl ) ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTest ( getBackendUrl ( ) ) ; }
Source:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
native void rsnAllocationElementData1D ( long con , long id , int xoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) ;
Source:
public java.lang.String print ( boolean shortFormat ) { if ( ( mSourceFile ) == null ) { if ( ( mDescription ) == null ) { return "Unknown" ; } return mDescription ; } java.lang.String fileName = mSourceFile.getName ( ) ; java.lang.String fileDisplayName = ( shortFormat ) ? fileName : mSourceFile.getAbsolutePath ( ) ; if ( ( ( mDescription ) == null ) || ( mDescription.equals ( fileName ) ) ) { return fileDisplayName ; } else { return java.lang.String.format ( "[%1$s] %2$s" , mDescription , fileDisplayName ) ; } }

Target:
public java.lang.String print ( boolean shortFormat ) { if ( ( mSourceFile ) == null ) { if ( ( mDescription ) == null ) { return "Unknown source file" ; } return mDescription ; } java.lang.String fileName = mSourceFile.getName ( ) ; java.lang.String fileDisplayName = ( shortFormat ) ? fileName : mSourceFile.getAbsolutePath ( ) ; if ( ( ( mDescription ) == null ) || ( mDescription.equals ( fileName ) ) ) { return fileDisplayName ; } else { return java.lang.String.format ( "[%1$s] %2$s" , mDescription , fileDisplayName ) ; } }
Source:
void onDocumentsReady ( java.util.List < com.android.documentsui.model.DocumentInfo > docs ) { com.android.documentsui.dirlist.RenameDocumentFragment.show ( getFragmentManager ( ) , docs.get ( 0 ) ) ; }

Target:
private void renameDocuments ( com.android.documentsui.dirlist.MultiSelectManager.Selection selected ) { com.android.documentsui.Metrics.logUserAction ( getContext ( ) , Metrics.USER_ACTION_RENAME ) ; assert ( selected.size ( ) ) == 1 ; java.util.List < com.android.documentsui.model.DocumentInfo > docs = mModel.getDocuments ( selected ) ; com.android.documentsui.dirlist.RenameDocumentFragment.show ( getFragmentManager ( ) , docs.get ( 0 ) ) ; }
Source:
void setVideoState ( java.lang.String callId , int videoState ) { android.telecom.Log.v ( this , "setVideoState: %d" , videoState ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.setVideoState ( callId , videoState ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void setVideoState ( java.lang.String callId , int videoState ) { android.telecom.Log.v ( this , "setVideoState: %d" , videoState ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.setVideoState ( callId , videoState , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent ( ) throws java.lang.InterruptedException { android.content.Intent startIntent = new android.content.Intent ( ) ; startIntent.setComponent ( new android.content.ComponentName ( "android.net.cts.appForApi23" , "android.net.cts.appForApi23.ConnectivityListeningActivity" ) ) ; mContext.startActivity ( startIntent ) ; toggleWifi ( ) ; android.content.Intent getConnectivityCount = new android.content.Intent ( android.net.cts.ConnectivityManagerTest.GET_WIFI_CONNECTIVITY_ACTION_COUNT ) ; assertEquals ( 2 , sendOrderedBroadcastAndReturnResultCode ( getConnectivityCount , android.net.cts.ConnectivityManagerTest.SEND_BROADCAST_TIMEOUT ) ) ; }

Target:
public void testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent ( ) throws java.lang.InterruptedException { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI ) ) ) { android.util.Log.i ( android.net.cts.ConnectivityManagerTest.TAG , "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi" ) ; return ; } android.content.Intent startIntent = new android.content.Intent ( ) ; startIntent.setComponent ( new android.content.ComponentName ( "android.net.cts.appForApi23" , "android.net.cts.appForApi23.ConnectivityListeningActivity" ) ) ; mContext.startActivity ( startIntent ) ; toggleWifi ( ) ; android.content.Intent getConnectivityCount = new android.content.Intent ( android.net.cts.ConnectivityManagerTest.GET_WIFI_CONNECTIVITY_ACTION_COUNT ) ; assertEquals ( 2 , sendOrderedBroadcastAndReturnResultCode ( getConnectivityCount , android.net.cts.ConnectivityManagerTest.SEND_BROADCAST_TIMEOUT ) ) ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; doLog ( lr ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.util.ResourceBundle bundle , java.lang.String msg , java.lang.Object ... params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; if ( ( params != null ) && ( ( params.length ) != 0 ) ) { lr.setParameters ( params ) ; } doLog ( lr , bundle ) ; }
Source:
public void labelMustNotBreakTree ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , new java.io.File ( com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.label.test001.jack" ) , "Label.java" ) ) ; }

Target:
public void labelMustNotBreakTree ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , new java.io.File ( com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.label.test001.jack" ) , "Label.java" ) ) ; }
Source:
public void copyFrom ( short [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFromUnchecked ( byte [ ] d ) { copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
public static com.android.hierarchyviewerlib.device.IHvDevice create ( com.android.ddmlib.IDevice device ) { return new com.android.hierarchyviewerlib.device.ViewServerDevice ( device ) ; }

Target:
public static com.android.hierarchyviewerlib.device.IHvDevice create ( com.android.ddmlib.IDevice device ) { if ( com.android.hierarchyviewerlib.device.HvDeviceFactory.ALWAYS_USE_VIEWSERVER ) { return new com.android.hierarchyviewerlib.device.ViewServerDevice ( device ) ; } boolean ddmViewHierarchy = false ; for ( com.android.ddmlib.Client c : device.getClients ( ) ) { com.android.ddmlib.ClientData cd = c.getClientData ( ) ; if ( ( cd != null ) && ( cd.hasFeature ( ClientData.FEATURE_VIEW_HIERARCHY ) ) ) { ddmViewHierarchy = true ; break ; } } return ddmViewHierarchy ? new com.android.hierarchyviewerlib.device.DdmViewDebugDevice ( device ) : new com.android.hierarchyviewerlib.device.ViewServerDevice ( device ) ; }
Source:
private vogar.tasks.Task newCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex ) { vogar.tasks.Task dex ; if ( run.useJack ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } else { dex = new vogar.android.DexTask ( run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } 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 ) { vogar.tasks.Task dex ; if ( run.useJack ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } else { dex = new vogar.android.DexTask ( run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex , run.multidex ) ; } return dex ; }
Source:
com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariableRef varRef ) { if ( varRef instanceof com.android.jack.ir.ast.JThisRef ) { assert ( thisReg ) != null : "This register was not created." ; return thisReg ; } com.android.jack.ir.ast.JVariable var = varRef.getTarget ( ) ; assert variableToRegister.containsKey ( var ) ; com.android.jack.dx.rop.code.RegisterSpec register = variableToRegister.get ( var ) ; assert com.android.jack.backend.dex.rop.RopHelper.areTypeCompatible ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( varRef.getType ( ) ) , register.getType ( ) ) ; return register ; }

Target:
com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariableRef varRef ) { if ( varRef instanceof com.android.jack.ir.ast.JThisRef ) { assert ( thisReg ) != null : "This register was not created." ; return thisReg ; } com.android.jack.ir.ast.JVariable var = varRef.getTarget ( ) ; assert variableToRegister.containsKey ( var ) ; com.android.jack.dx.rop.code.RegisterSpec register = variableToRegister.get ( var ) ; assert com.android.jack.backend.dex.rop.RopHelper.areTypeCompatible ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( varRef.getType ( ) , ( ( var.getMarker ( com.android.jack.transformations.lambda.ForceClosureMarker.class ) ) != null ) ) , register.getType ( ) ) ; return register ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSysImg ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.descriptors.IdDisplay tag , @ com.android.annotations.NonNull final java.lang.String abi , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SYS_IMAGES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.descriptors.IdDisplay getTag ( ) { return tag ; } @ java.lang.Override public java.lang.String getPath ( ) { return abi ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newSysImg ( @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IdDisplay tag , @ com.android.annotations.NonNull java.lang.String abi , @ com.android.annotations.NonNull com.android.sdklib.repository.MajorRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_SYS_IMAGES ) ; p.mAndroidVersion = version ; p.mMajorRevision = revision ; p.mTag = tag ; p.mPath = abi ; return p ; }
Source:
public void actionPerformed ( java.awt.event.ActionEvent e ) { java.lang.String packages = com.android.preload.Main.getUI ( ) . showInputDialog ( ( "Please enter packages name to run with" + " the monkey, or leave empty for default." ) ) ; if ( packages == null ) { return ; } if ( packages.isEmpty ( ) ) { packages = com.android.preload.actions.RunMonkeyAction.DEFAULT_MONKEY_PACKAGES ; } new java.lang.Thread ( new com.android.preload.actions.RunMonkeyAction.RunMonkeyRunnable ( packages ) ) . start ( ) ; }

Target:
public void actionPerformed ( java.awt.event.ActionEvent e ) { java.lang.String packages = com.android.preload.Main.getUI ( ) . showInputDialog ( ( "Please enter packages name to run with" + " the monkey, or leave empty for default." ) ) ; if ( packages == null ) { return ; } if ( packages.isEmpty ( ) ) { packages = com.android.preload.actions.RunMonkeyAction.DEFAULT_MONKEY_PACKAGES ; } java.lang.Runnable r = new com.android.preload.actions.RunMonkeyAction.RunMonkeyRunnable ( packages ) ; if ( com.android.preload.Main.getUI ( ) . isSingleThreaded ( ) ) { r.run ( ) ; } else { new java.lang.Thread ( r ) . start ( ) ; } }
Source:
java.lang.String getResourcePathFromCodePath ( ) { java.lang.String codePath = getCodePath ( ) ; if ( ( ( flags ) & ( android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ) ) != 0 ) { java.lang.String apkNameOnly = com.android.server.pm.PackageManagerService.getApkName ( codePath ) ; return ( ( ( mAppInstallDir.getPath ( ) ) + "/" ) + apkNameOnly ) + ".zip" ; } else { return codePath ; } }

Target:
private java.lang.String getResourcePathFromCodePath ( ) { final java.lang.String codePath = getCodePath ( ) ; if ( isFwdLocked ( ) ) { final java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( mAppInstallDir.getPath ( ) ) ; sb.append ( '/' ) ; sb.append ( com.android.server.pm.PackageManagerService.getApkName ( codePath ) ) ; sb.append ( ".zip" ) ; if ( codePath.endsWith ( ".tmp" ) ) { sb.append ( ".tmp" ) ; } return sb.toString ( ) ; } else { return codePath ; } }
Source:
public void testOtherLocales ( ) throws java.lang.Exception { com.android.tools.lint.checks.ButtonDetectorTest.sTestIssue = ButtonDetector.ORDER ; assertEquals ( ( "buttonbar.xml:12: Warning: OK button should be on the right (was \"OK | Cancel\", should be \"Cancel | OK\")\n" + "buttonbar.xml:44: Warning: OK button should be on the right (was \"OK | Cancel\", should be \"Cancel | OK\")" ) , lintProject ( "apicheck/minsdk14.xml=>AndroidManifest.xml" , "res/layout/buttonbar.xml=>res/layout-de/buttonbar.xml" , "res/values/buttonbar-values.xml=>res/values-de/buttonbar-values.xml" ) ) ; }

Target:
public void testOtherLocales ( ) throws java.lang.Exception { com.android.tools.lint.checks.ButtonDetectorTest.sTestIssue = ButtonDetector.ORDER ; assertEquals ( ( "res/layout-de/buttonbar.xml:12: Warning: OK button should be on the right (was \"OK | Cancel\", should be \"Cancel | OK\") [ButtonOrder]\n" + ( ( ( ( ( ( " <Button\n" + " ^\n" ) + "res/layout-de/buttonbar.xml:44: Warning: OK button should be on the right (was \"OK | Cancel\", should be \"Cancel | OK\") [ButtonOrder]\n" ) + " <Button\n" ) + " ^\n" ) + "0 errors, 2 warnings\n" ) + "" ) ) , lintProject ( "apicheck/minsdk14.xml=>AndroidManifest.xml" , "res/layout/buttonbar.xml=>res/layout-de/buttonbar.xml" , "res/values/buttonbar-values.xml=>res/values-de/buttonbar-values.xml" ) ) ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
public void test26_permission_dup ( ) throws java.lang.Exception { processTestFiles ( ) ; }

Target:
public void cleanup ( ) { if ( ( ( mMain ) != null ) && ( mMain.isFile ( ) ) ) { mMain.delete ( ) ; } if ( ( ( mActualResult ) != null ) && ( mActualResult.isFile ( ) ) ) { mActualResult.delete ( ) ; } for ( java.io.File f : mLibs ) { if ( ( f != null ) && ( f.isFile ( ) ) ) { f.delete ( ) ; } } }
Source:
public void testAesCbcHmacMd5Udp4 ( ) 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 , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) 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 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1000 , false ) ; }
Source:
public static void wtf ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ; android.util.Log.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }

Target:
public static void wtf ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( prefix , format , args ) ; android.util.Slog.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }
Source:
public void testLintWarningOnGetSignaturesFlagInBitwiseOrExpression ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesBitwiseOrTest.java:11: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " .getPackageInfo(\"some.pkg\", GET_GIDS | GET_SIGNATURES | GET_PROVIDERS);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( ( "src/test/pkg/GetSignaturesBitwiseOrTest.java.txt" + "=>src/test/pkg/GetSignaturesBitwiseOrTest.java" ) ) ) ; }

Target:
public void testLintWarningOnSingleGetSignaturesFlag ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesSingleFlagTest.java:9: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " .getPackageInfo(\"some.pkg\", PackageManager.GET_SIGNATURES);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/GetSignaturesSingleFlagTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "\n" ) + "public class GetSignaturesSingleFlagTest extends Activity {\n" ) + " public void failLintCheck() throws Exception {\n" ) + " getPackageManager()\n" ) + " .getPackageInfo(\"some.pkg\", PackageManager.GET_SIGNATURES);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public void setScrollBarStyle ( final int style ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setScrollBarStyle ( style ) ; } } ) ; return ; } mAwContents.setScrollBarStyle ( style ) ; }

Target:
public void setOverScrollMode ( final int mode ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setOverScrollMode ( mode ) ; } } ) ; return ; } mAwContents.setOverScrollMode ( mode ) ; }
Source:
private java.lang.String doLoad ( java.lang.String name , java.lang.ClassLoader loader ) { java.lang.String ldLibraryPath = null ; if ( ( loader != null ) && ( loader instanceof dalvik.system.BaseDexClassLoader ) ) { ldLibraryPath = ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) . getLdLibraryPath ( ) ; } synchronized ( this ) { return java.lang.Runtime.nativeLoad ( name , loader , ldLibraryPath ) ; } }

Target:
private java.lang.String doLoad ( java.lang.String name , java.lang.ClassLoader loader ) { java.lang.String ldLibraryPath = null ; java.lang.String dexPath = null ; if ( ( loader != null ) && ( loader instanceof dalvik.system.BaseDexClassLoader ) ) { dalvik.system.BaseDexClassLoader dexClassLoader = ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) ; ldLibraryPath = dexClassLoader.getLdLibraryPath ( ) ; dexPath = dexClassLoader.getDexPath ( ) ; } synchronized ( this ) { return java.lang.Runtime.nativeLoad ( name , loader , ldLibraryPath , dexPath ) ; } }
Source:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ; if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } populateMaskedFieldsFromWpaSupplicantFile ( configurationMap ) ; }

Target:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( ! ( mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ) ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "Failed to load wifi configurations from wpa_supplicant" ) ; return ; } if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } if ( ! ( WifiNative.HIDL_SUP_ENABLE ) ) { populateMaskedFieldsFromWpaSupplicantFile ( configurationMap ) ; } }
Source:
public void testNewInstanceString_IntArrayIntIntConstructor ( ) { runTestNewInstanceString ( "([III)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value intArrayValue = getStaticFieldValue ( debuggeeClassId , "INT_ARRAY" ) ; constructorArguments.add ( intArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; } } ) ; }

Target:
public void testNewInstanceString_StringBuilderConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/StringBuilder;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBuilderValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUILDER" ) ; constructorArguments.add ( stringBuilderValue ) ; } } ) ; }
Source:
public void testDisableWifiFromSoftApModeState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mWifiStateMachinePrime.disableWifi ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "WifiDisabled" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testEnterSoftApModeFromDifferentState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.CLIENT_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; }
Source:
public void resetMemory ( @ android.telephony.euicc.EuiccCardManager.ResetOption int options , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . resetMemory ( mContext.getOpPackageName ( ) , options , new com.android.internal.telephony.euicc.IResetMemoryCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling resetMemory" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void resetMemory ( java.lang.String cardId , @ android.telephony.euicc.EuiccCardManager.ResetOption int options , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . resetMemory ( mContext.getOpPackageName ( ) , cardId , options , new com.android.internal.telephony.euicc.IResetMemoryCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling resetMemory" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public int testCount ( ) { if ( isTest ( ) ) return 1 ; int result = 0 ; for ( org.junit.runner.Description child : getChildren ( ) ) result += child.testCount ( ) ; return result ; }

Target:
public java.lang.Class < ? > getTestClass ( ) { if ( ( fTestClass ) != null ) { return fTestClass ; } java.lang.String name = getClassName ( ) ; if ( name == null ) { return null ; } try { fTestClass = java.lang.Class.forName ( name , false , getClass ( ) . getClassLoader ( ) ) ; return fTestClass ; } catch ( java.lang.ClassNotFoundException e ) { return null ; } }
Source:
public final org.jf.dexlib2.iface.reference.MethodReference method_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.MethodReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableMethodReference method_reference209 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3594 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_method_reference_in_method_literal3596 ) ; method_reference209 = method_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = method_reference209 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL210 = null ; try { { CHAR_LITERAL210 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3528 ) ) ) ; value = ( CHAR_LITERAL210 != null ? CHAR_LITERAL210.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
protected java.lang.String checkLint ( java.util.List < java.io.File > files ) throws java.lang.Exception { mOutput = new java.lang.StringBuilder ( ) ; com.android.tools.lint.checks.AbstractCheckTest.TestLintClient lintClient = createClient ( ) ; java.lang.String result = lintClient.analyze ( files ) ; if ( ( java.io.File.separatorChar ) != '/' ) { result = result.replace ( java.io.File.separatorChar , '/' ) ; } return result ; }

Target:
protected java.lang.String checkLint ( java.util.List < java.io.File > files ) throws java.lang.Exception { mOutput = new java.lang.StringBuilder ( ) ; com.android.tools.lint.checks.AbstractCheckTest.TestLintClient lintClient = createClient ( ) ; java.lang.String result = lintClient.analyze ( files ) ; if ( ( java.io.File.separatorChar ) != '/' ) { result = result.replace ( java.io.File.separatorChar , '/' ) ; } for ( java.io.File f : files ) { deleteFile ( f ) ; } return result ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { if ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) { return ; } com.android.jack.optimizations.valuepropagation.field.FvpPropagateFieldValues.Visitor visitor = new com.android.jack.optimizations.valuepropagation.field.FvpPropagateFieldValues.Visitor ( method , preserveNullChecks ) ; visitor.accept ( method ) ; visitor.request.commit ( ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowingExpressionBasicBlock block ) { com.android.jack.ir.ast.cfg.JBasicBlockElement element = block.getLastElement ( ) ; if ( ( element instanceof com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) && ( ( ( com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ( element ) ) . isFieldLoad ( ) ) ) { handle ( ( ( com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ( element ) ) ) ; } return false ; }
Source:
public void testTimeZoneDataVersion ( ) { java.lang.String icu4cTzVersion = libcore.icu.ICU.getTZDataVersion ( ) ; java.lang.String zoneInfoTzVersion = libcore.util.ZoneInfoDB.getInstance ( ) . getVersion ( ) ; assertEquals ( icu4cTzVersion , zoneInfoTzVersion ) ; }

Target:
public void testTimeZoneDataVersion ( ) { java.lang.String icu4cTzVersion = libcore.icu.ICU.getTZDataVersion ( ) ; java.lang.String zoneInfoTzVersion = libcore.util.ZoneInfoDB.getInstance ( ) . getVersion ( ) ; assertEquals ( icu4cTzVersion , zoneInfoTzVersion ) ; java.lang.String icu4jTzVersion = android.icu.util.TimeZone.getTZDataVersion ( ) ; assertEquals ( icu4jTzVersion , zoneInfoTzVersion ) ; }
Source:
public void testLoadConfigFromXml_Multiple ( ) { com.android.phone.vvm.omtp.TelephonyVvmConfigManager manager = createManager ( ( ( ( ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.XML_HEADER ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.CARRIER ) ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.CARRIER ) ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.XML_FOOTER ) ) ) ; verifyCarrier ( manager.getConfig ( "12345" ) ) ; verifyCarrier ( manager.getConfig ( "67890" ) ) ; }

Target:
public void dontTestLoadConfigFromXml_Multiple ( ) { com.android.phone.vvm.omtp.TelephonyVvmConfigManager manager = createManager ( ( ( ( ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.XML_HEADER ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.CARRIER ) ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.CARRIER ) ) + ( com.android.phone.vvm.omtp.TelephonyVvmConfigManagerTest.XML_FOOTER ) ) ) ; verifyCarrier ( manager.getConfig ( "12345" ) ) ; verifyCarrier ( manager.getConfig ( "67890" ) ) ; }
Source:
public int getDiscoverableTimeout ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return - 1 ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getDiscoverableTimeout ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return - 1 ; }

Target:
public int getDiscoverableTimeout ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return - 1 ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.getDiscoverableTimeout ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return - 1 ; }
Source:
public void test_getDisplayName ( ) throws java.lang.Exception { assertEquals ( "Swiss Franc" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( java.util.Locale.US ) ) ; assertEquals ( "Schweizer Franken" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "de" , "CH" ) ) ) ; assertEquals ( "franc suisse" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "fr" , "CH" ) ) ) ; assertEquals ( "franco svizzero" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "it" , "CH" ) ) ) ; }

Target:
public void test_getSymbol_locale ( ) { java.util.Currency currency = java.util.Currency.getInstance ( "DEM" ) ; assertEquals ( "DEM" , currency.getSymbol ( java.util.Locale.FRANCE ) ) ; assertEquals ( "DM" , currency.getSymbol ( java.util.Locale.GERMANY ) ) ; assertEquals ( "DEM" , currency.getSymbol ( java.util.Locale.US ) ) ; }
Source:
public static void run ( ) throws java.lang.Exception { art.Main.bindAgentJNIForClass ( art.Test924.class ) ; art.Test924.doTest ( ) ; }

Target:
public static void run ( ) throws java.lang.Exception { art.Main.bindAgentJNIForClass ( art.Test924.class ) ; java.lang.Thread t = new java.lang.Thread ( "TestThread" ) { @ java.lang.Override public void run ( ) { try { art.Test924.doTest ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } } } ; t.start ( ) ; t.join ( ) ; }
Source:
public void testForceWrite ( ) throws java.lang.Exception { mWifiConfigStore.write ( true , getEmptyStoreData ( ) ) ; assertFalse ( mAlarmManager.isPending ( WifiConfigStore.BUFFERED_WRITE_ALARM_TAG ) ) ; assertTrue ( mSharedStore.isStoreWritten ( ) ) ; assertTrue ( mUserStore.isStoreWritten ( ) ) ; }

Target:
public void testForceWrite ( ) throws java.lang.Exception { mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; mWifiConfigStore.write ( true , getEmptyStoreData ( ) ) ; assertFalse ( mAlarmManager.isPending ( WifiConfigStore.BUFFERED_WRITE_ALARM_TAG ) ) ; assertTrue ( mSharedStore.isStoreWritten ( ) ) ; assertTrue ( mUserStore.isStoreWritten ( ) ) ; }