auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testFindDefaultManagementNetworkMultipleNonDefault ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockNetworkDao.getManagementNetworks ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ) . thenReturn ( java.util.Arrays.asList ( mockNetwork , mockDefaultEngineNetwork ) ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ; org.junit.Assert.assertNull ( actual ) ; }

Target:
public void testFindDefaultManagementNetworkMultipleNonDefault ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockNetworkDao.getAllForDataCenter ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ) . thenReturn ( java.util.Arrays.asList ( mockNetwork , mockNetwork ) ) ; org.mockito.Mockito.when ( mockNetworkDao.getManagementNetworks ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ) . thenReturn ( java.util.Arrays.asList ( mockNetwork , mockDefaultEngineNetwork ) ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ; org.junit.Assert.assertNull ( actual ) ; }
Source:
private void freeLockExecute ( ) { if ( ( ( releaseLocksAtEndOfExecute ) || ( ! ( getSucceeded ( ) ) ) ) || ( ( ! ( hasTasks ( ) ) ) && ( ! ( ( this ) instanceof org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand ) ) ) ) { freeLock ( ) ; } }

Target:
protected boolean noAsyncOperations ( ) { return ( ! ( hasTasks ( ) ) ) && ( ( getCallback ( ) ) == null ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain createDataStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setStorageName ( name ) ; storageDomain.setStatus ( status ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain createDataStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setStorageName ( name ) ; storageDomain.setStatus ( status ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; storageDomain.setId ( HE_SD_ID ) ; return storageDomain ; }
Source:
public static java.util.List < java.lang.String > runAndAssertCanDoActionFailure ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.dal.VdcBllMessages message ) { boolean canDoAction = command.canDoAction ( ) ; java.util.List < java.lang.String > canDoActionMessages = command.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertFalse ( "Command''s canDoAction expected to fail but succeed" , canDoAction ) ; org.junit.Assert.assertTrue ( java.text.MessageFormat.format ( "canDoAction messages doesn''t contain expected message: {0}, messages are: {1}" , message.name ( ) , canDoActionMessages ) , canDoActionMessages.contains ( message.name ( ) ) ) ; return canDoActionMessages ; }

Target:
public static java.util.List < java.lang.String > runAndAssertCanDoActionFailure ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.errors.VdcBllMessages message ) { boolean canDoAction = command.canDoAction ( ) ; java.util.List < java.lang.String > canDoActionMessages = command.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertFalse ( "Command's canDoAction expected to fail, but succeeded" , canDoAction ) ; org.junit.Assert.assertTrue ( java.text.MessageFormat.format ( "canDoAction messages doesn''t contain expected message: {0}, messages are: {1}" , message.name ( ) , canDoActionMessages ) , canDoActionMessages.contains ( message.name ( ) ) ) ; return canDoActionMessages ; }
Source:
protected void ReadOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . 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 ) { _vm.getStaticData ( ) . setos ( org.ovirt.engine.core.common.businessentities.VmOsType.valueOf ( node.InnerText ) ) ; } else { _vm.getStaticData ( ) . setos ( VmOsType.Unassigned ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . 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 ) { _vm.getStaticData ( ) . setOs ( org.ovirt.engine.core.common.businessentities.VmOsType.valueOf ( node.InnerText ) ) ; } else { _vm.getStaticData ( ) . setOs ( VmOsType.Unassigned ) ; } }
Source:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { org.ovirt.engine.ui.uicommonweb.validation.ValidationResult result = super . validate ( value ) ; if ( ! ( result.getSuccess ( ) ) ) { result.getReasons ( ) . add ( getAlreadyAssignedClonedNameMessage ( ) ) ; } return result ; }

Target:
protected void executeDiskModifications ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) . setId ( vmId ) ; model.getInstanceImages ( ) . executeDiskModifications ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getUser ( ) ; if ( dbUser == null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) { dbUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { dbUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setUser ( dbUser ) ; } return dbUser ; }

Target:
public java.lang.String getPrincipal ( java.lang.String sessionId ) { return getPrincipalName ( sessionId ) ; }
Source:
protected java.lang.String getRealAgentOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { return new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( agent.getType ( ) , org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , ( ( agent.getOptions ( ) ) == null ? "" : agent.getOptions ( ) ) , getArchitectureType ( ) ) , proxyHost.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) . ToInternalString ( ) ; }

Target:
protected java.lang.String getRealAgentOptions ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { return new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( agent.getType ( ) , org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , ( ( agent.getOptions ( ) ) == null ? "" : agent.getOptions ( ) ) , getArchitectureType ( ) ) , proxyHost.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) . ToInternalString ( ) ; }
Source:
public void testListLimitResultsBadFormat ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( true ) ; setUpEntityQueryExpectations ( QueryType.GetAllTags , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , null ) ; collection.setUriInfo ( uriInfo ) ; getCollection ( ) ; fail ( "Expected WebFaultException" ) ; }

Target:
public void testListLimitResultsBadFormat ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( true ) ; setUpEntityQueryExpectations ( QueryType.GetAllTags , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , null ) ; collection.setUriInfo ( uriInfo ) ; getCollection ( ) ; fail ( "Expected WebFaultException" ) ; }
Source:
public void bridgePropertiesNonVm ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; network.setVmNetwork ( false ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_BAD_INPUT , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void bridgePropertiesNonVm ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; network.setVmNetwork ( false ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_BAD_INPUT , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult hasSpaceForClonedDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { java.lang.Long availableSize = storageDomain.getAvailableDiskSizeInBytes ( ) ; double totalSizeForDisks = getTotalSizeForClonedDisks ( diskImages ) ; return validateRequiredSpace ( availableSize , totalSizeForDisks ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hasSpaceForClonedDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { if ( storageDomain.getStorageType ( ) . isCinderDomain ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.lang.Long availableSize = storageDomain.getAvailableDiskSizeInBytes ( ) ; double totalSizeForDisks = getTotalSizeForClonedDisks ( diskImages ) ; return validateRequiredSpace ( availableSize , totalSizeForDisks ) ; }
Source:
protected void EndSuccessfully ( ) { org.ovirt.engine.core.bll.ExportVmCommand.EndActionOnAllImageGroups ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.UnLockVm ( vm ) ; endDiskRelatedActions ( vm ) ; if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { endCopyCollapseOperations ( vm ) ; } else { updateSnapshotOvf ( vm ) ; } org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.ExportVmCommand.EndActionOnAllImageGroups ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.UnLockVm ( vm ) ; endDiskRelatedActions ( vm ) ; if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { endCopyCollapseOperations ( vm ) ; } else { updateSnapshotOvf ( vm ) ; } org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }
Source:
public java.lang.Void runInTransaction ( ) { copyVmDevices ( ) ; addDiskPermissions ( ) ; if ( ( getInstanceType ( ) ) == null ) { addVmPayload ( ) ; updateSmartCardDevices ( ) ; addVmWatchdog ( ) ; } setActionReturnValue ( getVm ( ) . getId ( ) ) ; setSucceeded ( true ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { copyVmDevices ( ) ; addDiskPermissions ( ) ; addVmPayload ( ) ; updateSmartCardDevices ( ) ; addVmWatchdog ( ) ; addGraphicsDevice ( ) ; setActionReturnValue ( getVm ( ) . getId ( ) ) ; setSucceeded ( true ) ; return null ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM getVmFromSnapshot ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { java.lang.String vmConfiguration = snapshot.getVmConfiguration ( ) ; if ( vmConfiguration == null ) { return getVm ( ) ; } else { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . updateVmFromConfiguration ( vm , vmConfiguration ) ; return vm ; } }

Target:
public org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return super . createTask ( taskId , asyncTaskCreationInfo , parentCommand ) ; }
Source:
protected void SelectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . SelectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { UpdateConsoleModels ( ) ; } }

Target:
protected void SelectedItemsChanged ( ) { super . SelectedItemsChanged ( ) ; updateConsoleModels ( ) ; UpdateActionAvailability ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc GetImageTransferSessionStats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.GetImageTransferSessionStats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( 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 remove_image_ticket ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.remove_image_ticket ( ticketId ) ; 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:
org.ovirt.engine.core.bll.ValidationResult validateNotRemovingUsedNetworkByVms ( ) { java.util.Collection < java.lang.String > removedNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( removedAttachment ) . getName ( ) ) ; } java.util.List < java.lang.String > vmNames = getVmInterfaceManager ( ) . findActiveVmsUsingNetworks ( host.getId ( ) , removedNetworks ) ; if ( vmNames.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , commaSeparated ( vmNames ) ) ; } }

Target:
org.ovirt.engine.core.bll.ValidationResult validateNotRemovingUsedNetworkByVms ( ) { java.util.Collection < java.lang.String > removedNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( removedAttachment ) . getName ( ) ) ; } java.util.List < java.lang.String > vmNames = getVmInterfaceManager ( ) . findActiveVmsUsingNetworks ( host.getId ( ) , removedNetworks ) ; if ( vmNames.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST , vmNames ) ) ; } }
Source:
protected void updateDetailsAvailability ( ) { if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.DbUser adUser = ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( getSelectedItem ( ) ) ) ; userGroupListModel.setIsAvailable ( ( ! ( adUser.getIsGroup ( ) ) ) ) ; userEventNotifierListModel.setIsAvailable ( ( ! ( adUser.getIsGroup ( ) ) ) ) ; } }

Target:
protected void updateDetailsAvailability ( ) { if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.DbUser adUser = ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( getSelectedItem ( ) ) ) ; userGroupListModel.setIsAvailable ( ( ! ( adUser.isGroup ( ) ) ) ) ; userEventNotifierListModel.setIsAvailable ( ( ! ( adUser.isGroup ( ) ) ) ) ; } }
Source:
protected void executeQueryCommand ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = getVmDeviceDAO ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.GetWatchdogQuery.getParameters ( ) . getId ( ) , VmDeviceGeneralType.WATCHDOG ) ; if ( ( vmDevices != null ) && ( ! ( vmDevices.isEmpty ( ) ) ) ) { setReturnValue ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.VmWatchdog ( vmDevices.get ( 0 ) ) ) ) ; } else { org.ovirt.engine.core.bll.GetWatchdogQuery.setReturnValue ( java.util.Collections.emptyList ( ) ) ; } }

Target:
protected void executeQueryCommand ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.GetWatchdogQuery.getParameters ( ) . getId ( ) , VmDeviceGeneralType.WATCHDOG ) ; if ( ( vmDevices != null ) && ( ! ( vmDevices.isEmpty ( ) ) ) ) { setReturnValue ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.VmWatchdog ( vmDevices.get ( 0 ) ) ) ) ; } else { org.ovirt.engine.core.bll.GetWatchdogQuery.setReturnValue ( java.util.Collections.emptyList ( ) ) ; } }
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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public static < T > boolean listsEqual ( java.util.Collection < T > firstList , java.util.Collection < T > secondList ) { if ( ( firstList.size ( ) ) != ( secondList.size ( ) ) ) { return false ; } for ( T entity : firstList ) { if ( ! ( secondList.contains ( entity ) ) ) { return false ; } } return true ; }

Target:
public static final org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrickByQualifiedName ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricksList , java.lang.String qualifiedBrickName ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : bricksList ) { if ( brick.getQualifiedName ( ) . equals ( qualifiedBrickName ) ) { return brick ; } } return null ; }
Source:
private void validate ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel mgmtNetwork = networkMap.get ( HostInterfaceListModel.ENGINE_NETWORK_NAME ) ; if ( ! ( mgmtNetwork.isAttached ( ) ) ) { okCommand.setIsExecutionAllowed ( false ) ; } else { okCommand.setIsExecutionAllowed ( true ) ; } }

Target:
private void validate ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel mgmtNetwork = networkMap.get ( HostInterfaceListModel.ENGINE_NETWORK_NAME ) ; if ( ! ( mgmtNetwork.isAttached ( ) ) ) { okCommand.setIsExecutionAllowed ( false ) ; okCommand.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . mgmtNotAttachedToolTip ( ) ) ; } else { okCommand.setIsExecutionAllowed ( true ) ; okCommand.setTitle ( null ) ; } }
Source:
private void addVnic ( org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { vmInterfaceManager.add ( iface , getCompensationContext ( ) , getParameters ( ) . isImportAsNewEntity ( ) , getVdsGroup ( ) . getcompatibility_version ( ) ) ; macsAdded.add ( iface.getMacAddress ( ) ) ; }

Target:
private void addVnic ( org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { vmInterfaceManager.add ( iface , org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) , getParameters ( ) . isImportAsNewEntity ( ) , getVdsGroup ( ) . getcompatibility_version ( ) ) ; macsAdded.add ( iface.getMacAddress ( ) ) ; }
Source:
private void configureLocalStorage2 ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { java.lang.String prefix = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.RhevhLocalFSPath ) ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( prefix ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel pathModel = model.getStorage ( ) . getPath ( ) ; pathModel.setEntity ( prefix ) ; pathModel.setIsChangable ( false ) ; } configureLocalStorage3 ( model ) ; }

Target:
private void configureLocalStorage2 ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { java.lang.String prefix = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.RhevhLocalFSPath ) ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( prefix ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel pathModel = model.getStorage ( ) . getPath ( ) ; pathModel.setEntity ( prefix ) ; pathModel.setIsChangable ( false ) ; } configureLocalStorage3 ( model ) ; }
Source:
public static boolean checkClusterVersionSupported ( org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , org.ovirt.engine.core.common.businessentities.VDS vds ) { boolean isVersionSupported = ! ( org.apache.commons.lang.StringUtils.isEmpty ( vds.getSupportedClusterLevels ( ) ) ) ; if ( isVersionSupported ) { try { isVersionSupported = vds.getSupportedClusterVersionsSet ( ) . contains ( clusterCompatibilityVersion ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.utils.VersionSupport.log.errorFormat ( e.getMessage ( ) ) ; isVersionSupported = false ; } } return isVersionSupported ; }

Target:
public static boolean checkClusterVersionSupported ( org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , org.ovirt.engine.core.common.businessentities.VDS vds ) { boolean isVersionSupported = ! ( org.apache.commons.lang.StringUtils.isEmpty ( vds.getSupportedClusterLevels ( ) ) ) ; if ( isVersionSupported ) { try { isVersionSupported = vds.getSupportedClusterVersionsSet ( ) . contains ( clusterCompatibilityVersion ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.utils.VersionSupport.log.error ( "{}" , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.utils.VersionSupport.log.debug ( "Exception" , e ) ; isVersionSupported = false ; } } return isVersionSupported ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createIscsiConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String userName , java.lang.String password , java.lang.String portal ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setuser_name ( userName ) ; connectionDetails.setpassword ( password ) ; connectionDetails.setportal ( portal ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createIscsiConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String userName , java.lang.String password , java.lang.String portal ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setuser_name ( userName ) ; connectionDetails.setpassword ( password ) ; connectionDetails.setportal ( portal ) ; return connectionDetails ; }
Source:
private void prepareVmToPassCanDoAction ( ) { vmStatic.setName ( "vm1" ) ; vmStatic.setMemSizeMb ( 256 ) ; vmStatic.setSingleQxlPci ( false ) ; mockVmDaoGetVm ( ) ; mockSameNameQuery ( false ) ; mockValidateCustomProperties ( ) ; mockValidatePciAndIdeLimit ( ) ; }

Target:
private void prepareVmToPassCanDoAction ( ) { vmStatic.setName ( "vm1" ) ; vmStatic.setMemSizeMb ( 256 ) ; vmStatic.setSingleQxlPci ( false ) ; mockVmDaoGetVm ( ) ; mockSameNameQuery ( false ) ; mockValidateCustomProperties ( ) ; mockValidatePciAndIdeLimit ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; mockGraphicsDevice ( ) ; }
Source:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static java.lang.String getFullLoginName ( java.lang.String loginName , java.lang.String directoryName ) { if ( ( directoryName != null ) && ( ( directoryName.length ( ) ) > 0 ) ) { return ( loginName + "@" ) + directoryName ; } else { return loginName ; } }

Target:
public static java.lang.String getFullLoginName ( java.lang.String loginName , java.lang.String directoryName ) { if ( ( loginName == null ) || ( ( loginName.length ( ) ) == 0 ) ) { return "" ; } if ( ( directoryName != null ) && ( ( directoryName.length ( ) ) > 0 ) ) { return ( loginName + "@" ) + directoryName ; } else { return loginName ; } }
Source:
public void setUp ( ) { underTest = new org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinder ( ) ; externalVnicProfileMapping1 = new org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping ( org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.NETWORK_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.VNIC_PROFILE1_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.TARGET_VNIC_PROFILE_ID ) ; externalVnicProfileMapping2 = new org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping ( org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.NETWORK_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.VNIC_PROFILE2_NAME , null ) ; externalVnicProfileMappings = java.util.Arrays.asList ( externalVnicProfileMapping1 , externalVnicProfileMapping2 ) ; }

Target:
public void setUp ( ) { underTest = new org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinder ( ) ; externalVnicProfileMapping1 = new org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping ( org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.NETWORK_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.VNIC_PROFILE1_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.TARGET_VNIC_PROFILE_ID ) ; externalVnicProfileMapping2 = new org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping ( org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.NETWORK_NAME , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.VNIC_PROFILE2_NAME , null ) ; externalVnicProfileMappings = java.util.Arrays.asList ( externalVnicProfileMapping1 , externalVnicProfileMapping2 ) ; emptySourceMapping = new org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping ( null , null , org.ovirt.engine.core.bll.exportimport.ExternalVnicProfileMappingFinderTest.TARGET_VNIC_PROFILE_ID ) ; }
Source:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }

Target:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }
Source:
private void updateActionAvailability ( ) { java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( ( selectedItems.size ( ) ) == 1 ) && ( ( selectedItems.iterator ( ) . next ( ) . getSecond ( ) . getVdsGroupCompatibilityVersion ( ) . compareTo ( Version.v3_1 ) ) >= 0 ) ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( ( selectedItems.size ( ) ) == 1 ) && ( ( selectedItems.iterator ( ) . next ( ) . getSecond ( ) . getClusterCompatibilityVersion ( ) . compareTo ( Version.v3_1 ) ) >= 0 ) ) ) ; }
Source:
public void qosValidCommitmentReportedBondSpeed ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosCommitmentReportedBondSpeed ( ( ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) / 2 ) ) ; validateAndExpectNoViolations ( helper ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public static void getClusterGlusterServices ( 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 ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private static java.util.List < java.lang.String > getVersionsList ( ) { java.util.List < java.lang.String > versions = new java.util.ArrayList < java.lang.String > ( ) ; versions.add ( Config.DefaultConfigurationVersion ) ; for ( org.ovirt.engine.core.compat.Version version : org.ovirt.engine.core.compat.Version.ALL ) { versions.add ( version.toString ( ) ) ; } return versions ; }

Target:
private static java.util.List < java.lang.String > getVersionsList ( ) { java.util.List < java.lang.String > versions = new java.util.ArrayList < java.lang.String > ( ) ; versions.add ( ConfigCommon.defaultConfigurationVersion ) ; for ( org.ovirt.engine.core.compat.Version version : org.ovirt.engine.core.compat.Version.ALL ) { versions.add ( version.toString ( ) ) ; } return versions ; }
Source:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel < ? > tableSelectionModel = org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getView ( ) . getTableSelectionModel ( ) ; if ( tableSelectionModel != null ) { registerHandler ( tableSelectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { updateDetailModelSelection ( ) ; } } ) ) ; } }

Target:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel < ? > tableSelectionModel = ( ( org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getView ( ) . getTable ( ) ) != null ) ? org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getView ( ) . getTable ( ) . getSelectionModel ( ) : null ; if ( tableSelectionModel != null ) { registerHandler ( tableSelectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { updateDetailModelSelection ( ) ; } } ) ) ; } }
Source:
public void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , org.ovirt.engine.core.compat.Guid vmId ) { addDiskImage ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) , vmId ) ; }

Target:
public static void addDiskToVmIfNotExists ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . exists ( disk.getId ( ) ) ) ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskToVm ( disk , vmId ) ; } }
Source:
protected void verify ( org.ovirt.engine.api.model.HostStorage model , org.ovirt.engine.api.model.HostStorage transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getType ( ) , transform.getType ( ) ) ; org.junit.Assert.assertNotNull ( model.getVolumeGroup ( ) ) ; org.junit.Assert.assertEquals ( model.getVolumeGroup ( ) . getId ( ) , model.getVolumeGroup ( ) . getId ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.HostStorage model , org.ovirt.engine.api.model.HostStorage transform ) { org.junit.jupiter.api.Assertions.assertNotNull ( transform ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getType ( ) , transform.getType ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( model.getVolumeGroup ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getVolumeGroup ( ) . getId ( ) , model.getVolumeGroup ( ) . getId ( ) ) ; }
Source:
protected org.ovirt.engine.api.model.Roles mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > entities ) { org.ovirt.engine.api.model.Roles collection = new org.ovirt.engine.api.model.Roles ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions entity : entities ) { if ( ( entity.getObjectType ( ) ) == ( org.ovirt.engine.core.common.VdcObjectType.System ) ) { collection.getRoles ( ) . add ( addLinks ( map ( entity ) ) ) ; } } return collection ; }

Target:
protected org.ovirt.engine.api.model.Roles mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.Permission > entities ) { org.ovirt.engine.api.model.Roles collection = new org.ovirt.engine.api.model.Roles ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission entity : entities ) { if ( ( entity.getObjectType ( ) ) == ( org.ovirt.engine.core.common.VdcObjectType.System ) ) { collection.getRoles ( ) . add ( addLinks ( map ( entity ) ) ) ; } } return collection ; }
Source:
public static void getSpiceUsbAutoShare ( 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 ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
private void logFailure ( ) { org.ovirt.engine.core.compat.Guid createdDiskId = ( ( org.ovirt.engine.core.compat.Guid ) ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getActionReturnValue ( ) ) ) ; if ( createdDiskId != null ) { addCustomValue ( "DiskId" , createdDiskId.toString ( ) ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( this , AuditLogType.CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_FAILED ) ; } else { new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( this , AuditLogType.CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_INITIATE_FAILED ) ; } }

Target:
private void logFailure ( ) { org.ovirt.engine.core.compat.Guid createdDiskId = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getActionReturnValue ( ) ; if ( createdDiskId != null ) { addCustomValue ( "DiskId" , createdDiskId.toString ( ) ) ; auditLogDirector.log ( this , AuditLogType.CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_FAILED ) ; } else { auditLogDirector.log ( this , AuditLogType.CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_INITIATE_FAILED ) ; } }
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > getNodeObjects ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : vm.getDiskMap ( ) . values ( ) ) { diskImages.add ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ) ; } return diskImages ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > getNodeObjects ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : vm.getDiskMap ( ) . values ( ) ) { disks.add ( ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( disk ) ) ) ; } return disks ; }
Source:
public static void IsUSBEnabledByDefault ( 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.EnableUSBAsDefault ) , aQuery ) ; }

Target:
public static void GetDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.sdk.entities.Host createHost ( java.lang.String name , java.lang.Long memory ) { org.ovirt.engine.sdk.entities.Host host = new org.ovirt.engine.sdk.entities.Host ( ) ; host.setName ( name ) ; host.setId ( name ) ; host.setMemory ( memory ) ; host.setCluster ( cluster ) ; host.setCpu ( new org.ovirt.engine.sdk.entities.CPU ( ) ) ; host.getCpu ( ) . setArchitecture ( "Westmere" ) ; host.getCpu ( ) . setTopology ( new org.ovirt.engine.sdk.entities.CpuTopology ( ) ) ; bestSolution.getHosts ( ) . add ( host ) ; return host ; }

Target:
public org.ovirt.engine.sdk.entities.Host createHost ( java.lang.String name , java.lang.Long memory ) { org.ovirt.engine.sdk.entities.Host host = new org.ovirt.engine.sdk.entities.Host ( ) ; host.setName ( name ) ; host.setId ( name ) ; host.setMemory ( memory ) ; host.setCluster ( cluster ) ; host.setCpu ( new org.ovirt.engine.sdk.entities.CPU ( ) ) ; host.getCpu ( ) . setArchitecture ( "Westmere" ) ; host.getCpu ( ) . setTopology ( new org.ovirt.engine.sdk.entities.CpuTopology ( ) ) ; addHost ( host ) ; return host ; }