auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.businessentities.storage.ImageStatus getImageStatusByClassificationType ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.businessentities.storage.VolumeClassification cinderVolumeType = cinderDisk.getVolumeClassification ( ) ; if ( cinderVolumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Volume ) ) { return getDiskStatus ( cinderDisk.getImageId ( ) ) ; } else if ( cinderVolumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Snapshot ) ) { return getSnapshotStatus ( cinderDisk.getImageId ( ) ) ; } else { org.ovirt.engine.core.bll.storage.CinderBroker.log.error ( "Error, could not determine Cinder entity with id from Cinder provider." , cinderDisk.getDiskAlias ( ) , cinderDisk.getImageId ( ) ) ; } return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.ImageStatus getImageStatusByClassificationType ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.businessentities.storage.VolumeClassification cinderVolumeType = cinderDisk.getVolumeClassification ( ) ; if ( cinderVolumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Volume ) ) { return getDiskStatus ( cinderDisk.getImageId ( ) ) ; } else if ( cinderVolumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Snapshot ) ) { return getSnapshotStatus ( cinderDisk.getImageId ( ) ) ; } org.ovirt.engine.core.bll.storage.CinderBroker.log.error ( "Error, could not determine Cinder entity with id from Cinder provider." , cinderDisk.getDiskAlias ( ) , cinderDisk.getImageId ( ) ) ; return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; }
Source:
public boolean isHotPlugAvailable ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; return ( vm != null ) && ( ( ( ( vm.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( vm.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) || ( ( vm.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Suspended ) ) ) ; }

Target:
public boolean isHotPlugAvailable ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; return ( vm != null ) && ( ( ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Suspended ) ) ) ; }
Source:
private void initImportClonedTemplateDisks ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getParameters ( ) . getImages ( ) ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { generateNewDiskId ( image ) ; updateManagedDeviceMap ( image , getVmTemplate ( ) . getManagedDeviceMap ( ) ) ; } else { newDiskIdForDisk.put ( image.getId ( ) , image ) ; } } }

Target:
private void initImportClonedTemplateDisks ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getImages ( ) ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { generateNewDiskId ( image ) ; updateManagedDeviceMap ( image , getVmTemplate ( ) . getManagedDeviceMap ( ) ) ; } else { newDiskIdForDisk.put ( image.getId ( ) , image ) ; } } }
Source:
public static org.ovirt.engine.core.bll.ValidationResult isConnectionExtensionExists ( org.ovirt.engine.core.compat.Guid connExtId ) { org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionExtensionDao ( ) . get ( connExtId ) ; if ( connExt == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_EXTENSION_DOES_NOT_EXIST , java.lang.String.format ( "$%1$s %2$s" , "connExtId" , connExtId.toString ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isConnectionExtensionExists ( org.ovirt.engine.core.compat.Guid connExtId ) { org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionExtensionDao ( ) . get ( connExtId ) ; if ( connExt == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_EXTENSION_DOES_NOT_EXIST , java.lang.String.format ( "$%1$s %2$s" , "connExtId" , connExtId.toString ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler scheduleTimeout ( ) { java.lang.Class [ ] argTypes = new java.lang.Class [ 0 ] ; java.lang.Object [ ] args = new java.lang.Object [ 0 ] ; java.lang.Integer timeout = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.StoragePoolNonOperationalResetTimeoutInMin ) ; timerId = getScheduler ( ) . scheduleAOneTimeJob ( this , "onTimeout" , argTypes , args , timeout , java.util.concurrent.TimeUnit.MINUTES ) ; return this ; }

Target:
private org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler scheduleTimeout ( ) { java.lang.Class [ ] argTypes = new java.lang.Class [ 0 ] ; java.lang.Object [ ] args = new java.lang.Object [ 0 ] ; java.lang.Integer timeout = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.StoragePoolNonOperationalResetTimeoutInMin ) ; timerId = getScheduler ( ) . scheduleAOneTimeJob ( this , "onTimeout" , argTypes , args , timeout , java.util.concurrent.TimeUnit.MINUTES ) ; return this ; }
Source:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType , java.lang.String actionProgressText ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = getSelectedItem ( ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName , selectedSession.getMasterVolumeName ( ) , selectedSession.getSlaveVolumeName ( ) , selectedSession.getSlaveHostName ( ) , null ) ; onGeoRepSessionAction ( actionType ) ; }

Target:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = getSelectedItem ( ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName , selectedSession.getMasterVolumeName ( ) , selectedSession.getSlaveVolumeName ( ) , selectedSession.getSlaveHostName ( ) , null ) ; onGeoRepSessionAction ( actionType ) ; }
Source:
private org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel createErrorNetworkModel ( java.lang.String networkName , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.network errorNetwork = new org.ovirt.engine.core.common.businessentities.network ( ) ; errorNetwork.setname ( networkName ) ; errorNetwork.setvlan_id ( vlanId ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( errorNetwork , this ) ; networkModel.setError ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . thisNetworkDoesNotExistInTheClusterErr ( ) ) ; networkMap.put ( networkName , networkModel ) ; return networkModel ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel createErrorNetworkModel ( java.lang.String networkName , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.Network errorNetwork = new org.ovirt.engine.core.common.businessentities.Network ( ) ; errorNetwork.setname ( networkName ) ; errorNetwork.setvlan_id ( vlanId ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( errorNetwork , this ) ; networkModel.setError ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . thisNetworkDoesNotExistInTheClusterErr ( ) ) ; networkMap.put ( networkName , networkModel ) ; return networkModel ; }
Source:
private boolean addMacToMap ( java.util.Map < java.lang.String , java.lang.Integer > macMap , java.lang.String mac ) { boolean returnValue = false ; if ( ! ( macMap.containsKey ( mac ) ) ) { macMap.put ( mac , 1 ) ; returnValue = true ; } else if ( allowDuplicate ( ) ) { incrementMacInMap ( macMap , mac ) ; returnValue = true ; } return returnValue ; }

Target:
private boolean addMacToMap ( java.util.Map < java.lang.String , java.lang.Integer > macMap , java.lang.String mac ) { if ( ! ( macMap.containsKey ( mac ) ) ) { macMap.put ( mac , 1 ) ; return true ; } else if ( allowDuplicate ( ) ) { incrementMacInMap ( macMap , mac ) ; return true ; } return false ; }
Source:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( 0 ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }
Source:
private void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSparse ( ) ) ; assertTrue ( ( ! ( model.isBootable ( ) ) ) ) ; assertTrue ( model.isPropagateErrors ( ) ) ; }

Target:
private void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSparse ( ) ) ; assertTrue ( model.isPropagateErrors ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > cinderVolumeTypes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( returnValue ) ) ; java.util.List < java.lang.String > volumeTypesNames = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType cinderVolumeType : cinderVolumeTypes ) { volumeTypesNames.add ( cinderVolumeType.getName ( ) ) ; } diskModel.getCinderVolumeType ( ) . setItems ( volumeTypesNames ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > cinderVolumeTypes ) { java.util.List < java.lang.String > volumeTypesNames = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType cinderVolumeType : cinderVolumeTypes ) { volumeTypesNames.add ( cinderVolumeType.getName ( ) ) ; } getCinderVolumeType ( ) . setItems ( volumeTypesNames ) ; }
Source:
public void checkExecuteCommandWithNullVdsId ( ) { parameters.setStorageServerConnection ( NFSConnection ) ; parameters.setVdsId ( null ) ; org.mockito.Mockito.doNothing ( ) . when ( storageServerConnectionDao ) . remove ( NFSConnection.getId ( ) ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( command , org.mockito.Mockito.never ( ) ) . disconnectStorage ( ) ; }

Target:
public void checkExecuteCommandWithNullVdsId ( ) { parameters.setStorageServerConnection ( NFSConnection ) ; parameters.setVdsId ( null ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( command , org.mockito.Mockito.never ( ) ) . disconnectStorage ( ) ; }
Source:
public static java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > networksByName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { if ( ! ( networks.isEmpty ( ) ) ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > byName = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { byName.put ( net.getname ( ) , net ) ; } return byName ; } else { return java.util.Collections.emptyMap ( ) ; } }

Target:
public static java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > networksByName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { if ( ! ( networks.isEmpty ( ) ) ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > byName = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { byName.put ( net.getName ( ) , net ) ; } return byName ; } else { return java.util.Collections.emptyMap ( ) ; } }
Source:
public boolean existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface interfaceToPlug ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > vmNetworkIntrefaces = getVmNicDao ( ) . getPluggedForMac ( interfaceToPlug.getMacAddress ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic vmNetworkInterface : vmNetworkIntrefaces ) { if ( ! ( interfaceToPlug.getId ( ) . equals ( vmNetworkInterface.getId ( ) ) ) ) { return true ; } } return false ; }

Target:
public boolean existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.common.businessentities.network.VmNic interfaceToPlug ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > vmNetworkIntrefaces = getVmNicDao ( ) . getPluggedForMac ( interfaceToPlug.getMacAddress ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic vmNetworkInterface : vmNetworkIntrefaces ) { if ( ! ( interfaceToPlug.getId ( ) . equals ( vmNetworkInterface.getId ( ) ) ) ) { return true ; } } return false ; }
Source:
public void getVdsNullRun ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( null ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }

Target:
public void getVdsNullRun ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( null ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > getParametersForChildCommand ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > sortedList = org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getParameters ( ) . getImagesParameters ( ) ; java.util.Collections.sort ( sortedList , new java.util.Comparator < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public int compare ( org.ovirt.engine.core.common.action.VdcActionParametersBase o1 , org.ovirt.engine.core.common.action.VdcActionParametersBase o2 ) { return ( ( org.ovirt.engine.core.common.action.ImagesActionsParametersBase ) ( o1 ) ) . getDestinationImageId ( ) . compareTo ( ( ( org.ovirt.engine.core.common.action.ImagesActionsParametersBase ) ( o2 ) ) . getDestinationImageId ( ) ) ; } } ) ; return sortedList ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > getParametersForChildCommand ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > sortedList = getParameters ( ) . getImagesParameters ( ) ; java.util.Collections.sort ( sortedList , new java.util.Comparator < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public int compare ( org.ovirt.engine.core.common.action.VdcActionParametersBase o1 , org.ovirt.engine.core.common.action.VdcActionParametersBase o2 ) { return ( ( org.ovirt.engine.core.common.action.ImagesActionsParametersBase ) ( o1 ) ) . getDestinationImageId ( ) . compareTo ( ( ( org.ovirt.engine.core.common.action.ImagesActionsParametersBase ) ( o2 ) ) . getDestinationImageId ( ) ) ; } } ) ; return sortedList ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { cancel ( ) ; } }
Source:
private static void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . enrichDiskByJsonDescription ( org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.Assert.assertEquals ( disk , diskToEnrich ) ; }

Target:
private static void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . enrichDiskByJsonDescription ( org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.Assert.assertEquals ( diskToEnrich , disk ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.AddGroupCommand.getAdGroupDAO ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup groupToAdd = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getGroupToAdd ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = dao.getByExternalId ( groupToAdd.getDomain ( ) , groupToAdd.getExternalId ( ) ) ; if ( dbGroup == null ) { dao.save ( groupToAdd ) ; } else { dao.update ( dbGroup ) ; } setActionReturnValue ( groupToAdd.getId ( ) ) ; org.ovirt.engine.core.bll.AddGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.AddGroupCommand.getAdGroupDAO ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup groupToAdd = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getGroupToAdd ( ) ; org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = dao.getByExternalId ( groupToAdd.getDomain ( ) , groupToAdd.getExternalId ( ) ) ; if ( dbGroup == null ) { dao.save ( groupToAdd ) ; } else { dao.update ( dbGroup ) ; groupToAdd = dbGroup ; } setActionReturnValue ( groupToAdd.getId ( ) ) ; org.ovirt.engine.core.bll.AddGroupCommand.setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainPoolMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( getParameters ( ) . getNewMasterDomainId ( ) , getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . save ( domainPoolMap ) ; getStoragePool ( ) . setstatus ( StoragePoolStatus.Problematic ) ; executeReconstruct ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( reconstructOpSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainPoolMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( getParameters ( ) . getNewMasterDomainId ( ) , getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . save ( domainPoolMap ) ; executeReconstruct ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( reconstructOpSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }
Source:
private org.ovirt.engine.core.vdsbroker.monitoring.VmStatsRefresher getRefresherForVds ( org.ovirt.engine.core.vdsbroker.VdsManager vdsManager ) { org.ovirt.engine.core.compat.Version version = vdsManager.getCompatibilityVersion ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = vdsManager.getCopyVds ( ) ; if ( ( ( ( org.ovirt.engine.core.common.FeatureSupported.jsonProtocol ( version ) ) && ( ( org.ovirt.engine.core.common.businessentities.VdsProtocol.STOMP ) == ( vds.getProtocol ( ) ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.vmStatsEvents ( version ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.events ( version ) ) ) { return new org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher ( vdsManager ) ; } return new org.ovirt.engine.core.vdsbroker.monitoring.PollListAndAllVmStatsRefresher ( vdsManager ) ; }

Target:
private org.ovirt.engine.core.vdsbroker.monitoring.VmStatsRefresher getRefresherForVds ( org.ovirt.engine.core.vdsbroker.VdsManager vdsManager ) { org.ovirt.engine.core.compat.Version version = vdsManager.getCompatibilityVersion ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = vdsManager.getCopyVds ( ) ; if ( ( ( ( org.ovirt.engine.core.common.businessentities.VdsProtocol.STOMP ) == ( vds.getProtocol ( ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.vmStatsEvents ( version ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.events ( version ) ) ) { return new org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher ( vdsManager ) ; } return new org.ovirt.engine.core.vdsbroker.monitoring.PollListAndAllVmStatsRefresher ( vdsManager ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSession ( ) . getId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass , isWaitForResult ) ; return returnValues ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSession ( ) . getId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass , isWaitForResult ) ; return returnValues ; }
Source:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { context = input.get ( Base.InvokeKeys.CONTEXT ) ; context.< java.util.Collection < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Internal Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , ( ( Authn.Capabilities.AUTHENTICATE_CREDENTIALS ) | ( Authn.Capabilities.AUTHENTICATE_PASSWORD ) ) ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; java.util.Properties config = context.get ( Base.ContextKeys.CONFIGURATION ) ; adminUser = config.getProperty ( "config.authn.user.name" , "admin" ) ; adminPassword = config.getProperty ( "config.authn.user.password" ) ; }

Target:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap input ) { context = input.get ( Base.InvokeKeys.CONTEXT ) ; context.< java.util.Collection < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Internal Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , ( ( Authn.Capabilities.AUTHENTICATE_CREDENTIALS ) | ( Authn.Capabilities.AUTHENTICATE_PASSWORD ) ) ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; java.util.Properties config = context.get ( Base.ContextKeys.CONFIGURATION ) ; adminUser = config.getProperty ( "config.authn.user.name" , "admin" ) ; adminPassword = config.getProperty ( "config.authn.user.password" ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStoragePoolIsoMapDao ( ) ) ; storagePoolIsoMapDAO = prepareDAO ( dbFacade.getStoragePoolDao ( ) ) ; existingPool = storagePoolIsoMapDAO.get ( new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; existingStoragePoolIsoMap = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAOTest.EXISTING_ISO_ID , existingPool.getId ( ) ) ) ; newStoragePoolIsoMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAOTest.FREE_ISO_ID , existingPool.getId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Unattached ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStoragePoolIsoMapDao ( ) ; storagePoolIsoMapDAO = dbFacade.getStoragePoolDao ( ) ; existingPool = storagePoolIsoMapDAO.get ( new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; existingStoragePoolIsoMap = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAOTest.EXISTING_ISO_ID , existingPool.getId ( ) ) ) ; newStoragePoolIsoMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAOTest.FREE_ISO_ID , existingPool.getId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Unattached ) ; }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( getQuota ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } if ( getQuota ( ) . isDefault ( ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_DEFAULT_CANNOT_BE_CHANGED ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( getQuota ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } if ( getQuota ( ) . isDefault ( ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_DEFAULT_CANNOT_BE_CHANGED ) ; return false ; } return super . validate ( ) ; }
Source:
private void startRebalance ( ) { if ( ( getSelectedItems ( ) ) == null ) { return ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( volume.getId ( ) , false , false ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartRebalanceGlusterVolume , list ) ; }

Target:
private void startRebalance ( ) { if ( ( getSelectedItems ( ) ) == null ) { return ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( volume.getId ( ) , false , false ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartRebalanceGlusterVolume , list , null , true , true ) ; }
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 ) { 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 ( ) ; }
Source:
private void cleanupPassthroughVnics ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > vnicToVfMap = getVnicToVfMap ( ) ; if ( vnicToVfMap != null ) { hostNicVfsConfigHelper.setVmIdOnVfs ( org.ovirt.engine.core.bll.RunVmCommand.getVdsId ( ) , null , new java.util.HashSet < java.lang.String > ( vnicToVfMap.values ( ) ) ) ; } vfScheduler.cleanVmData ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; }

Target:
private void cleanupPassthroughVnics ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > vnicToVfMap = getVnicToVfMap ( ) ; if ( vnicToVfMap != null ) { hostNicVfsConfigHelper.setVmIdOnVfs ( org.ovirt.engine.core.bll.RunVmCommand.getVdsId ( ) , null , new java.util.HashSet ( vnicToVfMap.values ( ) ) ) ; } vfScheduler.cleanVmData ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > getClusterByServiceList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list , boolean supportsVirtService , boolean supportsGlusterService ) { final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : list ) { if ( ( supportsVirtService && ( cluster.supportsVirtService ( ) ) ) || ( supportsGlusterService && ( cluster.supportsGlusterService ( ) ) ) ) { filteredList.add ( cluster ) ; } } java.util.Collections.sort ( filteredList , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return filteredList ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > getClusterByServiceList ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > list , boolean supportsVirtService , boolean supportsGlusterService ) { final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : list ) { if ( ( supportsVirtService && ( cluster.supportsVirtService ( ) ) ) || ( supportsGlusterService && ( cluster.supportsGlusterService ( ) ) ) ) { filteredList.add ( cluster ) ; } } java.util.Collections.sort ( filteredList , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return filteredList ; }
Source:
protected void setUpFormatDomain ( boolean shouldFail ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( ( ! shouldFail ) ) ; org.mockito.Mockito.doReturn ( ret ) . when ( command ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.FormatStorageDomain ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters.class ) ) ; }

Target:
protected void setUpFormatDomain ( boolean shouldFail ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( ( ! shouldFail ) ) ; org.mockito.Mockito.doReturn ( ret ) . when ( command ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.FormatStorageDomain ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.Erratum > erratum ) { if ( ( erratum.getEntity ( ) . getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.BUGFIX ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.bug ( ) ; } else if ( ( erratum.getEntity ( ) . getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.ENHANCEMENT ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.enhancement ( ) ; } else if ( ( erratum.getEntity ( ) . getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.SECURITY ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.security ( ) ; } return null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Erratum erratum ) { if ( ( erratum.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.BUGFIX ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.bug ( ) ; } else if ( ( erratum.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.ENHANCEMENT ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.enhancement ( ) ; } else if ( ( erratum.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Erratum.ErrataType.SECURITY ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.ErrataTableView.resources.security ( ) ; } return null ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; if ( disk.isShareable ( ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmDiskAttachPopupWidget.constants.shareable ( ) ) ; } return null ; }

Target:
public java.lang.String getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; if ( disk.isShareable ( ) ) { return org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmDiskAttachPopupWidget.constants.shareable ( ) ; } return null ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( ! ( bondDialogModel.validate ( ) ) ) { return ; } sourceListModel.setConfirmWindow ( null ) ; java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > potentialNetworks = computeLabelChanges ( bondDialogModel.getLabelsModel ( ) , nicMap.get ( entity.getName ( ) ) . getItems ( ) ) ; if ( validateLabelChanges ( potentialNetworks ) ) { setBondOptions ( entity , bondDialogModel ) ; commitLabelChanges ( bondDialogModel.getLabelsModel ( ) , entity , potentialNetworks ) ; redraw ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( ! ( bondDialogModel.validate ( ) ) ) { return ; } sourceListModel.setConfirmWindow ( null ) ; setBondOptions ( entity , bondDialogModel ) ; }
Source:
public static boolean checkVersionSupported ( final org.ovirt.engine.core.compat.Version compatibility_version ) { boolean result = true ; if ( ( compatibility_version == null ) || ( ! ( org.ovirt.engine.core.common.config.Config.< java.util.Set < org.ovirt.engine.core.compat.Version > > GetValue ( ConfigValues.SupportedClusterLevels ) . contains ( compatibility_version ) ) ) ) { result = false ; } return result ; }

Target:
public static boolean checkVersionSupported ( final org.ovirt.engine.core.compat.Version compatibility_version ) { boolean result = true ; if ( ( compatibility_version == null ) || ( ! ( org.ovirt.engine.core.common.config.Config.< java.util.Set < org.ovirt.engine.core.compat.Version > > getValue ( ConfigValues.SupportedClusterLevels ) . contains ( compatibility_version ) ) ) ) { result = false ; } return result ; }
Source:
protected void removeSnapshot ( org.ovirt.engine.core.common.businessentities.storage.DiskImage snapshot ) { org.ovirt.engine.core.bll.BaseImagesCommand.getImageStorageDomainMapDao ( ) . remove ( snapshot.getImageId ( ) ) ; getImageDao ( ) . remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesForDisk = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.BaseImagesCommand.getBaseDiskDao ( ) . remove ( snapshot.getId ( ) ) ; } }

Target:
protected void removeSnapshot ( org.ovirt.engine.core.common.businessentities.storage.DiskImage snapshot ) { org.ovirt.engine.core.bll.BaseImagesCommand.getImageStorageDomainMapDao ( ) . remove ( snapshot.getImageId ( ) ) ; org.ovirt.engine.core.bll.BaseImagesCommand.getImageDao ( ) . remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesForDisk = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.BaseImagesCommand.getBaseDiskDao ( ) . remove ( snapshot.getId ( ) ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( returnValue ) ) ; final org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel ) ( target ) ) ; model.setItems ( list ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( returnValue ) ) ; final org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel ) ( target ) ) ; model.setItems ( list ) ; }
Source:
protected void executeVmCommand ( ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retValue = runVdsCommand ( VDSCommandType.ConvertVm , buildConvertParameters ( ) ) ; if ( retValue.getSucceeded ( ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.WAIT_FOR_START ) ; org.ovirt.engine.core.bll.ConvertVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" ) ; setCommandStatus ( CommandStatus.FAILED ) ; } } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" , e ) ; setCommandStatus ( CommandStatus.FAILED ) ; } }

Target:
protected void executeVmCommand ( ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retValue = runVdsCommand ( ) ; if ( retValue.getSucceeded ( ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.WAIT_FOR_START ) ; org.ovirt.engine.core.bll.ConvertVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" ) ; setCommandStatus ( CommandStatus.FAILED ) ; } } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" , e ) ; setCommandStatus ( CommandStatus.FAILED ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getParameters ( ) . getPoolId ( ) , org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmPoolByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public org.ovirt.engine.core.aaa.AuthenticationResult authenticate ( java.lang.String name , java.lang.String password ) { org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.AuthenticateUser , new org.ovirt.engine.core.bll.adbroker.LdapUserPasswordBaseParameters ( getProfileName ( ) , name , password ) ) ; org.ovirt.engine.core.bll.adbroker.UserAuthenticationResult authResult = ( ( org.ovirt.engine.core.bll.adbroker.UserAuthenticationResult ) ( ldapResult.getReturnValue ( ) ) ) ; return new org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticationResult ( getProfileName ( ) , authResult ) ; }

Target:
public void authenticate ( java.lang.String name , java.lang.String password ) { broker.runAdAction ( AdActionType.AuthenticateUser , new org.ovirt.engine.core.bll.adbroker.LdapUserPasswordBaseParameters ( getProfileName ( ) , name , password ) ) ; }