auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void isValidVmNetworkForNullNetwork ( ) { org.ovirt.engine.core.common.businessentities.Network network = createNewNetwork ( true , NETWORK_NAME ) ; org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface = createNewInterface ( ) ; org.junit.Assert.assertTrue ( vmInterfaceManager.isValidVmNetwork ( iface , java.util.Collections.singletonMap ( network.getName ( ) , network ) ) ) ; }

Target:
public void isValidVmNetworkForNullNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNewNetwork ( true , NETWORK_NAME ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = createNewInterface ( ) ; org.junit.Assert.assertTrue ( vmInterfaceManager.isValidVmNetwork ( iface , java.util.Collections.singletonMap ( network.getName ( ) , network ) ) ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, force=%s, secondsToWait=%s, gracefully=%s, reason=%s" , super . toString ( ) , getForce ( ) , getSecondsToWait ( ) , getGracefully ( ) , getReason ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "force" , getForce ( ) ) . append ( "secondsToWait" , getSecondsToWait ( ) ) . append ( "gracefully" , getGracefully ( ) ) . append ( "reason" , getReason ( ) ) ; }
Source:
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.gluster.GlusterVolumeOptionInfo > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ( ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ) ( source ) ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo cifsOption = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ( ) ; cifsOption.setKey ( "user.cifs" ) ; list.add ( cifsOption ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ( ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > GetNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( osType ) ) { list.remove ( VmInterfaceType.e1000 ) ; if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DbUser user : asCollection ( org.ovirt.engine.core.common.businessentities.DbUser.class , getEntity ( java.util.List.class , SearchType.DBUser , "users:" ) ) ) { users.put ( user.getuser_id ( ) , user ) ; } return users ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.DbUser > lookupUsers ( ) { if ( isFiltered ( ) ) { return getBackendCollection ( org.ovirt.engine.core.common.businessentities.DbUser.class , VdcQueryType.GetAllDbUsers , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; } return asCollection ( org.ovirt.engine.core.common.businessentities.DbUser.class , getEntity ( java.util.List.class , SearchType.DBUser , "users:" ) ) ; }
Source:
public void updateInterface ( org.ovirt.engine.core.common.businessentities.storage_pool datacenter ) { if ( datacenter == null ) { return ; } getInterface ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDiskInterfaceList ( VmOsType.Unassigned , datacenter.getcompatibility_version ( ) ) ) ; getInterface ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDefaultDiskInterface ( VmOsType.Unassigned , null ) ) ; }

Target:
public void updateInterface ( org.ovirt.engine.core.common.businessentities.storage_pool datacenter ) { if ( datacenter == null ) { return ; } getInterface ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDiskInterfaceList ( VmOsType.Unassigned , datacenter.getcompatibility_version ( ) ) ) ; getInterface ( ) . setSelectedItem ( ( getIsNew ( ) ? org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDefaultDiskInterface ( VmOsType.Unassigned , null ) : getDisk ( ) . getDiskInterface ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getClusterId ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) . getId ( ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getCluster ( org.ovirt.engine.api.model.VM vm ) { if ( namedCluster ( vm ) ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) ; } return lookupCluster ( asGuid ( vm.getCluster ( ) . getId ( ) ) ) ; }
Source:
private boolean insertExclusiveLock ( java.lang.String key , boolean isCheckOnly ) { if ( locks.containsKey ( key ) ) { return false ; } if ( ! isCheckOnly ) { locks.put ( key , new org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView ( 0 , true ) ) ; } return true ; }

Target:
private org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.util.Set < java.lang.String > > insertExclusiveLock ( java.lang.String key , java.lang.String message , boolean isCheckOnly ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView lock = locks.get ( key ) ; if ( lock != null ) { return new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.util.Set < java.lang.String > > ( java.lang.Boolean.FALSE , lock.getMessages ( ) ) ; } if ( ! isCheckOnly ) { locks.put ( key , new org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView ( 0 , message , true ) ) ; } return org.ovirt.engine.core.bll.lock.InMemoryLockManager.LOCK_INSERT_SUCCESS_RESULT ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc fenceSpmStorage ( java.lang.String spUUID , int prevID , java.lang.String prevLVER ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.fenceSpmStorage ( spUUID , prevID , prevLVER ) ; 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 merge ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > drive , java.lang.String baseVolUUID , java.lang.String topVolUUID , java.lang.String bandwidth , java.lang.String jobUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.merge ( vmId , drive , baseVolUUID , topVolUUID , bandwidth , jobUUID ) ; 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:
private org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > setupCanAddVmFromSnapshotTests ( final int domainSizeGB , final int sizeRequired , final int pctRequired , org.ovirt.engine.core.compat.Guid sourceSnapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired , pctRequired ) ; initializeVmDAOMock ( vm ) ; org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > cmd = createVmFromSnapshotCommand ( vm , sourceSnapshotId ) ; initCommandMethods ( cmd ) ; return cmd ; }

Target:
private org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > setupCanAddVmFromSnapshotTests ( final int domainSizeGB , final int sizeRequired , final int pctRequired , org.ovirt.engine.core.compat.Guid sourceSnapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired , pctRequired ) ; initializeVmDAOMock ( vm ) ; org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > cmd = createVmFromSnapshotCommand ( vm , sourceSnapshotId ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; return cmd ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
private void writeParameter ( org.ovirt.api.metamodel.concepts.Parameter parameter ) { writer.writeStartElement ( "parameter" ) ; writeCommon ( parameter ) ; writer.writeElement ( "in" , java.lang.Boolean.toString ( parameter.isIn ( ) ) ) ; writer.writeElement ( "out" , java.lang.Boolean.toString ( parameter.isIn ( ) ) ) ; writeTypeRef ( parameter.getType ( ) ) ; writer.writeEndElement ( ) ; }

Target:
private void writeServiceLocator ( org.ovirt.api.metamodel.concepts.Locator locator ) { writer.writeStartElement ( "locator" ) ; writeCommon ( locator ) ; locator.parameters ( ) . forEach ( this :: writeParameter ) ; writer.writeEndElement ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; java.util.Map < java.lang.String , java.lang.String > timezones = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( returnValue ) ) ; timezones.put ( null , "" ) ; cachedTimeZones.put ( timezoneType , timezones.entrySet ( ) ) ; behavior.PostUpdateTimeZone ( selectedTimeZone ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; java.util.Map < java.lang.String , java.lang.String > timezones = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( returnValue ) ) ; timezones.put ( null , "" ) ; cachedTimeZones.put ( timezoneType , timezones.entrySet ( ) ) ; behavior.postUpdateTimeZone ( selectedTimeZone ) ; }
Source:
protected void addCustomModelsDetailModelList ( org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list ) { org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel diskListModel = new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel ( ) ; diskListModel.setSystemTreeContext ( this ) ; list.add ( 3 , diskListModel ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateEventListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; }

Target:
protected void addCustomModelsDetailModelList ( final java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list , int customPosition , final org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel templateDiskListModel , final org.ovirt.engine.ui.uicommonweb.models.templates.TemplateEventListModel templateEventListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel permissionListModel ) { templateDiskListModel.setSystemTreeContext ( this ) ; list.add ( customPosition , templateDiskListModel ) ; list.add ( templateEventListModel ) ; list.add ( permissionListModel ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveDiskProfile , org.ovirt.engine.core.common.action.DiskProfileParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveDiskProfile , org.ovirt.engine.core.common.action.DiskProfileParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public static 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 getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.Cluster group ) { org.ovirt.engine.core.compat.Guid id = group.getId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; group.setId ( id ) ; } getCallsHandler ( ) . executeModification ( "InsertCluster" , getClusterParamSource ( group ) ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { getCallsHandler ( ) . executeModification ( "UpdateCluster" , getClusterParamSource ( cluster ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , ( cmdContext != null ? cmdContext.getExecutionContext ( ) : null ) ) ; updateCommand ( command , result ) ; return result ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , ( cmdContext != null ? cmdContext.getExecutionContext ( ) : null ) ) ; updateCommandResult ( command.getCommandId ( ) , result ) ; return result ; }
Source:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.Disk > disks = getCollection ( ) ; assertTrue ( disks.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( disks ) ; } finally { accepts.clear ( ) ; } }

Target:
protected void setUpQueryExpectations ( java.lang.String query ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.Provider getProvider ( ) { org.ovirt.engine.core.common.businessentities.Provider provider = control.createMock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.easymock.EasyMock.expect ( provider.getId ( ) ) . andReturn ( GUIDS [ 0 ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( provider.getName ( ) ) . andReturn ( NAMES [ 0 ] ) . anyTimes ( ) ; return provider ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider getProvider ( ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.mockito.Mockito.when ( provider.getId ( ) ) . thenReturn ( GUIDS [ 0 ] ) ; org.mockito.Mockito.when ( provider.getName ( ) ) . thenReturn ( NAMES [ 0 ] ) ; return provider ; }
Source:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getNetworkDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsGroupId ( ) ) ; networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ; } return networkBusinessEntityMap ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getModifiedNetworks ( ) { if ( ( modifiedNetworks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) ; modifiedNetworks = new java.util.ArrayList ( networkAttachments.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : networkAttachments ) { modifiedNetworks.add ( existingNetworkRelatedToAttachment ( attachment ) ) ; } } return modifiedNetworks ; }
Source:
public void validateVmInPreview ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }

Target:
public void validateVmInPreview ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; initVmForSpace ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
private java.lang.String getGlusterNetworkAddress ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String glusterNetworkName ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDAO ( ) . getAllInterfacesForVds ( hostId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { if ( glusterNetworkName.equals ( nic.getNetworkName ( ) ) ) { return nic.getAddress ( ) ; } } return null ; }

Target:
private java.lang.String getGlusterNetworkAddress ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String glusterNetworkName ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDao ( ) . getAllInterfacesForVds ( hostId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { if ( glusterNetworkName.equals ( nic.getNetworkName ( ) ) ) { return nic.getAddress ( ) ; } } return null ; }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { if ( node.InnerText.equals ( java.lang.String.valueOf ( OsRepository.OLD_OTHER_ID ) ) ) { node.InnerText = java.lang.String.valueOf ( OsRepository.DEFAULT_OS ) ; } _vmTemplate.setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } _vmTemplate.setArchitecture ( ArchitectureType.x86_64 ) ; }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { int osId = osRepository.getOsIdByUniqueName ( node.innerText ) ; _vmTemplate.setOsId ( osId ) ; _vmTemplate.setClusterArch ( osRepository.getArchitectureFromOS ( osId ) ) ; } else { _vmTemplate.setClusterArch ( ArchitectureType.undefined ) ; } }
Source:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( ! ( model.getTimer ( ) . isActive ( ) ) ) ) { model.getSearchCommand ( ) . Execute ( ) ; } model.UpdatePagingAvailability ( ) ; }

Target:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( ! ( model.getTimer ( ) . isActive ( ) ) ) ) { model.getSearchCommand ( ) . execute ( ) ; } model.updatePagingAvailability ( ) ; }
Source:
public void canRemoveIncreaseReplica ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedReplicatedVolume ( volumeId1 , 12 , 4 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricksToRemove = new java.util.ArrayList < > ( ) ; bricksToRemove.add ( volumeEntity.getBricks ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( bricksToRemove , volumeEntity , 5 , false ) ; org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( ( ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT ) == ( validationResult.getMessage ( ) ) ) ) ; }

Target:
public void canRemoveIncreaseReplica ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedReplicatedVolume ( volumeId1 , 12 , 4 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricksToRemove = new java.util.ArrayList < > ( ) ; bricksToRemove.add ( volumeEntity.getBricks ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( bricksToRemove , volumeEntity , 5 , false ) ; org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT ) ) ; }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }

Target:
public static void GetAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
private static boolean isQosInSync ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.NetworkQoS networkQos ) { org.ovirt.engine.core.common.businessentities.network.NetworkQoS ifaceQos = iface.getQos ( ) ; if ( ifaceQos == networkQos ) { return true ; } else if ( ( ifaceQos == null ) || ( networkQos == null ) ) { return false ; } else { return ifaceQos.equalValues ( networkQos ) ; } }

Target:
public static boolean qosConfiguredOnInterface ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network network ) { if ( iface.isQosOverridden ( ) ) { return ( iface.getQos ( ) ) != null ; } else { return ( network != null ) && ( ( network.getQosId ( ) ) != null ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult a ) { stopProgress ( a.getState ( ) ) ; cancel ( ) ; } } , this ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( ( ( java.lang.Boolean ) ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallbacks.NetworkUpdateFrontendAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.VolumeFormat getVolumeFormatForDomain ( ) { if ( ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getVolumeFormat ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = org.ovirt.engine.core.bll.CopyImageGroupCommand.getStorageDomainStaticDAO ( ) . get ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) && ( ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } else { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.RAW ; } }

Target:
private org.ovirt.engine.core.common.businessentities.storage.VolumeFormat getVolumeFormatForDomain ( ) { if ( ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getVolumeFormat ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = org.ovirt.engine.core.bll.CopyImageGroupCommand.getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) && ( ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } else { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.RAW ; } }
Source:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.storage_domain_static storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }

Target:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForNetwork ( org.ovirt.engine.core.compat.Guid networkId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "network_id" , networkId ) ; return getCallsHandler ( ) . executeReadList ( "GetVdsByNetworkId" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForNetwork ( org.ovirt.engine.core.compat.Guid networkId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "network_id" , networkId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetVdsByNetworkId" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , parameterSource ) ; return uniteAgents ( vdsList ) ; }
Source:
protected void initUser ( ) { if ( ( org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUser ( ) ) == null ) { setDbUser ( org.ovirt.engine.core.bll.UserCommandBase.initUser ( org.ovirt.engine.core.bll.VmPoolUserCommandBase.getParameters ( ) . getVdcUserData ( ) , org.ovirt.engine.core.bll.VmPoolUserCommandBase.getParameters ( ) . getSessionId ( ) ) ) ; } }

Target:
protected void initUser ( ) { if ( ( org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUser ( ) ) == null ) { setDbUser ( org.ovirt.engine.core.bll.UserCommandBase.initUser ( org.ovirt.engine.core.bll.VmPoolUserCommandBase.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.VmPoolUserCommandBase.getParameters ( ) . getUser ( ) . getDomain ( ) , org.ovirt.engine.core.bll.VmPoolUserCommandBase.getParameters ( ) . getUser ( ) . getId ( ) ) ) ; } }
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 getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public java.lang.String toString ( ) { java.lang.String domainName = ( ( staticData ) == null ) ? "null" : staticData.getName ( ) ; org.ovirt.engine.core.compat.Guid domainId = ( ( staticData ) == null ) ? null : staticData.getId ( ) ; return ( ( ( "StorageDomain[" + domainName ) + ", " ) + domainId ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "domainName" , ( ( staticData ) == null ? null : staticData.getName ( ) ) ) . append ( "domainId" , ( ( staticData ) == null ? null : staticData.getId ( ) ) ) . build ( ) ; }
Source:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VmPool selectedItem ) { org.ovirt.engine.ui.webadmin.section.main.view.tab.pool.SubTabPoolGeneralView.Driver.driver.edit ( getDetailModel ( ) ) ; monitorCount.setText ( java.lang.String.valueOf ( getDetailModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getDetailModel ( ) . getIsStateless ( ) ) ) ; formBuilder.showForm ( getDetailModel ( ) ) ; }

Target:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VmPool selectedItem ) { driver.edit ( getDetailModel ( ) ) ; monitorCount.setText ( java.lang.String.valueOf ( getDetailModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getDetailModel ( ) . getIsStateless ( ) ) ) ; formBuilder.showForm ( getDetailModel ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc monitorCommand ( java.lang.String vmId , java.lang.String monitorCommand ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.monitorCommand" ) . withParameter ( "vmID" , vmId ) . withParameter ( "command" , monitorCommand ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc getExternalVmNamesList ( java.lang.String uri , java.lang.String username , java.lang.String password ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getExternalVMNames" ) . withParameter ( "uri" , uri ) . withParameter ( "username" , username ) . withParameter ( "password" , password ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmNames" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc ( response ) ; }
Source:
private void mockGetImageDomainsListVdsCommand ( ) { java.util.ArrayList < org.ovirt.engine.core.compat.Guid > guids = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( 1 ) ; guids.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( guids ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImageDomainsList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = setupCanAddVmTests ( 0 , 0 ) ; org.mockito.Mockito.doReturn ( createVdsGroup ( ) ) . when ( cmd ) . getVdsGroup ( ) ; junit.framework.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }
Source:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void IsTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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 ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }
Source:
private void removeMemory ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot , boolean useTaskManager ) { org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters parameters = new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( snapshot.getMemoryVolume ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ; if ( useTaskManager ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveMemoryVolumes , parameters , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) ) ; } else { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = runInternalAction ( VdcActionType.RemoveMemoryVolumes , parameters ) ; if ( ! ( ret.getSucceeded ( ) ) ) { log.errorFormat ( "Cannot remove memory volumes for snapshot {0}" , snapshot.getId ( ) ) ; } } }

Target:
private void removeMemory ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot , boolean useTaskManager ) { org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters parameters = new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( snapshot.getMemoryVolume ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ; if ( useTaskManager ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveMemoryVolumes , parameters , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) ) ; } else { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = runInternalAction ( VdcActionType.RemoveMemoryVolumes , parameters ) ; if ( ! ( ret.getSucceeded ( ) ) ) { log.error ( "Cannot remove memory volumes for snapshot '{}'" , snapshot.getId ( ) ) ; } } }
Source:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = createPersistentHostSetupNetworksParameters ( ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid qosId = getQosId ( ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos oldQos = getQosDao ( ) . get ( qosId ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos newQos = getQos ( ) ; super . executeCommand ( ) ; if ( networkUpdateRequired ( oldQos , newQos ) ) { refreshNetworks ( refreshNetworksParametersFactory.create ( qosId ) ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricksToRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId ) ; bricks.add ( brick ) ; return bricks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBrickEntitiesToRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId ) ; bricks.add ( brick ) ; return bricks ; }