auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeCommand ( ) { if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = runInternalAction ( VdcActionType.RemoveImage , buildRemoveImageParameters ( getDiskImage ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveDiskCommand.getExecutionContext ( ) ) ) ; if ( vdcReturnValue.getSucceeded ( ) ) { incrementVmsGeneration ( ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.setSucceeded ( true ) ; } } else { removeLunDisk ( ) ; } }

Target:
protected void executeCommand ( ) { if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = runInternalActionWithTasksContext ( VdcActionType.RemoveImage , buildRemoveImageParameters ( getDiskImage ( ) ) ) ; if ( vdcReturnValue.getSucceeded ( ) ) { incrementVmsGeneration ( ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.setSucceeded ( true ) ; } } else { removeLunDisk ( ) ; } }
Source:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
private void optimizationForDesktopFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationForDesktop ( ) ) != null ) && ( ( object.getOptimizationForDesktop ( ) . getEntity ( ) ) != null ) ) { optimizationForDesktopEditor.asRadioButton ( ) . setHTML ( templates.radioButtonLabel ( messages.clusterPopupMemoryOptimizationForDesktopLabel ( object.getOptimizationForDesktop ( ) . getEntity ( ) . toString ( ) ) ) ) ; } }

Target:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; consoleTab.setVisible ( false ) ; fencingPolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }
Source:
protected boolean checkIsConnectionFieldEmpty ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( connection.getConnection ( ) ) ) { java.lang.String fieldName = org.ovirt.engine.core.bll.storage.connection.StorageServerConnectionCommandBase.getFieldName ( connection ) ; org.ovirt.engine.core.bll.storage.connection.StorageServerConnectionCommandBase.addCanDoActionMessageVariable ( "fieldName" , fieldName ) ; addCanDoActionMessage ( EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_CONNECTION ) ; return true ; } return false ; }

Target:
protected boolean checkIsConnectionFieldEmpty ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( connection.getConnection ( ) ) ) { java.lang.String fieldName = org.ovirt.engine.core.bll.storage.connection.StorageServerConnectionCommandBase.getFieldName ( connection ) ; org.ovirt.engine.core.bll.storage.connection.StorageServerConnectionCommandBase.addValidationMessageVariable ( "fieldName" , fieldName ) ; addValidationMessage ( EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_CONNECTION ) ; return true ; } return false ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( getPluginType ( ) ) == null ? 0 : getPluginType ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getAgentConfiguration ( ) ) == null ? 0 : getAgentConfiguration ( ) . hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , pluginType , agentConfiguration ) ; }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getHostById ( 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.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testAddVmToPool ( ) { int before = dao.getVmPoolsMapByVmPoolId ( newVmPoolMap.getvm_pool_id ( ) ) . size ( ) ; dao.addVmToPool ( newVmPoolMap ) ; int after = dao.getVmPoolsMapByVmPoolId ( newVmPoolMap.getvm_pool_id ( ) ) . size ( ) ; org.junit.Assert.assertEquals ( ( before + 1 ) , after ) ; org.ovirt.engine.core.common.businessentities.VmPoolMap result = dao.getVmPoolMapByVmGuid ( newVmPoolMap.getvm_guid ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( newVmPoolMap , result ) ; }

Target:
public void testAddVmToPool ( ) { org.junit.Assert.assertNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID ) . getVmPoolId ( ) ) ; dao.addVmToPool ( newVmPoolMap ) ; org.junit.Assert.assertNotNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID ) . getVmPoolId ( ) ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { try { switch ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.FIELDS.valueOf ( fieldName.toUpperCase ( ) ) ) { case TYPE : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.class ) ; case TRANSPORT_TYPE : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.TransportType.class ) ; case STATUS : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.class ) ; default : return null ; } } catch ( java.lang.Exception e ) { return null ; } }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { try { switch ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.FIELDS.valueOf ( fieldName.toUpperCase ( ) ) ) { case TYPE : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.class ) ; case TRANSPORT_TYPE : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.TransportType.class ) ; case STATUS : return new org.ovirt.engine.core.searchbackend.EnumNameAutoCompleter ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.class ) ; default : return null ; } } catch ( java.lang.Exception e ) { return null ; } }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createHotPlugDiskToVmParameters ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters ( vm.getId ( ) , disk.getId ( ) ) ) ; } return parametersList ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createHotPlugDiskToVmParameters ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( disk.getId ( ) , vm.getId ( ) ) ) ) ; } return parametersList ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.MapConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public 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:
public static void GetDiskMaxSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }
Source:
protected void initWidget ( com.google.gwt.user.client.ui.Widget wrapperWidget ) { super . initWidget ( wrapperWidget ) ; org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor.getFormLabel ( ) . setVisible ( false ) ; org.ovirt.engine.ui.common.widget.editor.Style panelStyle = org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor.getContentWidgetContainer ( ) . getElement ( ) . getStyle ( ) ; panelStyle.setFloat ( org.ovirt.engine.ui.common.widget.editor.com.google.gwt.dom.client.Style ) ; }

Target:
protected void initWidget ( com.google.gwt.user.client.ui.Widget wrapperWidget ) { super . initWidget ( wrapperWidget ) ; if ( ! ( org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor.isUsePatternfly ( ) ) ) { org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor.getFormLabel ( ) . setVisible ( false ) ; org.ovirt.engine.ui.common.widget.editor.Style panelStyle = org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor.getContentWidgetContainer ( ) . getElement ( ) . getStyle ( ) ; panelStyle.setFloat ( org.ovirt.engine.ui.common.widget.editor.com.google.gwt.dom.client.Style ) ; } }
Source:
protected void proccessDisksDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { proccessedDomains.addAll ( disk.getStorageIds ( ) ) ; } }

Target:
protected void proccessDisksDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { if ( disks.isEmpty ( ) ) { proccessedDomains.addAll ( activeDataDomainsIds ) ; return ; } for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { proccessedDomains.addAll ( disk.getStorageIds ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.asynctasks.AsyncTaskType getCurrentTaskHandlerTaskType ( ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.lang.String description , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { return createTaskImpl ( taskId , asyncTaskCreationInfo , parentCommand , description , entityType , entityIds ) ; } catch ( java.lang.RuntimeException ex ) { log.errorFormat ( "Error during CreateTask for command: {0}. Exception {1}" , getClass ( ) . getName ( ) , ex ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
public void testRemoveForEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > before = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.Assert.assertFalse ( before.isEmpty ( ) ) ; dao.removeForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Permission > after = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.Assert.assertTrue ( after.isEmpty ( ) ) ; }

Target:
public void testRemoveForEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > before = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.jupiter.api.Assertions.assertFalse ( before.isEmpty ( ) ) ; dao.removeForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Permission > after = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.jupiter.api.Assertions.assertTrue ( after.isEmpty ( ) ) ; }
Source:
public void onSuccess ( java.util.List < org.ovirt.engine.core.compat.Version > versions ) { versions.add ( 0 , null ) ; org.ovirt.engine.core.compat.Version selectedVersion ; selectedVersion = getModel ( ) . getCustomCompatibilityVersion ( ) . getSelectedItem ( ) ; if ( ( selectedVersion != null ) && ( versions.contains ( selectedVersion ) ) ) { getModel ( ) . getCustomCompatibilityVersion ( ) . setItems ( versions , selectedVersion ) ; } else { getModel ( ) . getCustomCompatibilityVersion ( ) . setItems ( versions ) ; } }

Target:
public void beforeUpdates ( ) { getInstanceTypeManager ( ) . deactivate ( ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel object ) { driver.edit ( object ) ; pathExampleLabel.setVisible ( ( ( object.getPath ( ) . getIsAvailable ( ) ) && ( object.getPath ( ) . getIsChangable ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( glusterStorageModel.getLinkGlusterVolume ( ) . getEntity ( ) ) { glusterVolumesEditor.setVisible ( true ) ; pathEditor.setVisible ( false ) ; } else { glusterVolumesEditor.setVisible ( false ) ; pathEditor.setVisible ( true ) ; } }
Source:
private static void GetAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.GetAllChildVlanInterfacesQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleQueries ( queryTypeList , parametersList , callback ) ; }

Target:
private static void GetAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleQueries ( queryTypeList , parametersList , callback ) ; }
Source:
private void monitorV2VJob ( org.ovirt.engine.core.common.businessentities.V2VJobInfo.JobStatus initialJobStatus ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , initialJobStatus ) ; getVmManager ( ) . setConvertProxyHostId ( org.ovirt.engine.core.bll.ConvertVmCommand.getVdsId ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( ( cachedCallback ) == null ) { cachedCallback = new org.ovirt.engine.core.bll.ConvertVmCallback ( org.ovirt.engine.core.bll.ConvertVmCommand.getCommandId ( ) ) ; if ( ( getCommandExecutionStatus ( ) ) == ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.UNKNOWN ) ; } } return cachedCallback ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > > aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > searchVmsFromDb ( ) { org.ovirt.engine.core.aaa.QueryData data = initQueryData ( true ) ; if ( data == null ) { return java.util.Collections.emptyList ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.SearchQuery.getDbFacade ( ) . getVmDao ( ) . getAllUsingQuery ( data.getQuery ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { org.ovirt.engine.core.bll.VmHandler.updateVmGuestAgentVersion ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateVmLock ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateOperationProgress ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateVmStatistics ( vm ) ; } return vms ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > searchVmsFromDb ( ) { org.ovirt.engine.core.aaa.QueryData data = initQueryData ( true ) ; if ( data == null ) { return java.util.Collections.emptyList ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllUsingQuery ( data.getQuery ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { vmHandler.updateVmGuestAgentVersion ( vm ) ; vmHandler.updateVmLock ( vm ) ; vmHandler.updateOperationProgress ( vm ) ; vmHandler.updateVmStatistics ( vm ) ; } return vms ; }
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.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.RegisterEntityInfoPanel.constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }

Target:
protected void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.RegisterEntityInfoPanel.constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }
Source:
public static void GetDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void GetVmNicList ( 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.common.businessentities.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( id ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST ) ; } if ( ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getUniqueId ( ) ) ) && ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.InstallVds ) ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NO_UUID ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP ) ; } return true ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid lookupClusterId ( org.ovirt.engine.api.model.VM vm ) { return vm.getCluster ( ) . isSetId ( ) ? asGuid ( vm.getCluster ( ) . getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid lookupClusterId ( org.ovirt.engine.api.model.Vm vm ) { return vm.getCluster ( ) . isSetId ( ) ? asGuid ( vm.getCluster ( ) . getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
static org.ovirt.engine.api.model.Cluster getModel ( int index ) { org.ovirt.engine.api.model.Cluster model = new org.ovirt.engine.api.model.Cluster ( ) ; model.setName ( NAMES [ index ] ) ; model.setDescription ( DESCRIPTIONS [ index ] ) ; model.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; model.setCpu ( new org.ovirt.engine.api.model.Cpu ( ) ) ; model.getCpu ( ) . setType ( "Intel Xeon" ) ; return model ; }

Target:
static org.ovirt.engine.core.common.businessentities.Cluster getModel ( int index ) { org.ovirt.engine.core.common.businessentities.Cluster model = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; model.setName ( NAMES [ index ] ) ; model.setDescription ( DESCRIPTIONS [ index ] ) ; model.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; model.setCpu ( new org.ovirt.engine.api.model.Cpu ( ) ) ; model.getCpu ( ) . setType ( "Intel Xeon" ) ; return model ; }
Source:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = java.lang.Math.round ( ( ( ( ( vds.getMaxSchedulingMemory ( ) ) - 1 ) * ( ( MaxSchedulerWeight ) - 1 ) ) / ( maxMemoryOfVdsInCluster - 1 ) ) ) ; return ( MaxSchedulerWeight ) - score ; }

Target:
protected int calcHostScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds ) { int score = java.lang.Math.round ( ( ( ( ( vds.getMaxSchedulingMemory ( ) ) - 1 ) * ( ( MaxSchedulerWeight ) - 1 ) ) / ( maxMemoryOfVdsInCluster - 1 ) ) ) ; return ( MaxSchedulerWeight ) - score ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.UPDATE ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.putUserEditKeys ( context , args ) ; if ( ! ( context.containsKey ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , context.get ( ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }
Source:
public static org.ovirt.engine.core.extensions.mgr.ExtensionsManager getInstance ( ) { if ( ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.instance ) == null ) { synchronized ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.class ) { if ( ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.instance ) == null ) { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.instance = new org.ovirt.engine.core.extensions.mgr.ExtensionsManager ( ) ; } } } return org.ovirt.engine.core.extensions.mgr.ExtensionsManager.instance ; }

Target:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = initializedEntries.get ( name ) ; if ( entry == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Extension %1$s could not be found" , name ) ) ; } return entry.extension ; }
Source:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = loadedEntries.get ( name ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy result = null ; if ( ( entry != null ) && ( entry.activated ) ) { result = entry.extension ; } return result ; }

Target:
public java.util.List < org.ovirt.engine.core.extensions.mgr.ExtensionProxy > getLoadedExtensions ( ) { java.util.List < org.ovirt.engine.core.extensions.mgr.ExtensionProxy > results = new java.util.ArrayList < > ( loadedEntries.size ( ) ) ; for ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry : loadedEntries.values ( ) ) { results.add ( entry.extension ) ; } return results ; }
Source:
private boolean validateNetworkExclusiveOnNic ( java.lang.String nicName , java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > networksOnIface ) { if ( ( networksOnIface.size ( ) ) <= 1 ) { return true ; } org.apache.commons.collections.Bag networkTypes = new org.apache.commons.collections.bag.HashBag ( networksOnIface ) ; if ( ( ( networkTypes.contains ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.VM ) ) && ( ( networkTypes.size ( ) ) > 1 ) ) || ( ( networkTypes.contains ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.NON_VM ) ) && ( ( networkTypes.getCount ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.NON_VM ) ) > 1 ) ) ) { return false ; } return true ; }

Target:
private boolean validateNetworkTypesOnNic ( java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > networksOnInterface ) { if ( ( networksOnInterface.size ( ) ) <= 1 ) { return true ; } org.apache.commons.collections.Bag networkTypes = new org.apache.commons.collections.bag.HashBag ( networksOnInterface ) ; boolean vmNetworkIsNotSoleNetworkAssigned = networkTypes.contains ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.VM ) ; boolean moreThanOneNonVmNetworkAssigned = ( networkTypes.contains ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.NON_VM ) ) && ( ( networkTypes.getCount ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType.NON_VM ) ) > 1 ) ; return ! ( vmNetworkIsNotSoleNetworkAssigned || moreThanOneNonVmNetworkAssigned ) ; }
Source:
public void testIsNetworkInSyncWhenIpv4BootProtocolNotStaticAddressDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolAddress ( Ipv4BootProtocol.NONE , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4StaticBootProtocolNetmaskDifferent ( ) { initIpv4ConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public void init ( ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initializing Scheduling manager" ) ; loadPolicyUnits ( ) ; loadClusterPolicies ( ) ; if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.ExternalSchedulerEnabled ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Starting external scheduler dicovery thread" ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread discoveryThread = new org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread ( ) ; discoveryThread.start ( ) ; } else { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "External scheduler disabled, discovery skipped" ) ; } org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initialized Scheduling manager" ) ; }

Target:
public void init ( ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initializing Scheduling manager" ) ; loadPolicyUnits ( ) ; loadClusterPolicies ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread discoveryThread = new org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread ( ) ; if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.ExternalSchedulerEnabled ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Starting external scheduler dicovery thread" ) ; discoveryThread.start ( ) ; } else { discoveryThread.markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "External scheduler disabled, discovery skipped" ) ; } org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initialized Scheduling manager" ) ; }
Source:
private static boolean failVmFree ( java.util.List < java.lang.String > messages , java.lang.String ... messagesToAdd ) { for ( java.lang.String messageToAdd : messagesToAdd ) { messages.add ( messageToAdd ) ; } messages.add ( VdcBllMessages.VAR__TYPE__DESKTOP_POOL.toString ( ) ) ; messages.add ( VdcBllMessages.VAR__ACTION__ATTACH_DESKTOP_TO.toString ( ) ) ; return false ; }

Target:
private static boolean failVmFree ( java.util.List < java.lang.String > messages , java.lang.String ... messagesToAdd ) { for ( java.lang.String messageToAdd : messagesToAdd ) { messages.add ( messageToAdd ) ; } return org.ovirt.engine.core.bll.VmPoolCommandBase.failVmFree ( messages , java.util.Arrays.asList ( messagesToAdd ) ) ; }
Source:
private void markIsSetNonOperationalExecuted ( ) { if ( ! ( _vdsManager.isSetNonOperationalExecuted ( ) ) ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = getDbFacade ( ) . getVdsDynamicDAO ( ) . get ( _vds.getId ( ) ) ; if ( ( vdsDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) { _vdsManager.setIsSetNonOperationalExecuted ( true ) ; } } }

Target:
private void markIsSetNonOperationalExecuted ( ) { if ( ! ( _vdsManager.isSetNonOperationalExecuted ( ) ) ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = getDbFacade ( ) . getVdsDynamicDao ( ) . get ( _vds.getId ( ) ) ; if ( ( vdsDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) { _vdsManager.setIsSetNonOperationalExecuted ( true ) ; } } }
Source:
private void updateBrickSize ( ) { long totalSize = 0 ; if ( ( getStorageDevices ( ) . getSelectedItems ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice : getStorageDevices ( ) . getSelectedItems ( ) ) { totalSize += storageDevice.getSize ( ) ; } } org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > convertedSize = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( totalSize , SizeUnit.MB ) ; setBrickSize ( convertedSize ) ; }

Target:
private void updateBrickSize ( ) { long totalSize = 0 ; if ( ( getStorageDevices ( ) . getSelectedItems ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice : getStorageDevices ( ) . getSelectedItems ( ) ) { totalSize += storageDevice.getSize ( ) ; } } org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > convertedSize = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( totalSize , SizeUnit.MiB ) ; setBrickSize ( convertedSize ) ; }