auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void runQuickFixTest ( com.intellij.psi.PsiParameter parameter , java.lang.String expectedString ) { com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection.MyQuickFix myQuickFix = new com.google.gct.intellij.endpoints.validation.InvalidParameterAnnotationsInspection ( ) . new com.google.gct.intellij.endpoints.validation.MyQuickFix ( ) ; com.intellij.testFramework.MockProblemDescriptor problemDescriptor = new com.intellij.testFramework.MockProblemDescriptor ( parameter , "" , com.intellij.codeInspection.ProblemHighlightType.ERROR , null ) ; myQuickFix.applyFix ( myFixture.getProject ( ) , problemDescriptor ) ; junit.framework.Assert.assertEquals ( expectedString , parameter.getText ( ) ) ; }

Target:
private void runQuickFixTest ( com.intellij.psi.PsiParameter parameter , java.lang.String expectedString ) { com.google.gct.idea.appengine.validation.InvalidParameterAnnotationsInspection.MyQuickFix myQuickFix = new com.google.gct.idea.appengine.validation.InvalidParameterAnnotationsInspection ( ) . new com.google.gct.idea.appengine.validation.MyQuickFix ( ) ; com.intellij.testFramework.MockProblemDescriptor problemDescriptor = new com.intellij.testFramework.MockProblemDescriptor ( parameter , "" , com.intellij.codeInspection.ProblemHighlightType.ERROR , null ) ; myQuickFix.applyFix ( myFixture.getProject ( ) , problemDescriptor ) ; junit.framework.Assert.assertEquals ( expectedString , parameter.getText ( ) ) ; }
Source:
public boolean enableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( mIsNdefPushEnabled ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "enabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , true ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = true ; setBeamShareActivityState ( true ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( true , true ) ; } } return true ; }

Target:
public boolean enableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( mIsNdefPushEnabled ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "enabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , true ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = true ; setBeamShareActivityState ( true ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( true , true ) ; } mBackupManager.dataChanged ( ) ; } return true ; }
Source:
public void setWifiIndicators ( boolean enabled , com.android.systemui.statusbar.policy.NetworkController.IconState statusIcon , com.android.systemui.statusbar.policy.NetworkController.IconState qsIcon , boolean activityIn , boolean activityOut , java.lang.String description ) { mWifiVisible = ( statusIcon.visible ) && ( ! ( mBlockWifi ) ) ; mWifiStrengthId = statusIcon.icon ; mWifiDescription = statusIcon.contentDescription ; apply ( ) ; }

Target:
public void setWifiIndicators ( boolean enabled , com.android.systemui.statusbar.policy.NetworkController.IconState statusIcon , com.android.systemui.statusbar.policy.NetworkController.IconState qsIcon , boolean activityIn , boolean activityOut , java.lang.String description ) { mWifiVisible = ( statusIcon.visible ) && ( ! ( mBlockWifi ) ) ; mWifiStrengthId = statusIcon.icon ; mWifiDescription = statusIcon.contentDescription ; mWifiActivityId = ( activityIn && activityOut ) ? R.drawable.stat_sys_wifi_inout : activityIn ? R.drawable.stat_sys_wifi_in : activityOut ? R.drawable.stat_sys_wifi_out : 0 ; apply ( ) ; }
Source:
protected void computeLayerMatteBehindFocalDepth ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_MarkLayerMask ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; android.util.Log.d ( com.android.rs.refocus.f32.RefocusFilterF32.myTAG , ( ( "MarkLayerMask: " + ( endnow - startnow ) ) + " ns" ) ) ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_ComputeLayerMatteBehindFocalDepth ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; android.util.Log.d ( com.android.rs.refocus.f32.RefocusFilterF32.myTAG , ( ( "ComputeLayerMatteBehindFocalDepth: " + ( endnow - startnow ) ) + " ns" ) ) ; }

Target:
protected void computeLayerMatteBehindFocalDepth ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_MarkLayerMask ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; logTiming ( com.android.rs.refocus.f32.RefocusFilterF32.myTAG , "MarkLayerMask" , ( endnow - startnow ) ) ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_ComputeLayerMatteBehindFocalDepth ( buffers.inAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; logTiming ( com.android.rs.refocus.f32.RefocusFilterF32.myTAG , "ComputeLayerMatteBehindFocalDepth" , ( endnow - startnow ) ) ; }
Source:
public static android.hardware.Sensor getSensor ( android.content.Context context , int sensorType ) { android.hardware.SensorManager sensorManager = ( ( android.hardware.SensorManager ) ( context.getSystemService ( Context.SENSOR_SERVICE ) ) ) ; if ( sensorManager == null ) { throw new java.lang.IllegalStateException ( "SensorService is not present in the system." ) ; } android.hardware.Sensor sensor = sensorManager.getDefaultSensor ( sensorType ) ; if ( sensor == null ) { throw new android.hardware.cts.helpers.SensorNotSupportedException ( sensorType ) ; } return sensor ; }

Target:
public static android.hardware.Sensor getSensor ( android.content.Context context , int sensorType ) { android.hardware.SensorManager sensorManager = android.hardware.cts.helpers.SensorCtsHelper.getSensorManager ( context ) ; android.hardware.Sensor sensor = sensorManager.getDefaultSensor ( sensorType ) ; if ( sensor == null ) { throw new android.hardware.cts.helpers.SensorNotSupportedException ( sensorType ) ; } return sensor ; }
Source:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( mVisitMethods ) { java.lang.String methodName = node.astName ( ) . getDescription ( ) ; java.util.List < com.android.tools.lint.client.api.JavaVisitor.VisitingDetector > list = mMethodDetectors.get ( methodName ) ; if ( list != null ) { for ( com.android.tools.lint.client.api.JavaVisitor.VisitingDetector v : list ) { v.getJavaScanner ( ) . visitMethod ( mContext , v.getVisitor ( ) , node ) ; } } } return super . visitMethodInvocation ( node ) ; }

Target:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( mVisitMethods ) { java.lang.String methodName = node.astName ( ) . astValue ( ) ; java.util.List < com.android.tools.lint.client.api.JavaVisitor.VisitingDetector > list = mMethodDetectors.get ( methodName ) ; if ( list != null ) { for ( com.android.tools.lint.client.api.JavaVisitor.VisitingDetector v : list ) { v.getJavaScanner ( ) . visitMethod ( mContext , v.getVisitor ( ) , node ) ; } } } return super . visitMethodInvocation ( node ) ; }
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:
private void updateServiceStateLteEarfcnBoost ( android.telephony.ServiceState serviceState , int lteEarfcn ) { synchronized ( mLteRsrpBoostLock ) { if ( ( lteEarfcn != ( com.android.internal.telephony.ServiceStateTracker.INVALID_LTE_EARFCN ) ) && ( containsEarfcnInEarfcnRange ( mEarfcnPairListForRsrpBoost , lteEarfcn ) ) ) { serviceState.setLteEarfcnRsrpBoost ( mLteRsrpBoost ) ; } else { serviceState.setLteEarfcnRsrpBoost ( 0 ) ; } } }
Source:
android.content.Context getContext ( ) { android.content.Context context = mock ( android.content.Context.class ) ; android.content.res.Resources resource = mock ( android.content.res.Resources.class ) ; when ( context.getResources ( ) ) . thenReturn ( mResource ) ; return context ; }

Target:
private void setupResources ( ) { when ( mResource.getBoolean ( R.bool.config_wifi_framework_enable_associated_network_selection ) ) . thenReturn ( true ) ; when ( mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ) . thenReturn ( ( - 70 ) ) ; when ( mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ) . thenReturn ( ( - 73 ) ) ; when ( mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz ) ) . thenReturn ( ( - 82 ) ) ; when ( mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz ) ) . thenReturn ( ( - 85 ) ) ; }
Source:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function ) { return com.google.common.util.concurrent.Futures.transform ( input , function , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function , java.util.concurrent.Executor executor ) { com.google.common.base.Preconditions.checkNotNull ( function ) ; return com.google.common.util.concurrent.Futures.transform ( input , com.google.common.util.concurrent.Futures.asAsyncFunction ( function ) , executor ) ; }
Source:
public void stop ( ) { disposeConnection ( ) ; finishProcessAndRedirectors ( ) ; closeConnection ( ) ; if ( settings.isListenConnectorKind ( ) ) { try { transport.stopListening ( ) ; } catch ( java.io.IOException e ) { logWriter.println ( ( "IOException in stopping transport listening: " + e ) ) ; } } }

Target:
public void stop ( ) { disposeConnection ( ) ; try { finishProcessAndRedirectors ( ) ; } finally { tearDownConnection ( ) ; } }
Source:
java.lang.reflect.Type resolveTypeVariable ( java.lang.reflect.TypeVariable < ? > var , com.google.common.reflect.TypeResolver guardedResolver ) { java.lang.reflect.Type type = typeTable.get ( var ) ; if ( type == null ) { java.lang.reflect.Type [ ] bounds = var.getBounds ( ) ; if ( ( bounds.length ) == 0 ) { return var ; } return com.google.common.reflect.Types.newTypeVariable ( var.getGenericDeclaration ( ) , var.getName ( ) , guardedResolver.resolveTypes ( bounds ) ) ; } return guardedResolver.resolveType ( type ) ; }

Target:
com.google.common.reflect.TypeResolver where ( java.util.Map < com.google.common.reflect.TypeResolver.TypeVariableKey , ? extends java.lang.reflect.Type > mappings ) { return new com.google.common.reflect.TypeResolver ( typeTable.where ( mappings ) ) ; }
Source:
public boolean installPacketFilter ( byte [ ] filter ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.installPacketFilterNative ( com.android.server.wifi.WifiNative.sWlan0Index , filter ) ; } else { return false ; } } }

Target:
public boolean installPacketFilter ( byte [ ] filter ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.installPacketFilter ( filter ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.installPacketFilterNative ( com.android.server.wifi.WifiNative.sWlan0Index , filter ) ; } else { return false ; } } } }
Source:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendTestMessages.testSendMessageUcs2Umts ( this , getMessageId ( ) , getCategory ( ) ) ; } }

Target:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendTestMessages.testSendMessage7bitMultipageGsm ( this , getSerialNumber ( ) , getCategory ( ) ) ; } }
Source:
private static void testUnloadClassAndLoader ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ref.WeakReference < java.lang.ClassLoader > loader = Main.setUpUnloadLoader ( constructor ) ; java.lang.ref.WeakReference < java.lang.Class > klass = Main.setUpUnloadClass ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.ref.WeakReference < java.lang.Class > klass2 = Main.setUpUnloadClass ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.out.println ( klass.get ( ) ) ; java.lang.System.out.println ( klass2.get ( ) ) ; java.lang.System.out.println ( loader.get ( ) ) ; }

Target:
private static void testUnloadLoader ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ref.WeakReference < java.lang.ClassLoader > loader = Main.setUpUnloadLoader ( constructor , true ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.out.println ( loader.get ( ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( '<' ) ; builder.append ( this . getClass ( ) . getSimpleName ( ) ) ; builder.append ( getDesc ( ) . toString ( ) . replace ( '<' , ':' ) ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( '<' ) . append ( this . getClass ( ) . getSimpleName ( ) ) . append ( ' ' ) ; builder.append ( getDesc ( ) . toString ( ) ) ; builder.append ( '>' ) ; return builder.toString ( ) ; }
Source:
public void testWorldWriteable ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/WorldWriteableFile.java:26: Warning: Using MODE_WORLD_READABLE when creating files can be risky, review carefully [WorldReadableFiles]\n" + ( ( ( ( ( ( ( ( ( ( ( ( " out = openFileOutput(mFile.getName(), MODE_WORLD_READABLE);\n" + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:31: Warning: Using MODE_WORLD_READABLE when creating files can be risky, review carefully [WorldReadableFiles]\n" ) + " prefs = getSharedPreferences(mContext, MODE_WORLD_READABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:25: Warning: Using MODE_WORLD_WRITEABLE when creating files can be risky, review carefully [WorldWriteableFiles]\n" ) + " out = openFileOutput(mFile.getName(), MODE_WORLD_WRITEABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:30: Warning: Using MODE_WORLD_WRITEABLE when creating files can be risky, review carefully [WorldWriteableFiles]\n" ) + " prefs = getSharedPreferences(mContext, MODE_WORLD_WRITEABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 4 warnings\n" ) + "" ) ) , lintProject ( "src/test/pkg/WorldWriteableFile.java.txt=>src/test/pkg/WorldWriteableFile.java" ) ) ; }

Target:
public void testWorldWriteable ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/WorldWriteableFile.java:27: Warning: Using MODE_WORLD_READABLE when creating files can be risky, review carefully [WorldReadableFiles]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " out = openFileOutput(mFile.getName(), MODE_WORLD_READABLE);\n" + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:32: Warning: Using MODE_WORLD_READABLE when creating files can be risky, review carefully [WorldReadableFiles]\n" ) + " prefs = getSharedPreferences(mContext, MODE_WORLD_READABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:36: Warning: Using MODE_WORLD_READABLE when creating files can be risky, review carefully [WorldReadableFiles]\n" ) + " dir = getDir(mFile.getName(), MODE_WORLD_READABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:26: Warning: Using MODE_WORLD_WRITEABLE when creating files can be risky, review carefully [WorldWriteableFiles]\n" ) + " out = openFileOutput(mFile.getName(), MODE_WORLD_WRITEABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:31: Warning: Using MODE_WORLD_WRITEABLE when creating files can be risky, review carefully [WorldWriteableFiles]\n" ) + " prefs = getSharedPreferences(mContext, MODE_WORLD_WRITEABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WorldWriteableFile.java:35: Warning: Using MODE_WORLD_WRITEABLE when creating files can be risky, review carefully [WorldWriteableFiles]\n" ) + " dir = getDir(mFile.getName(), MODE_WORLD_WRITEABLE);\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 6 warnings\n" ) + "" ) ) , lintProject ( "src/test/pkg/WorldWriteableFile.java.txt=>src/test/pkg/WorldWriteableFile.java" ) ) ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState " + ( mState ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getState(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }

Target:
protected void disconnect ( ) { synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }
Source:
public synchronized com.android.jack.ir.ast.JClassOrInterface getPhantomClassOrInterface ( @ javax.annotation.Nonnull java.lang.String typeName ) { try { return getType ( typeName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { for ( com.android.jack.ir.ast.JPhantomClassOrInterface f : phantomTypes ) { if ( f.name.equals ( typeName ) ) { return f ; } } com.android.jack.ir.ast.JPhantomClassOrInterface phantom = new com.android.jack.ir.ast.JPhantomClassOrInterface ( typeName , this ) ; phantomTypes.add ( phantom ) ; com.android.jack.ir.ast.JPackage.tracer.getStatistic ( com.android.jack.ir.ast.JPackage.PHANTOM_CREATION ) . incValue ( ) ; return phantom ; } }

Target:
public synchronized com.android.jack.ir.ast.JClassOrInterface getPhantomClassOrInterface ( @ javax.annotation.Nonnull java.lang.String typeName ) { try { return getType ( typeName ) ; } catch ( com.android.jack.lookup.JLookupException e ) { for ( com.android.jack.ir.ast.JPhantomClassOrInterface f : phantomTypes ) { if ( f.name.equals ( typeName ) ) { return f ; } } com.android.jack.ir.ast.JPhantomClassOrInterface phantom = new com.android.jack.ir.ast.JPhantomClassOrInterface ( typeName , this ) ; phantomTypes.add ( phantom ) ; tracer.getStatistic ( com.android.jack.ir.ast.JPackage.PHANTOM_CREATION ) . incValue ( ) ; return phantom ; } }
Source:
public void encode ( com.android.jack.dx.io.instructions.DecodedInstruction insn , com.android.jack.dx.io.instructions.CodeOutput out ) { int index = insn.getIndex ( ) ; out.write ( com.android.jack.dx.io.instructions.InstructionCodec.codeUnit ( insn.getOpcode ( ) , insn.getA ( ) ) , com.android.jack.dx.io.instructions.InstructionCodec.unit0 ( index ) , com.android.jack.dx.io.instructions.InstructionCodec.unit1 ( index ) ) ; }

Target:
public void encode ( com.android.jack.dx.io.instructions.DecodedInstruction insn , com.android.jack.dx.io.instructions.CodeOutput out ) { int index = insn.getFirstIndex ( ) ; out.write ( com.android.jack.dx.io.instructions.InstructionCodec.codeUnit ( insn.getOpcode ( ) , insn.getA ( ) ) , com.android.jack.dx.io.instructions.InstructionCodec.unit0 ( index ) , com.android.jack.dx.io.instructions.InstructionCodec.unit1 ( index ) ) ; }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { final byte [ ] iv ; if ( params instanceof javax.crypto.spec.IvParameterSpec ) { javax.crypto.spec.IvParameterSpec ivParams = ( ( javax.crypto.spec.IvParameterSpec ) ( params ) ) ; iv = ivParams.getIV ( ) ; } else { iv = null ; } engineInitInternal ( opmode , key , iv , random ) ; }

Target:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { checkAndSetEncodedKey ( opmode , key ) ; engineInitInternal ( this . encodedKey , params , random ) ; }
Source:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierIdentification.All.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierIdentification.All.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( android.database.SQLException e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertFalse ( mContentObserver.changed ) ; } }

Target:
public void testInvalidInsertionCarrierInfo ( ) { try { android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( CarrierId.All.GID1 , com.android.providers.telephony.CarrierIdProviderTest.dummy_gid1 ) ; mContentResolver.insert ( CarrierId.All.CONTENT_URI , contentValues ) ; org.junit.Assert.fail ( "should throw an exception for null mccmnc" ) ; } catch ( android.database.SQLException e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; assertFalse ( mContentObserver.changed ) ; } }
Source:
public int checkUriPermission ( android.net.Uri uri , int pid , int uid , int modeFlags ) { com.android.server.am.ActivityManagerService.Identity tlsIdentity = com.android.server.am.ActivityManagerService.sCallerIdentity.get ( ) ; if ( tlsIdentity != null ) { uid = tlsIdentity.uid ; pid = tlsIdentity.pid ; } if ( pid == ( MY_PID ) ) { return android.content.pm.PackageManager.PERMISSION_GRANTED ; } synchronized ( this ) { return checkUriPermissionLocked ( uri , uid , modeFlags ) ? android.content.pm.PackageManager.PERMISSION_GRANTED : android.content.pm.PackageManager.PERMISSION_DENIED ; } }

Target:
public int checkUriPermission ( android.net.Uri uri , int pid , int uid , int modeFlags ) { com.android.server.am.ActivityManagerService.Identity tlsIdentity = com.android.server.am.ActivityManagerService.sCallerIdentity.get ( ) ; if ( tlsIdentity != null ) { uid = tlsIdentity.uid ; pid = tlsIdentity.pid ; } if ( pid == ( com.android.server.am.ActivityManagerService.MY_PID ) ) { return android.content.pm.PackageManager.PERMISSION_GRANTED ; } synchronized ( this ) { return checkUriPermissionLocked ( uri , uid , modeFlags ) ? android.content.pm.PackageManager.PERMISSION_GRANTED : android.content.pm.PackageManager.PERMISSION_DENIED ; } }
Source:
private synchronized boolean removeMediaPlayerInfo ( java.lang.String packageName ) { java.util.List < java.lang.Integer > removeKeys = new java.util.ArrayList < java.lang.Integer > ( ) ; for ( java.util.Map.Entry < java.lang.Integer , com.android.bluetooth.avrcp.MediaPlayerInfo > entry : mMediaPlayerInfoList.entrySet ( ) ) { if ( entry.getValue ( ) . getPackageName ( ) . equals ( packageName ) ) { removeKeys.add ( entry.getKey ( ) ) ; } } for ( java.lang.Integer key : removeKeys ) { mMediaPlayerInfoList.remove ( key ) ; } return ( removeKeys.size ( ) ) > 0 ; }

Target:
private synchronized com.android.bluetooth.avrcp.MediaPlayerInfo removeMediaPlayerInfo ( java.lang.String packageName ) { int removeKey = - 1 ; for ( java.util.Map.Entry < java.lang.Integer , com.android.bluetooth.avrcp.MediaPlayerInfo > entry : mMediaPlayerInfoList.entrySet ( ) ) { if ( entry.getValue ( ) . getPackageName ( ) . equals ( packageName ) ) { removeKey = entry.getKey ( ) ; break ; } } if ( removeKey != ( - 1 ) ) { return mMediaPlayerInfoList.remove ( removeKey ) ; } return null ; }
Source:
public android.content.Intent getLongClickIntent ( ) { android.content.Intent i = new android.content.Intent ( android.service.quicksettings.TileService.ACTION_QS_TILE_PREFERENCES ) ; i.setPackage ( mComponent.getPackageName ( ) ) ; i = resolveIntent ( i ) ; if ( i != null ) { return i ; } return new android.content.Intent ( android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS ) . setData ( android.net.Uri.fromParts ( "package" , mComponent.getPackageName ( ) , null ) ) ; }

Target:
public android.content.Intent getLongClickIntent ( ) { android.content.Intent i = new android.content.Intent ( android.service.quicksettings.TileService.ACTION_QS_TILE_PREFERENCES ) ; i.setPackage ( mComponent.getPackageName ( ) ) ; i = resolveIntent ( i ) ; if ( i != null ) { i.putExtra ( TileService.EXTRA_COMPONENT , mComponent ) ; i.putExtra ( TileService.EXTRA_STATE , mTile.getState ( ) ) ; return i ; } return new android.content.Intent ( android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS ) . setData ( android.net.Uri.fromParts ( "package" , mComponent.getPackageName ( ) , null ) ) ; }
Source:
public final short short_literal ( ) throws org.jf.smali.RecognitionException { short value = 0 ; org.antlr.runtime.tree.CommonTree SHORT_LITERAL211 = null ; try { { SHORT_LITERAL211 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.SHORT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_SHORT_LITERAL_in_short_literal3525 ) ) ) ; value = org.jf.smali.LiteralTools.parseShort ( ( SHORT_LITERAL211 != null ? SHORT_LITERAL211.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL209 = null ; try { { DOUBLE_LITERAL209 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3455 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL209 != null ? DOUBLE_LITERAL209.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private java.lang.Throwable tryToExecAllList ( ) { com.intellij.concurrency.ApplierCompleter right = this ; java.lang.Throwable result = throwable ; while ( right != null ) { if ( right.tryUnfork ( ) ) { right.execAndForkSubTasks ( ) ; result = com.intellij.concurrency.ApplierCompleter.moreImportant ( result , right.throwable ) ; } right = right.next ; } return result ; }

Target:
private java.lang.Throwable tryToExecAllList ( ) { com.intellij.concurrency.ApplierCompleter < T > right = this ; java.lang.Throwable result = throwable ; while ( right != null ) { if ( right.tryUnfork ( ) ) { right.execAndForkSubTasks ( ) ; result = com.intellij.concurrency.ApplierCompleter.moreImportant ( result , right.throwable ) ; } right = right.next ; } return result ; }
Source:
private boolean isDisconnectingToActive ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection prevConn , android.bluetooth.BluetoothHeadsetClientCall newCall ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( "prevConn " + ( prevConn.isClosing ( ) ) ) + " new call " ) + ( newCall.getState ( ) ) ) ) ; } if ( ( prevConn.isClosing ( ) ) && ( ( newCall.getState ( ) ) != ( android.bluetooth.BluetoothHeadsetClientCall.CALL_STATE_TERMINATED ) ) ) { return true ; } return false ; }

Target:
synchronized com.android.bluetooth.hfpclient.connserv.HfpClientDeviceBlock findBlockForHandle ( android.telecom.PhoneAccountHandle handle ) { android.telecom.PhoneAccount account = mTelecomManager.getPhoneAccount ( handle ) ; java.lang.String btAddr = account.getAddress ( ) . getSchemeSpecificPart ( ) ; android.bluetooth.BluetoothDevice device = mAdapter.getRemoteDevice ( btAddr ) ; android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( ( ( "Finding block for handle " + handle ) + " device " ) + btAddr ) ) ; return mDeviceBlocks.get ( device ) ; }
Source:
public void testVerify ( ) { assertTrue ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap.g.com" ) ) ) ; assertFalse ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap2.g.com" ) ) ) ; assertFalse ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=sub.imap.g.com" ) ) ) ; }

Target:
public void testVerify ( ) { assertTrue ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap.g.com" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap2.g.com" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=sub.imap.g.com" ) ) ) ; }
Source:
public static java.util.List < java.lang.Double > getJitterValues ( android.hardware.cts.helpers.TestSensorEvent [ ] events ) { java.util.List < java.lang.Long > timestampDelayValues = android.hardware.cts.helpers.SensorCtsHelper.getTimestampDelayValues ( events ) ; double averageTimestampDelay = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; java.util.List < java.lang.Double > jitterValues = new java.util.ArrayList < java.lang.Double > ( timestampDelayValues.size ( ) ) ; for ( long timestampDelay : timestampDelayValues ) { jitterValues.add ( java.lang.Math.abs ( ( timestampDelay - averageTimestampDelay ) ) ) ; } return jitterValues ; }

Target:
public static java.lang.String formatAssertionMessage ( android.hardware.Sensor sensor , java.lang.String label , java.lang.String format , java.lang.Object ... params ) { return java.lang.String.format ( "%s | %s, handle: %d | %s" , label , android.hardware.cts.helpers.SensorTestInformation.getSensorName ( sensor.getType ( ) ) , sensor.getHandle ( ) , java.lang.String.format ( format , params ) ) ; }
Source:
private void clearProfilePriorty ( android.bluetooth.BluetoothDevice device ) { com.android.bluetooth.hid.HidService hidService = com.android.bluetooth.hid.HidService.getHidService ( ) ; com.android.bluetooth.a2dp.A2dpService a2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; com.android.bluetooth.hfp.HeadsetService headsetService = com.android.bluetooth.hfp.HeadsetService.getHeadsetService ( ) ; if ( hidService != null ) hidService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; if ( a2dpService != null ) a2dpService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; if ( headsetService != null ) headsetService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; }

Target:
private void clearProfilePriorty ( android.bluetooth.BluetoothDevice device ) { com.android.bluetooth.hid.HidService hidService = com.android.bluetooth.hid.HidService.getHidService ( ) ; com.android.bluetooth.a2dp.A2dpService a2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; com.android.bluetooth.hfp.HeadsetService headsetService = com.android.bluetooth.hfp.HeadsetService.getHeadsetService ( ) ; if ( hidService != null ) hidService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; if ( a2dpService != null ) a2dpService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; if ( headsetService != null ) headsetService.setPriority ( device , BluetoothProfile.PRIORITY_UNDEFINED ) ; if ( a2dpService != null ) a2dpService.resetAvrcpBlacklist ( device ) ; }
Source:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( java.lang.String layoutName ) { if ( layoutName.equals ( mLayoutName ) ) { return mLayoutEmbeddedParser ; } return null ; }

Target:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( java.lang.String layoutName ) { if ( ( mResourceResolver ) != null ) { com.android.ide.common.rendering.api.ResourceValue value = mResourceResolver.getProjectResource ( ResourceType.LAYOUT , layoutName ) ; if ( value != null ) { return getParser ( value ) ; } } return getParser ( layoutName , null ) ; }
Source:
private boolean addSyntheticInitializerIfNotExists ( @ javax.annotation.Nonnull com.android.jack.transformations.request.TransformationRequest transformRequest ) { java.lang.String methodName = com.android.jack.transformations.enums.OptimizationUtil.getSyntheticSwitchMapInitializerName ( enumType ) ; try { switchMapClass.getMethod ( methodName , supportUtil.getPrimitiveIntType ( ) . getArray ( ) ) ; } catch ( com.android.jack.lookup.JMethodLookupException ex ) { syntheticSwitchMapField = addSyntheticField ( transformRequest ) ; syntheticSwitchMapInitializer = createSyntheticSwitchMapInitializer ( transformRequest ) ; boolean isPackedSwitchStmt = ! ( com.android.jack.transformations.enums.opt.SyntheticClassManager.isSyntheticSwitchMapClass ( switchMapClass ) ) ; createOrdinalMapping ( isPackedSwitchStmt ) ; if ( ! ( fillSyntheticSwitchMapInitializer ( transformRequest ) ) ) { return false ; } } return true ; }

Target:
private boolean createOrUpdateSyntheticInitializer ( @ javax.annotation.Nonnull com.android.jack.transformations.request.TransformationRequest transformRequest ) { boolean needNewSwitchMapInitializer = false ; java.lang.String methodName = com.android.jack.transformations.enums.OptimizationUtil.getSyntheticSwitchMapInitializerName ( enumType ) ; try { switchMapClass.getMethod ( methodName , supportUtil.getPrimitiveIntType ( ) . getArray ( ) ) ; } catch ( com.android.jack.lookup.JMethodLookupException ex ) { syntheticSwitchMapField = addSyntheticField ( transformRequest ) ; syntheticSwitchMapInitializer = createSyntheticSwitchMapInitializer ( transformRequest ) ; needNewSwitchMapInitializer = true ; } if ( needNewSwitchMapInitializer ) { createOrdinalMapping ( ) ; if ( ! ( fillSyntheticSwitchMapInitializer ( transformRequest ) ) ) { return false ; } } return true ; }
Source:
public void testListensForDunNetworks ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( mCM.listening.isEmpty ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertFalse ( mCM.listening.isEmpty ( ) ) ; org.junit.Assert.assertTrue ( mCM.isListeningForDun ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.isEmpty ( ) ) ; }

Target:
public void testListensForDunNetworks ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( mCM.listening.isEmpty ( ) ) ; mUNM.start ( ) ; org.junit.Assert.assertFalse ( mCM.listening.isEmpty ( ) ) ; org.junit.Assert.assertTrue ( mCM.isListeningForDun ( ) ) ; mUNM.stop ( ) ; org.junit.Assert.assertTrue ( mCM.hasNoCallbacks ( ) ) ; }
Source:
public java.util.List < com.android.resources.ResourceType > getResourceTypes ( ) { update ( ) ; if ( ( mResourceTypeList ) == null ) { java.util.Set < com.android.resources.ResourceType > keys = mResourceItems.keySet ( ) ; mResourceTypeList = new java.util.ArrayList < com.android.resources.ResourceType > ( ) ; mResourceTypeList.addAll ( keys ) ; mResourceTypeList = java.util.Collections.unmodifiableList ( mResourceTypeList ) ; } return mResourceTypeList ; }

Target:
protected void update ( ) { getFolder ( ) . getRepository ( ) . removeFile ( mResourceTypeList , this ) ; mResourceItems.clear ( ) ; parseFile ( ) ; mResourceTypeList = java.util.Collections.unmodifiableCollection ( mResourceItems.keySet ( ) ) ; updateResourceItems ( ) ; }
Source:
protected void iterate ( ) { java.lang.String id = android.icu.dev.test.util.ICUServiceThreadTest.getCLV ( ) ; java.lang.Object o = service.get ( id , actualID ) ; if ( o != null ) { log.logln ( ( ( ( ( ( " id: " + id ) + " actual: " ) + ( actualID [ 0 ] ) ) + " result: " ) + o ) ) ; } }

Target:
protected void iterate ( ) { java.lang.String id = android.icu.dev.test.util.ICUServiceThreadTest.getCLV ( ) ; java.lang.Object o = service.get ( id , actualID ) ; if ( o != null ) { android.icu.dev.test.TestFmwk.logln ( ( ( ( ( ( " id: " + id ) + " actual: " ) + ( actualID [ 0 ] ) ) + " result: " ) + o ) ) ; } }
Source:
protected void writeDiff ( java.io.File olderFile , java.io.File newerFile , java.util.zip.ZipOutputStream patchOutput ) throws java.io.IOException { java.io.BufferedInputStream olderFileIn = new java.io.BufferedInputStream ( new java.io.FileInputStream ( olderFile ) ) ; java.io.BufferedInputStream newerFileIn = new java.io.BufferedInputStream ( new java.io.FileInputStream ( newerFile ) ) ; try { writeDiff ( olderFileIn , newerFileIn , patchOutput ) ; } finally { olderFileIn.close ( ) ; newerFileIn.close ( ) ; } }

Target:
public com.intellij.updater.ValidationResult validate ( java.io.File toDir ) throws java.io.IOException { java.io.File fromFile = getSource ( toDir ) ; com.intellij.updater.ValidationResult result = doValidateAccess ( fromFile , ValidationResult.Action.UPDATE ) ; if ( result != null ) return result ; if ( ! ( mySource.isEmpty ( ) ) ) { result = doValidateAccess ( getFile ( toDir ) , ValidationResult.Action.UPDATE ) ; if ( result != null ) return result ; } return doValidateNotChanged ( fromFile , ValidationResult.Kind.ERROR , ValidationResult.Action.UPDATE ) ; }
Source:
private static long totalValues ( java.util.HashMap < java.lang.String , java.lang.Long > map , java.lang.String ... keys ) { long total = 0 ; for ( java.lang.String key : keys ) { total += map.get ( key ) ; } return total ; }

Target:
private static long totalValues ( java.util.HashMap < java.lang.String , java.lang.Long > map , java.lang.String ... keys ) { long total = 0 ; for ( java.lang.String key : keys ) { if ( map.containsKey ( key ) ) { total += map.get ( key ) ; } } return total ; }
Source:
public void testHeader_BoundaryCheck ( ) throws java.io.IOException { java.lang.String resourceName = "org/apache/harmony/luni/tests/" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; java.net.URLConnection urlConnection = url.openConnection ( ) ; assertNull ( urlConnection.getHeaderField ( java.lang.Integer.MIN_VALUE ) ) ; assertNull ( urlConnection.getHeaderField ( java.lang.Integer.MAX_VALUE ) ) ; assertNull ( urlConnection.getHeaderFieldKey ( java.lang.Integer.MIN_VALUE ) ) ; assertNull ( urlConnection.getHeaderFieldKey ( java.lang.Integer.MAX_VALUE ) ) ; assertNull ( urlConnection.getHeaderField ( null ) ) ; }

Target:
public void testHeader_BoundaryCheck ( ) throws java.io.IOException { java.lang.String resourceName = "resources/test.rtf" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; java.net.URLConnection urlConnection = url.openConnection ( ) ; assertNull ( urlConnection.getHeaderField ( java.lang.Integer.MIN_VALUE ) ) ; assertNull ( urlConnection.getHeaderField ( java.lang.Integer.MAX_VALUE ) ) ; assertNull ( urlConnection.getHeaderFieldKey ( java.lang.Integer.MIN_VALUE ) ) ; assertNull ( urlConnection.getHeaderFieldKey ( java.lang.Integer.MAX_VALUE ) ) ; assertNull ( urlConnection.getHeaderField ( null ) ) ; }
Source:
private static int getMainTableEntry ( char char1 , char char2 ) { if ( ( ( ( char1 < 'A' ) || ( char1 > 'Z' ) ) || ( char2 < 'A' ) ) || ( char2 > 'Z' ) ) { throw new java.lang.IllegalArgumentException ( ) ; } return java.util.Currency.mainTable [ ( ( ( char1 - 'A' ) * ( java.util.Currency.A_TO_Z ) ) + ( char2 - 'A' ) ) ] ; }

Target:
public java.lang.String getSymbol ( java.util.Locale locale ) { if ( locale == null ) { throw new java.lang.NullPointerException ( "locale == null" ) ; } return icuCurrency.getSymbol ( locale ) ; }
Source:
private android.support.v7.preference.Preference buildWifiPref ( android.content.Context context , android.net.wifi.WifiConfiguration config ) { final java.lang.String networkId = config.SSID ; final android.net.NetworkTemplate template = android.net.NetworkTemplate.buildTemplateWifi ( networkId ) ; final com.android.settings.datausage.DataUsageMeteredSettings.MeteredPreference pref = new com.android.settings.datausage.DataUsageMeteredSettings.MeteredPreference ( context , template ) ; pref.setTitle ( android.net.wifi.WifiInfo.removeDoubleQuotes ( networkId ) ) ; return pref ; }

Target:
private android.support.v7.preference.Preference buildWifiPref ( android.content.Context context , android.net.wifi.WifiConfiguration config ) { final java.lang.String networkId = ( config.isPasspoint ( ) ) ? config.providerFriendlyName : config.SSID ; final android.net.NetworkTemplate template = android.net.NetworkTemplate.buildTemplateWifi ( networkId ) ; final com.android.settings.datausage.DataUsageMeteredSettings.MeteredPreference pref = new com.android.settings.datausage.DataUsageMeteredSettings.MeteredPreference ( context , template ) ; pref.setTitle ( android.net.wifi.WifiInfo.removeDoubleQuotes ( networkId ) ) ; return pref ; }
Source:
public int getOffset ( long when ) { long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return mEarliestRawOffset ; } } return ( mRawOffset ) + ( ( mOffsets [ ( ( mTypes [ transition ] ) & 255 ) ] ) * 1000 ) ; }

Target:
int findOffsetIndexForTimeInMilliseconds ( long millis ) { return findOffsetIndexForTimeInSeconds ( libcore.util.ZoneInfo.roundDownMillisToSeconds ( millis ) ) ; }
Source:
synchronized void recordNodeAction ( com.android.manifmerger.XmlElement mergedElement , com.android.manifmerger.Actions.ActionType actionType , com.android.manifmerger.XmlElement targetElement ) { com.android.manifmerger.Actions.NodeRecord record = new com.android.manifmerger.Actions.NodeRecord ( actionType , new com.android.manifmerger.Actions.ActionLocation ( targetElement.getDocument ( ) . getSourceLocation ( ) , targetElement.getPosition ( ) ) , targetElement.getId ( ) , null , mergedElement.getOperationType ( ) ) ; recordNodeAction ( mergedElement , record ) ; }

Target:
synchronized void recordNodeAction ( com.android.manifmerger.XmlElement mergedElement , com.android.manifmerger.Actions.ActionType actionType , com.android.manifmerger.XmlElement targetElement ) { com.android.manifmerger.Actions.NodeRecord record = new com.android.manifmerger.Actions.NodeRecord ( actionType , new com.android.manifmerger.Actions.ActionLocation ( targetElement.getDocument ( ) . getSourceLocation ( ) , targetElement.getPosition ( ) ) , targetElement.getOriginalId ( ) , null , mergedElement.getOperationType ( ) ) ; recordNodeAction ( mergedElement , record ) ; }
Source:
public int getMinorVersion ( ) throws com.android.jack.library.LibraryFormatException { int minor ; try { minor = java.lang.Integer.parseInt ( getProperty ( com.android.jack.library.v0000.KEY_LIB_MINOR_VERSION ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.jack.library.v0000.InputJackLibraryImpl.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to parse the property " + ( KEY_LIB_MINOR_VERSION ) ) + " from " ) + ( getLocation ( ) . getDescription ( ) ) ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( getLocation ( ) ) ; } return minor ; }

Target:
public int getMinorVersion ( ) { return minorVersion ; }
Source:
private void onControlStateChanged ( int localRole , int state , int error , java.lang.String ifname ) { if ( com.android.bluetooth.pan.PanService.DBG ) { log ( ( ( ( ( ( "onControlStateChanged: " + state ) + ", error: " ) + error ) + ", ifname: " ) + ifname ) ) ; } if ( error == 0 ) { mPanIfName = ifname ; } }

Target:
private void onControlStateChanged ( int localRole , int state , int error , java.lang.String ifname ) { if ( com.android.bluetooth.pan.PanService.DBG ) { android.util.Log.d ( com.android.bluetooth.pan.PanService.TAG , ( ( ( ( ( "onControlStateChanged: " + state ) + ", error: " ) + error ) + ", ifname: " ) + ifname ) ) ; } if ( error == 0 ) { mPanIfName = ifname ; } }
Source:
void execute ( ) { try { executor.execute ( runnable ) ; } catch ( java.lang.RuntimeException e ) { com.google.common.util.concurrent.ExecutionList.log.log ( java.util.logging.Level.SEVERE , ( ( ( "RuntimeException while executing runnable " + ( runnable ) ) + " with executor " ) + ( executor ) ) , e ) ; } }

Target:
private static void executeListener ( java.lang.Runnable runnable , java.util.concurrent.Executor executor ) { try { executor.execute ( runnable ) ; } catch ( java.lang.RuntimeException e ) { com.google.common.util.concurrent.ExecutionList.log.log ( java.util.logging.Level.SEVERE , ( ( ( "RuntimeException while executing runnable " + runnable ) + " with executor " ) + executor ) , e ) ; } }
Source:
public synchronized int bindServer ( ) { java.net.InetSocketAddress serverAddress = getSyncServerAddress ( ) ; try { logWriter.println ( ( "[SYNC] Binding socket on: " + serverAddress ) ) ; serverSocket = new java.net.ServerSocket ( serverAddress.getPort ( ) , 0 , serverAddress.getAddress ( ) ) ; logWriter.println ( ( "[SYNC] Bound socket on: " + serverAddress ) ) ; return serverAddress.getPort ( ) ; } catch ( java.io.IOException e ) { throw new org.apache.harmony.jpda.tests.framework.TestErrorException ( "[SYNC] Exception in binding for socket sync connection" , e ) ; } }

Target:
public synchronized int bindServer ( ) { java.net.InetSocketAddress serverAddress = getSyncServerAddress ( ) ; try { logWriter.println ( ( "[SYNC] Binding socket on: " + serverAddress ) ) ; serverSocket = new java.net.ServerSocket ( serverAddress.getPort ( ) , 0 , serverAddress.getAddress ( ) ) ; int localPort = serverSocket.getLocalPort ( ) ; logWriter.println ( ( ( ( ( "[SYNC] Bound socket on: " + serverAddress ) + " (local port: " ) + localPort ) + ")" ) ) ; return localPort ; } catch ( java.io.IOException e ) { throw new org.apache.harmony.jpda.tests.framework.TestErrorException ( "[SYNC] Exception in binding for socket sync connection" , e ) ; } }
Source:
private int findThreadIdFromName ( @ com.android.annotations.NonNull java.lang.String threadName , @ com.android.annotations.NonNull com.android.utils.SparseArray < java.lang.String > threads ) { for ( int i = 0 ; i < ( threads.size ( ) ) ; i ++ ) { int id = threads.keyAt ( i ) ; java.lang.String name = threads.valueAt ( i ) ; if ( threadName.equals ( name ) ) { return id ; } } return - 1 ; }

Target:
public void testSearch ( ) throws java.io.IOException { com.android.tools.perflib.vmtrace.VmTraceData traceData = getVmTraceData ( "/basic.trace" ) ; java.lang.String thread = "AsyncTask #1" ; com.android.tools.perflib.vmtrace.SearchResult results = traceData.searchFor ( "startMethodTracing" , thread ) ; assertEquals ( 3 , results.getMethods ( ) . size ( ) ) ; assertEquals ( 3 , results.getInstances ( ) . size ( ) ) ; }