auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public synchronized java.lang.ref.Reference < ? extends T > poll ( ) { if ( ( head ) == null ) { return null ; } java.lang.ref.Reference < ? extends T > ret ; ret = head ; if ( ( head ) == ( head.queueNext ) ) { head = null ; } else { head = head.queueNext ; } ret.queueNext = null ; return ret ; }

Target:
public synchronized java.lang.ref.Reference < ? extends T > poll ( ) { if ( ( head ) == null ) { return null ; } java.lang.ref.Reference < ? extends T > ret = head ; if ( ( head ) == ( tail ) ) { tail = null ; head = null ; } else { head = head.queueNext ; } ret.queueNext = null ; return ret ; }
Source:
private static void tryFileRead ( java.io.File f ) { byte [ ] b = new byte [ 1024 ] ; try { java.lang.System.out.println ( ( "looking at " + ( f.getCanonicalPath ( ) ) ) ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; while ( ( fis.read ( b ) ) != ( - 1 ) ) { } fis.close ( ) ; } catch ( java.io.IOException e ) { } }

Target:
private static java.lang.Boolean tryFileRead ( java.io.File f ) { byte [ ] b = new byte [ 1024 ] ; try { java.lang.System.out.println ( ( "looking at " + ( f.getCanonicalPath ( ) ) ) ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; while ( ( ( fis.available ( ) ) != 0 ) && ( ( fis.read ( b ) ) != ( - 1 ) ) ) { } fis.close ( ) ; } catch ( java.io.IOException e ) { } return true ; }
Source:
public void run ( ) { if ( ( result ) == 0 ) { switch ( mID ) { case com.android.rs.test.UnitTest.RS_MSG_TEST_PASSED : result = 1 ; break ; case com.android.rs.test.UnitTest.RS_MSG_TEST_FAILED : result = - 1 ; break ; default : com.android.rs.test.RSTest.log ( "Unit test got unexpected message" ) ; return ; } } updateUI ( ) ; }

Target:
public void run ( ) { if ( ( result ) == 0 ) { switch ( mID ) { case com.android.rs.test.UnitTest.RS_MSG_TEST_PASSED : result = com.android.rs.test.UnitTest.TEST_PASSED ; break ; case com.android.rs.test.UnitTest.RS_MSG_TEST_FAILED : result = com.android.rs.test.UnitTest.TEST_FAILED ; break ; default : com.android.rs.test.RSTest.log ( "Unit test got unexpected message" ) ; return ; } } updateUI ( ) ; }
Source:
public void onCallTerminated ( com.android.ims.ImsCall imsCall , android.telephony.ims.ImsReasonInfo reasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallTerminated reasonCode=" + ( reasonInfo.getCode ( ) ) ) ) ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_CHECK_FOR_WIFI_HANDOVER ) ; if ( imsCall == ( mUssdSession ) ) { mUssdSession = null ; if ( ( mPendingUssd ) != null ) { com.android.internal.telephony.CommandException ex = new com.android.internal.telephony.CommandException ( CommandException.Error.GENERIC_FAILURE ) ; android.os.AsyncResult.forMessage ( mPendingUssd , null , ex ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } imsCall.close ( ) ; }

Target:
public void onRegistered ( @ android.telephony.ims.stub.ImsRegistrationImplBase.ImsRegistrationTech int imsRadioTech ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onImsConnected imsRadioTech=" + imsRadioTech ) ) ; mPhone.setServiceState ( ServiceState.STATE_IN_SERVICE ) ; mPhone.setImsRegistered ( true ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.CONNECTED , null ) ; }
Source:
private static android.net.wifi.IClientInterface setupDriverForClientMode ( android.net.wifi.IWificond wificond ) { if ( wificond == null ) { android.util.Log.e ( com.android.server.wifi.WifiStateMachine.TAG , "Failed to get reference to wificond" ) ; return null ; } android.net.wifi.IClientInterface clientInterface = null ; try { clientInterface = wificond.createClientInterface ( ) ; } catch ( android.os.RemoteException e1 ) { } if ( clientInterface == null ) { android.util.Log.e ( com.android.server.wifi.WifiStateMachine.TAG , "Could not get IClientInterface instance from wificond" ) ; return null ; } else { android.os.Binder.allowBlocking ( clientInterface.asBinder ( ) ) ; } return clientInterface ; }

Target:
private void reportConnectionAttemptStart ( android.net.wifi.WifiConfiguration config , java.lang.String targetBSSID , int roamType ) { mWifiMetrics.startConnectionEvent ( config , targetBSSID , roamType ) ; mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_STARTED ) ; }
Source:
public void setSystemProperty ( java.lang.String property , java.lang.String value ) { if ( getUnitTestMode ( ) ) { return ; } if ( ( isPhoneTypeGsm ( ) ) || ( isPhoneTypeCdmaLte ( ) ) ) { android.telephony.TelephonyManager.setTelephonyProperty ( mPhoneId , property , value ) ; } else { super . setSystemProperty ( property , value ) ; } }

Target:
public java.lang.String getPlmn ( ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; return r != null ? r.getPnnHomeName ( ) : null ; } else if ( isPhoneTypeCdma ( ) ) { loge ( "Plmn is not available in CDMA" ) ; return null ; } else { return ( mSimRecords ) != null ? mSimRecords.getPnnHomeName ( ) : null ; } }
Source:
protected void onPostExecute ( com.example.android.rs.vr.engine.Volume v ) { android.util.Log.v ( com.example.android.rs.vr.VrActivity.LOGTAG , "done" ) ; mVrView.setVolume ( mRs , v ) ; progressDialog.dismiss ( ) ; }

Target:
protected void onPostExecute ( com.example.android.rs.vr.engine.Volume v ) { android.util.Log.v ( com.example.android.rs.vr.VrActivity.LOGTAG , "done" ) ; mVrView.setVolume ( mRs , v ) ; progressDialog.dismiss ( ) ; if ( ( getResources ( ) . getConfiguration ( ) . orientation ) == ( android.content.res.Configuration.ORIENTATION_PORTRAIT ) ) { setRequestedOrientation ( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ) ; } else { setRequestedOrientation ( ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE ) ; } }
Source:
public boolean isActive ( ) { try { if ( hasFlag ( android.net.InterfaceConfiguration.FLAG_UP ) ) { for ( byte b : mAddr.getAddress ( ) . getAddress ( ) ) { if ( b != 0 ) return true ; } } } catch ( java.lang.NullPointerException e ) { return false ; } return false ; }

Target:
public boolean isActive ( ) { try { if ( isUp ( ) ) { for ( byte b : mAddr.getAddress ( ) . getAddress ( ) ) { if ( b != 0 ) return true ; } } } catch ( java.lang.NullPointerException e ) { return false ; } return false ; }
Source:
public void testApplyingWithCaseChangedNames ( ) throws java.lang.Exception { com.intellij.openapi.util.io.FileUtil.rename ( new java.io.File ( myOlderDir , "Readme.txt" ) , new java.io.File ( myOlderDir , "README.txt" ) ) ; com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testCreatingAndApplyingWhenFileBecomesDirectory ( ) throws java.lang.Exception { java.io.File file = new java.io.File ( myOlderDir , "bin" ) ; assertTrue ( com.intellij.openapi.util.io.FileUtil.delete ( file ) ) ; file.createNewFile ( ) ; com.intellij.openapi.util.io.FileUtil.copy ( new java.io.File ( myOlderDir , "lib/boot_with_directory_becomes_file.jar" ) , new java.io.File ( myOlderDir , "lib/boot.jar" ) ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; assertAppliedAndRevertedCorrectly ( patch , com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { com.android.traceur.AtraceUtils.atraceDumpAndSend ( context , tags , Receiver.BUFFER_SIZE_KB ) ; return null ; }

Target:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; return null ; }
Source:
public void test_freeMemory ( ) { assertTrue ( "freeMemory returned nonsense value" , ( ( r.freeMemory ( ) ) > 0 ) ) ; }

Target:
public void test_memory ( ) { assertTrue ( "freeMemory <= 0" , ( ( r.freeMemory ( ) ) > 0 ) ) ; assertTrue ( "totalMemory() < freeMemory()" , ( ( r.totalMemory ( ) ) >= ( r.freeMemory ( ) ) ) ) ; assertTrue ( "maxMemory() < totalMemory()" , ( ( r.maxMemory ( ) ) >= ( r.totalMemory ( ) ) ) ) ; }
Source:
public void testSetValues015_ThreadGroupAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value actualValue = getStaticFieldValue ( classID , "THREAD_GROUP_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "THREAD_GROUP_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.THREAD_GROUP_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , actualValue , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues015_ThreadGroup ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = getStaticFieldValue ( classID , "THREAD_GROUP_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = getStaticFieldValue ( classID , "THREAD_GROUP_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.THREAD_GROUP_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointThreadGroup" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointThreadGroup" ) ; methodInfo.addVariable ( "param" , oldValue , newValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public void testAssistantStackLaunchNewTaskWithDockedStack ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) return ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; launchActivityInDockStack ( android.server.cts.ActivityManagerAssistantStackTests.DOCKED_ACTIVITY ) ; mAmWmState.assertHasFullscreenTypeStackOnDisplay ( "Must contain fullscreen stack." , mAssistantDisplayId ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; enableAssistant ( ) ; assertAssistantStackCanLaunchAndReturnFromNewTask ( ) ; disableAssistant ( ) ; }

Target:
public void testAssistantStackLaunchNewTaskWithDockedStack ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) return ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; launchActivityInDockStack ( android.server.cts.ActivityManagerAssistantStackTests.DOCKED_ACTIVITY ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; enableAssistant ( ) ; assertAssistantStackCanLaunchAndReturnFromNewTask ( ) ; disableAssistant ( ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( o instanceof com.google.common.hash.BloomFilter ) { com.google.common.hash.BloomFilter < ? > that = ( ( com.google.common.hash.BloomFilter < ? > ) ( o ) ) ; return ( ( ( ( this . numHashFunctions ) == ( that.numHashFunctions ) ) && ( this . bits.equals ( that.bits ) ) ) && ( ( this . funnel ) == ( that.funnel ) ) ) && ( ( this . strategy ) == ( that.strategy ) ) ; } return false ; }

Target:
public boolean isCompatible ( com.google.common.hash.BloomFilter < T > that ) { com.google.common.base.Preconditions.checkNotNull ( that ) ; return ( ( ( ( ( this ) != that ) && ( ( this . numHashFunctions ) == ( that.numHashFunctions ) ) ) && ( ( this . bitSize ( ) ) == ( that.bitSize ( ) ) ) ) && ( this . strategy.equals ( that.strategy ) ) ) && ( this . funnel.equals ( that.funnel ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JThisRef thisRef ) { com.android.jack.dx.rop.code.RegisterSpec valueReg = ropReg.getRegisterSpec ( thisRef ) ; com.android.jack.dx.rop.code.RegisterSpecList sources = com.android.jack.dx.rop.code.RegisterSpecList.make ( valueReg ) ; addInstruction ( new com.android.jack.dx.rop.code.PlainInsn ( com.android.jack.dx.rop.code.Rops.opMove ( valueReg.getTypeBearer ( ) ) , sourcePosition , destReg , sources ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JThisRef thisRef ) { com.android.jack.dx.rop.code.RegisterSpec valueReg = ropReg.getOrCreateRegisterSpec ( thisRef ) ; com.android.jack.dx.rop.code.RegisterSpecList sources = com.android.jack.dx.rop.code.RegisterSpecList.make ( valueReg ) ; addInstruction ( new com.android.jack.dx.rop.code.PlainInsn ( com.android.jack.dx.rop.code.Rops.opMove ( valueReg.getTypeBearer ( ) ) , sourcePosition , destReg , sources ) ) ; return false ; }
Source:
static java.util.List < org.eclipse.core.resources.IProject > getProjects ( org.eclipse.jface.viewers.ISelection selection , boolean warn ) { java.util.List < org.eclipse.core.resources.IProject > projects = com.android.ide.eclipse.adt.AdtUtils.getSelectedProjects ( selection ) ; if ( ( projects.isEmpty ( ) ) && warn ) { org.eclipse.jface.dialogs.MessageDialog.openWarning ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , "Lint" , "Could not run Lint: Select an Android project first." ) ; } return projects ; }

Target:
static java.util.List < org.eclipse.core.resources.IProject > getProjects ( org.eclipse.jface.viewers.ISelection selection , boolean warn ) { java.util.List < org.eclipse.core.resources.IProject > projects = com.android.ide.eclipse.adt.AdtUtils.getSelectedProjects ( selection ) ; if ( ( projects.isEmpty ( ) ) && warn ) { org.eclipse.jface.dialogs.MessageDialog.openWarning ( com.android.ide.eclipse.adt.AdtPlugin.getShell ( ) , "Lint" , "Could not run Lint: Select an Android project first." ) ; } return projects ; }
Source:
synchronized void nScriptSetTimeZone ( long script , byte [ ] timeZone ) { validate ( ) ; rsnScriptSetTimeZone ( mContext , script , timeZone ) ; }

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } return rsnScriptKernelIDCreate ( curCon , sid , slot , sig , mUseInc ) ; }
Source:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceSet ( "main" ) , mBuildType , new com.android.builder.MockSourceSet ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceSet ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }
Source:
public void test001_throughJayce ( ) throws java.lang.Exception { java.io.File tmpDir = com.android.jack.TestTools.createTempDir ( "NoPackageTest" , "dir" ) ; java.lang.String testName = "nopackage" ; java.lang.String classpath = com.android.jack.TestTools.getDefaultBootclasspathString ( ) ; java.io.File sourceDir = com.android.jack.TestTools.getJackTestsWithJackFolder ( testName ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , sourceDir , classpath , tmpDir , false ) ; java.io.File tmpDex = com.android.jack.TestTools.createTempFile ( "NoPackageTest" , ".dex" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , tmpDir , tmpDex , false ) ; }

Target:
public void test001_throughJayce ( ) throws java.lang.Exception { java.io.File tmpDir = com.android.jack.TestTools.createTempDir ( "NoPackageTest" , "dir" ) ; java.lang.String testName = "nopackage" ; java.lang.String classpath = com.android.jack.TestTools.getDefaultBootclasspathString ( ) ; java.io.File sourceDir = com.android.jack.TestTools.getJackTestsWithJackFolder ( testName ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , sourceDir , classpath , tmpDir , false ) ; java.io.File tmpDexFolder = com.android.jack.TestTools.createTempDir ( "NoPackageTest" , "dex" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , tmpDir , tmpDexFolder , false ) ; }
Source:
public java.lang.String getColumnText ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.tools.lint.detector.api.Category ) { if ( columnIndex == 0 ) { return ( ( com.android.tools.lint.detector.api.Category ) ( element ) ) . getFullName ( ) ; } else { return null ; } } com.android.tools.lint.detector.api.Issue issue = ( ( com.android.tools.lint.detector.api.Issue ) ( element ) ) ; switch ( columnIndex ) { case 0 : return issue.getId ( ) ; case 1 : return issue.getDescription ( ) ; } return null ; }

Target:
public java.lang.String getColumnText ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.tools.lint.detector.api.Category ) { if ( columnIndex == 0 ) { return ( ( com.android.tools.lint.detector.api.Category ) ( element ) ) . getFullName ( ) ; } else { return null ; } } com.android.tools.lint.detector.api.Issue issue = ( ( com.android.tools.lint.detector.api.Issue ) ( element ) ) ; switch ( columnIndex ) { case 0 : return issue.getId ( ) ; case 1 : return issue.getDescription ( com.android.tools.lint.detector.api.Issue.OutputFormat.TEXT ) ; } return null ; }
Source:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "me me me me" , java.lang.System.currentTimeMillis ( ) ) ; n.contentView = new android.widget.RemoteViews ( getPackageName ( ) , R.layout.chrono_notification ) ; mChronometerBase = android.os.SystemClock.elapsedRealtime ( ) ; n.contentView.setChronometer ( R.id.time , mChronometerBase , "Yay! (%s)" , true ) ; n.flags |= android.app.Notification.FLAG_ONGOING_EVENT ; n.contentIntent = makeIntent ( ) ; mNM.notify ( 2 , n ) ; }

Target:
public void run ( ) { android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Chronometer Stop" ) ; android.app.Notification n = new android.app.Notification ( ) ; n.icon = R.drawable.icon1 ; n.contentView = new android.widget.RemoteViews ( getPackageName ( ) , R.layout.chrono_notification ) ; n.contentView.setChronometer ( R.id.time , mChronometerBase , null , false ) ; n.contentIntent = makeIntent ( ) ; mNM.notify ( 2 , n ) ; }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources getProjectResources ( org.eclipse.core.resources.IProject project ) { synchronized ( mMap ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = mMap.get ( project ) ; if ( resources == null ) { resources = new com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources ( project ) ; mMap.put ( project , resources ) ; } return resources ; } }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources getProjectResources ( org.eclipse.core.resources.IProject project ) { synchronized ( mMap ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = mMap.get ( project ) ; if ( resources == null ) { resources = com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources.create ( project ) ; mMap.put ( project , resources ) ; } return resources ; } }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
public void onCreate ( ) { if ( com.android.providers.settings.SettingsBackupAgent.DEBUG_BACKUP ) android.util.Log.d ( com.android.providers.settings.SettingsBackupAgent.TAG , "onCreate() invoked" ) ; mSettingsHelper = new com.android.providers.settings.SettingsHelper ( this ) ; super . onCreate ( ) ; android.net.wifi.WifiManager mWfm = ( ( android.net.wifi.WifiManager ) ( getSystemService ( Context.WIFI_SERVICE ) ) ) ; if ( mWfm != null ) com.android.providers.settings.SettingsBackupAgent.mWifiConfigFile = mWfm.getConfigFile ( ) ; }

Target:
public void onCreate ( ) { if ( com.android.providers.settings.SettingsBackupAgent.DEBUG_BACKUP ) android.util.Log.d ( com.android.providers.settings.SettingsBackupAgent.TAG , "onCreate() invoked" ) ; mSettingsHelper = new com.android.providers.settings.SettingsHelper ( this ) ; super . onCreate ( ) ; android.net.wifi.WifiManager mWfm = ( ( android.net.wifi.WifiManager ) ( getSystemService ( Context.WIFI_SERVICE ) ) ) ; if ( mWfm != null ) mWifiConfigFile = mWfm.getConfigFile ( ) ; }
Source:
private void revertToNitzTime ( ) { if ( ( Settings.Global.getInt ( mCr , Settings.Global.AUTO_TIME , 0 ) ) == 0 ) { return ; } if ( com.android.internal.telephony.ServiceStateTracker.DBG ) { log ( ( ( ( "Reverting to NITZ Time: mSavedTime=" + ( mSavedTime ) ) + " mSavedAtTime=" ) + ( mSavedAtTime ) ) ) ; } if ( ( ( mSavedTime ) != 0 ) && ( ( mSavedAtTime ) != 0 ) ) { setAndBroadcastNetworkSetTime ( ( ( mSavedTime ) + ( ( android.os.SystemClock.elapsedRealtime ( ) ) - ( mSavedAtTime ) ) ) ) ; } }

Target:
public void unregisterForNetworkDetached ( android.os.Handler h ) { mNetworkDetachedRegistrants.remove ( h ) ; }
Source:
private int selectResourceForRejectCode ( int rejCode ) { int rejResourceId = 0 ; switch ( rejCode ) { case 1 : rejResourceId = com.android.internal.R.string.mmcc_authentication_reject ; break ; case 2 : rejResourceId = com.android.internal.R.string.mmcc_imsi_unknown_in_hlr ; break ; case 3 : rejResourceId = com.android.internal.R.string.mmcc_illegal_ms ; break ; case 6 : rejResourceId = com.android.internal.R.string.mmcc_illegal_me ; break ; default : break ; } return rejResourceId ; }

Target:
private int selectResourceForRejectCode ( int rejCode , boolean multipleSubscriptions ) { int rejResourceId = 0 ; switch ( rejCode ) { case 1 : rejResourceId = ( multipleSubscriptions ) ? com.android.internal.R.string.mmcc_authentication_reject_msim_template : com.android.internal.R.string.mmcc_authentication_reject ; break ; case 2 : rejResourceId = ( multipleSubscriptions ) ? com.android.internal.R.string.mmcc_imsi_unknown_in_hlr_msim_template : com.android.internal.R.string.mmcc_imsi_unknown_in_hlr ; break ; case 3 : rejResourceId = ( multipleSubscriptions ) ? com.android.internal.R.string.mmcc_illegal_ms_msim_template : com.android.internal.R.string.mmcc_illegal_ms ; break ; case 6 : rejResourceId = ( multipleSubscriptions ) ? com.android.internal.R.string.mmcc_illegal_me_msim_template : com.android.internal.R.string.mmcc_illegal_me ; break ; default : break ; } return rejResourceId ; }
Source:
public void setMustTraceOverridingMethods ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { if ( ! ( isForcedMark ( method ) ) ) { synchronized ( method ) { com.android.jack.tracer.MultiTracerMarker marker = method.getMarker ( com.android.jack.tracer.MultiTracerMarker.class ) ; assert ( marker != null ) && ( marker.isSet ( id ) ) ; marker.setMustTraceOverridingMethods ( id , true ) ; } } }

Target:
public void setMustTraceOverridingMethods ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { if ( ( ! ( method.getEnclosingType ( ) . isExternal ( ) ) ) && ( ! ( isForcedMark ( method ) ) ) ) { synchronized ( method ) { com.android.jack.tracer.MultiTracerMarker marker = method.getMarker ( com.android.jack.tracer.MultiTracerMarker.class ) ; assert ( marker != null ) && ( marker.isSet ( id ) ) ; marker.setMustTraceOverridingMethods ( id , true ) ; } } }
Source:
public static < T > java.util.Iterator < T > consumingIterator ( final java.util.Iterator < T > iterator ) { com.google.common.base.Preconditions.checkNotNull ( iterator ) ; return new com.google.common.collect.UnmodifiableIterator < T > ( ) { @ java.lang.Override public boolean hasNext ( ) { return iterator.hasNext ( ) ; } @ java.lang.Override public T next ( ) { T next = iterator.next ( ) ; iterator.remove ( ) ; return next ; } } ; }

Target:
public static < T > java.util.Iterator < T > consumingIterator ( final java.util.Iterator < T > iterator ) { com.google.common.base.Preconditions.checkNotNull ( iterator ) ; return new com.google.common.collect.UnmodifiableIterator < T > ( ) { @ java.lang.Override public boolean hasNext ( ) { return iterator.hasNext ( ) ; } @ java.lang.Override public T next ( ) { T next = iterator.next ( ) ; iterator.remove ( ) ; return next ; } @ java.lang.Override public java.lang.String toString ( ) { return "Iterators.consumingIterator(...)" ; } } ; }
Source:
public boolean pingSupplicant ( ) { enforceAccessPermission ( ) ; mLog.trace ( "pingSupplicant uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncPingSupplicant ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }

Target:
public boolean removePasspointConfiguration ( java.lang.String fqdn ) { enforceChangePermission ( ) ; mLog.trace ( "removePasspointConfiguration uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_wifi_hotspot2_enabled ) ) ) { throw new java.lang.UnsupportedOperationException ( "Passpoint not enabled" ) ; } return mWifiStateMachine.syncRemovePasspointConfig ( mWifiStateMachineChannel , fqdn ) ; }
Source:
public void setViews ( android.view.ViewGroup root ) { mMobileGroup = root ; mMobile = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_signal ) ) ) ; mMobileDark = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_signal_dark ) ) ) ; mMobileType = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_type ) ) ) ; }

Target:
public void setViews ( android.view.ViewGroup root ) { mMobileGroup = root ; mMobile = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_signal ) ) ) ; mMobileDark = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_signal_dark ) ) ) ; mMobileType = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_type ) ) ) ; mMobileActivity = ( ( android.widget.ImageView ) ( root.findViewById ( R.id.mobile_inout ) ) ) ; }
Source:
public void onCreate ( ) { mNotificationManager = ( ( android.app.NotificationManager ) ( getSystemService ( com.googlecode.android_scripting.NOTIFICATION_SERVICE ) ) ) ; try { mStartForeground = getClass ( ) . getMethod ( "startForeground" , com.googlecode.android_scripting.ForegroundService.mStartForegroundSignature ) ; mStopForeground = getClass ( ) . getMethod ( "stopForeground" , com.googlecode.android_scripting.ForegroundService.mStopForegroundSignature ) ; } catch ( java.lang.NoSuchMethodException e ) { mStartForeground = mStopForeground = null ; } startForegroundCompat ( createNotification ( ) ) ; }

Target:
protected android.app.NotificationManager getNotificationManager ( ) { if ( ( mNotificationManager ) == null ) { mNotificationManager = ( ( android.app.NotificationManager ) ( getSystemService ( com.googlecode.android_scripting.NOTIFICATION_SERVICE ) ) ) ; } return mNotificationManager ; }
Source:
public static < T > void assertThat ( java.lang.String reason , T actual , org.hamcrest.Matcher < T > matcher ) { if ( ! ( matcher.matches ( actual ) ) ) { org.hamcrest.Description description = new org.hamcrest.StringDescription ( ) ; description.appendText ( reason ) ; description.appendText ( "\nExpected: " ) ; description.appendDescriptionOf ( matcher ) ; description.appendText ( "\n got: " ) ; description.appendValue ( actual ) ; description.appendText ( "\n" ) ; throw new java.lang.AssertionError ( description.toString ( ) ) ; } }

Target:
private static void failNotNull ( java.lang.String message , java.lang.Object actual ) { java.lang.String formatted = "" ; if ( message != null ) { formatted = message + " " ; } org.junit.Assert.fail ( ( ( ( formatted + "expected null, but was:<" ) + actual ) + ">" ) ) ; }
Source:
public void run ( com.android.sdklib.internal.repository.ITaskMonitor monitor ) { monitor.setProgressMax ( ( ( archives.size ( ) ) + 1 ) ) ; for ( com.android.sdklib.internal.repository.Archive a : archives ) { monitor.setDescription ( "Deleting '%1$s' (%2$s)" , a.getParentPackage ( ) . getShortDescription ( ) , a.getLocalOsPath ( ) ) ; a.deleteLocal ( ) ; monitor.incProgress ( 1 ) ; if ( monitor.isCancelRequested ( ) ) { break ; } } monitor.incProgress ( 1 ) ; monitor.setDescription ( "Done" ) ; }

Target:
public void run ( com.android.sdklib.internal.repository.ITaskMonitor monitor ) { monitor.setProgressMax ( ( ( archives.size ( ) ) + 1 ) ) ; for ( com.android.sdklib.internal.repository.archives.Archive a : archives ) { monitor.setDescription ( "Deleting '%1$s' (%2$s)" , a.getParentPackage ( ) . getShortDescription ( ) , a.getLocalOsPath ( ) ) ; a.deleteLocal ( ) ; monitor.incProgress ( 1 ) ; if ( monitor.isCancelRequested ( ) ) { break ; } } monitor.incProgress ( 1 ) ; monitor.setDescription ( "Done" ) ; }
Source:
public void addMetrics ( java.util.Map < java.lang.String , java.lang.String > runMetrics , boolean aggregateMetrics ) { if ( aggregateMetrics ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : runMetrics.entrySet ( ) ) { java.lang.String existingValue = mRunMetrics.get ( entry.getKey ( ) ) ; java.lang.String combinedValue = combineValues ( existingValue , entry.getValue ( ) ) ; mRunMetrics.put ( entry.getKey ( ) , combinedValue ) ; } } else { mRunMetrics.putAll ( runMetrics ) ; } }

Target:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > runMetrics ) { if ( mAggregateMetrics ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : runMetrics.entrySet ( ) ) { java.lang.String existingValue = mRunMetrics.get ( entry.getKey ( ) ) ; java.lang.String combinedValue = combineValues ( existingValue , entry.getValue ( ) ) ; mRunMetrics.put ( entry.getKey ( ) , combinedValue ) ; } } else { mRunMetrics.putAll ( runMetrics ) ; } mElapsedTime += elapsedTime ; mIsRunComplete = true ; }
Source:
private void setVpnForcedLocked ( boolean enforce ) { final java.util.Set < android.net.UidRange > removedRanges = new android.util.ArraySet ( mBlockedUsers ) ; if ( enforce ) { final java.util.Set < android.net.UidRange > addedRanges = createUserAndRestrictedProfilesRanges ( mUserHandle , null , java.util.Collections.singletonList ( mPackage ) ) ; removedRanges.removeAll ( addedRanges ) ; addedRanges.removeAll ( mBlockedUsers ) ; setAllowOnlyVpnForUids ( false , removedRanges ) ; setAllowOnlyVpnForUids ( true , addedRanges ) ; } else { setAllowOnlyVpnForUids ( false , removedRanges ) ; } }

Target:
private void setVpnForcedLocked ( boolean enforce ) { final java.util.List < java.lang.String > exemptedPackages = ( com.android.server.connectivity.Vpn.isNullOrLegacyVpn ( mPackage ) ) ? null : java.util.Collections.singletonList ( mPackage ) ; setVpnForcedWithExemptionsLocked ( enforce , exemptedPackages ) ; }
Source:
public void updateServiceForegroundLocked ( com.android.server.am.ProcessRecord proc , boolean oomAdj ) { boolean anyForeground = false ; for ( com.android.server.am.ServiceRecord sr : proc.services ) { if ( sr.isForeground ) { anyForeground = true ; break ; } } if ( anyForeground != ( proc.foregroundServices ) ) { proc.foregroundServices = anyForeground ; if ( oomAdj ) { updateOomAdjLocked ( ) ; } } }

Target:
final void updateLruProcessLocked ( com.android.server.am.ProcessRecord app , boolean oomAdj ) { ( mLruSeq ) ++ ; updateLruProcessInternalLocked ( app , 0 ) ; if ( oomAdj ) { updateOomAdjLocked ( ) ; } }
Source:
public java.io.File getCppCompiler ( com.android.build.gradle.internal.core.Abi abi ) { java.lang.String compiler = ( ( toolchain ) == ( com.android.build.gradle.internal.core.Toolchain.CLANG ) ) ? "clang++" : ( abi.getGccPrefix ( ) ) + "-g++" ; return new java.io.File ( getToolchainPath ( abi ) , ( "bin/" + compiler ) ) ; }

Target:
public java.io.File getCppCompiler ( com.android.build.gradle.internal.core.Abi abi ) { java.lang.String compiler = ( ( toolchain ) == ( com.android.build.gradle.internal.core.Toolchain.CLANG ) ) ? "clang++" : ( abi.getGccExecutablePrefix ( ) ) + "-g++" ; return new java.io.File ( getToolchainPath ( toolchain , toolchainVersion , abi ) , ( "bin/" + compiler ) ) ; }
Source:
public void compileFrameworks ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.TestTools.createTempDir ( "frameworks" , "dex" ) ; java.lang.String classpathString = com.android.jack.TestTools.getClasspathsAsString ( com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.BOOTCLASSPATH , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.CLASSPATH ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.SOURCELIST , classpathString , outDexFolder , false ) ; }

Target:
public void compileFrameworks ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.TestTools.createTempDir ( "frameworks" , "dex" ) ; java.lang.String classpathString = com.android.jack.TestTools.getClasspathsAsString ( com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.BOOTCLASSPATH , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.CLASSPATH ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.addProperty ( DexFileWriter.DEX_WRITING_POLICY.getName ( ) , "multidex" ) ; options.addProperty ( Options.JAVA_SOURCE_VERSION.getName ( ) , JavaVersion.JAVA_7.toString ( ) ) ; com.android.jack.TestTools.compileSourceToDex ( options , com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.SOURCELIST , classpathString , outDexFolder , false ) ; }
Source:
private static android.support.test.espresso.ViewAction actionOpenDrawer ( final int gravity ) { return new android.support.test.espresso.ViewAction ( ) { @ java.lang.Override public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; } @ java.lang.Override public java.lang.String getDescription ( ) { return "open drawer with gravity " + gravity ; } @ java.lang.Override public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) . openDrawer ( gravity ) ; } } ; }

Target:
public static void closeDrawer ( int drawerLayoutId , int gravity ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.close ( gravity ) ) ; }
Source:
public void setUp ( ) { mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( java.lang.Exception e ) { fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } }

Target:
public void setUp ( ) { mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( java.lang.Exception e ) { fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }
Source:
public void addI16 ( android.support.v8.renderscript.Short3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( new android.support.v8.renderscript.Short3 ( v.x , v.y , v.z ) ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; addI16 ( v.z ) ; }

Target:
public void addU16 ( android.support.v8.renderscript.Int3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU16 ( v ) ; return ; } addU16 ( v.x ) ; addU16 ( v.y ) ; addU16 ( v.z ) ; }
Source:
private java.lang.String [ ] jsonToArray ( org.json.JSONArray array ) throws org.json.JSONException { java.lang.String [ ] result = null ; if ( ( array != null ) && ( ( array.length ( ) ) > 0 ) ) { result = new java.lang.String [ array.length ( ) ] ; for ( int i = 0 ; i < ( array.length ( ) ) ; i ++ ) { result [ i ] = array.getString ( i ) ; } } return result ; }

Target:
private java.lang.String [ ] jsonToArray ( org.json.JSONArray array ) throws org.json.JSONException { java.lang.String [ ] resultingArray = null ; if ( ( array != null ) && ( ( array.length ( ) ) > 0 ) ) { resultingArray = new java.lang.String [ array.length ( ) ] ; for ( int i = 0 ; i < ( array.length ( ) ) ; i ++ ) { resultingArray [ i ] = array.getString ( i ) ; } } return resultingArray ; }
Source:
public void enableAutoConnect ( boolean enable ) { if ( enable ) { doBooleanCommand ( "STA_AUTOCONNECT 1" ) ; } else { doBooleanCommand ( "STA_AUTOCONNECT 0" ) ; } }

Target:
public java.util.Map < java.lang.String , java.lang.String > getNetworkExtra ( int netId , java.lang.String name ) { final java.lang.String extraString = getNetworkVariable ( netId , name ) ; if ( ( ( extraString == null ) || ( ! ( extraString.startsWith ( "\"" ) ) ) ) || ( ! ( extraString.endsWith ( "\"" ) ) ) ) { return null ; } return com.android.server.wifi.WifiNative.parseNetworkExtra ( com.android.server.wifi.util.NativeUtil.removeEnclosingQuotes ( extraString ) ) ; }
Source:
public java.lang.String getDeviceSvnUsingSubId ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getDeviceSvn" ) ) ) { return null ; } return phone.getDeviceSvn ( ) ; } else { loge ( "getDeviceSvn phone is null" ) ; return null ; } }

Target:
public java.lang.String getVoiceMailNumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , subId , callingPackage , "getVoiceMailNumber" ) ) ) { return null ; } java.lang.String number = android.telephony.PhoneNumberUtils.extractNetworkPortion ( phone.getVoiceMailNumber ( ) ) ; if ( com.android.internal.telephony.PhoneSubInfoController.VDBG ) log ( ( "VM: getVoiceMailNUmber: " + number ) ) ; return number ; } else { loge ( ( "getVoiceMailNumber phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private libcore.tzdata.update2.tools.TzDataBundleBuilder createValidTzDataBundleBuilder ( java.lang.String tzDataVersion ) throws java.io.IOException { java.io.File bionicTzData = new java.io.File ( tempDir , "zoneinfo" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( bionicTzData ) ; java.io.File icuData = new java.io.File ( tempDir , "icudata" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( icuData ) ; return new libcore.tzdata.update2.tools.TzDataBundleBuilder ( ) . setTzDataVersion ( tzDataVersion ) . addBionicTzData ( bionicTzData ) . addIcuTzData ( icuData ) ; }

Target:
private libcore.tzdata.update2.tools.TzDataBundleBuilder createValidTzDataBundleBuilder ( java.lang.String tzDataVersion ) throws java.io.IOException { java.io.File bionicTzData = new java.io.File ( tempDir , "zoneinfo" ) ; createTzDataFile ( bionicTzData , tzDataVersion ) ; java.io.File icuData = new java.io.File ( tempDir , "icudata" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( icuData ) ; return new libcore.tzdata.update2.tools.TzDataBundleBuilder ( ) . setTzDataVersion ( tzDataVersion ) . addBionicTzData ( bionicTzData ) . addIcuTzData ( icuData ) ; }
Source:
synchronized void nAllocationData3D ( int dstAlloc , int dstXoff , int dstYoff , int dstZoff , int dstMip , int width , int height , int depth , int srcAlloc , int srcXoff , int srcYoff , int srcZoff , int srcMip ) { validate ( ) ; rsnAllocationData3D ( mContext , dstAlloc , dstXoff , dstYoff , dstZoff , dstMip , width , height , depth , srcAlloc , srcXoff , srcYoff , srcZoff , srcMip ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
private void initSdk ( ) { mSdkManager = com.android.sdklib.SdkManager.createManager ( mOsSdkRoot , mSdkLog ) ; try { mAvdManager = null ; mAvdManager = new com.android.sdklib.internal.avd.AvdManager ( mSdkManager , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { mSdkLog.error ( e , ( "Unable to read AVDs: " + ( e.getMessage ( ) ) ) ) ; mAvdManagerInitError = e ; } notifyListeners ( false ) ; }

Target:
private void initSdk ( ) { mSdkManager = com.android.sdklib.SdkManager.createManager ( mOsSdkRoot , mSdkLog ) ; try { mAvdManager = null ; mAvdManager = new com.android.sdklib.internal.avd.AvdManager ( mSdkManager , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { mSdkLog.error ( e , ( "Unable to read AVDs: " + ( e.getMessage ( ) ) ) ) ; mAvdManagerInitError = e ; } broadcastOnSdkReload ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mManager = new com.android.server.wifi.hotspot2.PasspointManager ( mContext , mWifiNative , mWifiKeyStore , mClock , mSimAccessor , mObjectFactory ) ; org.mockito.ArgumentCaptor < com.android.server.wifi.hotspot2.PasspointEventHandler.Callbacks > callbacks = org.mockito.ArgumentCaptor.forClass ( PasspointEventHandler.Callbacks.class ) ; org.mockito.Mockito.verify ( mObjectFactory ) . makePasspointEventHandler ( org.mockito.Mockito.any ( com.android.server.wifi.WifiNative.class ) , callbacks.capture ( ) ) ; mCallbacks = callbacks.getValue ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mObjectFactory.makeAnqpCache ( mClock ) ) . thenReturn ( mAnqpCache ) ; mManager = new com.android.server.wifi.hotspot2.PasspointManager ( mContext , mWifiNative , mWifiKeyStore , mClock , mSimAccessor , mObjectFactory ) ; org.mockito.ArgumentCaptor < com.android.server.wifi.hotspot2.PasspointEventHandler.Callbacks > callbacks = org.mockito.ArgumentCaptor.forClass ( PasspointEventHandler.Callbacks.class ) ; org.mockito.Mockito.verify ( mObjectFactory ) . makePasspointEventHandler ( org.mockito.Mockito.any ( com.android.server.wifi.WifiNative.class ) , callbacks.capture ( ) ) ; mCallbacks = callbacks.getValue ( ) ; }
Source:
public void addDefaultAndroidSourceSet ( @ org.gradle.model.Path ( value = "android.sources" ) com.android.build.gradle.model.AndroidComponentModelSourceSet sources ) { sources.addDefaultSourceSet ( "resources" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "java" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "manifest" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "res" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "assets" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "aidl" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "renderscript" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; sources.addDefaultSourceSet ( "jniLibs" , com.android.build.gradle.model.AndroidLanguageSourceSet.class ) ; }

Target:
public void execute ( org.gradle.language.base.FunctionalSourceSet functionalSourceSet ) { org.gradle.language.base.LanguageSourceSet manifest = functionalSourceSet.getByName ( "manifest" ) ; manifest.getSource ( ) . setIncludes ( com.google.common.collect.ImmutableList.of ( "AndroidManifest.xml" ) ) ; }
Source:
private static vogar.target.junit.VogarTest createForTestCase ( junit.framework.TestCase testCase ) { return new vogar.target.junit.Junit3.TestCaseInstance ( testCase , testCase.getMethod ( ) ) ; }

Target:
private static vogar.target.junit.VogarTest createForTestCase ( junit.framework.TestCase testCase ) { java.lang.reflect.Method method ; try { method = testCase.getMethod ( ) ; } catch ( java.lang.NoSuchMethodError e ) { if ( ! ( e.getMessage ( ) . contains ( "getMethod()Ljava/lang/reflect/Method;" ) ) ) { throw e ; } method = vogar.target.junit.Junit3.runTest ; } return new vogar.target.junit.Junit3.TestCaseInstance ( testCase , method ) ; }
Source:
public boolean setNetworkRSSIStats ( int networkId , int numUserTriggeredWifiDisableLowRSSI , int numUserTriggeredWifiDisableBadRSSI , int numUserTriggeredWifiDisableNotHighRSSI , int numTicksAtLowRSSI , int numTicksAtBadRSSI , int numTicksAtNotHighRSSI ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.numUserTriggeredWifiDisableLowRSSI = numUserTriggeredWifiDisableLowRSSI ; config.numUserTriggeredWifiDisableBadRSSI = numUserTriggeredWifiDisableBadRSSI ; config.numUserTriggeredWifiDisableNotHighRSSI = numUserTriggeredWifiDisableNotHighRSSI ; config.numTicksAtLowRSSI = numTicksAtLowRSSI ; config.numTicksAtBadRSSI = numTicksAtBadRSSI ; config.numTicksAtNotHighRSSI = numTicksAtNotHighRSSI ; return true ; }

Target:
private void handleUserUnlockOrSwitch ( int userId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Loading from store after user switch/unlock for " + userId ) ) ; } if ( loadFromUserStoreAfterUnlockOrSwitch ( userId ) ) { saveToStore ( true ) ; mPendingUnlockStoreRead = false ; } }