auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertTrue ( disk.isSetStatistics ( ) ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertTrue ( disk.isSetStatistics ( ) ) ; org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; } finally { accepts.clear ( ) ; } }
Source:
public void testChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; jedi2.saberColor = "red" ; java.util.List < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( jedi1 , jedi2 ) ; assertTrue ( "Should be 1 changes" , ( ( changes.size ( ) ) == 1 ) ) ; }

Target:
public void testChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; jedi2.saberColor = "red" ; java.util.List < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( jedi1 , jedi2 ) ; org.junit.Assert.assertTrue ( "Should be 1 changes" , ( ( changes.size ( ) ) == 1 ) ) ; }
Source:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void updateMtuSelectorsChangeability ( ) { if ( ( ( getSelectedDc ( ) ) != null ) && ( ! ( isMTUOverrideSupported ( ) ) ) ) { setMtuSelectorsChangeability ( false , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . mtuOverrideNotSupported ( getSelectedDc ( ) . getcompatibility_version ( ) . toString ( ) ) ) ; return ; } if ( getExport ( ) . getEntity ( ) ) { setMtuSelectorsChangeability ( false , null ) ; return ; } setMtuSelectorsChangeability ( true , null ) ; }

Target:
protected void updateMtuSelectorsChangeability ( ) { if ( ( ( getSelectedDc ( ) ) != null ) && ( ! ( isMTUOverrideSupported ( ) ) ) ) { setMtuSelectorsChangeability ( false , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . mtuOverrideNotSupported ( getSelectedDc ( ) . getCompatibilityVersion ( ) . toString ( ) ) ) ; return ; } if ( getExport ( ) . getEntity ( ) ) { setMtuSelectorsChangeability ( false , null ) ; return ; } setMtuSelectorsChangeability ( true , null ) ; }
Source:
private void doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol bootProtocol ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( bootProtocol , null , null ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.networkIpAddressWasSameAsHostnameAndChanged ( null ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
private void doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol bootProtocol ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( bootProtocol , null , null ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.networkIpAddressWasSameAsHostnameAndChanged ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidatorTest.EMPTY_NICS_MAP ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.lang.String getCustomToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return org.ovirt.engine.core.compat.StringFormat.format ( constants.cloneVmNotSupported ( ) , minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }

Target:
public java.lang.String getCustomToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return messages.cloneVmNotSupported ( minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > bonds = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; allBonds = bonds ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > bonds = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; allBonds = bonds ; queryLabels ( ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateVolumeCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewVolumeCommand ( ) ) ) { return popupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getStatusRebalanceCommand ( ) ) ) { return rebalanceStatusPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void updateController ( ) { this . controller = modelProvider.getModel ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer modelTimer = getModelTimer ( ) ; modelTimer.setRefreshRate ( readRefreshRate ( ) ) ; modelTimer.addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.String > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { onRefresh ( event.getValue ( ) ) ; } } ) ; }

Target:
private void updateTimer ( ) { final org.ovirt.engine.ui.uicommonweb.models.GridTimer modelTimer = getModelTimer ( ) ; if ( ( statusUpdateHandlerRegistration ) != null ) { statusUpdateHandlerRegistration.removeHandler ( ) ; } statusUpdateHandlerRegistration = modelTimer.addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.Integer > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Integer > event ) { onRefresh ( modelTimer.getTimerRefreshStatus ( ) ) ; } } ) ; modelTimer.resume ( ) ; }
Source:
private void distributeDbDownEvent ( ) { if ( ( failedQueries ) == 0 ) { try { distributeEvents ( eventsManager.getAuditLogEvents ( true ) , getEventSubscribers ( true ) ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.notifier.NotificationService.log.error ( "Failed to dispatch query failure email message" , e ) ; } } int failedQueriesNotificationThreshold = prop.getInteger ( NotificationProperties.FAILED_QUERIES_NOTIFICATION_THRESHOLD ) ; if ( failedQueriesNotificationThreshold == 0 ) { failedQueriesNotificationThreshold = 1 ; } failedQueries = ( ( failedQueries ) + 1 ) % failedQueriesNotificationThreshold ; }

Target:
public void registerTransport ( org.ovirt.engine.core.notifier.transport.Transport transport ) { if ( transport.isActive ( ) ) { firstMatchSimpleFilter.registerTransport ( transport ) ; transport.registerObserver ( this . eventsManager ) ; transports.add ( transport ) ; } }
Source:
public static void GetCustomPropertiesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void GetAllVmTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.core.common.queries.VdcQueryParametersBase params = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmTemplates , params , aQuery ) ; }
Source:
public void run ( ) throws java.lang.Exception { action.execute ( this ) ; }

Target:
public void run ( ) throws java.lang.Exception { int iterations = ( ( java.lang.Integer ) ( argModuleMap.get ( "iterations" ) ) ) ; for ( int i = 0 ; i < iterations ; i ++ ) { org.ovirt.engine.exttool.aaa.AAAServiceImpl.log.info ( "Iteration: {}" , i ) ; action.execute ( this ) ; } }
Source:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.insert_new_dc_storage_connectionStruct other ) { int returnValue = - 1 ; return returnValue ; }

Target:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.insert_new_dc_storage_connectionStruct other ) { int returnValue = - 1 ; returnValue = checkNullsAndCompare ( this . storage_domain_id , other.storage_domain_id ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . datacenter_id , other.datacenter_id ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . attach_date , other.attach_date ) ; if ( returnValue != 0 ) { return returnValue ; } return returnValue ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.volumeSnapshotCreate" ) . withOptionalParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withParameter ( "description" , description ) . withParameter ( "force" , force ) . 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.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storages = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( returnValue ) ) ; vmGuideModel1.storage = ( ! ( storages.isEmpty ( ) ) ) ? storages.get ( 0 ) : null ; vmGuideModel1.AddDiskPostData ( ) ; }

Target:
private void AddDiskUpdateData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.AddDiskPostData ( ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType , java.lang.String [ ] devicesList ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = null ; if ( devicesList != null ) { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType , devicesList ) ; } else { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType ) ; } org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( 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.LUNListReturnForXmlRpc getDeviceList ( int storageType , java.lang.String [ ] devicesList , boolean checkStatus ) { try { java.lang.String [ ] idsList = ( devicesList == null ) ? new java.lang.String [ ] { } : devicesList ; java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceList ( storageType , idsList , checkStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void updateNonExistingConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( null ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST ) ; }

Target:
public void updateNonExistingConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( null ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST ) ; }
Source:
public void vdsGroupWithNoServiceEnabled ( ) { createCommandWithNoService ( ) ; org.powermock.api.mockito.PowerMockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.powermock.api.mockito.PowerMockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.cpuExists ( ) ; allQueriesEmpty ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_AT_LEAST_ONE_SERVICE_MUST_BE_ENABLED ) ; }

Target:
public void disableGlusterWhenVolumesExist ( ) { createCommandWithVirtEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; cpuExists ( ) ; cpuFlagsNotMissing ( ) ; allQueriesEmpty ( ) ; clusterHasGlusterVolumes ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_CANNOT_DISABLE_GLUSTER_WHEN_CLUSTER_CONTAINS_VOLUMES ) ; }
Source:
private int calculateValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster ) { int res = 0 ; if ( networkCluster != null ) { if ( networkCluster.isManagement ( ) ) { res += 10 ; } if ( networkCluster.isDisplay ( ) ) { res += 4 ; } if ( networkCluster.isMigration ( ) ) { res += 2 ; } if ( networkCluster.isGluster ( ) ) { res += 1 ; } } return res ; }

Target:
private int calculateValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster ) { int res = 0 ; if ( networkCluster != null ) { if ( networkCluster.isManagement ( ) ) { res += 16 ; } if ( networkCluster.isDefaultRoute ( ) ) { res += 8 ; } if ( networkCluster.isDisplay ( ) ) { res += 4 ; } if ( networkCluster.isMigration ( ) ) { res += 2 ; } if ( networkCluster.isGluster ( ) ) { res += 1 ; } } return res ; }
Source:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
public static void getAllQuotasByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ( ) ; } return ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRelevantQuotasForVdsGroup , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
private void assertGetAllForStoragePoolValidResult ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup group : result ) { org.junit.Assert.assertEquals ( storagePool.getId ( ) , group.getStoragePoolId ( ) ) ; } }

Target:
private void assertGetAllForStoragePoolValidResult ( java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster group : result ) { org.junit.Assert.assertEquals ( storagePool.getId ( ) , group.getStoragePoolId ( ) ) ; } }
Source:
private void initNetworkModels ( ) { java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networkModels = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Network network : allNetworks ) { networkModels.put ( network.getname ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( network , this ) ) ; } setNetworks ( networkModels ) ; }

Target:
private void initNetworkModels ( ) { java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networkModels = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Network network : allNetworks ) { netTodcParams.put ( network.getname ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.DcNetworkParams ( network ) ) ; networkModels.put ( network.getname ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( network , this ) ) ; } setNetworks ( networkModels ) ; }
Source:
public void testGetAllOfType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAllOfType ( StorageType.ISCSI ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool pool : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , pool.getstorage_pool_type ( ) ) ; } }

Target:
public void testGetAllOfType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAllOfType ( StorageType.ISCSI ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool pool : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , pool.getStorageType ( ) ) ; } }
Source:
private static java.util.Properties loadProperties ( java.io.File localeFile ) throws java.io.IOException { java.util.Properties properties = new java.util.Properties ( ) ; java.io.FileReader fr = null ; try { fr = new java.io.FileReader ( localeFile ) ; properties.load ( fr ) ; } finally { if ( fr != null ) { fr.close ( ) ; } } return properties ; }

Target:
private static java.util.Properties loadProperties ( java.io.File localeFile ) throws java.io.IOException { java.util.Properties properties = new java.util.Properties ( ) ; java.io.Reader fr = null ; java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( localeFile ) ; fr = new java.io.InputStreamReader ( fis , java.nio.charset.StandardCharsets.UTF_8 ) ; properties.load ( fr ) ; } finally { if ( fis != null ) { fis.close ( ) ; } if ( fr != null ) { fr.close ( ) ; } } return properties ; }
Source:
protected void addCustomModelsDetailModelList ( org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list ) { list.add ( 3 , new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel ( ) ) ; 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 ( org.ovirt.engine.core.compat.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 ( ) ) ; }
Source:
public void Cancel ( ) { CancelConfirmation ( ) ; setGuideContext ( null ) ; setWindow ( null ) ; UpdateActionAvailability ( ) ; }

Target:
public void onForceRemove ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } org.ovirt.engine.core.common.action.StoragePoolParametersBase tempVar = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSelectedItem ( ) ) ) . getId ( ) ) ; tempVar.setForceDelete ( true ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parametersBase = tempVar ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveStoragePool , parametersBase ) ; cancel ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < java.lang.String > interfaces = ( ( java.util.ArrayList < java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskInterface > interfaceTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( ) ; for ( java.lang.String diskIfs : interfaces ) { try { interfaceTypes.add ( org.ovirt.engine.core.common.businessentities.DiskInterface.valueOf ( diskIfs ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } } chainedCallback.onSuccess ( model , interfaceTypes ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < java.lang.String > interfaces = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskInterface > interfaceTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskInterface > ( ) ; for ( java.lang.String diskIfs : interfaces ) { try { interfaceTypes.add ( org.ovirt.engine.core.common.businessentities.storage.DiskInterface.valueOf ( diskIfs ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } } chainedCallback.onSuccess ( model , interfaceTypes ) ; }
Source:
public void initialize ( ) { super . initialize ( ) ; if ( ( getVm ( ) ) != null ) { updateSuggestedDiskAlias ( ) ; getIsPlugged ( ) . setIsAvailable ( true ) ; } else { getIsReadOnly ( ) . setIsAvailable ( false ) ; getIsPlugged ( ) . setEntity ( false ) ; } getSizeExtend ( ) . setIsAvailable ( false ) ; }

Target:
public void initialize ( ) { super . initialize ( ) ; if ( ( getVm ( ) ) != null ) { updateSuggestedDiskAliasFromServer ( ) ; getIsPlugged ( ) . setIsAvailable ( true ) ; } else { getIsReadOnly ( ) . setIsAvailable ( false ) ; getIsPlugged ( ) . setEntity ( false ) ; } getSizeExtend ( ) . setIsAvailable ( false ) ; }
Source:
public void writeData ( java.io.ObjectOutputStream dos ) { try { writeString ( this . var_name , dos ) ; writeString ( this . var_value , dos ) ; writeDate ( this . var_datetime , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.row18Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , 120 ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }

Target:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , TICKET_VALIDITY_SECONDS ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedManagedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) && ( device.getIsPlugged ( ) ) ) && ( device.getIsManaged ( ) ) ) { result.add ( device ) ; } } return result ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedManagedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isHostDevInterface ( device ) ) || ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) ) && ( device.getIsPlugged ( ) ) ) && ( device.getIsManaged ( ) ) ) { result.add ( device ) ; } } return result ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; model.setClusters ( model , clusters , null ) ; behavior.initTemplate ( ) ; behavior.initCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
public static < T extends org.ovirt.engine.core.common.vdscommands.StorageDomainIdParametersBase & org.ovirt.engine.core.common.vdscommands.PostDeleteAction > T fixParameters ( T parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( parameters.getStorageDomainId ( ) ) ; return org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandler.fixParameters ( parameters , storageDomainStatic.getStorageType ( ) . isFileDomain ( ) ) ; }

Target:
public < T extends org.ovirt.engine.core.common.vdscommands.StorageDomainIdParametersBase & org.ovirt.engine.core.common.vdscommands.PostDeleteAction > T fixParameters ( T parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = storageDomainStaticDao.get ( parameters.getStorageDomainId ( ) ) ; return fixParameters ( parameters , storageDomainStatic.getStorageType ( ) . isFileDomain ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getModifiedNetworks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > modifiedNetworks = new java.util.ArrayList ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) ) { modifiedNetworks.add ( getNetworkBusinessEntityMap ( ) . get ( attachment.getNetworkId ( ) ) ) ; } return modifiedNetworks ; }

Target:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getLabelToNic ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > labelToNic = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { if ( ( nic.getLabels ( ) ) != null ) { for ( java.lang.String label : nic.getLabels ( ) ) { labelToNic.put ( label , nic ) ; } } } return labelToNic ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Nic , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Nic , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Nic , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Nic , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
private boolean configuredNetworkNotAssignedToCluster ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > targetNetworksByName , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsByNetwork , org.ovirt.engine.core.common.businessentities.network.Network net ) { return ( nicsByNetwork.containsKey ( net.getName ( ) ) ) && ( ! ( targetNetworksByName.containsKey ( net.getName ( ) ) ) ) ; }

Target:
private boolean isNetworkAssignedToTargetCluster ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > targetNetworksByName , java.lang.String networkName ) { return targetNetworksByName.containsKey ( networkName ) ; }
Source:
public void vlanBondNameMismatch ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; java.lang.String ifaceName = ( bond.getName ( ) ) + "1" ; parameters.getInterfaces ( ) . add ( createVlan ( ifaceName , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , ifaceName ) ; }

Target:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; java.lang.String networkName = "net" ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , networkName ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER , networkName ) ; }
Source:
public 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 ) ; }

Target:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { 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.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { ( sucessCount ) ++ ; if ( ( ( toAddList.size ( ) ) > 0 ) && ( ( sucessCount ) == ( toRemoveList.size ( ) ) ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.AddEventSubscription , toAddList ) ; } } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { ( sucessCount ) ++ ; if ( ( ( toAddList.size ( ) ) > 0 ) && ( ( sucessCount ) == ( toRemoveList.size ( ) ) ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( ActionType.AddEventSubscription , toAddList ) ; } } }