auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.util.Set < java.lang.String > extractServers ( java.lang.String serversXml ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( serversXml ) ) { throw new java.lang.RuntimeException ( "Could not get the peer list!" ) ; } try { return getServers ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.utils.gluster.GlusterUtil.PEER ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while parsing peer list xml [{0}]!" , serversXml , e ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected java.util.Set < java.lang.String > extractServers ( java.lang.String serversXml ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( serversXml ) ) { throw new java.lang.RuntimeException ( "Could not get the peer list!" ) ; } try { return getServers ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.bll.utils.GlusterUtil.PEER ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while parsing peer list xml [{0}]!" , serversXml , e ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void qosBondSpeedMissing ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosBondSpeedSetup ( null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; validateAndExpectNoViolations ( helper ) ; }

Target:
private void mockCalculateBaseNicWhenVlanNicIsPassed ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlanNic ) { org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) ) ) . thenReturn ( baseNic ) ; org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) , org.mockito.Matchers.any ( java.util.Map.class ) ) ) . thenReturn ( baseNic ) ; }
Source:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getRoleList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void testRemoveNonExistant ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 0 , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 0 , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VmTemplate get ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( "GetVmTemplateByVmtGuid" , org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.VMTemplateRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vmt_guid" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmTemplate get ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( "GetVmTemplateByVmtGuid" , org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.VMTemplateRowMapper.instance , createIdParameterMapper ( id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( 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 new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( 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 new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionResume ( volumeName , slaveHostName , slaveVolumeName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionResume ( volumeName , slaveHostName , slaveVolumeName , userName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void failWhenPowerManagementDisabled ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; java.util.List < java.lang.String > messages = new java.util.LinkedList < > ( ) ; boolean result = validator.isPowerManagementEnabledAndLegal ( vds , null , messages ) ; org.junit.Assert.assertFalse ( result ) ; org.junit.Assert.assertEquals ( 1 , messages.size ( ) ) ; org.junit.Assert.assertEquals ( "VDS_FENCE_DISABLED" , messages.get ( 0 ) ) ; }

Target:
public void failWhenPowerManagementDisabled ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; java.util.List < java.lang.String > messages = new java.util.LinkedList < > ( ) ; boolean result = validator.isPowerManagementEnabledAndLegal ( vds , null , messages ) ; org.junit.jupiter.api.Assertions.assertFalse ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , messages.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "VDS_FENCE_DISABLED" , messages.get ( 0 ) ) ; }
Source:
private java.lang.String generatePreviewSentence ( ) { java.lang.String outOfSyncPreviewSentence = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "Host" , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongText ( "Host" ) . asString ( ) ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "DC" , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongText ( "DC" ) . asString ( ) ) ; return outOfSyncPreviewSentence ; }

Target:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }
Source:
private void endChildCommand ( boolean succeeded ) { if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.common.action.VdcActionParametersBase childParams = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ; childParams.setTaskGroupSuccess ( succeeded ) ; org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getBackend ( ) . endAction ( childParams.getCommandType ( ) , childParams , org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
private void endChildCommand ( boolean succeeded ) { if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.common.action.ActionParametersBase childParams = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ; childParams.setTaskGroupSuccess ( succeeded ) ; org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getBackend ( ) . endAction ( childParams.getCommandType ( ) , childParams , org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
private void setUpGetEntityExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , new org.ovirt.engine.api.model.VM ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM setUpStatisticalExpectations ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = new org.ovirt.engine.api.restapi.resource.VM ( ) ; org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.setUpStatisticalEntityExpectations ( entity , entity.getStatisticsData ( ) ) ; setUpGetEntityExpectations ( 1 , false , entity ) ; control.replay ( ) ; return entity ; }
Source:
org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentNotRemoved ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.core.compat.Guid networkAttachmentId = networkAttachment.getId ( ) ; if ( isNewAttachment ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } boolean attachmentInRemoveList = params.getRemovedNetworkAttachments ( ) . contains ( networkAttachmentId ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ATTACHMENT_IN_BOTH_LISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "NETWORK_ATTACHMENT_IN_BOTH_LISTS_ENTITY" , networkAttachmentId.toString ( ) ) ) . when ( attachmentInRemoveList ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult referencedNetworkAttachmentActuallyExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS ; java.lang.String id = networkAttachmentId.toString ( ) ; java.lang.String replacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , id ) ; return new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , replacement ) ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected void init ( org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > listModel ) { this . listModel = listModel ; super . init ( listModel ) ; header.setText ( org.ovirt.engine.ui.webadmin.widget.host.HostProxySourceEditor.constants.hostPopupSourceText ( ) ) ; updateButtonState ( ) ; }

Target:
protected void init ( org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel > listModel ) { this . listModel = listModel ; super . init ( listModel ) ; header.setText ( org.ovirt.engine.ui.webadmin.widget.host.HostProxySourceEditor.constants.hostPopupSourceText ( ) ) ; newProxyLabel.setText ( org.ovirt.engine.ui.webadmin.widget.host.HostProxySourceEditor.constants.hostPopupAddProxyPreferenceType ( ) ) ; setEnabled ( listModel.getIsChangable ( ) ) ; updateButtonState ( ) ; }
Source:
public void testNoStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ) ; assertTrue ( "Size" , ( ( error.size ( ) ) == 1 ) ) ; assertEquals ( "String should equal" , "VM not found" , error.get ( 0 ) ) ; }

Target:
public void testNoStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ) ; org.junit.Assert.assertTrue ( "Size" , ( ( error.size ( ) ) == 1 ) ) ; org.junit.Assert.assertEquals ( "String should equal" , "VM not found" , error.get ( 0 ) ) ; }
Source:
protected org.ovirt.engine.api.resteasy.json.CustomObjectMapper addSerializationConfig ( ) { org.codehaus.jackson.xc.JaxbAnnotationIntrospector introspector = new org.codehaus.jackson.xc.JaxbAnnotationIntrospector ( ) ; org.codehaus.jackson.map.SerializationConfig serCfg = getSerializationConfig ( ) . withAnnotationIntrospector ( introspector ) ; setSerializationConfig ( serCfg ) ; org.codehaus.jackson.map.DeserializationConfig deserCfg = getDeserializationConfig ( ) . withAnnotationIntrospector ( introspector ) ; setDeserializationConfig ( deserCfg ) ; return this ; }

Target:
protected org.ovirt.engine.api.json.CustomObjectMapper addSerializationConfig ( ) { org.codehaus.jackson.xc.JaxbAnnotationIntrospector introspector = new org.codehaus.jackson.xc.JaxbAnnotationIntrospector ( ) ; org.codehaus.jackson.map.SerializationConfig serCfg = getSerializationConfig ( ) . withAnnotationIntrospector ( introspector ) ; setSerializationConfig ( serCfg ) ; org.codehaus.jackson.map.DeserializationConfig deserCfg = getDeserializationConfig ( ) . withAnnotationIntrospector ( introspector ) ; setDeserializationConfig ( deserCfg ) ; return this ; }
Source:
protected static org.ovirt.engine.core.compat.Guid getNonPrestartedVmToAttach ( org.ovirt.engine.core.compat.NGuid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.vm_pool_map > vmPoolMaps = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Down ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.vm_pool_map map : vmPoolMaps ) { if ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachNonPrestartedVmToUser ( map.getvm_guid ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
protected static org.ovirt.engine.core.compat.Guid getNonPrestartedVmToAttach ( org.ovirt.engine.core.compat.NGuid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Down ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachNonPrestartedVmToUser ( map.getvm_guid ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
protected void itemsChanged ( java.lang.Object selectedItem ) { if ( selectedItem == null ) { itemsChanged ( ) ; } else { java.util.List selectedItems = new java.util.ArrayList ( ) ; selectedItems.add ( selectedItem ) ; setSelectedItem ( selectedItem ) ; setSelectedItems ( selectedItems ) ; } }
Source:
public java.lang.String getIsoPrefix ( ) { synchronized ( syncObj ) { if ( ( ( mIsoPrefix ) == null ) || ( ( mIsoPrefix.length ( ) ) == 0 ) ) { try { org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfoReturnForXmlRpc returnValue = getIrsProxy ( ) . getStoragePoolInfo ( _storagePoolId.toString ( ) ) ; if ( returnValue.mStoragePoolInfo.containsKey ( IrsProperties.isoPrefix ) ) { mIsoPrefix = returnValue.mStoragePoolInfo.get ( IrsProperties.isoPrefix ) . toString ( ) ; } } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.errorFormat ( "IrsBroker::IsoPrefix Failed to get IRS statistics." ) ; } } return mIsoPrefix ; } }

Target:
public java.lang.String getIsoPrefix ( ) { synchronized ( syncObj ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( mIsoPrefix ) ) { try { org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfoReturnForXmlRpc returnValue = getIrsProxy ( ) . getStoragePoolInfo ( _storagePoolId.toString ( ) ) ; if ( returnValue.mStoragePoolInfo.containsKey ( IrsProperties.isoPrefix ) ) { mIsoPrefix = returnValue.mStoragePoolInfo.get ( IrsProperties.isoPrefix ) . toString ( ) ; } } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.errorFormat ( "IrsBroker::IsoPrefix Failed to get IRS statistics." ) ; } } return mIsoPrefix ; } }
Source:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getCurrentUser ( ) ) ) ; }

Target:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.storage.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getCurrentUser ( ) ) ) ; }
Source:
private org.ovirt.engine.core.searchbackend.PagingType getPagingType ( ) { java.lang.String val = org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DBPagingType ) ; org.ovirt.engine.core.searchbackend.PagingType type = null ; try { type = org.ovirt.engine.core.searchbackend.PagingType.valueOf ( val ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.searchbackend.SyntaxChecker.log.error ( ( "Unknown paging type " + val ) ) ; } return type ; }

Target:
private org.ovirt.engine.core.searchbackend.PagingType getPagingType ( ) { java.lang.String val = org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DBPagingType ) ; org.ovirt.engine.core.searchbackend.PagingType type = null ; try { type = org.ovirt.engine.core.searchbackend.PagingType.valueOf ( val ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.searchbackend.SyntaxChecker.log.error ( "Unknown paging type '{}'" , val ) ; } return type ; }
Source:
public void getRoleList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( 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.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void updateStorageDomains ( final org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getStorageDomainById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( returnValue ) ) ; diskModel.getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; } } ) , getStorageDomainId ( ) ) ; }

Target:
protected void updateStorageDomains ( final org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getStorageDomainById ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; } } ) , getStorageDomainId ( ) ) ; }
Source:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmInUpPausedDownStatus ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmNotInPreviewSnapshot ( ) ) ) && ( imageStorageValidation ( ) ) ; }

Target:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmInUpPausedDownStatus ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.canRunActionOnNonManagedVm ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmNotInPreviewSnapshot ( ) ) ) && ( imageStorageValidation ( ) ) ; }
Source:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; return org.ovirt.engine.core.common.utils.RpmVersionUtils.isUpdateAvailable ( isos , host.getHostOs ( ) ) ; }

Target:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = backendInternal.runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; boolean updateAvailable = org.ovirt.engine.core.common.utils.RpmVersionUtils.isUpdateAvailable ( isos , host.getHostOs ( ) ) ; if ( updateAvailable ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLog = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLog.setVds ( host ) ; auditLogDirector.log ( auditLog , AuditLogType.OVIRT_NODE_UPDATES_ARE_AVAILABLE ) ; } return updateAvailable ; }
Source:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }
Source:
private void handleCommunicationException ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandlingResponse response , java.lang.Throwable cause ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandler.log.error ( ( "Error in communicating with LDAP server " + ( cause.getMessage ( ) ) ) ) ; response.setOrderingAlgorithm ( OrderingAlgorithmType.PUT_LAST ) . setTryNextServer ( true ) . setTranslatedException ( ( ( java.lang.Exception ) ( cause ) ) ) ; }

Target:
private void handleCommunicationException ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandlingResponse response , java.lang.Throwable cause ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandler.log.error ( "Error in communicating with LDAP server: {}" , cause.getMessage ( ) ) ; response.setOrderingAlgorithm ( OrderingAlgorithmType.PUT_LAST ) . setTryNextServer ( true ) . setTranslatedException ( ( ( java.lang.Exception ) ( cause ) ) ) ; }
Source:
public void getAAAProfilesEntriesList ( 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.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getRoleList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s(%s)" , super . toString ( ) , ( ( getParameters ( ) ) != null ? getParameters ( ) . toString ( ) : "null" ) ) ; }

Target:
public java.lang.String toString ( ) { java.lang.String AddInfo = getAdditionalInformation ( ) ; return java.lang.String.format ( "%s(%s %s)" , super . toString ( ) , ( ! ( AddInfo.isEmpty ( ) ) ? AddInfo + "," : "" ) , ( ( getParameters ( ) ) != null ? getParameters ( ) . toString ( ) : "null" ) ) ; }
Source:
public static java.lang.String getTimezoneIndexByKey ( java.lang.String key ) { for ( java.lang.String s : org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.timeZoneIndex.keySet ( ) ) { if ( org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.getTimezoneKey ( s ) . equals ( key ) ) { return org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.timeZoneIndex.get ( s ) . toString ( ) ; } } org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.log.errorFormat ( "getTimezoneIndexByKey: cannot find timezone key '{0}'" , key ) ; return key ; }

Target:
public static java.lang.String getTimezoneIndexByKey ( java.lang.String key ) { for ( java.util.Map.Entry < java.lang.String , java.lang.Integer > timeZoneEntry : org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.timeZoneIndex.entrySet ( ) ) { if ( org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.getTimezoneKey ( timeZoneEntry.getKey ( ) ) . equals ( key ) ) { return timeZoneEntry.getValue ( ) . toString ( ) ; } } org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.log.errorFormat ( "getTimezoneIndexByKey: cannot find timezone key '{0}'" , key ) ; return key ; }
Source:
public void calculateFreeVirtualMemory ( ) { if ( ( ( ( getmem_commited ( ) ) != null ) && ( ( getphysical_mem_mb ( ) ) != null ) ) && ( ( getreserved_mem ( ) ) != null ) ) { maxSchedulingMemory = ( ( ( getmax_vds_memory_over_commit ( ) ) * ( getphysical_mem_mb ( ) ) ) / 100.0F ) - ( ( getmem_commited ( ) ) + ( getreserved_mem ( ) ) ) ; maxSchedulingMemory = ( ( maxSchedulingMemory ) > 0 ) ? maxSchedulingMemory : 0 ; } }

Target:
public void setVdsSpmId ( java.lang.Integer value ) { vdsSpmId = value ; }
Source:
private void vmNetworkSetupTest ( org.ovirt.engine.core.bll.ValidationResult expected , boolean vmNetwork , boolean featureSupported ) { mockConfigRule.mockConfigValue ( ConfigValues.NonVmNetworkSupported , dataCenter.getcompatibility_version ( ) , featureSupported ) ; org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.junit.Assert.assertEquals ( expected , validator.vmNetworkSetCorrectly ( ) ) ; }

Target:
private void vmNetworkSetupTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , boolean vmNetwork , boolean featureSupported ) { mockConfigRule.mockConfigValue ( ConfigValues.NonVmNetworkSupported , dataCenter.getcompatibility_version ( ) , featureSupported ) ; org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.junit.Assert.assertThat ( validator.vmNetworkSetCorrectly ( ) , matcher ) ; }
Source:
private void removeMemoryFromActiveSnapshot ( ) { java.lang.String memory = org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( memory ) ) { return ; } org.ovirt.engine.core.bll.RunVmCommand.getSnapshotDAO ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; if ( ( org.ovirt.engine.core.bll.RunVmCommand.getSnapshotDAO ( ) . getNumOfSnapshotsByMemory ( memory ) ) == 0 ) { removeMemoryVolumes ( memory , org.ovirt.engine.core.bll.RunVmCommand.getActionType ( ) , true ) ; } }

Target:
public void onPowerringUp ( ) { decreasePendingVm ( org.ovirt.engine.core.bll.RunVmCommand.getVmStaticDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getStorageDomainId ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage_domains.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { if ( storageDomain.getstorage_name ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }

Target:
private org.ovirt.engine.core.compat.Guid getStorageDomainId ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getStorageName ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }
Source:
public void getGlusterHooks ( 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 ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterHooks ( 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 ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { setClusterPolicyModel ( object.getClusterPolicyModel ( ) ) ; if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.PowerSave ) ) { policyRadioButton_powerSave.setValue ( true ) ; } else if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.EvenlyDistribute ) ) { policyRadioButton_evenDist.setValue ( true ) ; } else { policyRadioButton_none.setValue ( true ) ; } setSelectionAlgorithm ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.PowerSave ) ) { policyRadioButton_powerSave.setValue ( true ) ; } else if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.EvenlyDistribute ) ) { policyRadioButton_evenDist.setValue ( true ) ; } else { policyRadioButton_none.setValue ( true ) ; } setSelectionAlgorithm ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmPool pool = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( returnValue ) ) ; boolean isManualPool = ( pool.getVmPoolType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.UpdateCommandsAccordingToPoolType ( isManualPool ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmPool pool = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( returnValue ) ) ; boolean isManualPool = ( pool.getVmPoolType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.updateCommandsAccordingToPoolType ( isManualPool ) ; }
Source:
private boolean networkAttachedToVds ( java.lang.String networkName , org.ovirt.engine.core.compat.Guid vdsId ) { if ( networkName != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > listOfInterfaces = getInterfaceDAO ( ) . getAllInterfacesForVds ( vdsId ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface vdsNetworkInterface : listOfInterfaces ) { if ( networkName.equals ( vdsNetworkInterface.getNetworkName ( ) ) ) { return true ; } } } return false ; }

Target:
private boolean networkAttachedToVds ( java.lang.String networkName , org.ovirt.engine.core.compat.Guid vdsId ) { if ( networkName != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > listOfInterfaces = getInterfaceDao ( ) . getAllInterfacesForVds ( vdsId ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface vdsNetworkInterface : listOfInterfaces ) { if ( networkName.equals ( vdsNetworkInterface.getNetworkName ( ) ) ) { return true ; } } } return false ; }
Source:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList ) { java.util.List < org.ovirt.engine.core.compat.Guid > vmIds = getAffinityGroup ( ) . getVmIds ( ) ; getVmsSelectionModel ( ) . init ( vmList , ( vmIds != null ? vmIds : new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ) ; stopProgress ( ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList ) { java.util.List < org.ovirt.engine.core.compat.Guid > vmIds = getAffinityGroup ( ) . getVmIds ( ) ; getVmsSelectionModel ( ) . init ( vmList , ( vmIds != null ? vmIds : new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ) ; stopProgressOnVmsAndHostsInit ( ) ; }
Source:
protected void moveOrCopyAllImageGroups ( ) { moveOrCopyAllImageGroups ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , false , false , true ) ) ; copyAllMemoryImages ( getVm ( ) . getId ( ) ) ; }

Target:
protected void moveOrCopyAllImageGroups ( ) { moveOrCopyAllImageGroups ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , false , false , true ) ) ; copyAllMemoryImages ( getVm ( ) . getId ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ) ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }
Source:
private boolean performVmRelatedChecks ( ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = createVmValidator ( ) ; return ( validate ( vmValidator.vmNotRunningStateless ( ) ) ) && ( isVmNotInPreview ( ) ) ; }

Target:
private boolean performVmRelatedChecks ( ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = createVmValidator ( ) ; org.ovirt.engine.core.bll.snapshots.SnapshotsValidator snapshotValidator = createSnapshotsValidator ( ) ; return ( ( validate ( vmValidator.vmNotRunningStateless ( ) ) ) && ( validate ( snapshotValidator.vmNotDuringSnapshot ( org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) ) ) ) && ( isVmNotInPreview ( ) ) ; }