auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void twoNetworkInterfacesWithSameIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; validateAndAssertResult ( listOfInterfaces , false ) ; }

Target:
public void twoNetworkInterfacesWithSameIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; listOfInterfaces.add ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; validateAndAssertResult ( listOfInterfaces , false ) ; }
Source:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig before = dao.get ( FixturesTool.HOST_NIC_VFS_CONFIG_ALL_NETWORKS_ALLOWED ) ; before.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE2 ) ; before.setAllNetworksAllowed ( ( ! ( before.isAllNetworksAllowed ( ) ) ) ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig after = dao.get ( FixturesTool.HOST_NIC_VFS_CONFIG_ALL_NETWORKS_ALLOWED ) ; org.junit.Assert.assertNotNull ( after ) ; assertHostNicVfsConfigEquals ( before , after ) ; }

Target:
public void testGetByIdNotAllNetworksAllowed ( ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 , result.getId ( ) ) ; checkNetworksAndLabels ( result , 2 , 2 ) ; }
Source:
public static void saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getstorage_ids ( ) . get ( 0 ) ) ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getstorage_ids ( ) . get ( 0 ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }
Source:
private org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters getFirstParam ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( ( parameters != null ) && ( ( parameters.size ( ) ) != 0 ) ) { org.ovirt.engine.core.common.action.VdcActionParametersBase param = parameters.get ( 0 ) ; if ( param instanceof org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters ) { return ( ( org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters ) ( param ) ) ; } } return null ; }

Target:
private org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters getFirstParam ( ) { java.util.Iterator < ? > iterator = ( ( getParameters ( ) ) == null ) ? null : getParameters ( ) . iterator ( ) ; if ( ( iterator != null ) && ( iterator.hasNext ( ) ) ) { java.lang.Object param = iterator.next ( ) ; if ( param instanceof org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters ) { return ( ( org.ovirt.engine.core.common.action.RemoveVmFromPoolParameters ) ( param ) ) ; } } return null ; }
Source:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; addTypeToStorageModels ( StorageDomainType.ISO , models ) ; return models ; }

Target:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel glusterStorageModel = new org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel ( ) ; models.add ( glusterStorageModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; addTypeToStorageModels ( StorageDomainType.ISO , models ) ; return models ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isAttach = ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) . getEntity ( ) ) ) ; createDiskPanel.setVisible ( ( ! isAttach ) ) ; attachDiskPanel.setVisible ( isAttach ) ; if ( ( ! isAttach ) && ( ! ( isNewLunDiskEnabled ) ) ) { disk.getIsInternal ( ) . setEntity ( true ) ; } revealDiskPanel ( disk ) ; }
Source:
private void initListeners ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = extractSpice ( model ) ; if ( spice == null ) { return ; } viewUpdatingListener = new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { getView ( ) . edit ( model ) ; } } ; spice.getUsbAutoShareChangedEvent ( ) . addListener ( viewUpdatingListener ) ; spice.getWANColorDepthChangedEvent ( ) . addListener ( viewUpdatingListener ) ; spice.getWANDisableEffectsChangeEvent ( ) . addListener ( viewUpdatingListener ) ; }

Target:
private void initListeners ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = extractSpice ( model ) ; if ( spice == null ) { return ; } viewUpdatingListener = new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . edit ( model ) ; } } ; spice.getUsbAutoShareChangedEvent ( ) . addListener ( viewUpdatingListener ) ; spice.getWANColorDepthChangedEvent ( ) . addListener ( viewUpdatingListener ) ; spice.getWANDisableEffectsChangeEvent ( ) . addListener ( viewUpdatingListener ) ; }
Source:
public void setMigrationNetwork ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel model , boolean value ) { if ( ! ( isMultiCluster ( ) ) ) { if ( value ) { if ( ( getMigrationNetwork ( ) ) != null ) { getMigrationNetwork ( ) . setMigrationNetwork ( false ) ; } } else { managementNetwork.setMigrationNetwork ( true ) ; } } model.setMigrationNetwork ( value ) ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel getManagementNetwork ( ) { return managementNetwork ; }
Source:
protected void updateActionAvailability ( ) { super . updateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ! ( getIsConnected ( ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) ) && ( isVmConnectReady ( ) ) ) ) ; }

Target:
public boolean isWanOptionsAvailableForMyVm ( ) { boolean isWindowsVm = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( getEntity ( ) . getOs ( ) ) ; boolean spiceGuestAgentInstalled = ( getEntity ( ) . getSpiceDriverVersion ( ) ) != null ; return isWindowsVm && spiceGuestAgentInstalled ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( getParameters ( ) . getVm ( ) . getName ( ) ) ) ) { return java.util.Collections.singletonMap ( getParameters ( ) . getVm ( ) . getName ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_NAME , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { return java.util.Collections.singletonMap ( getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.REMOTE_VM , getVmIsBeingImportedMessage ( ) ) ) ; }
Source:
private void updateDefaultNetworkFilterIfRequired ( ) { if ( ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isUseDefaultNetworkFiterId ( ) ) && ( ! ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . isPassthrough ( ) ) ) ) { final org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = org.ovirt.engine.core.bll.network.cluster.NetworkHelper.resolveVnicProfileDefaultNetworkFilter ( networkFilterDao ) ; if ( networkFilter != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = networkFilter.getId ( ) ; setNetworkFilterId ( networkFilterId ) ; } } }

Target:
private void updateDefaultNetworkFilterIfRequired ( ) { if ( ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isUseDefaultNetworkFilterId ( ) ) && ( ! ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . isPassthrough ( ) ) ) ) { final org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = org.ovirt.engine.core.bll.network.cluster.NetworkHelper.resolveVnicProfileDefaultNetworkFilter ( networkFilterDao ) ; if ( networkFilter != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = networkFilter.getId ( ) ; setNetworkFilterId ( networkFilterId ) ; } } }
Source:
private void afterSuspendTreatment ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.ovirt.engine.core.common.AuditLogType type = ( ( vm.getExitStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmExitStatus.Normal ) ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_OK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( getVdsManager ( ) . getVdsId ( ) , vm.getId ( ) ) ; auditLog ( logable , type ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vm.getId ( ) ) ; }

Target:
private void afterSuspendTreatment ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.ovirt.engine.core.common.AuditLogType type = ( ( vm.getExitStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmExitStatus.Normal ) ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_OK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( getVdsManager ( ) . getVdsId ( ) , vm.getId ( ) ) ; auditLog ( logable , type ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . removeAsyncRunningVm ( vm.getId ( ) ) ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) || ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ) ; }
Source:
public static void getStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
private boolean addInterfaceToProcessedList ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( ifaceByNames.containsKey ( iface.getName ( ) ) ) { addViolation ( VdcBllMessages.NETWORK_INTERFACES_ALREADY_SPECIFIED , iface.getName ( ) ) ; return false ; } ifaceByNames.put ( iface.getName ( ) , iface ) ; return true ; }

Target:
private boolean addInterfaceToProcessedList ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( ifaceByNames.containsKey ( iface.getName ( ) ) ) { addViolation ( EngineMessage.NETWORK_INTERFACES_ALREADY_SPECIFIED , iface.getName ( ) ) ; return false ; } ifaceByNames.put ( iface.getName ( ) , iface ) ; return true ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations add ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType type , java.lang.Integer value , boolean inSync ) { reportedConfigurationList.add ( new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( type , ( value == null ? "null" : value.toString ( ) ) , inSync ) ) ; return this ; }

Target:
public < T > org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations add ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType type , T actual , T expected , boolean inSync ) { java.lang.String actualValue = ( actual == null ) ? null : actual.toString ( ) ; java.lang.String expectedValue = ( expected == null ) ? null : expected.toString ( ) ; reportedConfigurationList.add ( new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( type , actualValue , expectedValue , inSync ) ) ; return this ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter ( ) ; assertTrue ( "-02:03:04.05" , comp.validateFieldValue ( "UPTIME" , "-02:03:04.05" ) ) ; assertTrue ( "1" , comp.validateFieldValue ( "UPTIME" , "1" ) ) ; assertFalse ( "Fer Ever" , comp.validateFieldValue ( "UPTIME" , "FerEver" ) ) ; }

Target:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter ( ) ; org.junit.Assert.assertTrue ( "-02:03:04.05" , comp.validateFieldValue ( "UPTIME" , "-02:03:04.05" ) ) ; org.junit.Assert.assertTrue ( "1" , comp.validateFieldValue ( "UPTIME" , "1" ) ) ; org.junit.Assert.assertFalse ( "Fer Ever" , comp.validateFieldValue ( "UPTIME" , "FerEver" ) ) ; }
Source:
protected void setQcowCompat ( org.ovirt.engine.core.common.businessentities.storage.Image diskImage , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid newImageGroupId , org.ovirt.engine.core.compat.Guid newImageId , org.ovirt.engine.core.compat.Guid newStorageDomainID , boolean shouldPrepareAndTeardown ) { diskImage.setQcowCompat ( QcowCompat.QCOW2_V2 ) ; if ( org.ovirt.engine.core.common.FeatureSupported.qcowCompatSupported ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) { org.ovirt.engine.core.common.businessentities.storage.QemuImageInfo qemuImageInfo = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getQemuImageInfoFromVdsm ( storagePoolId , newStorageDomainID , newImageGroupId , newImageId , shouldPrepareAndTeardown ) ; if ( qemuImageInfo != null ) { diskImage.setQcowCompat ( qemuImageInfo.getQcowCompat ( ) ) ; } } }

Target:
protected void setQcowCompat ( org.ovirt.engine.core.common.businessentities.storage.Image diskImage , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid newImageGroupId , org.ovirt.engine.core.compat.Guid newImageId , org.ovirt.engine.core.compat.Guid newStorageDomainID , org.ovirt.engine.core.compat.Guid hostIdForExecution ) { diskImage.setQcowCompat ( QcowCompat.QCOW2_V2 ) ; if ( org.ovirt.engine.core.common.FeatureSupported.qcowCompatSupported ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) { org.ovirt.engine.core.common.businessentities.storage.QemuImageInfo qemuImageInfo = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getQemuImageInfoFromVdsm ( storagePoolId , newStorageDomainID , newImageGroupId , newImageId , hostIdForExecution , ( hostIdForExecution == null ) ) ; if ( qemuImageInfo != null ) { diskImage.setQcowCompat ( qemuImageInfo.getQcowCompat ( ) ) ; } } }
Source:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > ( modelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getClientStorage ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > ( modelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getClientStorage ( ) ) { { showRefreshButton ( ) ; showPagingButtons ( ) ; showItemsCount ( ) ; showSelectionCountTooltip ( ) ; enableHeaderContextMenu ( ) ; } } ; }
Source:
protected com.google.gwt.user.client.ui.IsWidget createIconPanel ( ) { com.google.gwt.user.client.ui.FlowPanel panel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; panel.addStyleName ( PatternflyConstants.PF_LIST_VIEW_LEFT ) ; org.gwtbootstrap3.client.ui.html.Span iconSpan = new org.gwtbootstrap3.client.ui.html.Span ( ) ; iconSpan.addStyleName ( Styles.FONT_AWESOME_BASE ) ; iconSpan.addStyleName ( IconType.CAMERA.getCssName ( ) ) ; iconSpan.addStyleName ( PatternflyConstants.PF_LIST_VIEW_ICON_SM ) ; panel.add ( iconSpan ) ; return panel ; }

Target:
protected com.google.gwt.user.client.ui.IsWidget createIcon ( ) { org.gwtbootstrap3.client.ui.html.Span iconSpan = new org.gwtbootstrap3.client.ui.html.Span ( ) ; iconSpan.addStyleName ( Styles.FONT_AWESOME_BASE ) ; iconSpan.addStyleName ( IconType.CAMERA.getCssName ( ) ) ; iconSpan.addStyleName ( PatternflyConstants.PF_LIST_VIEW_ICON_SM ) ; iconPanel.add ( iconSpan ) ; return iconPanel ; }
Source:
private synchronized java.util.concurrent.locks.ReentrantReadWriteLock lockForMacPool ( org.ovirt.engine.core.compat.Guid macPoolId ) { if ( poolLocks.containsKey ( macPoolId ) ) { return poolLocks.get ( macPoolId ) ; } java.util.concurrent.locks.ReentrantReadWriteLock lock = new java.util.concurrent.locks.ReentrantReadWriteLock ( ) ; poolLocks.put ( macPoolId , lock ) ; return lock ; }

Target:
private synchronized java.util.concurrent.locks.ReentrantReadWriteLock lockForMacPool ( org.ovirt.engine.core.compat.Guid macPoolId ) { if ( poolLocks.containsKey ( macPoolId ) ) { org.ovirt.engine.core.bll.network.macpool.DecoratedMacPoolFactory.log.debug ( "Returning cached read/write lock for macPoolId={}" , macPoolId ) ; return poolLocks.get ( macPoolId ) ; } org.ovirt.engine.core.bll.network.macpool.DecoratedMacPoolFactory.log.debug ( "Creating read/write lock for macPoolId={}" , macPoolId ) ; java.util.concurrent.locks.ReentrantReadWriteLock lock = new java.util.concurrent.locks.ReentrantReadWriteLock ( ) ; poolLocks.put ( macPoolId , lock ) ; return lock ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageConnection incoming , org.ovirt.engine.core.common.businessentities.StorageServerConnections entity ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = map ( incoming , entity ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( incoming.getHost ( ) ) != null ) { hostId = getHostId ( incoming.getHost ( ) ) ; } return new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageConnection incoming , org.ovirt.engine.core.common.businessentities.StorageServerConnections entity ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = map ( incoming , entity ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( incoming.getHost ( ) ) != null ) { hostId = getHostId ( incoming.getHost ( ) ) ; } return new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId , isForce ( ) ) ; }
Source:
protected void Perform ( ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , mCdImagePath ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }

Target:
protected void perform ( ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , mCdImagePath ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }
Source:
public com.google.gwt.event.dom.client.HasClickHandlers addShutdownButton ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel model , org.ovirt.engine.ui.uicommonweb.UICommand command ) { org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton button = new org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton ( constants.shutdownVm ( ) , resources.stopIcon ( ) , resources.stopDisabledIcon ( ) , style.shutdownButtonAdditionalStyle ( ) ) ; button.setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "shutdownButton" ) ) ; addButtonToPanel ( button ) ; updateButton ( button , command ) ; return button ; }

Target:
public com.google.gwt.event.dom.client.HasClickHandlers addShutdownButton ( ) { org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton button = new org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton ( constants.shutdownVm ( ) , resources.stopIcon ( ) , resources.stopDisabledIcon ( ) , style.shutdownButtonAdditionalStyle ( ) ) ; button.setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "shutdownButton" ) ) ; this . shutdownButton = button ; addButtonToPanel ( button ) ; return button ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( hostName ) ; if ( contentHost == null ) { log.error ( "Failed to find host on provider '{}' by host name '{}' " , getProvider ( ) . getName ( ) , hostName ) ; return java.util.Collections.emptyList ( ) ; } return runErrataListMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATA_ENTRY_POINT , contentHost.getUuid ( ) ) ) ; }

Target:
private org.ovirt.engine.core.compat.Version getForemanVersion ( ) { try { org.ovirt.engine.core.bll.host.provider.foreman.ReportedForemanStatus status = objectMapper.readValue ( runHttpGetMethod ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.API_VERSION_ENTRY_POINT ) , org.ovirt.engine.core.bll.host.provider.foreman.ReportedForemanStatus.class ) ; return new org.ovirt.engine.core.compat.Version ( status.getVersion ( ) ) ; } catch ( java.io.IOException e ) { log.warn ( "Unable to detect Foreman version for provider {}. Using older version to connect to the provider" , getProvider ( ) . getName ( ) ) ; return null ; } }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void testPayloadMapToVmPaylod ( ) { org.ovirt.engine.api.model.Payload payload = new org.ovirt.engine.api.model.Payload ( ) ; payload.setType ( "CDROM" ) ; payload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = org.ovirt.engine.api.restapi.types.VmMapper.map ( payload , null ) ; assertEquals ( payload.getType ( ) , vmPayload.getType ( ) . name ( ) ) ; assertEquals ( payload.getVolumeId ( ) , vmPayload.getVolumeId ( ) ) ; }

Target:
public void testPayloadMapToVmPaylod ( ) { org.ovirt.engine.api.model.Payload payload = new org.ovirt.engine.api.model.Payload ( ) ; payload.setType ( "CDROM" ) ; payload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = org.ovirt.engine.api.restapi.types.VmMapper.map ( payload , null ) ; assertEquals ( payload.getType ( ) , vmPayload.getDeviceType ( ) . name ( ) ) ; assertEquals ( payload.getVolumeId ( ) , vmPayload.getVolumeId ( ) ) ; }
Source:
private boolean noChangesDetected ( ) { return ( ( ( ( getNetworks ( ) . isEmpty ( ) ) && ( getRemovedNetworks ( ) . isEmpty ( ) ) ) && ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) . isEmpty ( ) ) ) && ( getRemovedBonds ( ) . isEmpty ( ) ) ) && ( getRemovedUnmanagedNetworks ( ) . isEmpty ( ) ) ; }

Target:
private boolean noChangesDetected ( ) { return ( ( ( ( getNetworksToConfigure ( ) . isEmpty ( ) ) && ( getRemovedNetworks ( ) . isEmpty ( ) ) ) && ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) . isEmpty ( ) ) ) && ( getRemovedBondNames ( ) . isEmpty ( ) ) ) && ( getRemovedUnmanagedNetworks ( ) . isEmpty ( ) ) ; }
Source:
public java.lang.String getCustomToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }

Target:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }
Source:
int doGenerateMaxLength ( int maxNameLengt , int poolNameLength ) { int allowedLength = ( maxNameLengt - poolNameLength ) - 1 ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( "" ) ; if ( allowedLength == 0 ) { return 0 ; } for ( int i = 0 ; i < allowedLength ; i ++ ) { sb.append ( "9" ) ; } return java.lang.Integer.parseInt ( sb.toString ( ) ) ; }

Target:
int doGenerateMaxNumOfVmsWithQuestionMark ( int maxNameLength , int poolNameLength , int questionMarkCount ) { final int numberOfDigits = maxNameLength - ( poolNameLength - questionMarkCount ) ; return getMaxNumberInNDigits ( numberOfDigits ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( result ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( ( java.lang.Boolean ) ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }
Source:
private org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > setupCanAddVmFromTemplateTests ( final int domainSizeGB , final int sizeRequired ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > cmd = createVmFromTemplateCommand ( vm ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; return cmd ; }

Target:
private void initDestSDs ( org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > command ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd1 = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd2 = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd1.setId ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 ) ; sd2.setId ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_2 ) ; command.destStorages.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 , sd1 ) ; command.destStorages.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_2 , sd2 ) ; }
Source:
public void canDoActionFailure ( ) { org.mockito.Mockito.when ( validator.isConnectionExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isConnectionForISCSIDomainAttached ( domain ) ) . thenReturn ( java.lang.Boolean.TRUE ) ; org.mockito.Mockito.when ( validator.isISCSIConnectionAndDomain ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isDomainOfConnectionExistsAndInactive ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_FOR_DOMAIN_ALREADY_EXISTS ) ; }

Target:
public void validateFailure ( ) { org.mockito.Mockito.when ( validator.isConnectionExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isConnectionForISCSIDomainAttached ( domain ) ) . thenReturn ( java.lang.Boolean.TRUE ) ; org.mockito.Mockito.when ( validator.isISCSIConnectionAndDomain ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isDomainOfConnectionExistsAndInactive ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_FOR_DOMAIN_ALREADY_EXISTS ) ; }
Source:
public boolean isPmReportsStatusDown ( ) { boolean result = false ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.VdsCommand.getVds ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = null ; if ( ( vds != null ) && ( vds.getpm_enabled ( ) ) ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( vds ) ; returnValue = executor.checkStatus ( ) ; result = org.ovirt.engine.core.bll.VdsCommand.isHostStatusOff ( returnValue ) ; } if ( result ) { runVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.common.businessentities.VDSStatus.Down ) ) ; } return result ; }

Target:
public boolean isPmReportsStatusDown ( ) { boolean result = false ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.VdsCommand.getVds ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = null ; if ( ( vds != null ) && ( vds.isPmEnabled ( ) ) ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( vds ) ; returnValue = executor.checkStatus ( ) ; result = org.ovirt.engine.core.bll.VdsCommand.isHostStatusOff ( returnValue ) ; } if ( result ) { runVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.common.businessentities.VDSStatus.Down ) ) ; } 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.storage.ImportStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.PostUpdateItemsAvailability ( behavior , storageModelItem , ( returnValue == null ) ) ; }

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.storage.ImportStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.postUpdateItemsAvailability ( behavior , storageModelItem , ( returnValue == null ) ) ; }
Source:
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 > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) ; java.util.Collections.sort ( storagePoolList , new org.ovirt.engine.ui.uicommonweb.Linq.StoragePoolByNameComparer ( ) ) ; return source ; }

Target:
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 > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) ; java.util.Collections.sort ( storagePoolList , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; }
Source:
private java.util.concurrent.Callable < java.lang.Object > createCallable ( final java.lang.reflect.Method m , final java.lang.Object [ ] args ) { return new java.util.concurrent.Callable < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object call ( ) throws java.lang.Exception { try { return m.invoke ( obj , args ) ; } catch ( java.lang.Exception e ) { throw e ; } } } ; }

Target:
private java.util.concurrent.Callable < java.lang.Object > createCallable ( java.lang.Object obj , java.lang.reflect.Method m , java.lang.Object [ ] args , java.lang.String correlationId ) { return new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.AsyncProxy.InternalCallable ( obj , m , args , correlationId ) ; }
Source:
public void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
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 ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Disks" . equals ( changedArgs.PropertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( changedArgs.PropertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Disks" . equals ( changedArgs.propertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( changedArgs.propertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } } }