auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addDisk ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalActionWithTasksContext ( VdcActionType.AddDisk , buildAddDiskParameters ( disk ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , java.lang.String.format ( "Failed to create disk! %s" , disk.getDiskAlias ( ) ) ) ; } org.ovirt.engine.core.bll.HibernateVmCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; }

Target:
private void addDisk ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalActionWithTasksContext ( ActionType.AddDisk , buildAddDiskParameters ( disk ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , java.lang.String.format ( "Failed to create disk! %s" , disk.getDiskAlias ( ) ) ) ; } org.ovirt.engine.core.bll.HibernateVmCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; }
Source:
public void setRepoImages ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > repoImages ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > entities = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage i : repoImages ) { entities.add ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( i ) ) ; } setEntities ( entities ) ; }

Target:
public void setRepoImages ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > repoImages ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > entities = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage i : repoImages ) { entities.add ( new org.ovirt.engine.ui.uicommonweb.models.storage.RepoImageModel ( i ) ) ; } setEntities ( entities ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VM createVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic dynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.common.businessentities.VmStatic stat = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; stat.setVmtGuid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; stat.setName ( "testVm" ) ; stat.setPriority ( 1 ) ; vm.setStaticData ( stat ) ; vm.setDynamicData ( dynamic ) ; return vm ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VM createVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic dynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.common.businessentities.VmStatic stat = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; stat.setVmtGuid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; stat.setName ( "testVm" ) ; stat.setPriority ( 1 ) ; vm.setStaticData ( stat ) ; vm.setDynamicData ( dynamic ) ; vm.setSingleQxlPci ( false ) ; return vm ; }
Source:
public static void GetNetworkList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void GetClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getBroker ( ) . convertOva ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getOvaPath ( ) , createVmProperties ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ? org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getVmId ( ) : null ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getBroker ( ) . convertVmFromOva ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getOvaPath ( ) , createVmProperties ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ? org.ovirt.engine.core.vdsbroker.vdsbroker.ConvertOvaVDSCommand.getParameters ( ) . getVmId ( ) : null ) ) ; }
Source:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassValidate ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.ArgumentMatchers.any ( ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "validate should have failed with invalid dedicated host." , command.validate ( ) ) ; }

Target:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassValidate ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.ArgumentMatchers.any ( ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( command.validate ( ) , "validate should have failed with invalid dedicated host." ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; dataCenterGuideModel.localStorageHost = localStorageHost ; } else { noLocalStorageHost = true ; } dataCenterGuideModel.UpdateOptionsLocalFS ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; dataCenterGuideModel.localStorageHost = localStorageHost ; } else { noLocalStorageHost = true ; } dataCenterGuideModel.updateOptionsLocalFS ( ) ; }
Source:
public void load ( java.lang.String xsd ) throws java.io.IOException { org.w3c.dom.Document schema ; try { javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance ( ) ; factory.setNamespaceAware ( true ) ; javax.xml.parsers.DocumentBuilder parser = factory.newDocumentBuilder ( ) ; schema = parser.parse ( new java.io.File ( xsd ) ) ; } catch ( java.lang.Exception exception ) { throw new java.io.IOException ( "Can't parse XML schema." , exception ) ; } xpath = javax.xml.xpath.XPathFactory.newInstance ( ) . newXPath ( ) ; xpath.setNamespaceContext ( new javax.xml.namespace.NamespaceContext ( ) { @ java.lang.Override public java.lang.String getNamespaceURI ( java.lang.String prefix ) { switch ( prefix ) { case "xs" : return "http://www.w3.org/2001/XMLSchema" ; default : return javax.xml.XMLConstants.NULL_NS_URI ; } } @ java.lang.Override public java.lang.String getPrefix ( java.lang.String namespaceURI ) { throw new java.lang.UnsupportedOperationException ( ) ; } @ java.lang.Override public java.util.Iterator getPrefixes ( java.lang.String namespaceURI ) { throw new java.lang.UnsupportedOperationException ( ) ; } } ) ; populateElementsIndex ( schema ) ; populateComplexTypesIndex ( schema ) ; }

Target:
public void load ( java.io.File file ) throws java.io.IOException { this . file = file ; org.w3c.dom.Document schema ; try { javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance ( ) ; factory.setNamespaceAware ( true ) ; javax.xml.parsers.DocumentBuilder parser = factory.newDocumentBuilder ( ) ; schema = parser.parse ( file ) ; } catch ( java.lang.Exception exception ) { throw new java.io.IOException ( "Can't parse XML schema." , exception ) ; } xpath = javax.xml.xpath.XPathFactory.newInstance ( ) . newXPath ( ) ; xpath.setNamespaceContext ( new javax.xml.namespace.NamespaceContext ( ) { @ java.lang.Override public java.lang.String getNamespaceURI ( java.lang.String prefix ) { switch ( prefix ) { case "xs" : return "http://www.w3.org/2001/XMLSchema" ; default : return javax.xml.XMLConstants.NULL_NS_URI ; } } @ java.lang.Override public java.lang.String getPrefix ( java.lang.String namespaceURI ) { throw new java.lang.UnsupportedOperationException ( ) ; } @ java.lang.Override public java.util.Iterator getPrefixes ( java.lang.String namespaceURI ) { throw new java.lang.UnsupportedOperationException ( ) ; } } ) ; populateElementsIndex ( schema ) ; populateComplexTypesIndex ( schema ) ; }
Source:
private void initSorting ( ) { vmStatusColumn.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; nicActivateStatusColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; rxColumn.makeSortable ( ) ; txColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }

Target:
private void initSorting ( ) { vmStatusColumn.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; nicActivateStatusColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; rxColumn.makeSortable ( ) ; txColumn.makeSortable ( ) ; totalRxColumn.makeSortable ( ) ; totalTxColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }
Source:
private org.ovirt.engine.api.extensions.Extension loadExtension ( java.util.Properties props ) throws java.lang.Exception { org.ovirt.engine.api.extensions.Extension extension ; org.ovirt.engine.core.extensions.mgr.ExtensionsManager.BindingsLoader loader = bindingsLoaders.get ( props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ; if ( loader == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Invalid binding method '%1$s'." , props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ) ; } return loader.load ( props ) ; }

Target:
private org.ovirt.engine.core.extensions.mgr.ExtensionProxy loadExtension ( java.util.Properties props ) throws java.lang.Exception { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.BindingsLoader loader = org.ovirt.engine.core.extensions.mgr.ExtensionsManager.bindingsLoaders.get ( props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ; if ( loader == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Invalid binding method '%1$s'." , props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ) ; } return loader.load ( props ) ; }
Source:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }

Target:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }
Source:
private org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( ) { try { javax.naming.InitialContext ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.CommandBase.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { log.error ( ( "Getting backend command objects handler failed" + ( e.getMessage ( ) ) ) ) ; log.debug ( "" , e ) ; return null ; } }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase executeChildCommand ( org.ovirt.engine.core.compat.Guid idInCommandsMap ) { org.ovirt.engine.core.bll.CommandBase < ? > command = childCommandsMap.get ( idInCommandsMap ) ; return org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( log ) . runAction ( command , getExecutionContext ( ) ) ; }
Source:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , "net" ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_NOT_EXISTS_IN_CURRENT_CLUSTER ) ; }

Target:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , "net" ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER ) ; }
Source:
public void getStorageDomainMaxNameLength ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getNetworkList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void testDnsResolverConfiguration ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration vdsDnsResolver , org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration networkDnsResolver , org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration attachmentDnsResolver , boolean expectedInSync ) { iface.setIpv4DefaultRoute ( true ) ; iface.setIpv4BootProtocol ( Ipv4BootProtocol.DHCP ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setBootProtocol ( Ipv4BootProtocol.DHCP ) ; testedNetworkAttachment.getIpConfiguration ( ) . setIPv4Addresses ( java.util.Collections.singletonList ( address ) ) ; network.setDnsResolverConfiguration ( networkDnsResolver ) ; testedNetworkAttachment.setDnsResolverConfiguration ( attachmentDnsResolver ) ; org.junit.Assert.assertThat ( createTestedInstance ( true , vdsDnsResolver ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( expectedInSync ) ) ; }

Target:
private void testDnsResolverConfiguration ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration vdsDnsResolver , org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration networkDnsResolver , org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration attachmentDnsResolver , boolean expectedInSync ) { iface.setIpv4DefaultRoute ( true ) ; iface.setIpv4BootProtocol ( Ipv4BootProtocol.DHCP ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setBootProtocol ( Ipv4BootProtocol.DHCP ) ; testedNetworkAttachment.getIpConfiguration ( ) . setIPv4Addresses ( java.util.Collections.singletonList ( address ) ) ; network.setDnsResolverConfiguration ( networkDnsResolver ) ; testedNetworkAttachment.setDnsResolverConfiguration ( attachmentDnsResolver ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( true , vdsDnsResolver ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( expectedInSync ) ) ; }
Source:
private boolean networkNameAndNetworkIdIsIncoherent ( org.ovirt.engine.core.compat.Guid nicId , java.lang.String nicName ) { org.ovirt.engine.core.common.businessentities.network.Network networkById = networkBusinessEntityMap.get ( nicId ) ; org.ovirt.engine.core.common.businessentities.network.Network networkByName = networkBusinessEntityMap.get ( nicName ) ; return ! ( java.util.Objects.equals ( networkById , networkByName ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; org.ovirt.engine.core.compat.Guid violatingEntityId = attachment.getId ( ) ; return validateCoherentIdentification ( violatingEntityId , networkId , networkName , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , networkBusinessEntityMap ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { org.ovirt.engine.core.common.businessentities.AuditLog event = auditLogDao.get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; if ( AuditLogSeverity.ALERT.equals ( event.getSeverity ( ) ) ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.compat.Guid.SYSTEM , org.ovirt.engine.core.common.VdcObjectType.System , org.ovirt.engine.core.common.businessentities.ActionGroup.AUDIT_LOG_MANAGEMENT ) ) ; } return getPermissionList ( event ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.AuditLog getAuditLog ( ) { if ( ( auditLog ) == null ) { auditLog = auditLogDao.get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; } return auditLog ; }
Source:
public void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getUserProfile ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUserProfile , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static 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 ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public static VdsNetworkInterface.NetworkImplementationDetails calculateNetworkImplementationDetails ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.NetworkQoS qos , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getNetworkName ( ) ) ) { return null ; } if ( network != null ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isNetworkInSync ( iface , network , qos ) ) { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( true , true ) ; } else { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( false , true ) ; } } else { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( ) ; } }

Target:
public static VdsNetworkInterface.NetworkImplementationDetails calculateNetworkImplementationDetails ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getNetworkName ( ) ) ) { return null ; } if ( network != null ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isNetworkInSync ( iface , network , qos ) ) { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( true , true ) ; } else { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( false , true ) ; } } else { return new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails ( ) ; } }
Source:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
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.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Quota entity = getEntity ( org.ovirt.engine.core.common.businessentities.Quota.class , VdcQueryType.GetQuotaByQuotaId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( parentId ) , parentId.toString ( ) ) ; updateEntityForRemove ( entity , asGuid ( id ) ) ; return performAction ( ActionType.UpdateQuota , new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( entity ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Quota entity = getEntity ( org.ovirt.engine.core.common.businessentities.Quota.class , QueryType.GetQuotaByQuotaId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( parentId ) , parentId.toString ( ) ) ; updateEntityForRemove ( entity , asGuid ( id ) ) ; return performAction ( ActionType.UpdateQuota , new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( entity ) ) ; }
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" , "<strong>Host</strong>" ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "DC" , "<strong>DC</strong>" ) ; final java.lang.String output = ( "<p>" + outOfSyncPreviewSentence ) + "</p>" ; return output ; }

Target:
private void insertHorizontalLine ( ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.horizontalLine ( ) ) ; }
Source:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( ) ; }

Target:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateDiskProfiles ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DISK_LIVE_STORAGE_MIGRATION ) ) ; } } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DISK_LIVE_STORAGE_MIGRATION ) ) ; } } return permissionList ; }
Source:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void diskSnapshotsCannotBePreviewed ( ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( activeSnapshot ) ; org.mockito.Mockito.when ( diskImageDao.get ( disk1.getImageId ( ) ) ) . thenReturn ( disk1 ) ; org.mockito.Mockito.when ( diskImageDao.get ( disk2.getImageId ( ) ) ) . thenReturn ( disk2 ) ; org.junit.Assert.assertThat ( validator.canDiskSnapshotsBePreviewed ( activeSnapshot.getId ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.CANNOT_PREVIEW_ACTIVE_SNAPSHOT ) ) ; }

Target:
public void diskSnapshotsCannotBePreviewed ( ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( activeSnapshot ) ; org.mockito.Mockito.when ( diskImageDao.get ( disk1.getImageId ( ) ) ) . thenReturn ( disk1 ) ; org.mockito.Mockito.when ( diskImageDao.get ( disk2.getImageId ( ) ) ) . thenReturn ( disk2 ) ; org.junit.Assert.assertThat ( validator.canDiskSnapshotsBePreviewed ( activeSnapshot.getId ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_PREVIEW_ACTIVE_SNAPSHOT ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsStatisticsDao ( ) ) ; staticDao = prepareDAO ( dbFacade.getVdsStaticDao ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getVdsDynamicDao ( ) ) ; existingVds = staticDao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.sethost_name ( "farkle.redhat.com" ) ; newStaticVds.setvds_group_id ( existingVds.getvds_group_id ( ) ) ; newStatistics = new org.ovirt.engine.core.common.businessentities.VdsStatistics ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVdsStatisticsDao ( ) ; staticDao = dbFacade.getVdsStaticDao ( ) ; dynamicDao = dbFacade.getVdsDynamicDao ( ) ; existingVds = staticDao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.setHostName ( "farkle.redhat.com" ) ; newStaticVds.setVdsGroupId ( existingVds.getVdsGroupId ( ) ) ; newStatistics = new org.ovirt.engine.core.common.businessentities.VdsStatistics ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel = null ; } } ) ; }

Target:
public static void init ( final com.google.gwt.event.shared.EventBus eventBus ) { org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel = org.ovirt.engine.ui.uicommonweb.models.CommonModel.newInstance ( ) ; org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.common.uicommon.model.MainModelSelectionChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.getSelectedItem ( ) ) ; } } ) ; }
Source:
public void getClusterDesktopMemoryOverCommit ( 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.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getNetworkList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private boolean templateExists ( ) { if ( ( ( getVmTemplate ( ) ) == null ) && ( ! ( getParameters ( ) . getCopyCollapse ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , getVdsGroup ( ) , getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
protected org.ovirt.engine.core.dao.StorageServerConnectionLunMapDao setUpStorageServerConnectionLunMapDao ( ) { storageServerConnectionLunMapDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDao.class ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getStorageServerConnectionLunMapDao ( ) ) . thenReturn ( storageServerConnectionLunMapDao ) ; return storageServerConnectionLunMapDao ; }

Target:
protected void expectGetLunsMap ( java.lang.String lunId , java.lang.String cnxId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap map = new org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap ( ) ; map.setLunId ( lunId ) ; map.setstorage_server_connection ( cnxId ) ; ret.add ( map ) ; org.mockito.Mockito.when ( storageServerConnectionLunMapDao.getAll ( lunId ) ) . thenReturn ( ret ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase EndAction ( ) { org.ovirt.engine.core.bll.job.ExecutionHandler.startFinalizingStep ( getExecutionContext ( ) ) ; try { SetActionState ( ) ; handleTransactivity ( ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( endActionScope , this ) ; } catch ( javax.ejb.TransactionRolledbackLocalException e ) { log.infoFormat ( "EndAction: Transaction was aborted in {0}" , this . getClass ( ) . getName ( ) ) ; } finally { if ( getCommandShouldBeLogged ( ) ) { LogCommand ( ) ; } } return getReturnValue ( ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase endAction ( ) { org.ovirt.engine.core.bll.job.ExecutionHandler.startFinalizingStep ( getExecutionContext ( ) ) ; try { setActionState ( ) ; handleTransactivity ( ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( endActionScope , this ) ; } catch ( javax.ejb.TransactionRolledbackLocalException e ) { log.infoFormat ( "EndAction: Transaction was aborted in {0}" , this . getClass ( ) . getName ( ) ) ; } finally { if ( getCommandShouldBeLogged ( ) ) { logCommand ( ) ; } } return getReturnValue ( ) ; }
Source:
public static void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( 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 < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void initGeneralForm ( ) { org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel , org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel > modelProvider = new org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel , org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel > ( ) { @ java.lang.Override public org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel getModel ( ) { return getTemplateGeneralModel ( ) ; } @ java.lang.Override public void onSubTabSelected ( ) { } @ java.lang.Override public void onSubTabDeselected ( ) { } } ; generalView = new org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportTemplateGeneralSubTabView ( modelProvider ) ; }

Target:
public void activateDetailModel ( ) { }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessage ( java.lang.String.format ( "$clusterName %1$s" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessageVariable ( "clusterName" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.StopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.search ( ) ; } } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.stopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.search ( ) ; } } }