auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean verifyAddVM ( ) { return org.ovirt.engine.core.bll.VmHandler.VerifyAddVm ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , ( ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ) , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getPriority ( ) ) ; }

Target:
protected boolean verifyAddVM ( ) { return org.ovirt.engine.core.bll.VmHandler.verifyAddVm ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , ( ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ) , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getPriority ( ) ) ; }
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 getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void testReportConfigurationsOnHostWhenSwitchTypeIsOutOfSync ( ) { cluster.setRequiredSwitchTypeForCluster ( SwitchType.OVS ) ; org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations reportedConfigurations = createTestedInstance ( ) . reportConfigurationsOnHost ( ) ; org.junit.Assert.assertThat ( reportedConfigurations.isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > reportedConfigurationList = reportedConfigurations.getReportedConfigurationList ( ) ; org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration expectedReportedConfiguration = new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType.SWITCH_TYPE , org.ovirt.engine.core.common.network.SwitchType.LEGACY , org.ovirt.engine.core.common.network.SwitchType.OVS , false ) ; org.junit.Assert.assertThat ( reportedConfigurationList.contains ( expectedReportedConfiguration ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testReportConfigurationsOnHostWhenSwitchTypeIsOutOfSync ( ) { cluster.setRequiredSwitchTypeForCluster ( SwitchType.OVS ) ; org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations reportedConfigurations = createTestedInstance ( ) . reportConfigurationsOnHost ( ) ; org.hamcrest.MatcherAssert.assertThat ( reportedConfigurations.isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > reportedConfigurationList = reportedConfigurations.getReportedConfigurationList ( ) ; org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration expectedReportedConfiguration = new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType.SWITCH_TYPE , org.ovirt.engine.core.common.network.SwitchType.LEGACY , org.ovirt.engine.core.common.network.SwitchType.OVS , false ) ; org.hamcrest.MatcherAssert.assertThat ( reportedConfigurationList.contains ( expectedReportedConfiguration ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
private boolean CanAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }

Target:
private boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface , java.lang.String value ) { importModel.getNetworkImportData ( iface.getName ( ) ) . setSelectedNetworkName ( value ) ; nicTable.asEditor ( ) . edit ( importModel.getImportNetworkInterfaceListModel ( ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { java.util.ArrayList < java.lang.String > networkList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView network : importModel.getNetworkProfiles ( ) ) { networkList.add ( network.getName ( ) ) ; } ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( networkList ) ; return networkList.isEmpty ( ) ? "" : networkList.get ( 0 ) ; }
Source:
public void testNotRemovingLabeledNetworksReferencingUnlabeledNetworkRemovalIsOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network unlabeledNetwork = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; unlabeledNetwork.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachment ( unlabeledNetwork ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( java.util.Collections.singletonList ( unlabeledNetwork ) ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( networkAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNotRemovingLabeledNetworksReferencingUnlabeledNetworkRemovalIsOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network unlabeledNetwork = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; unlabeledNetwork.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachment ( unlabeledNetwork ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addNetworks ( java.util.Collections.singletonList ( unlabeledNetwork ) ) . build ( ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( networkAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { float maxMemoryOfVdsInCluster = getMaxMemoryOfVdsInCluster ( hosts ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenDistributionScore ( maxMemoryOfVdsInCluster , vds , vm , false ) ) ) ; } return scores ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { float maxMemoryOfVdsInCluster = getMaxMemoryOfVdsInCluster ( hosts ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcHostScore ( maxMemoryOfVdsInCluster , vds ) ) ) ; } return scores ; }
Source:
protected java.util.List < java.util.concurrent.Callable < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > > createTasks ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType fenceAction ) { java.util.List < java.util.concurrent.Callable < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > > tasks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.FenceAgent fenceAgent : fenceAgents ) { tasks.add ( createTask ( createFenceActionExecutor ( fenceAgent ) , fenceAction ) ) ; } return tasks ; }

Target:
protected java.util.List < java.util.concurrent.Callable < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > > createTasks ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType fenceAction ) { java.util.List < java.util.concurrent.Callable < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > > tasks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent fenceAgent : fenceAgents ) { tasks.add ( createTask ( createFenceActionExecutor ( fenceAgent ) , fenceAction ) ) ; } return tasks ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( VdcActionType.CopyImageGroup , buildModeOrCopyImageGroupParameters ( containerID , disk ) ) ; getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( ActionType.CopyImageGroup , buildModeOrCopyImageGroupParameters ( containerID , disk ) ) ; getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } return null ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( ) ; targetModel.setWindow ( null ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { if ( ( ( java.lang.Boolean ) ( returnValue ) ) ) { postCloneVmNameUnique ( targetModel , makeCreatorExplicitOwner ) ; } else { stopProgress ( ) ; getCloneName ( ) . getInvalidityReasons ( ) . add ( constants.nameMustBeUniqueInvalidReason ( ) ) ; getCloneName ( ) . setIsValid ( false ) ; } }
Source:
public void disconnect ( ) { if ( ( _session ) != null ) { _session.close ( true ) ; _session = null ; } if ( ( _client ) != null ) { _client.stop ( ) ; _client = null ; } }

Target:
public void close ( ) throws java.io.IOException { try { if ( ( _session ) != null ) { _session.close ( true ) ; _session = null ; } if ( ( _client ) != null ) { _client.stop ( ) ; _client = null ; } } catch ( java.lang.Exception e ) { org.ovirt.engine.core.utils.ssh.SSHClient.log.error ( "Failed to close session" , e ) ; throw new java.io.IOException ( e ) ; } }
Source:
public void testSetStatusForRequiredNetworkPresentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , java.util.Collections.singletonList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ) ; org.mockito.Mockito.verify ( vdsStaticDao ) . checkIfExistsHostThatMissesNetworkInCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 , VDSStatus.Up ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForRequiredNetworkPresentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , java.util.Collections.singletonList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ) ; org.mockito.Mockito.verify ( vdsStaticDao ) . checkIfExistsHostThatMissesNetworkInCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 , VDSStatus.Up ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_ATTACHMENT_NOT_EXISTS ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY , networkAttachmentId.toString ( ) ) ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > getBalancePolicyUnits ( java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > list ) { if ( ( list == null ) || ( ( list.size ( ) ) == 0 ) ) { return new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; } java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > balancePolicyUnits = new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : list ) { if ( ( policyUnit.getPolicyUnitType ( ) ) == ( org.ovirt.engine.core.common.scheduling.PolicyUnitType.LoadBalancing ) ) { balancePolicyUnits.add ( policyUnit ) ; } } return balancePolicyUnits ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > getBalancePolicyUnits ( java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > list ) { if ( ( list == null ) || ( ( list.size ( ) ) == 0 ) ) { return new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; } java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > balancePolicyUnits = new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : list ) { if ( ( policyUnit.getPolicyUnitType ( ) ) == ( org.ovirt.engine.core.common.scheduling.PolicyUnitType.LOAD_BALANCING ) ) { balancePolicyUnits.add ( policyUnit ) ; } } return balancePolicyUnits ; }
Source:
boolean validatePluginAction ( java.lang.String pluginName ) { org.ovirt.engine.ui.webadmin.plugin.Plugin plugin = getPlugin ( pluginName ) ; boolean pluginInitializingOrInUse = ( plugin != null ) ? ( plugin.isInState ( PluginState.INITIALIZING ) ) || ( plugin.isInState ( PluginState.IN_USE ) ) : false ; return ( canInvokePlugins ) && pluginInitializingOrInUse ; }

Target:
boolean validatePluginAction ( java.lang.String pluginName , boolean allowWhileLoading ) { org.ovirt.engine.ui.webadmin.plugin.Plugin plugin = getPlugin ( pluginName ) ; if ( plugin == null ) { return false ; } boolean isInitializingOrInUse = ( plugin.isInState ( PluginState.INITIALIZING ) ) || ( plugin.isInState ( PluginState.IN_USE ) ) ; boolean isLoading = plugin.isInState ( PluginState.LOADING ) ; return isInitializingOrInUse || ( allowWhileLoading && isLoading ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void extractBond ( java.util.Set < java.lang.String > bonds , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String name ) { if ( org.apache.commons.lang.StringUtils.isBlank ( iface.getNetworkName ( ) ) ) { violations.add ( VdcBllMessages.NETWROK_NOT_EXISTS ) ; } else { if ( bonds.contains ( name ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { bonds.add ( name ) ; modifiedBonds.put ( name , iface ) ; } } }

Target:
protected void extractBondIfModified ( java.util.Set < java.lang.String > bonds , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String name ) { if ( org.apache.commons.lang.StringUtils.isBlank ( iface.getNetworkName ( ) ) ) { violations.add ( VdcBllMessages.NETWROK_NOT_EXISTS ) ; } else { if ( bonds.contains ( name ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { bonds.add ( name ) ; if ( interfaceWasModified ( iface ) ) { modifiedBonds.put ( name , iface ) ; } } } }
Source:
public static org.ovirt.engine.core.common.queries.VmIconIdSizePair ensureIconPairInDatabase ( java.lang.String largeIconDataUrl ) { final java.lang.String smallIconDataUrl = org.ovirt.engine.core.bll.utils.IconUtils.computeSmallIcon ( largeIconDataUrl ) ; org.ovirt.engine.core.compat.Guid largeIconId = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmIconDao ( ) . ensureIconInDatabase ( largeIconDataUrl ) ; org.ovirt.engine.core.compat.Guid smallIconId = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmIconDao ( ) . ensureIconInDatabase ( smallIconDataUrl ) ; return new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( smallIconId , largeIconId ) ; }

Target:
public org.ovirt.engine.core.common.queries.VmIconIdSizePair ensureIconPairInDatabase ( java.lang.String largeIconDataUrl ) { final java.lang.String smallIconDataUrl = org.ovirt.engine.core.bll.utils.IconUtils.computeSmallIcon ( largeIconDataUrl ) ; org.ovirt.engine.core.compat.Guid largeIconId = vmIconDao.ensureIconInDatabase ( largeIconDataUrl ) ; org.ovirt.engine.core.compat.Guid smallIconId = vmIconDao.ensureIconInDatabase ( smallIconDataUrl ) ; return new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( smallIconId , largeIconId ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmWatchdog resolve ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { java.util.List < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = getBackendCollection ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog : watchdogs ) { if ( java.util.Objects.equals ( watchdog.getId ( ) , id ) ) { return watchdog ; } } return null ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmWatchdog resolve ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { java.util.List < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = getBackendCollection ( QueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog : watchdogs ) { if ( java.util.Objects.equals ( watchdog.getId ( ) , id ) ) { return watchdog ; } } return null ; }
Source:
private void initCustomPropertySheet ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { object.getCustomPropertySheet ( ) . getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( 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 ) { customPropertiesSheetEditor.edit ( object.getCustomPropertySheet ( ) ) ; } } ) ; }

Target:
private void initCustomPropertySheet ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { object.getCustomPropertySheet ( ) . getKeyValueLines ( ) . 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 ) { customPropertiesSheetEditor.edit ( object.getCustomPropertySheet ( ) ) ; } } ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { if ( ( items ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel itemModel : ( ( java.lang.Iterable < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ) ( items ) ) ) { itemModel.clearReferences ( ) ; } } ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImages = new java.util.ArrayList ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskImageByDiskAliasComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.DiskImageByBootAndSnapshotComparator ( ) ) ) ; return diskImages ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImages = new java.util.ArrayList ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.DiskImageByBootAndSnapshotComparator ( ) ) ) ; return diskImages ; }
Source:
public void testValue ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( NumericConditionRelationAutoCompleter.INSTANCE.getCompletion ( "<" ) ) ; org.junit.Assert.assertTrue ( "<" , comps.contains ( "<" ) ) ; org.junit.Assert.assertTrue ( "<=" , comps.contains ( "<=" ) ) ; org.junit.Assert.assertFalse ( "=" , comps.contains ( "=" ) ) ; }

Target:
public void testValue ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( NumericConditionRelationAutoCompleter.INSTANCE.getCompletion ( "<" ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( comps.contains ( "<" ) , "<" ) ; org.junit.jupiter.api.Assertions.assertTrue ( comps.contains ( "<=" ) , "<=" ) ; org.junit.jupiter.api.Assertions.assertFalse ( comps.contains ( "=" ) , "=" ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return validateCoherentIdentification ( ( ( attachment.getId ( ) ) == null ? null : attachment.getId ( ) . toString ( ) ) , attachment.getNicId ( ) , attachment.getNicName ( ) , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NICS_INCOHERENTLY , existingInterfacesMap ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return hostSetupNetworksValidatorHelper.validateCoherentIdentification ( java.lang.String.valueOf ( attachment.getId ( ) ) , attachment.getNicId ( ) , attachment.getNicName ( ) , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NICS_INCOHERENTLY , existingInterfacesMap ) ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getoVirtISOsList ( 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 < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( emptyParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( nullParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmHostDevice > result = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmHostDevices = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.GetVmHostDevicesQuery.getParameters ( ) . getId ( ) , VmDeviceGeneralType.HOSTDEV ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : vmHostDevices ) { result.add ( new org.ovirt.engine.core.common.businessentities.VmHostDevice ( device ) ) ; } setReturnValue ( result ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.bll.GetVmHostDevicesQuery.getParameters ( ) . getId ( ) ; setReturnValue ( vmDeviceDao.getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.HOSTDEV ) . stream ( ) . map ( VmHostDevice :: new ) . collect ( java.util.stream.Collectors.toList ( ) ) ) ; }
Source:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }

Target:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : diskImageDao.getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }
Source:
public static void getHostPublicKey ( 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }

Target:
public void vnicCreated ( org.ovirt.engine.core.compat.Guid vmId ) { getWindow ( ) . stopProgress ( ) ; cancel ( ) ; updateActionAvailability ( ) ; }
Source:
public static void IsBackendAvailable ( 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 ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( true ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void GetAllowClusterWithVirtGlusterEnabled ( 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 ? source : java.lang.Boolean.TRUE ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private java.lang.String generatePreviewSentence ( ) { java.lang.String outOfSyncPreviewSentence = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "Host" , "<strong>Host</strong>" ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "DC" , "<strong>DC</strong>" ) ; final java.lang.String output = ( "<p>" + outOfSyncPreviewSentence ) + "</p>" ; return output ; }

Target:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }
Source:
public void qosBondSpeedZero ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosBondSpeedSetup ( 0 , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; validateAndExpectNoViolations ( helper ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void isSoundcardEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected boolean CanAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return true ; }

Target:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return true ; }
Source:
public void testGetVdsToRun ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getVdsToRun ( VDSType.VDS , new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) , VDSStatus.Up , 0 ) ; org.ovirt.engine.core.dao.VdsDAOTest.assertIncorrectGetResult ( result ) ; }

Target:
public void testGetAllOfType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfType ( VDSType.VDS ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( VDSType.VDS , vds.getvds_type ( ) ) ; } }
Source:
public java.lang.String scheduleACronJob ( java.lang.Object instance , java.lang.String methodName , java.lang.Class < ? > [ ] inputTypes , java.lang.Object [ ] inputParams , java.lang.String cronExpression , java.util.Date startAt , java.util.Date endBy ) { if ( ! ( validate ( instance , inputTypes ) ) ) { return null ; } return super . scheduleACronJob ( instance , methodName , inputTypes , inputParams , cronExpression , startAt , endBy ) ; }

Target:
public java.lang.String scheduleACronJob ( java.lang.Object instance , java.lang.String methodName , java.lang.Class < ? > [ ] inputTypes , java.lang.Object [ ] inputParams , java.lang.String cronExpression , java.util.Date startAt , java.util.Date endBy ) { if ( ! ( validate ( instance , inputTypes ) ) ) { throw new java.lang.RuntimeException ( "Failed to validate input parameters for scheduling. Only primitives or String values are allowed." ) ; } return super . scheduleACronJob ( instance , methodName , inputTypes , inputParams , cronExpression , startAt , endBy ) ; }
Source:
public java.lang.String GetTagNamesAndChildrenNamesByRegExp ( java.lang.String tagNameRegExp ) { tagNameRegExp = java.lang.String.format ( "^%1$s$" , tagNameRegExp ) ; tagNameRegExp = tagNameRegExp.replace ( "*" , ".*" ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.bll.TagsDirector.RecursiveGetTagsAndChildrenByRegExp ( tagNameRegExp , sb , getRootTag ( ) , org.ovirt.engine.core.bll.TagsDirector.TagReturnValueIndicator.NAME ) ; return sb.toString ( ) ; }

Target:
public java.lang.String getTagNamesAndChildrenNamesByRegExp ( java.lang.String tagNameRegExp ) { tagNameRegExp = java.lang.String.format ( "^%1$s$" , tagNameRegExp ) ; tagNameRegExp = tagNameRegExp.replace ( "*" , ".*" ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.bll.TagsDirector.recursiveGetTagsAndChildrenByRegExp ( tagNameRegExp , sb , getRootTag ( ) , org.ovirt.engine.core.bll.TagsDirector.TagReturnValueIndicator.NAME ) ; return sb.toString ( ) ; }