auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void clearWeights ( com.android.ide.common.api.INode parentNode ) { java.lang.String sizeAttribute = ( isVertical ( parentNode ) ) ? com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT : com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH ; for ( com.android.ide.common.api.INode target : parentNode.getChildren ( ) ) { target.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WEIGHT , null ) ; java.lang.String size = target.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , sizeAttribute ) ; if ( ( size != null ) && ( size.startsWith ( "0" ) ) ) { target.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , sizeAttribute , com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT ) ; } } }

Target:
private void clearWeights ( com.android.ide.common.api.INode parentNode ) { java.lang.String sizeAttribute = ( isVertical ( parentNode ) ) ? com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT : com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH ; for ( com.android.ide.common.api.INode target : parentNode.getChildren ( ) ) { target.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WEIGHT , null ) ; java.lang.String size = target.getStringAttr ( com.android.util.XmlUtils.ANDROID_URI , sizeAttribute ) ; if ( ( size != null ) && ( size.startsWith ( "0" ) ) ) { target.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , sizeAttribute , com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT ) ; } } }
Source:
private static int linearForNE ( ) { int [ ] x = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } ; int result = 0 ; for ( int i = 0 ; i != 10 ; i ++ ) { result += x [ i ] ; } return result ; }

Target:
private static int linearForNEUp ( ) { int [ ] x = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } ; int result = 0 ; for ( int i = 0 ; i != 10 ; i ++ ) { result += x [ i ] ; } return result ; }
Source:
public java.nio.ByteBuffer put ( byte [ ] src , int srcOffset , int byteCount ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkPutBounds ( 1 , src.length , srcOffset , byteCount ) ; this . block.pokeByteArray ( ( ( offset ) + ( position ) ) , src , srcOffset , byteCount ) ; position += byteCount ; return this ; }

Target:
public java.nio.ByteBuffer put ( byte [ ] src , int srcOffset , int byteCount ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkPutBounds ( 1 , src.length , srcOffset , byteCount ) ; this . block.pokeByteArray ( ( ( offset ) + ( position ) ) , src , srcOffset , byteCount ) ; position += byteCount ; return this ; }
Source:
void handlePreDhcpSetup ( ) { if ( ! ( mBluetoothConnectionActive ) ) { mWifiNative.setBluetoothCoexistenceMode ( WifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED ) ; } setSuspendOptimizationsNative ( com.android.server.wifi.WifiStateMachine.SUSPEND_DUE_TO_DHCP , false ) ; mWifiNative.setPowerSave ( false ) ; getWifiLinkLayerStats ( ) ; if ( ( mWifiP2pChannel ) != null ) { android.os.Message msg = new android.os.Message ( ) ; msg.what = com.android.server.wifi.p2p.WifiP2pServiceImpl.BLOCK_DISCOVERY ; msg.arg1 = com.android.server.wifi.p2p.WifiP2pServiceImpl.ENABLED ; msg.arg2 = android.net.dhcp.DhcpClient.CMD_PRE_DHCP_ACTION_COMPLETE ; msg.obj = this ; mWifiP2pChannel.sendMessage ( msg ) ; } }

Target:
void handlePreDhcpSetup ( ) { if ( ! ( mBluetoothConnectionActive ) ) { mWifiNative.setBluetoothCoexistenceMode ( WifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED ) ; } setSuspendOptimizationsNative ( com.android.server.wifi.WifiStateMachine.SUSPEND_DUE_TO_DHCP , false ) ; mWifiNative.setPowerSave ( false ) ; getWifiLinkLayerStats ( ) ; if ( ( mWifiP2pChannel ) != null ) { android.os.Message msg = new android.os.Message ( ) ; msg.what = com.android.server.wifi.p2p.WifiP2pServiceImpl.BLOCK_DISCOVERY ; msg.arg1 = com.android.server.wifi.p2p.WifiP2pServiceImpl.ENABLED ; msg.arg2 = android.net.dhcp.DhcpClient.CMD_PRE_DHCP_ACTION_COMPLETE ; msg.obj = this ; mWifiP2pChannel.sendMessage ( msg ) ; } else { sendMessage ( DhcpClient.CMD_PRE_DHCP_ACTION_COMPLETE ) ; } }
Source:
public android.content.pm.UserInfo getCurrentUser ( ) throws android.os.RemoteException { final int callingUid = android.os.Binder.getCallingUid ( ) ; if ( ( callingUid != 0 ) && ( callingUid != ( java.lang.Process.myUid ( ) ) ) ) { android.util.Slog.e ( com.android.server.am.ActivityManagerService.TAG , "Trying to get user from unauthorized app" ) ; return null ; } return android.app.AppGlobals.getPackageManager ( ) . getUser ( mCurrentUserId ) ; }

Target:
public android.graphics.Bitmap getTaskTopThumbnail ( int id ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.READ_FRAME_BUFFER , "getTaskTopThumbnail()" ) ; com.android.server.am.TaskRecord tr = taskForIdLocked ( id ) ; if ( tr != null ) { return mMainStack.getTaskTopThumbnailLocked ( tr ) ; } } return null ; }
Source:
public void resolveDependencies ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dependency.VariantDependencies variantDeps , @ com.android.annotations.Nullable com.android.build.gradle.internal.dependency.VariantDependencies testedVariantDeps ) { com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap = com.google.common.collect.ArrayListMultimap.create ( ) ; resolveDependencyForConfig ( variantDeps , testedVariantDeps , reverseMap ) ; processLibraries ( variantDeps.getLibraries ( ) , reverseMap ) ; }

Target:
public void resolveDependencies ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dependency.VariantDependencies variantDeps , @ com.android.annotations.Nullable com.android.build.gradle.internal.dependency.VariantDependencies testedVariantDeps , @ com.android.annotations.Nullable java.lang.String testedProjectPath ) { com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap = com.google.common.collect.ArrayListMultimap.create ( ) ; resolveDependencyForConfig ( variantDeps , testedVariantDeps , testedProjectPath , reverseMap ) ; processLibraries ( variantDeps.getLibraries ( ) , reverseMap ) ; }
Source:
void init ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; filter.addAction ( BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.PLANTRONICS ) ) ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.APPLE ) ) ) ; com.android.bluetooth.btservice.RemoteDevices.mAdapterService.registerReceiver ( mReceiver , filter ) ; }

Target:
void init ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; filter.addAction ( BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.PLANTRONICS ) ) ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.APPLE ) ) ) ; filter.addAction ( BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED ) ; com.android.bluetooth.btservice.RemoteDevices.mAdapterService.registerReceiver ( mReceiver , filter ) ; }
Source:
public java.lang.String computeFullNameWithSplits ( @ com.android.annotations.NonNull java.lang.String splitName ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String flavorName = getFlavorName ( ) ; if ( ! ( flavorName.isEmpty ( ) ) ) { sb.append ( flavorName ) ; sb.append ( com.android.builder.internal.StringHelper.capitalize ( splitName ) ) ; } else { sb.append ( splitName ) ; } sb.append ( com.android.builder.internal.StringHelper.capitalize ( mBuildType.getName ( ) ) ) ; if ( mType.isForTesting ( ) ) { sb.append ( mType.getSuffix ( ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String computeFullNameWithSplits ( @ com.android.annotations.NonNull java.lang.String splitName ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String flavorName = getFlavorName ( ) ; if ( ! ( flavorName.isEmpty ( ) ) ) { sb.append ( flavorName ) ; sb.append ( com.android.utils.StringHelper.capitalize ( splitName ) ) ; } else { sb.append ( splitName ) ; } sb.append ( com.android.utils.StringHelper.capitalize ( mBuildType.getName ( ) ) ) ; if ( mType.isForTesting ( ) ) { sb.append ( mType.getSuffix ( ) ) ; } return sb.toString ( ) ; }
Source:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.gsm.GsmMmiCode mmi = com.android.internal.telephony.gsm.GsmMmiCode.newFromDialString ( dialString , this ) ; if ( ( mmi != null ) && ( mmi.isPinCommand ( ) ) ) { mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } return false ; }

Target:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.gsm.GsmMmiCode mmi = com.android.internal.telephony.gsm.GsmMmiCode.newFromDialString ( dialString , this , mUiccApplication.get ( ) ) ; if ( ( mmi != null ) && ( mmi.isPinCommand ( ) ) ) { mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } return false ; }
Source:
private android.bluetooth.BluetoothGattCharacteristic getCharacteristic ( java.util.UUID serverUid , java.util.UUID characteristicUid ) { android.bluetooth.BluetoothGattCharacteristic characteristic = null ; android.bluetooth.BluetoothGattService service = getService ( serverUid ) ; if ( service != null ) { characteristic = service.getCharacteristic ( characteristicUid ) ; if ( characteristic == null ) { showMessage ( "Characteristic not found" ) ; } } return characteristic ; }

Target:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.CHARACTERISTIC_UUID ) ; if ( characteristic == null ) return null ; android.bluetooth.BluetoothGattDescriptor descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleClientService.DESCRIPTOR_UUID ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; return null ; } return descriptor ; }
Source:
private static void unprovide ( java.lang.String type , java.lang.String algorithm ) { java.util.Set < java.lang.String > algorithms = libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.get ( type ) ; assertNotNull ( algorithms ) ; assertTrue ( algorithm , algorithms.remove ( algorithm.toUpperCase ( java.util.Locale.ROOT ) ) ) ; if ( algorithms.isEmpty ( ) ) { assertNotNull ( libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.remove ( type ) ) ; } }

Target:
private static void unprovide ( java.lang.String type , java.lang.String algorithm ) { java.util.Set < java.lang.String > algorithms = libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.get ( type ) ; org.junit.Assert.assertNotNull ( algorithms ) ; org.junit.Assert.assertTrue ( algorithm , algorithms.remove ( algorithm.toUpperCase ( java.util.Locale.ROOT ) ) ) ; if ( algorithms.isEmpty ( ) ) { org.junit.Assert.assertNotNull ( libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.remove ( type ) ) ; } }
Source:
public java.util.Collection < V > get ( java.lang.Object key ) { java.util.Collection < V > collection = this . get ( ( ( K ) ( key ) ) ) ; return collection.isEmpty ( ) ? null : collection ; }

Target:
public static < K , V > java.util.Map < K , java.util.SortedSet < V > > asMap ( com.google.common.collect.SortedSetMultimap < K , V > multimap ) { return ( ( java.util.Map < K , java.util.SortedSet < V > > ) ( ( java.util.Map < K , ? > ) ( multimap.asMap ( ) ) ) ) ; }
Source:
private void on_SitesTableViewer_checkStateChanged ( org.eclipse.jface.viewers.CheckStateChangedEvent event ) { java.lang.Object element = event.getElement ( ) ; if ( element instanceof com.android.sdklib.internal.repository.SdkSource ) { com.android.sdklib.internal.repository.SdkSource source = ( ( com.android.sdklib.internal.repository.SdkSource ) ( element ) ) ; boolean isChecked = event.getChecked ( ) ; if ( ( source.isEnabled ( ) ) != isChecked ) { setReturnValue ( true ) ; source.setEnabled ( isChecked ) ; mSources.notifyChangeListeners ( ) ; } } }

Target:
private void on_SitesTableViewer_checkStateChanged ( org.eclipse.jface.viewers.CheckStateChangedEvent event ) { java.lang.Object element = event.getElement ( ) ; if ( element instanceof com.android.sdklib.internal.repository.sources.SdkSource ) { com.android.sdklib.internal.repository.sources.SdkSource source = ( ( com.android.sdklib.internal.repository.sources.SdkSource ) ( element ) ) ; boolean isChecked = event.getChecked ( ) ; if ( ( source.isEnabled ( ) ) != isChecked ) { setReturnValue ( true ) ; source.setEnabled ( isChecked ) ; mSources.notifyChangeListeners ( ) ; } } }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( android.bluetooth.BluetoothMap.VDBG ) android.bluetooth.BluetoothMap.log ( "getClient()" ) ; if ( ( mService ) != null ) { try { return mService.getClient ( ) ; } catch ( android.bluetooth.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothMap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothMap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothMap.DBG ) android.bluetooth.BluetoothMap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }

Target:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( android.bluetooth.BluetoothMap.VDBG ) android.bluetooth.BluetoothMap.log ( "getClient()" ) ; final android.bluetooth.IBluetoothMap service = mService ; if ( service != null ) { try { return service.getClient ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothMap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothMap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothMap.DBG ) android.bluetooth.BluetoothMap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }
Source:
private static java.lang.String mapEAPMethodName ( com.android.server.wifi.anqp.eap.EAP.EAPMethodID eapMethodID ) { switch ( eapMethodID ) { case EAP_AKA : return "AKA" ; case EAP_AKAPrim : return "AKA'" ; case EAP_SIM : return "SIM" ; case EAP_TLS : return "TLS" ; case EAP_TTLS : return "TTLS" ; default : throw new java.lang.IllegalArgumentException ( ( "No mapping for " + eapMethodID ) ) ; } }

Target:
public void notifyWnmFrameReceived ( com.android.server.wifi.hotspot2.WnmData data ) { mCallbacks.onWnmFrameReceived ( data ) ; }
Source:
public boolean visitEnumConstant ( lombok.ast.EnumConstant node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = mContext.resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; checkCall ( node , method ) ; } return false ; }

Target:
private static boolean isZero ( @ com.android.annotations.NonNull com.intellij.psi.PsiElement argument ) { if ( argument instanceof com.intellij.psi.PsiLiteral ) { java.lang.Object value = ( ( com.intellij.psi.PsiLiteral ) ( argument ) ) . getValue ( ) ; return ( value instanceof java.lang.Number ) && ( ( ( ( java.lang.Number ) ( value ) ) . intValue ( ) ) == 0 ) ; } return false ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getConnectedDevices" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return new java.util.ArrayList < > ( 0 ) ; } return service.getConnectedDevices ( ) ; }
Source:
public static com.android.jack.Version getVersion ( ) { if ( ( com.android.jack.Jack.version ) == null ) { java.io.InputStream is = com.android.jack.Jack.class . getClassLoader ( ) . getResourceAsStream ( com.android.jack.Jack.PROPERTIES_FILE ) ; if ( is != null ) { com.android.jack.Jack.version = new com.android.jack.Version ( is ) ; } else { com.android.jack.Jack.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to open Jack properties file " + ( com.android.jack.Jack.PROPERTIES_FILE ) ) ) ; throw new java.lang.AssertionError ( ) ; } } assert ( com.android.jack.Jack.version ) != null ; return com.android.jack.Jack.version ; }

Target:
public static com.android.sched.util.Version getVersion ( ) { if ( ( com.android.jack.Jack.version ) == null ) { try { com.android.jack.Jack.version = new com.android.sched.util.Version ( "jack" , com.android.jack.Jack.class . getClassLoader ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.Jack.logger.log ( java.util.logging.Level.SEVERE , "Failed to open Jack version file" , e ) ; throw new java.lang.AssertionError ( ) ; } } assert ( com.android.jack.Jack.version ) != null ; return com.android.jack.Jack.version ; }
Source:
public boolean isInactiveSync ( ) { boolean value ; if ( isCallerOnDifferentThread ( ) ) { android.os.Message response = sendMessageSynchronously ( com.android.internal.telephony.dataconnection.DcAsyncChannel.REQ_IS_INACTIVE ) ; if ( ( response != null ) && ( ( response.what ) == ( com.android.internal.telephony.dataconnection.DcAsyncChannel.RSP_IS_INACTIVE ) ) ) { value = rspIsInactive ( response ) ; } else { log ( ( "rspIsInactive error response=" + response ) ) ; value = false ; } } else { value = mDc.getIsInactive ( ) ; } return value ; }

Target:
public boolean isInactiveSync ( ) { boolean value ; if ( isCallerOnDifferentThread ( ) ) { android.os.Message response = sendMessageSynchronously ( com.android.internal.telephony.dataconnection.DcAsyncChannel.REQ_IS_INACTIVE ) ; if ( ( response != null ) && ( ( response.what ) == ( com.android.internal.telephony.dataconnection.DcAsyncChannel.RSP_IS_INACTIVE ) ) ) { value = rspIsInactive ( response ) ; } else { log ( ( "rspIsInactive error response=" + response ) ) ; value = false ; } } else { value = mDc.isInactive ( ) ; } return value ; }
Source:
private void deleteSelectedFilter ( ) { int selectedIndex = mFiltersTableViewer.getTable ( ) . getSelectionIndex ( ) ; if ( selectedIndex <= 0 ) { return ; } mLogCatFilters.remove ( selectedIndex ) ; mFiltersTableViewer.refresh ( ) ; mFiltersTableViewer.getTable ( ) . setSelection ( ( selectedIndex - 1 ) ) ; filterSelectionChanged ( ) ; saveFilterPreferences ( ) ; }

Target:
private void deleteSelectedFilter ( ) { int selectedIndex = mFiltersTableViewer.getTable ( ) . getSelectionIndex ( ) ; if ( selectedIndex <= 0 ) { return ; } com.android.ddmlib.logcat.LogCatFilter f = mLogCatFilters.get ( selectedIndex ) ; mLogCatFilters.remove ( selectedIndex ) ; mLogCatFilterData.remove ( f ) ; mFiltersTableViewer.refresh ( ) ; mFiltersTableViewer.getTable ( ) . setSelection ( ( selectedIndex - 1 ) ) ; filterSelectionChanged ( ) ; saveFilterPreferences ( ) ; }
Source:
private com.intellij.openapi.editor.markup.GutterIconRenderer getPositionIconRenderer ( boolean isTopFrame ) { if ( ! isTopFrame ) { return null ; } if ( ( myActiveNonLineBreakpoint ) != null ) { return ( ( com.intellij.xdebugger.impl.XBreakpointBase < ? , ? , ? > ) ( myActiveNonLineBreakpoint ) ) . createGutterIconRenderer ( ) ; } if ( ( myCurrentExecutionStack ) != null ) { return myCurrentExecutionStack.getExecutionLineIconRenderer ( ) ; } return null ; }

Target:
public com.intellij.xdebugger.impl.XBreakpoint < ? > getActiveNonLineBreakpoint ( ) { if ( ( myActiveNonLineBreakpoint ) != null ) { com.intellij.xdebugger.impl.XSourcePosition breakpointPosition = myActiveNonLineBreakpoint.getSourcePosition ( ) ; com.intellij.xdebugger.impl.XSourcePosition position = getTopFramePosition ( ) ; if ( ( breakpointPosition == null ) || ( ( position != null ) && ( ! ( ( breakpointPosition.getFile ( ) . equals ( position.getFile ( ) ) ) && ( ( breakpointPosition.getLine ( ) ) == ( position.getLine ( ) ) ) ) ) ) ) { return myActiveNonLineBreakpoint ; } } return null ; }
Source:
public void test002f ( ) throws java.lang.Exception { java.io.File jackOutput ; jackOutput = runTest002 ( true , "keep-first" ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( jackOutput ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE1_LONGPATH , "Res1" ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE2_LONGPATH , "Res2" ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE3_LONGPATH , "Res3" ) ; }

Target:
public void test002f ( ) throws java.lang.Exception { java.io.File jackOutput ; java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; jackOutput = runTest002 ( true , "keep-first" , errOut , false , false ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( jackOutput ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE1_LONGPATH , "Res1" ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE2_LONGPATH , "Res2" ) ; checkResourceContent ( zipFile , com.android.jack.fileconflict.FileConflictTests.RESOURCE3_LONGPATH , "Res3" ) ; junit.framework.Assert.assertTrue ( errOut.toString ( ) . isEmpty ( ) ) ; }
Source:
private void unregisterAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { app.unregisterForReady ( this ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { ir.unregisterForRecordsLoaded ( this ) ; ir.unregisterForRecordsEvents ( this ) ; } } } }

Target:
private void unregisterAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { app.unregisterForReady ( mHandler ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { ir.unregisterForRecordsLoaded ( mHandler ) ; ir.unregisterForRecordsEvents ( mHandler ) ; } } } }
Source:
public int getMinApiLevel ( ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk != null ) { com.android.sdklib.IAndroidTarget target = currentSdk.getTarget ( mEditor.getProject ( ) ) ; return target.getVersion ( ) . getApiLevel ( ) ; } return - 1 ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart getEditor ( ) { return mEditor ; }
Source:
public void setSmscAddress ( java.lang.String address , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SMSC_ADDRESS , result ) ; rr.mParcel.writeString ( address ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + address ) ) ; send ( rr ) ; }

Target:
public void setSmscAddress ( java.lang.String address , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SMSC_ADDRESS , result , mRILDefaultWorkSource ) ; rr.mParcel.writeString ( address ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + address ) ) ; send ( rr ) ; }
Source:
void onExtrasChanged ( com.android.server.telecom.Call call , android.os.Bundle extras ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onExtrasChanged" ) ) ) { try { logOutgoing ( "onExtrasChanged %s %s" , callId , extras ) ; mServiceInterface.onExtrasChanged ( callId , extras ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void onExtrasChanged ( com.android.server.telecom.Call call , android.os.Bundle extras ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onExtrasChanged" ) ) ) { try { logOutgoing ( "onExtrasChanged %s %s" , callId , extras ) ; mServiceInterface.onExtrasChanged ( callId , extras , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void update ( com.android.internal.telephony.CommandsInterface ci , com.android.internal.telephony.uicc.IccSlotStatus iss ) { log ( "slotStatus update" ) ; synchronized ( mLock ) { mCi = ci ; if ( ( iss.slotState ) == ( IccSlotStatus.SlotState.SLOTSTATE_INACTIVE ) ) { if ( mActive ) { mActive = false ; onRadioStateUnavailable ( ) ; } parseAtr ( iss.atr ) ; mCardState = iss.cardState ; mIccId = iss.iccid ; } else if ( ( ! ( mActive ) ) && ( ( iss.slotState ) == ( IccSlotStatus.SlotState.SLOTSTATE_ACTIVE ) ) ) { mActive = true ; } } }

Target:
public void update ( com.android.internal.telephony.CommandsInterface ci , com.android.internal.telephony.uicc.IccSlotStatus iss ) { log ( "slotStatus update" ) ; synchronized ( mLock ) { mCi = ci ; if ( ( iss.slotState ) == ( IccSlotStatus.SlotState.SLOTSTATE_INACTIVE ) ) { if ( mActive ) { mActive = false ; onRadioStateUnavailable ( ) ; mPhoneId = null ; } parseAtr ( iss.atr ) ; mCardState = iss.cardState ; mIccId = iss.iccid ; } else if ( ( ! ( mActive ) ) && ( ( iss.slotState ) == ( IccSlotStatus.SlotState.SLOTSTATE_ACTIVE ) ) ) { mActive = true ; } } }
Source:
public java.nio.ByteBuffer put ( int index , byte value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index ) ; this . block.pokeByte ( ( ( offset ) + index ) , value ) ; return this ; }

Target:
public java.nio.ByteBuffer put ( int index , byte value ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index ) ; this . block.pokeByte ( ( ( offset ) + index ) , value ) ; return this ; }
Source:
private com.google.dexmaker.stock.Map < java.lang.Class < ? > , java.lang.Class < ? > > getGeneratedProxyClasses ( ) throws java.lang.Exception { com.google.dexmaker.stock.Field mapField = com.google.dexmaker.stock.ProxyBuilder.class . getDeclaredField ( "generatedProxyClasses" ) ; mapField.setAccessible ( true ) ; return ( ( com.google.dexmaker.stock.Map < java.lang.Class < ? > , java.lang.Class < ? > > ) ( mapField.get ( null ) ) ) ; }

Target:
private java.util.Map < java.lang.Class < ? > , java.lang.Class < ? > > getGeneratedProxyClasses ( ) throws java.lang.Exception { java.lang.reflect.Field mapField = com.google.dexmaker.stock.ProxyBuilder.class . getDeclaredField ( "generatedProxyClasses" ) ; mapField.setAccessible ( true ) ; return ( ( java.util.Map < java.lang.Class < ? > , java.lang.Class < ? > > ) ( mapField.get ( null ) ) ) ; }
Source:
public void requestFocusNodeHref ( final android.os.Message hrefMsg ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { requestFocusNodeHref ( hrefMsg ) ; } } ) ; return ; } mAwContents.requestFocusNodeHref ( hrefMsg ) ; }

Target:
public void clearView ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearView ( ) ; } } ) ; return ; } mAwContents.clearView ( ) ; }
Source:
protected void onPostExecute ( com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette palette ) { super . onPostExecute ( palette ) ; if ( mHasComputedThemeColor ) { return ; } if ( imageViewDrawable == ( mPhotoView.getDrawable ( ) ) ) { mHasComputedThemeColor = true ; setThemeColor ( palette ) ; onAggregationSuggestionChange ( ) ; } }

Target:
protected void onPostExecute ( com.android.contacts.util.MaterialColorMapUtils.MaterialPalette palette ) { super . onPostExecute ( palette ) ; if ( mHasComputedThemeColor ) { return ; } if ( imageViewDrawable == ( mPhotoView.getDrawable ( ) ) ) { mHasComputedThemeColor = true ; setThemeColor ( palette ) ; } }
Source:
public void testCannotAccessScanResults_NoCoarseLocationPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mLocationModeSetting = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }

Target:
public void testInvalidPackage ( ) throws java.lang.Exception { boolean output = false ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } }
Source:
private com.android.sdklib.repository.local.LocalPlatformToolPkgInfo scanPlatformTools ( java.io.File ptFolder ) { java.util.Properties props = parseProperties ( new java.io.File ( ptFolder , com.android.SdkConstants.FN_SOURCE_PROP ) ) ; com.android.sdklib.repository.FullRevision rev = com.android.sdklib.internal.repository.packages.PackageParserUtils.getPropertyFull ( props , PkgProps.PKG_REVISION ) ; if ( rev == null ) { return null ; } com.android.sdklib.repository.local.LocalPlatformToolPkgInfo info = new com.android.sdklib.repository.local.LocalPlatformToolPkgInfo ( this , ptFolder , props , rev ) ; return info ; }

Target:
private com.android.sdklib.repository.local.LocalPlatformToolPkgInfo scanPlatformTools ( java.io.File ptFolder ) { java.util.Properties props = parseProperties ( new java.io.File ( ptFolder , com.android.SdkConstants.FN_SOURCE_PROP ) ) ; com.android.sdklib.repository.FullRevision rev = com.android.sdklib.repository.local.PackageParserUtils.getPropertyFull ( props , PkgProps.PKG_REVISION ) ; if ( rev == null ) { return null ; } com.android.sdklib.repository.local.LocalPlatformToolPkgInfo info = new com.android.sdklib.repository.local.LocalPlatformToolPkgInfo ( this , ptFolder , props , rev ) ; return info ; }
Source:
public void dispose ( ) { super . dispose ( ) ; if ( ( image ) != null ) { image.dispose ( ) ; } crosshairColor.dispose ( ) ; transform.dispose ( ) ; if ( ( grid ) != null ) { grid.dispose ( ) ; } }

Target:
public void widgetDisposed ( org.eclipse.swt.events.DisposeEvent e ) { model.removeImageChangeListener ( this ) ; if ( ( image ) != null ) { image.dispose ( ) ; } crosshairColor.dispose ( ) ; transform.dispose ( ) ; if ( ( grid ) != null ) { grid.dispose ( ) ; } }
Source:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; parameters.putAll ( mValues.parameters ) ; }

Target:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , mValues.targetSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; parameters.putAll ( mValues.parameters ) ; }
Source:
public boolean isDataConnectivityPossible ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.isDataConnectivityPossible ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isDataConnectivityPossible" , e ) ; } return false ; }

Target:
public com.android.ims.internal.IImsServiceController getImsServiceControllerAndListen ( int slotIndex , @ android.telephony.TelephonyManager.Feature int feature , com.android.ims.internal.IImsServiceFeatureListener callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsServiceControllerAndListen ( slotIndex , feature , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsServiceControllerAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public static java.lang.String toBinaryString ( long i ) { return java.lang.Long.toUnsignedString ( i , 1 ) ; }

Target:
private static java.math.BigInteger toUnsignedBigInteger ( long i ) { if ( i >= 0L ) return java.math.BigInteger.valueOf ( i ) ; else { int upper = ( ( int ) ( i > > > 32 ) ) ; int lower = ( ( int ) ( i ) ) ; return java.math.BigInteger.valueOf ( java.lang.Integer.toUnsignedLong ( upper ) ) . shiftLeft ( 32 ) . add ( java.math.BigInteger.valueOf ( java.lang.Integer.toUnsignedLong ( lower ) ) ) ; } }
Source:
public com.android.tools.perflib.heap.Heap getHeap ( java.lang.String name ) { for ( com.android.tools.perflib.heap.Heap heap : mHeaps.values ( ) ) { if ( heap.mName.equals ( name ) ) { return heap ; } } return null ; }

Target:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { if ( ( mHeaps.get ( i ) . getId ( ) ) == id ) { return mHeaps.get ( i ) ; } } return null ; }
Source:
public final void testJoin ( ) { assertEquals ( "foo" , com.android.ide.common.layout.BaseView.join ( '|' , java.util.Arrays.asList ( "foo" ) ) ) ; assertEquals ( "" , com.android.ide.common.layout.BaseView.join ( '|' , java.util.Collections.< java.lang.String > emptyList ( ) ) ) ; assertEquals ( "foo,bar" , com.android.ide.common.layout.BaseView.join ( ',' , java.util.Arrays.asList ( "foo" , "bar" ) ) ) ; assertEquals ( "foo|bar" , com.android.ide.common.layout.BaseView.join ( '|' , java.util.Arrays.asList ( "foo" , "bar" ) ) ) ; }

Target:
public final void testJoin ( ) { assertEquals ( "foo" , com.android.ide.common.layout.BaseViewRule.join ( '|' , java.util.Arrays.asList ( "foo" ) ) ) ; assertEquals ( "" , com.android.ide.common.layout.BaseViewRule.join ( '|' , java.util.Collections.< java.lang.String > emptyList ( ) ) ) ; assertEquals ( "foo,bar" , com.android.ide.common.layout.BaseViewRule.join ( ',' , java.util.Arrays.asList ( "foo" , "bar" ) ) ) ; assertEquals ( "foo|bar" , com.android.ide.common.layout.BaseViewRule.join ( '|' , java.util.Arrays.asList ( "foo" , "bar" ) ) ) ; }
Source:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getBlocksDepthFirst ( true ) ) { if ( ( block == ( cfg.getEntryBlock ( ) ) ) || ( block == ( cfg.getExitBlock ( ) ) ) ) { continue ; } if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( com.android.jack.transformations.ssa.SsaUtil.getNumPredecessor ( block ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { } } }

Target:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( com.android.jack.transformations.ssa.SsaUtil.getNumPredecessor ( block ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { } } }
Source:
private com.android.server.audio.AudioService.ScoClient getScoClient ( android.os.IBinder cb , boolean create ) { synchronized ( mScoClients ) { com.android.server.audio.AudioService.ScoClient client = null ; int size = mScoClients.size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { client = mScoClients.get ( i ) ; if ( ( client.getBinder ( ) ) == cb ) return client ; } if ( create ) { client = new com.android.server.audio.AudioService.ScoClient ( cb ) ; mScoClients.add ( client ) ; } return client ; } }

Target:
private com.android.server.audio.AudioService.ScoClient getScoClient ( android.os.IBinder cb , boolean create ) { synchronized ( mScoClients ) { for ( com.android.server.audio.AudioService.ScoClient existingClient : mScoClients ) { if ( ( existingClient.getBinder ( ) ) == cb ) { return existingClient ; } } if ( create ) { com.android.server.audio.AudioService.ScoClient newClient = new com.android.server.audio.AudioService.ScoClient ( cb ) ; mScoClients.add ( newClient ) ; return newClient ; } return null ; } }
Source:
private void updateAll ( ) { if ( ( mTimeShiftManager.isAvailable ( ) ) && ( ! ( mTvView.isScreenBlocked ( ) ) ) ) { setEnabled ( true ) ; initializeTimeline ( ) ; mBackgroundView.setEnabled ( true ) ; } else { setEnabled ( false ) ; mBackgroundView.setEnabled ( false ) ; } updateControls ( ) ; }

Target:
private void updateAll ( boolean forceUpdate ) { if ( ( mTimeShiftManager.isAvailable ( ) ) && ( ! ( mTvView.isScreenBlocked ( ) ) ) ) { setEnabled ( true ) ; initializeTimeline ( ) ; mBackgroundView.setEnabled ( true ) ; setTextIfNeeded ( mBackgroundView , null ) ; } else { setEnabled ( false ) ; mBackgroundView.setEnabled ( false ) ; setTextIfNeeded ( mBackgroundView , mUnavailableMessage ) ; } updateControls ( forceUpdate ) ; }
Source:
public void testEmptyXml ( ) throws java.lang.Exception { java.lang.String document = "<?xml version=\"1.0\"?>" ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepository.NS_LATEST_VERSION , handler ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "Premature end of file.*" , e.getMessage ( ) ) ; return ; } handler.verify ( ) ; fail ( ) ; }

Target:
public void testEmptyXml ( ) throws java.lang.Exception { java.lang.String document = "<?xml version=\"1.0\"?>" ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "Premature end of file.*" , e.getMessage ( ) ) ; return ; } handler.verify ( ) ; fail ( ) ; }
Source:
private void _push ( com.android.builder.tasks.WorkQueue.QueueTask < T > task ) throws java.lang.InterruptedException { mPendingJobs.put ( task ) ; if ( ( mWorkThreads.isEmpty ( ) ) || ( ( ( mPendingJobs.size ( ) ) / ( mWorkThreads.size ( ) ) ) > ( mGrowthTriggerRation ) ) ) { addWorkforce ( ) ; } }

Target:
private void _push ( com.android.builder.tasks.WorkQueue.QueueTask < T > task ) throws java.lang.InterruptedException { mPendingJobs.put ( task ) ; checkWorkforce ( ) ; }
Source:
public void run ( ) { mTextView.setText ( "" , BufferType.EDITABLE ) ; mTextView.requestFocus ( ) ; android.text.Selection.setSelection ( ( ( android.text.Editable ) ( mTextView.getText ( ) ) ) , 0 , 0 ) ; mTextView.setKeyListener ( qwertyKeyListener ) ; }

Target:
public void run ( ) { keyListener.onKeyDown ( mTextView , mTextView.getEditableText ( ) , keyCode , new android.view.KeyEvent ( android.view.KeyEvent.ACTION_DOWN , keyCode ) ) ; }
Source:
public com.google.gct.testing.CloudTestConfigurationImpl copy ( java.lang.String prefix ) { com.google.gct.testing.CloudTestConfigurationImpl newConfiguration = ( prefix == null ) ? new com.google.gct.testing.CloudTestConfigurationImpl ( id , name , icon , facet ) : new com.google.gct.testing.CloudTestConfigurationImpl ( ( prefix + ( name ) ) , icon , facet ) ; newConfiguration.deviceDimension.enableAll ( deviceDimension.getEnabledTypes ( ) ) ; newConfiguration.apiDimension.enableAll ( apiDimension.getEnabledTypes ( ) ) ; newConfiguration.languageDimension.enableAll ( languageDimension.getEnabledTypes ( ) ) ; newConfiguration.orientationDimension.enableAll ( orientationDimension.getEnabledTypes ( ) ) ; return newConfiguration ; }

Target:
public com.google.gct.testing.CloudConfigurationImpl copy ( java.lang.String prefix ) { com.google.gct.testing.CloudConfigurationImpl newConfiguration = ( prefix == null ) ? new com.google.gct.testing.CloudConfigurationImpl ( id , name , kind , icon , facet ) : new com.google.gct.testing.CloudConfigurationImpl ( ( prefix + ( name ) ) , kind , icon , facet ) ; newConfiguration.deviceDimension.enableAll ( deviceDimension.getEnabledTypes ( ) ) ; newConfiguration.apiDimension.enableAll ( apiDimension.getEnabledTypes ( ) ) ; newConfiguration.languageDimension.enableAll ( languageDimension.getEnabledTypes ( ) ) ; newConfiguration.orientationDimension.enableAll ( orientationDimension.getEnabledTypes ( ) ) ; return newConfiguration ; }
Source:
public boolean hasWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } lock.lock ( ) ; try { return ( guard.waiterCount ) > 0 ; } finally { lock.unlock ( ) ; } }

Target:
public void leave ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; try { if ( ( lock.getHoldCount ( ) ) == 1 ) { signalNextWaiter ( ) ; } } finally { lock.unlock ( ) ; } }
Source:
public void setBytes ( byte [ ] keyBytes , int keyOffset ) { bytes = keyBytes ; offset = keyOffset ; for ( length = 0 ; ( keyBytes [ ( keyOffset + ( length ) ) ] ) != 0 ; ++ ( length ) ) { } s = null ; }

Target:
public android.icu.impl.UResource.Key setBytes ( byte [ ] keyBytes , int keyOffset ) { bytes = keyBytes ; offset = keyOffset ; for ( length = 0 ; ( keyBytes [ ( keyOffset + ( length ) ) ] ) != 0 ; ++ ( length ) ) { } s = null ; return this ; }
Source:
public boolean enableNetworkWithoutConnect ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "enableNetworkWithoutConnect nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( ( ( "ENABLE_NETWORK " + netId ) + " " ) + "no-connect" ) ) ; }

Target:
public java.lang.String getMacAddress ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.getMacAddress ( ) ; } else { java.lang.String ret = doStringCommand ( "DRIVER MACADDR" ) ; if ( ! ( android.text.TextUtils.isEmpty ( ret ) ) ) { java.lang.String [ ] tokens = ret.split ( " = " ) ; if ( ( tokens.length ) == 2 ) return tokens [ 1 ] ; } return null ; } }
Source:
protected void invoke ( int slot ) { mRS.nScriptInvoke ( getID ( mRS ) , slot ) ; }

Target:
protected android.support.v8.renderscript.Script.InvokeID createInvokeID ( int slot ) { android.support.v8.renderscript.Script.InvokeID i = mIIDs.get ( slot ) ; if ( i != null ) { return i ; } long id = mRS.nScriptInvokeIDCreate ( getID ( mRS ) , slot ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create KernelID" ) ; } i = new android.support.v8.renderscript.Script.InvokeID ( id , mRS , this , slot ) ; mIIDs.put ( slot , i ) ; return i ; }
Source:
private static boolean isLocaleReference ( @ com.android.annotations.Nullable com.android.tools.lint.client.api.JavaParser.TypeDescriptor reference ) { return ( reference != null ) && ( com.android.tools.lint.checks.StringFormatDetector.isLocaleReference ( reference.getName ( ) ) ) ; }

Target:
private static boolean isCharacterType ( com.intellij.psi.PsiType type ) { if ( type == ( com.intellij.psi.PsiType.CHAR ) ) { return true ; } if ( type instanceof com.intellij.psi.PsiClassType ) { java.lang.String fqn = type.getCanonicalText ( ) ; return com.android.tools.lint.client.api.JavaParser.TYPE_CHARACTER_WRAPPER.equals ( fqn ) ; } return false ; }
Source:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; args.outFloor = ( ( float ) ( java.lang.StrictMath.floor ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.min ( ( ( args.inV ) - ( args.outFloor ) ) , 0.99999994F ) ) ) ; }

Target:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloatFloat args ) { float floor = android.renderscript.cts.CoreMathVerifier.floor ( args.inV ) ; args.outFloor = new android.renderscript.cts.Floaty ( floor ) ; args.out = new android.renderscript.cts.Floaty ( java.lang.Math.min ( ( ( args.inV ) - floor ) , 0.99999994F ) , 0 , 1 ) ; }