auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onFinish ( org.ovirt.engine.ui.uicompat.TaskContext context , boolean isSucceeded , org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model , java.lang.String message ) { context.InvokeUIThread ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "Finish" , isSucceeded , model , message } ) ) ) ; }

Target:
public void onFinish ( org.ovirt.engine.ui.uicompat.TaskContext context , boolean isSucceeded , org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model , java.lang.String message ) { context.invokeUIThread ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "Finish" , isSucceeded , model , message } ) ) ) ; }
Source:
public void testChangeCdNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendDeviceResource < org.ovirt.engine.api.model.CdRom , org.ovirt.engine.api.model.CdRoms , org.ovirt.engine.core.common.businessentities.VM > resource = getNotFoundResource ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; try { resource.update ( getUpdate ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testChangeCdNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendDeviceResource < org.ovirt.engine.api.model.Cdrom , org.ovirt.engine.api.model.Cdroms , org.ovirt.engine.core.common.businessentities.VM > resource = getNotFoundResource ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; try { resource.update ( getUpdate ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void isSoundcardEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmHandler.warnMemorySizeLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; UpdateVmTemplate ( ) ; updateWatchdog ( ) ; checkTrustedService ( ) ; org.ovirt.engine.core.bll.UpdateVmTemplateCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmHandler.warnMemorySizeLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; updateOriginalTemplateNameOnDerivedVms ( ) ; UpdateVmTemplate ( ) ; updateWatchdog ( ) ; checkTrustedService ( ) ; org.ovirt.engine.core.bll.UpdateVmTemplateCommand.setSucceeded ( true ) ; } }
Source:
public int countDownBricks ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { int downCount = 0 ; int upCount = 0 ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : volume.getBricks ( ) ) { if ( ( brick.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ) { upCount ++ ; } else { downCount ++ ; } if ( ( upCount > 0 ) && ( downCount > 0 ) ) { return downCount ; } } return downCount ; }

Target:
private java.lang.String getToolTip ( org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus status ) { switch ( status ) { case DOWN : return constants.down ( ) ; case UP : return constants.up ( ) ; case SOME_BRICKS_DOWN : return constants.volumeBricksDown ( ) ; case ALL_BRICKS_DOWN : return constants.volumeAllBricksDown ( ) ; default : return constants.down ( ) ; } }
Source:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debug ( "LoginAdminUser: User logged to admin using role '{}'" , r.getname ( ) ) ; return true ; } } return false ; }

Target:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAnyAdminRoleForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; if ( ! ( userRoles.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debug ( "LoginAdminUser: User logged to admin using role '{}'" , userRoles.get ( 0 ) . getname ( ) ) ; return true ; } return false ; }
Source:
public static void GetClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters ( clusterId ) , aQuery ) ; }

Target:
public static void GetDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( glusterVolume.isOnline ( ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( glusterVolume.isOnline ( ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED ) ; } return true ; }
Source:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptySet ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( params , null ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( null ) ) ) . build ( ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private boolean hasImages ( ) { return ( ( getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) || ( ( getImageStorageDomainMapDao ( ) . getAllByStorageDomainId ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) ; }

Target:
private boolean hasImages ( ) { int allowedDisksNum = getOvfInfo ( ) . size ( ) ; return ( ( getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) > allowedDisksNum ) || ( ( getImageStorageDomainMapDao ( ) . getAllByStorageDomainId ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) > allowedDisksNum ) ; }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putOne ( isSoundcardEnabledEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.hiddenField ( ) ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.hiddenField ( ) ) . putOne ( templateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.hiddenField ( ) ) . update ( resourceAllocationTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.hiddenField ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( templateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( resourceAllocationTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void OnRemove ( ) { org.ovirt.engine.core.common.businessentities.Bookmark selectedBookmark = ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.action.BookmarksParametersBase parameters = new org.ovirt.engine.core.common.action.BookmarksParametersBase ( selectedBookmark.getbookmark_id ( ) ) ; org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback async = new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { PostOnSave ( result.getReturnValue ( ) ) ; } } ; getWindow ( ) . StartProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveBookmark , parameters , async ) ; }

Target:
public void onRemove ( ) { org.ovirt.engine.core.common.businessentities.Bookmark selectedBookmark = ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.action.BookmarksParametersBase parameters = new org.ovirt.engine.core.common.action.BookmarksParametersBase ( selectedBookmark.getbookmark_id ( ) ) ; org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback async = new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { postOnSave ( result.getReturnValue ( ) ) ; } } ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveBookmark , parameters , async ) ; }
Source:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Status ) ; if ( ( getVds ( ) . getpm_enabled ( ) ) && ( executor.FindVdsToFence ( ) ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = executor.Fence ( ) ; _fenceSucceeded = returnValue.getSucceeded ( ) ; _fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; _vdsProxyFound = true ; } }

Target:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Status ) ; if ( ( getVds ( ) . getpm_enabled ( ) ) && ( executor.findProxyHost ( ) ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = executor.Fence ( ) ; _fenceSucceeded = returnValue.getSucceeded ( ) ; _fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; _vdsProxyFound = true ; } }
Source:
protected java.security.MessageDigest getMd5Digest ( javax.servlet.http.HttpServletRequest request ) throws java.security.NoSuchAlgorithmException { java.security.MessageDigest digest = createMd5Digest ( ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_SELECTOR_SCRIPT ) . toString ( ) . getBytes ( ) ) ; if ( ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_USER_INFO ) ) != null ) { digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_USER_INFO ) . toString ( ) . getBytes ( ) ) ; } return digest ; }

Target:
private java.util.Locale getLocaleFromRequest ( final javax.servlet.ServletRequest request ) { java.util.Locale locale = ( ( java.util.Locale ) ( request.getAttribute ( LocaleFilter.LOCALE ) ) ) ; if ( locale == null ) { locale = org.ovirt.engine.core.utils.servlet.LocaleFilter.DEFAULT_LOCALE ; } return locale ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getDbUserDao ( ) ; vm = new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4354" ) ; existingUser = dao.get ( new org.ovirt.engine.core.compat.Guid ( "9bf7c640-b620-456f-a550-0348f366544a" ) ) ; deletableUser = dao.get ( new org.ovirt.engine.core.compat.Guid ( "9bf7c640-b620-456f-a550-0348f366544b" ) ) ; newUser = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; newUser.setExternalId ( "0" ) ; newUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newUser.setFirstName ( "Bob" ) ; newUser.setLastName ( "Milqtoste" ) ; newUser.setLoginName ( "newuser" ) ; newUser.setEmail ( "newuser@redhat.com" ) ; newUser.setDomain ( "domain" ) ; newUser.setGroupNames ( new java.util.LinkedList < > ( java.util.Collections.singletonList ( "groups" ) ) ) ; newUser.setNamespace ( "*" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getDbUserDao ( ) ; vm = FixturesTool.VM_RHEL5_POOL_50 ; existingUser = dao.get ( new org.ovirt.engine.core.compat.Guid ( "9bf7c640-b620-456f-a550-0348f366544a" ) ) ; deletableUser = dao.get ( new org.ovirt.engine.core.compat.Guid ( "9bf7c640-b620-456f-a550-0348f366544b" ) ) ; newUser = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; newUser.setExternalId ( "0" ) ; newUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newUser.setFirstName ( "Bob" ) ; newUser.setLastName ( "Milqtoste" ) ; newUser.setLoginName ( "newuser" ) ; newUser.setEmail ( "newuser@redhat.com" ) ; newUser.setDomain ( "domain" ) ; newUser.setGroupNames ( new java.util.LinkedList < > ( java.util.Collections.singletonList ( "groups" ) ) ) ; newUser.setNamespace ( "*" ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.validateBricks ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.canRemoveBrick ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) , true ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = org.ovirt.engine.core.bll.network.host.UpdateNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ; if ( networkAttachment == null ) { return failCanDoAction ( EngineMessage.NETWORK_ATTACHMENT_NOT_SPECIFIED ) ; } if ( ( networkAttachment.getId ( ) ) == null ) { return failCanDoAction ( EngineMessage.NETWORK_ATTACHMENT_WHEN_UPDATING_YOU_HAVE_TO_PROVIDE_ID ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = org.ovirt.engine.core.bll.network.host.UpdateNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ; if ( networkAttachment == null ) { return failValidation ( EngineMessage.NETWORK_ATTACHMENT_NOT_SPECIFIED ) ; } if ( ( networkAttachment.getId ( ) ) == null ) { return failValidation ( EngineMessage.NETWORK_ATTACHMENT_WHEN_UPDATING_YOU_HAVE_TO_PROVIDE_ID ) ; } return true ; }
Source:
public long nextLong ( long l ) { if ( l <= 0 ) { throw new java.lang.IllegalArgumentException ( "l must be greater than 0!" ) ; } return ( java.lang.Math.abs ( super . nextLong ( ) ) ) % l ; }

Target:
public long nextLong ( long l ) { if ( l <= 0 ) { throw new java.lang.IllegalArgumentException ( "l must be greater than 0!" ) ; } long rand = super . nextLong ( ) ; if ( rand == ( java.lang.Long.MIN_VALUE ) ) { rand ++ ; } return ( java.lang.Math.abs ( rand ) ) % l ; }
Source:
public void talendLogs_LOGS_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtodaily_3_6.AggregationToDaily.TalendException { end_Hash.put ( "talendLogs_LOGS" , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; talendLogs_LOGS_onSubJobError ( exception , errorComponent , globalMap ) ; }

Target:
public void talendLogs_CONSOLE_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtodaily_3_6.AggregationToDaily.TalendException { end_Hash.put ( errorComponent , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; talendLogs_LOGS_onSubJobError ( exception , errorComponent , globalMap ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > byNetworkId ( ) { return group ( new org.ovirt.engine.core.common.utils.MapNetworkAttachments.ByNetworkId ( ) , networkAttachments ) ; }

Target:
private < K , I > java.util.Map < K , java.util.Set < I > > groupMultipleValues ( org.ovirt.engine.core.common.utils.MapNetworkAttachments.CalculateKey < I , K > calculateKey , java.util.Collection < I > instances ) { java.util.Map < K , java.util.Set < I > > result = new java.util.HashMap < > ( instances.size ( ) ) ; for ( I instance : instances ) { getSetForKey ( calculateKey.keyFrom ( instance ) , result ) . add ( instance ) ; } return result ; }
Source:
public static org.ovirt.engine.api.model.GlusterVolumeType map ( org.ovirt.engine.api.model.GlusterVolumeType glusterVolumeType , org.ovirt.engine.api.model.GlusterVolumeType template ) { switch ( glusterVolumeType ) { case DISTRIBUTE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.GlusterVolumeType map ( org.ovirt.engine.api.model.GlusterVolumeType glusterVolumeType , org.ovirt.engine.api.model.GlusterVolumeType template ) { switch ( glusterVolumeType ) { case DISTRIBUTE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; default : return null ; } }
Source:
private static void flatGroups ( java.util.Set < org.ovirt.engine.core.aaa.DirectoryGroup > accumulator , java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > groupsFrom ) { for ( org.ovirt.engine.core.aaa.DirectoryGroup group : groupsFrom ) { org.ovirt.engine.core.aaa.DirectoryUtils.flatGroups ( accumulator , group.getGroups ( ) ) ; accumulator.add ( group ) ; } }

Target:
private static void flatGroups ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > accumulator , java.util.List < org.ovirt.engine.api.extensions.ExtMap > groupsFrom ) { for ( org.ovirt.engine.api.extensions.ExtMap group : groupsFrom ) { org.ovirt.engine.core.aaa.DirectoryUtils.flatGroups ( accumulator , group.get ( GroupRecord.GROUPS , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) ; accumulator.add ( group ) ; } }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( ( "%s, targetVdsId = %s, action = %s, ip = %s, port = %s, type = %s, user = %s, " + "password = %s, options = '%s', policy = '%s'" ) , super . toString ( ) , getTargetVdsID ( ) , getAction ( ) , getIp ( ) , getPort ( ) , getType ( ) , getUser ( ) , ( ( getPassword ( ) ) == null ? null : "******" ) , getOptions ( ) , getFencingPolicy ( ) ) ; }

Target:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, targetVdsId = %s, action = %s, agent = '%s', policy = '%s'" , super . toString ( ) , getTargetVdsID ( ) , getAction ( ) , getFenceAgent ( ) , getFencingPolicy ( ) ) ; }
Source:
private void doQueryClose ( org.ovirt.engineextensions.aaa.ldap.ExtMap input , org.ovirt.engineextensions.aaa.ldap.ExtMap output ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "doQueryClose Enter" ) ; org.ovirt.engineextensions.aaa.ldap.AuthzExtension.SearchOpaque opaque = input.< org.ovirt.engineextensions.aaa.ldap.AuthzExtension.SearchOpaque > get ( Authz.InvokeKeys.QUERY_OPAQUE ) ; if ( opaque != null ) { framework.searchClose ( opaque.instance ) ; } org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "doQueryClose Return" ) ; }

Target:
private void doQueryClose ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "doQueryClose Enter" ) ; org.ovirt.engineextensions.aaa.ldap.AuthzExtension.SearchOpaque opaque = input.< org.ovirt.engineextensions.aaa.ldap.AuthzExtension.SearchOpaque > get ( Authz.InvokeKeys.QUERY_OPAQUE ) ; if ( opaque != null ) { framework.searchClose ( opaque.instance ) ; } org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "doQueryClose Return" ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { org.openstack.quantum.model.Networks networks = getQuantumClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.ENGINE , new java.lang.RuntimeException ( e ) ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }
Source:
public void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getAllForConnection ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { return getCallsHandler ( ) . executeReadList ( "Getstorage_server_connectionsByKey" , org.ovirt.engine.core.dao.StorageServerConnectionDaoImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "iqn" , connection.getiqn ( ) ) . addValue ( "connection" , connection.getconnection ( ) ) . addValue ( "port" , connection.getport ( ) ) . addValue ( "portal" , connection.getportal ( ) ) . addValue ( "username" , connection.getuser_name ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getAllForConnection ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { return getCallsHandler ( ) . executeReadList ( "Getstorage_server_connectionsByKey" , org.ovirt.engine.core.dao.StorageServerConnectionDaoImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "iqn" , connection.getIqn ( ) ) . addValue ( "connection" , connection.getConnection ( ) ) . addValue ( "port" , connection.getPort ( ) ) . addValue ( "portal" , connection.getPortal ( ) ) . addValue ( "username" , connection.getUserName ( ) ) ) ; }
Source:
public final void setInternal ( boolean internal ) { policyUnit.setInternal ( internal ) ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < java.util.List < org.ovirt.engine.core.compat.Guid > , org.ovirt.engine.core.compat.Guid > balance ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < java.lang.String , java.lang.String > parameters , java.util.ArrayList < java.lang.String > messages ) { org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl.log.error ( ( ( "policy unit:" + ( getPolicyUnit ( ) . getName ( ) ) ) + "balance is not implemented" ) ) ; return null ; }
Source:
public void vnicProfileInUseByVms ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VM.class ) ; org.mockito.Mockito.when ( vm.getName ( ) ) . thenReturn ( NAMEABLE_NAME ) ; vnicProfileNotUsedByVmsTest ( failsWithVnicProfileInUse ( ) , java.util.Collections.singletonList ( vm ) ) ; }

Target:
public void vnicProfileInUseByVms ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VM.class ) ; org.mockito.Mockito.when ( vm.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.NAMEABLE_NAME ) ; vnicProfileNotUsedByVmsTest ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.failsWithVnicProfileInUse ( ) , java.util.Collections.singletonList ( vm ) ) ; }
Source:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }

Target:
public void getAllRelevantQuotasForStorageSorted ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid storageId , org.ovirt.engine.core.compat.Guid topQuotaId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.QuotaConverter ( topQuotaId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRelevantQuotasForStorage , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageId ) , asyncQuery ) ; }
Source:
public void testGetForDisk ( ) { java.util.Map < java.lang.Boolean , java.util.List < org.ovirt.engine.core.common.businessentities.VM > > result = dao.getForDisk ( FixturesTool.IMAGE_GROUP_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( "wrong number of VMs with unplugged image" , 1 , result.get ( java.lang.Boolean.TRUE ) . size ( ) ) ; }

Target:
public void testGetForDisk ( ) { java.util.Map < java.lang.Boolean , java.util.List < org.ovirt.engine.core.common.businessentities.VM > > result = dao.getForDisk ( FixturesTool.IMAGE_GROUP_ID , true ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , result.get ( java.lang.Boolean.TRUE ) . size ( ) , "wrong number of VMs with unplugged image" ) ; }
Source:
protected boolean validateSoundDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isSoundDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isSoundDeviceEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failCanDoAction ( EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }

Target:
protected boolean validateSoundDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isSoundDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isSoundDeviceEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , getEffectiveCompatibilityVersion ( ) ) ) ) { addCanDoActionMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failCanDoAction ( EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }
Source:
public void testEquals ( ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p1 = new org.ovirt.engine.core.common.utils.Pair ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p2 = new org.ovirt.engine.core.common.utils.Pair ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p3 = new org.ovirt.engine.core.common.utils.Pair ( false , "abc" ) ; org.junit.Assert.assertTrue ( p1.equals ( p2 ) ) ; org.junit.Assert.assertFalse ( p1.equals ( p3 ) ) ; }

Target:
public void testEquals ( ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p1 = new org.ovirt.engine.core.common.utils.Pair ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p2 = new org.ovirt.engine.core.common.utils.Pair ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p3 = new org.ovirt.engine.core.common.utils.Pair ( false , "abc" ) ; org.junit.Assert.assertEquals ( p1 , p2 ) ; org.junit.Assert.assertNotEquals ( p1 , p3 ) ; }
Source:
private void cancel ( ) { setWindow ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . unsubscribe ( ) ; }

Target:
private void cancelImportConfirm ( ) { cancelConfirm ( ) ; getWindow ( ) . stopProgress ( ) ; if ( ( fileConnection ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.DisconnectStorageServerConnection , new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( fileConnection , hostId ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; cleanConnection ( storageListModel.fileConnection , storageListModel.hostId ) ; storageListModel.fileConnection = null ; } } , this ) ; } }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void ExecuteVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.LockVm ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDynamicData ( ) , org.ovirt.engine.core.bll.RemoveVmCommand.getCompensationContext ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( removeVm ( ) ) ; }

Target:
protected void executeVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.LockVm ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDynamicData ( ) , org.ovirt.engine.core.bll.RemoveVmCommand.getCompensationContext ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( removeVm ( ) ) ; }