auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void validateInvalidDestinationAndSourceDomainOfDifferentStorageSubtypes ( org.ovirt.engine.core.common.businessentities.storage.StorageType sourceType , org.ovirt.engine.core.common.businessentities.storage.StorageType destType ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; srcStorageDomain.setStorageType ( sourceType ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStatus ( StorageDomainStatus.Active ) ; dstStorageDomain.setStorageType ( destType ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
private void validateInvalidDestinationAndSourceDomainOfDifferentStorageSubtypes ( org.ovirt.engine.core.common.businessentities.storage.StorageType sourceType , org.ovirt.engine.core.common.businessentities.storage.StorageType destType ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; srcStorageDomain.setStorageType ( sourceType ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStatus ( StorageDomainStatus.Active ) ; dstStorageDomain.setStorageType ( destType ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
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 > > 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_NAME_ALREADY_USED ) ) ; } return null ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getDiskProfile ( ) . getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( getDiskProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult parentEntityNotChanged ( ) { if ( org.apache.commons.lang.ObjectUtils.equals ( getProfile ( ) . getStorageDomainId ( ) , getProfileFromDb ( ) . getStorageDomainId ( ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_CHANGE_PROFILE ) ; }
Source:
public void canSetNumaPinning ( ) { paramNumaNodes.clear ( ) ; paramNumaNodes.add ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , vdsNumaNodes ) ) ; mockCommandWithVmFromParams ( ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massRemoveNumaNodeByNumaNodeId ( org.mockito.Matchers.eq ( existingNumaNodeIds ) ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massSaveNumaNode ( org.mockito.Matchers.eq ( paramNumaNodes ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }

Target:
public void canSetNumaPinning ( ) { paramNumaNodes.clear ( ) ; paramNumaNodes.add ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , vdsNumaNodes ) ) ; mockCommandWithVmFromParams ( ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massRemoveNumaNodeByNumaNodeId ( org.mockito.ArgumentMatchers.eq ( existingNumaNodeIds ) ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massSaveNumaNode ( org.mockito.ArgumentMatchers.eq ( paramNumaNodes ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.DiskImage x , org.ovirt.engine.core.common.businessentities.DiskImage y ) { if ( x.getCreationDate ( ) . before ( y.getCreationDate ( ) ) ) { return - 1 ; } if ( x.getCreationDate ( ) . after ( y.getCreationDate ( ) ) ) { return 1 ; } return 0 ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.storage.DiskImage x , org.ovirt.engine.core.common.businessentities.storage.DiskImage y ) { if ( x.getCreationDate ( ) . before ( y.getCreationDate ( ) ) ) { return - 1 ; } if ( x.getCreationDate ( ) . after ( y.getCreationDate ( ) ) ) { return 1 ; } return 0 ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateRequestedProxyHost ( ) { if ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_DOES_NOT_EXIST ) ; } if ( ! ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolId ( ) . equals ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) . getStoragePoolId ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_NOT_IN_DEST_STORAGE_POOL ) ; } if ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL ) ; } return ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateRequestedProxyHost ( ) { if ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VDS_DOES_NOT_EXIST ) ; } if ( ! ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolId ( ) . equals ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) . getStoragePoolId ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_NOT_IN_DEST_STORAGE_POOL ) ; } if ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL ) ; } return ValidationResult.VALID ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( java.lang.String name , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = control.createMock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.easymock.EasyMock.expect ( vdsGroup.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( vdsGroup.getName ( ) ) . andReturn ( name ) . anyTimes ( ) ; return vdsGroup ; }

Target:
private org.ovirt.engine.core.common.businessentities.Cluster getCluster ( java.lang.String name , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = control.createMock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.easymock.EasyMock.expect ( cluster.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( cluster.getName ( ) ) . andReturn ( name ) . anyTimes ( ) ; return cluster ; }
Source:
private void checkReturnValue ( org.ovirt.engine.core.bll.GetoVirtISOsQuery < org.ovirt.engine.core.common.queries.VdsIdParametersBase > query ) { java.util.List < org.ovirt.engine.core.compat.RpmVersion > isosList = ( ( java.util.List < org.ovirt.engine.core.compat.RpmVersion > ) ( query.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; assertTrue ( ( ! ( isosList.isEmpty ( ) ) ) ) ; }

Target:
public void testPrefixChange ( ) { org.ovirt.engine.core.bll.GetoVirtISOsTest.mcr.mockConfigValue ( ConfigValues.OvirtIsoPrefix , "a different prefix" ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . ExecuteCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.junit.Assert.assertTrue ( "Prefix was changed, no ISOs should be returned" , ( ( java.util.List < org.ovirt.engine.core.compat.RpmVersion > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }
Source:
public java.lang.Void call ( ) { com.woorea.openstack.cinder.model.VolumeForUpdate volumeForUpdate = new com.woorea.openstack.cinder.model.VolumeForUpdate ( ) ; volumeForUpdate.setName ( cinderDisk.getDiskAlias ( ) ) ; volumeForUpdate.setDescription ( cinderDisk.getDiskDescription ( ) ) ; proxy.updateVolume ( cinderDisk.getId ( ) . toString ( ) , volumeForUpdate ) ; return null ; }

Target:
public java.lang.Void call ( ) { com.woorea.openstack.cinder.model.VolumeForUpdate volumeForUpdate = new com.woorea.openstack.cinder.model.VolumeForUpdate ( ) ; volumeForUpdate.setName ( cinderDisk.getDiskAlias ( ) ) ; volumeForUpdate.setDescription ( cinderDisk.getDiskDescription ( ) ) ; proxy.updateVolume ( cinderDisk.getImageId ( ) . toString ( ) , volumeForUpdate ) ; return null ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdcOptionDao ( ) . getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getoption_value ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( VdcBllMessages.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = dbFacade.getVdcOptionDao ( ) . getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getoption_value ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( VdcBllMessages.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }
Source:
public void shouldDetectNeverStartedVM ( ) { final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.hamcrest.MatcherAssert.assertThat ( filter ( newVM , tooOldHost , newEnoughHost ) , org.hamcrest.Matchers.hasItems ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( filter ( newVM , tooOldHost , newEnoughHost ) , org.hamcrest.Matchers.hasSize ( 2 ) ) ; }

Target:
public void shouldWeightNothingOnVmStartWithDifferenOsFamilies ( ) { org.ovirt.engine.core.common.businessentities.VDS fedoraHost = newHost ( "Fedora - 23 - 1.fc23" ) ; final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.hamcrest.MatcherAssert.assertThat ( filter ( newVM , tooOldHost , newEnoughHost , fedoraHost ) , org.hamcrest.Matchers.hasItems ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( fedoraHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( filter ( newVM , tooOldHost , newEnoughHost , fedoraHost ) , org.hamcrest.Matchers.hasSize ( 3 ) ) ; }
Source:
private void withDataCenterLoaded ( org.ovirt.engine.core.compat.Guid dataCenterId , final org.ovirt.engine.ui.frontend.INewAsyncCallback callback ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDataCenterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( null , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setStoragePool ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ) ; callback.onSuccess ( model , returnValue ) ; } } ) , dataCenterId ) ; }

Target:
private void withDataCenterLoaded ( org.ovirt.engine.core.compat.Guid dataCenterId , final org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.StoragePool > callback ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDataCenterById ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.StoragePool returnValue ) { setStoragePool ( returnValue ) ; callback.onSuccess ( returnValue ) ; } } ) , dataCenterId ) ; }
Source:
public static boolean isBackedByHugepages ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { if ( ( ( vm.getCustomProperties ( ) ) == null ) || ( vm.getCustomProperties ( ) . isEmpty ( ) ) ) { return false ; } java.lang.String hugePage = org.ovirt.engine.core.common.utils.HugePageUtils.getHugePageSize ( vm ) ; if ( hugePage == null ) { return false ; } try { return ( java.lang.Integer.parseInt ( hugePage ) ) > 0 ; } catch ( java.lang.NumberFormatException e ) { return false ; } }

Target:
public static java.util.Optional < java.lang.Integer > getHugePageSize ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.common.utils.customprop.SimpleCustomPropertiesUtil util = org.ovirt.engine.core.common.utils.customprop.SimpleCustomPropertiesUtil.getInstance ( ) ; java.util.Map < java.lang.String , java.lang.String > customProperties = util.convertProperties ( vm.getCustomProperties ( ) ) ; java.lang.String hugePageStr = customProperties.get ( "hugepages" ) ; if ( hugePageStr == null ) { return java.util.Optional.empty ( ) ; } try { return java.util.Optional.of ( java.lang.Integer.parseInt ( hugePageStr ) ) ; } catch ( java.lang.NumberFormatException e ) { return java.util.Optional.empty ( ) ; } }
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.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setTitle ( ( object.isBoot ( ) ? getDefaultTitle ( ) : null ) ) ; return object.isBoot ( ) ? getDefaultImage ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setTitle ( ( ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? getDefaultTitle ( ) : null ) ) ; return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.externalDiskIcon ( ) : null ; }
Source:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileTemplateListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
private void setDetailList ( final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileVmListModel vNicProfileVmListModel , final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileTemplateListModel vNicProfileTemplateListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > permissionListModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasEntity < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > > list = new java.util.ArrayList < > ( ) ; list.add ( vNicProfileVmListModel ) ; list.add ( vNicProfileTemplateListModel ) ; list.add ( permissionListModel ) ; setDetailModels ( list ) ; }
Source:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testDedicatedHostNotExist ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }

Target:
private void mockGraphicsDevice ( ) { org.ovirt.engine.core.common.businessentities.VmDevice graphicsDevice = new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ; graphicsDevice.setDeviceId ( Guid.Empty ) ; graphicsDevice.setVmId ( vm.getId ( ) ) ; org.mockito.Mockito.when ( vmDeviceDAO.getVmDeviceByVmIdAndType ( vm.getId ( ) , VmDeviceGeneralType.GRAPHICS ) ) . thenReturn ( java.util.Arrays.asList ( graphicsDevice ) ) ; org.mockito.Mockito.doReturn ( vmDeviceDAO ) . when ( dbFacade ) . getVmDeviceDao ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.setDbFacade ( dbFacade ) ; }
Source:
protected boolean shouldCheckSpaceInStorageDomains ( ) { return ( ! ( getImagesToCheckDestinationStorageDomains ( ) . isEmpty ( ) ) ) && ( ! ( org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( getImagesToCheckDestinationStorageDomains ( ) , new org.ovirt.engine.core.utils.linq.All < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) . getImageId ( ) . equals ( VmTemplateHandler.BlankVmTemplateId ) ) ) ; }

Target:
protected boolean shouldCheckSpaceInStorageDomains ( ) { return ( ! ( getImagesToCheckDestinationStorageDomains ( ) . isEmpty ( ) ) ) && ( ! ( org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( getImagesToCheckDestinationStorageDomains ( ) , new org.ovirt.engine.core.utils.linq.All < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) . getImageId ( ) . equals ( VmTemplateHandler.BLANK_VM_TEMPLATE_ID ) ) ) ; }
Source:
protected void onCommonModelChange ( ) { super . onCommonModelChange ( ) ; org.ovirt.engine.ui.common.uicommon.model.DataBoundTabModelProvider.getModel ( ) . getItemsChangedEvent ( ) . addListener ( 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 ) { if ( ( hasModel ( ) ) && ( handleItemsChangedEvent ( ) ) ) { updateData ( ) ; } } } ) ; }

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 pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.PROGRESS.equals ( pcArgs.propertyName ) ) { clearData ( ) ; } } }
Source:
public void vdsGroupWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }

Target:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.GLUSTER_NOT_SUPPORTED ) ; }
Source:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask handleTaskReturn ( org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask asyncTask ) { org.ovirt.engine.core.compat.Guid externalTaskId = asyncTask.getTaskId ( ) ; asyncTaskStep.setStatus ( JobExecutionStatus.STARTED ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.updateStepExternalId ( asyncTaskStep , externalTaskId , ExternalSystemType.GLUSTER ) ; org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getExecutionContext ( ) . getJob ( ) . setStatus ( JobExecutionStatus.STARTED ) ; asyncTask.setStepId ( asyncTaskStep.getId ( ) ) ; return asyncTask ; }

Target:
protected org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask handleTaskReturn ( org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask asyncTask ) { org.ovirt.engine.core.compat.Guid externalTaskId = asyncTask.getTaskId ( ) ; asyncTaskStep.setStatus ( JobExecutionStatus.STARTED ) ; executionHandler.updateStepExternalId ( asyncTaskStep , externalTaskId , ExternalSystemType.GLUSTER ) ; org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getExecutionContext ( ) . getJob ( ) . setStatus ( JobExecutionStatus.STARTED ) ; asyncTask.setStepId ( asyncTaskStep.getId ( ) ) ; return asyncTask ; }
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase createException ( ) { org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx ; final java.lang.String errorMessage = java.lang.String.format ( "Failed to %1$s, error = %2$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase.getCommandName ( ) , getReturnStatus ( ) . mMessage ) ; if ( ( this ) instanceof org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand ) { outEx = new org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException ( errorMessage ) ; } else { outEx = new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException ( errorMessage ) ; } return outEx ; }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase createException ( ) { final java.lang.String errorMessage = java.lang.String.format ( "Failed to %1$s, error = %2$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase.getCommandName ( ) , getReturnStatus ( ) . mMessage ) ; return createDefaultConcreteException ( errorMessage ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private boolean validateServers ( java.util.Set < java.lang.String > serverNames ) { for ( java.lang.String serverName : serverNames ) { if ( ( ( getVdsStaticDao ( ) . getAllForHost ( serverName ) . size ( ) ) > 0 ) || ( ( getVdsStaticDao ( ) . getAllWithIpAddress ( serverName ) . size ( ) ) > 0 ) ) { return false ; } } return true ; }

Target:
private boolean validateServers ( java.util.Set < java.lang.String > serverNames ) { for ( java.lang.String serverName : serverNames ) { if ( ( ( getVdsStaticDao ( ) . getByHostName ( serverName ) ) != null ) || ( ( getVdsStaticDao ( ) . getAllWithIpAddress ( serverName ) . size ( ) ) > 0 ) ) { return false ; } } return true ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( true , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , 1L , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage di = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; di.setActive ( true ) ; di.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setParentId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageStatus ( ImageStatus.OK ) ; return di ; }
Source:
public void testParseNoOptions ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:" , "" ) ; assertNotNull ( ret ) ; assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" ) ; }

Target:
public void testParseNoOptions ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:" , "" ) ; org.junit.Assert.assertNotNull ( ret ) ; org.junit.Assert.assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" ) ; }
Source:
private void initialize ( ) { org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges.log.info ( "Start initializing {}" , getClass ( ) . getSimpleName ( ) ) ; this . macsStorage = createMacsStorage ( rangesBoundaries ) ; org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges.log.info ( "Finished initializing. Available MACs in pool: {}" , macsStorage.getAvailableMacsCount ( ) ) ; }

Target:
public java.util.List < java.lang.String > addMacs ( java.util.List < java.lang.String > macs ) { java.util.List < java.lang.String > notAddedMacs = new java.util.ArrayList < > ( macs.size ( ) ) ; for ( java.lang.String mac : macs ) { if ( ! ( addMac ( mac ) ) ) { notAddedMacs.add ( mac ) ; } } return notAddedMacs ; }
Source:
public static boolean isTemplateStatusIsNotLocked ( org.ovirt.engine.core.compat.Guid id ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.VmTemplate template = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDAO ( ) . get ( id ) ; if ( ( template != null ) && ( ( template.getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.Locked ) ) ) { returnValue = true ; } return returnValue ; }

Target:
public static boolean isTemplateStatusIsNotLocked ( org.ovirt.engine.core.compat.Guid id ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.VmTemplate template = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . get ( id ) ; if ( ( template != null ) && ( ( template.getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.Locked ) ) ) { returnValue = true ; } return returnValue ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ExportVmCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { MoveOrCopyAllImageGroups ( ) ; return null ; } } ) ; if ( ! ( org.ovirt.engine.core.bll.ExportVmCommand.getReturnValue ( ) . getTaskIdList ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmHandler.LockVm ( org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) . getDynamicData ( ) , org.ovirt.engine.core.bll.ExportVmCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.bll.ExportVmCommand.freeLock ( ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { MoveOrCopyAllImageGroups ( ) ; return null ; } } ) ; if ( ! ( org.ovirt.engine.core.bll.ExportVmCommand.getReturnValue ( ) . getTaskIdList ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; } }
Source:
private boolean canDoSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ! ( isLiveSnapshotEnabled ( ) ) ) && ( ! ( vm.isDown ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DATA_CENTER_VERSION_DOESNT_SUPPORT_LIVE_SNAPSHOT ) ; } org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVds ( ) ; if ( ( vds != null ) && ( ! ( vds.getLiveSnapshotSupport ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_QEMU_UNSUPPORTED_OPERATION ) ; } return true ; }

Target:
protected boolean validateVM ( org.ovirt.engine.core.bll.validator.VmValidator vmValidator ) { org.ovirt.engine.core.bll.validator.LiveSnapshotValidator validator = new org.ovirt.engine.core.bll.validator.LiveSnapshotValidator ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVds ( ) ) ; return ( ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . isDown ( ) ) || ( validate ( validator.canDoSnapshot ( ) ) ) ) && ( validate ( vmValidator.vmNotSavingRestoring ( ) ) ) ) && ( validate ( vmValidator.validateVmStatusUsingMatrix ( VdcActionType.CreateAllSnapshotsFromVm ) ) ) ; }
Source:
private boolean isCurrentTaskLookedFor ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.bll.SPMAsyncTask task ) { return ( ( ( task instanceof org.ovirt.engine.core.bll.EntityAsyncTask ) && ( id.equals ( task.getParameters ( ) . getEntityId ( ) ) ) ) && ( ( task.getState ( ) ) != ( AsyncTaskState.Cleared ) ) ) && ( ( task.getState ( ) ) != ( AsyncTaskState.ClearFailed ) ) ; }

Target:
private boolean isCurrentTaskLookedFor ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.bll.SPMAsyncTask task ) { return ( ( ( task instanceof org.ovirt.engine.core.bll.EntityAsyncTask ) && ( id.equals ( task.getParameters ( ) . getEntityInfo ( ) . getId ( ) ) ) ) && ( ( task.getState ( ) ) != ( AsyncTaskState.Cleared ) ) ) && ( ( task.getState ( ) ) != ( AsyncTaskState.ClearFailed ) ) ; }
Source:
public void printAvailableKeys ( ) { java.util.List < org.apache.commons.configuration.tree.ConfigurationNode > configNodes = keysConfig.getRootNode ( ) . getChildren ( ) ; for ( org.apache.commons.configuration.tree.ConfigurationNode node : configNodes ) { org.ovirt.engine.core.config.entity.ConfigKey key = configKeyFactory.generateByPropertiesKey ( node.getName ( ) ) ; printKeyInFormat ( key ) ; } }

Target:
public void printAvailableKeys ( ) { org.ovirt.engine.core.config.EngineConfigLogic.iterateAllKeys ( configKeyFactory , keysConfig , new org.ovirt.engine.core.config.ConfigKeyHandler ( ) { @ java.lang.Override public boolean handle ( org.ovirt.engine.core.config.entity.ConfigKey key ) { printKeyInFormat ( key ) ; return true ; } } ) ; }
Source:
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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChainText , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public void getExternalProviderHostGroupList ( 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 new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostGroupsFromExternalProvider , params , aQuery ) ; }
Source:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.Network network = ( ( org.ovirt.engine.core.common.businessentities.Network ) ( getSelectedItem ( ) ) ) ; if ( ( getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel ( network , this ) ; setWindow ( networkModel ) ; initDcList ( networkModel ) ; }

Target:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.NetworkView networkView = ( ( org.ovirt.engine.core.common.businessentities.NetworkView ) ( getSelectedItem ( ) ) ) ; if ( ( getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel ( networkView.getNetwork ( ) , this ) ; setWindow ( networkModel ) ; initDcList ( networkModel ) ; }
Source:
public boolean isStorageDomainInProcess ( ) { return ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.PreparingForMaintenance ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Detaching ) ) ; }

Target:
public boolean isStorageDomainInProcess ( ) { return ( ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.PreparingForMaintenance ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Detaching ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Activating ) ) ; }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
private static boolean isDiskOrInterface ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { return ( ( vmDevice.getDevice ( ) . equals ( VmDeviceType.DISK.getName ( ) ) ) && ( ( vmDevice.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK ) ) ) || ( ( vmDevice.getDevice ( ) . equals ( VmDeviceType.BRIDGE.getName ( ) ) ) && ( ( vmDevice.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) ) ) ; }

Target:
private static boolean isDiskOrInterface ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { return ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isDisk ( vmDevice ) ) || ( ( vmDevice.getDevice ( ) . equals ( VmDeviceType.BRIDGE.getName ( ) ) ) && ( ( vmDevice.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) ) ) ; }
Source:
protected void onAdUsersLoaded ( org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel adElementListModel ) { onAdItemsLoaded ( adElementListModel , getusers ( ) ) ; }

Target:
private void onAdItemsLoaded ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > userOrGroups ) { getSearchInProgress ( ) . setEntity ( false ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > items = new java.util.ArrayList < > ( ) ; items.addAll ( userOrGroups ) ; getSelectAll ( ) . setEntity ( false ) ; setItems ( items ) ; setIsEmpty ( items.isEmpty ( ) ) ; }
Source:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , java.lang.String sessionId , javax.naming.InitialContext ctx ) { org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ; queryParams.setSessionId ( sessionId ) ; queryParams.setFiltered ( org.ovirt.engine.core.aaa.filters.SsoPostLoginFilter.FILTER_QUERIES ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , java.lang.String sessionId , javax.naming.InitialContext ctx ) { org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ; queryParams.setSessionId ( sessionId ) ; queryParams.setFiltered ( org.ovirt.engine.core.aaa.filters.SsoPostLoginFilter.FILTER_QUERIES ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }