auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static boolean checkClusterVersionSupported ( org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , org.ovirt.engine.core.common.businessentities.VDS vds ) { boolean isVersionSupported = ! ( org.apache.commons.lang.StringUtils.isEmpty ( vds.getsupported_cluster_levels ( ) ) ) ; if ( isVersionSupported ) { try { isVersionSupported = vds.getSupportedClusterVersionsSet ( ) . contains ( clusterCompatibilityVersion ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.utils.VersionSupport.log.errorFormat ( e.getMessage ( ) ) ; isVersionSupported = false ; } } return isVersionSupported ; }

Target:
public static boolean checkClusterVersionSupported ( org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , org.ovirt.engine.core.common.businessentities.VDS vds ) { boolean isVersionSupported = ! ( org.apache.commons.lang.StringUtils.isEmpty ( vds.getSupportedClusterLevels ( ) ) ) ; if ( isVersionSupported ) { try { isVersionSupported = vds.getSupportedClusterVersionsSet ( ) . contains ( clusterCompatibilityVersion ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.utils.VersionSupport.log.errorFormat ( e.getMessage ( ) ) ; isVersionSupported = false ; } } return isVersionSupported ; }
Source:
public void setPmProxyPreferences ( java.lang.String value ) { java.lang.String [ ] array = value.split ( "," ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > list = new java.util.ArrayList < > ( ) ; for ( java.lang.String item : array ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > model = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; model.setEntity ( item ) ; list.add ( model ) ; } getPmProxyPreferencesList ( ) . setItems ( list ) ; }

Target:
public void setPmProxyPreferences ( java.lang.String value ) { java.lang.String [ ] array = value.split ( "," ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel > list = new java.util.ArrayList < > ( ) ; for ( java.lang.String item : array ) { org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel model = new org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel ( ) ; model.setEntity ( org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType.forValue ( item ) ) ; list.add ( model ) ; } getPmProxyPreferencesList ( ) . setItems ( list ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( returnValue ) ) ; model.getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmTemplate [ ] { template } ) ) ) ; model.getTemplate ( ) . setSelectedItem ( template ) ; model.getTemplate ( ) . setIsChangable ( false ) ; postInitTemplate ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }
Source:
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 ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }

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 ) { clearVms ( ) ; exportDomain.setEntity ( null ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }
Source:
private void initCustomPropertySheet ( ) { setCustomPropertySheet ( new org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel ( ) ) ; if ( ( clusterPolicy.getParameterMap ( ) ) != null ) { getCustomProperties ( ) . putAll ( clusterPolicy.getParameterMap ( ) ) ; } getCustomPropertySheet ( ) . setIsChangable ( ( ! ( clusterPolicy.isLocked ( ) ) ) ) ; customPropertiesInitialized = true ; refreshCustomProperties ( null , false ) ; }

Target:
private void initCustomPropertySheet ( ) { setCustomPropertySheet ( new org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel ( ) ) ; if ( ( clusterPolicy.getParameterMap ( ) ) != null ) { getCustomProperties ( ) . putAll ( clusterPolicy.getParameterMap ( ) ) ; } getCustomPropertySheet ( ) . setIsChangeable ( ( ! ( clusterPolicy.isLocked ( ) ) ) ) ; customPropertiesInitialized = true ; refreshCustomProperties ( null , false ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc glusterVolumeRemoveBricksStop ( java.lang.String volumeName , java.lang.String [ ] brickList , int replicaCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.removeBrickStop" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( brickList ) ) ) . withParameter ( "replicaCount" , replicaCount ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn glusterVolumeRemoveBricksStop ( java.lang.String volumeName , java.lang.String [ ] brickList , int replicaCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.removeBrickStop" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( brickList ) ) ) . withParameter ( "replicaCount" , replicaCount ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn ( response ) ; }
Source:
public java.lang.String getMemberStyleName ( org.ovirt.api.metamodel.concepts.Name name ) { java.lang.String result = name.words ( ) . map ( java.lang.String :: toLowerCase ) . collect ( java.util.stream.Collectors.joining ( "_" ) ) ; if ( reservedWords.contains ( result ) ) { result += "_" ; } return result ; }

Target:
public java.lang.String getMemberStyleName ( org.ovirt.api.metamodel.concepts.Name name ) { return avoidReservedWord ( names.getLowerJoined ( name , "_" ) ) ; }
Source:
public static void GetAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static int map ( org.ovirt.engine.api.model.OsType type , java.lang.Class < java.lang.Integer > incoming ) { for ( java.util.Map.Entry < java.lang.Integer , java.lang.String > e : org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getUniqueOsNames ( ) . entrySet ( ) ) { if ( e.getValue ( ) . equalsIgnoreCase ( type.name ( ) . replace ( "_" , "" ) ) ) { return e.getKey ( ) ; } } return 0 ; }

Target:
public static int mapOsType ( java.lang.String type ) { if ( OsType.UNASSIGNED.name ( ) . equalsIgnoreCase ( type ) ) { type = OsType.OTHER.name ( ) ; } return org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getOsIdByUniqueName ( type ) ; }
Source:
public void setUp ( ) { super . setUp ( ) ; cmd.getParameters ( ) . setSourceRepoImageId ( getRepoImageId ( ) ) ; cmd.getParameters ( ) . setSourceStorageDomainId ( getRepoStorageDomainId ( ) ) ; cmd.getParameters ( ) . setStoragePoolId ( getStoragePoolId ( ) ) ; cmd.getParameters ( ) . setStorageDomainId ( getStorageDomainId ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateSpaceRequirements ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }

Target:
public void setUp ( ) { super . setUp ( ) ; cmd.getParameters ( ) . setSourceRepoImageId ( getRepoImageId ( ) ) ; cmd.getParameters ( ) . setSourceStorageDomainId ( getRepoStorageDomainId ( ) ) ; cmd.getParameters ( ) . setStoragePoolId ( getStoragePoolId ( ) ) ; cmd.getParameters ( ) . setStorageDomainId ( getStorageDomainId ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateSpaceRequirements ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }
Source:
public static java.lang.String map ( java.lang.Integer type ) { switch ( type ) { case 0 : return NicInterface.RTL8139_VIRTIO.value ( ) ; case 1 : return NicInterface.RTL8139.value ( ) ; case 2 : return NicInterface.E1000.value ( ) ; case 3 : return NicInterface.VIRTIO.value ( ) ; case 4 : return NicInterface.SPAPR_VLAN.value ( ) ; default : return null ; } }

Target:
public static java.lang.String map ( java.lang.Integer type ) { switch ( type ) { case 0 : return NicInterface.RTL8139_VIRTIO.value ( ) ; case 1 : return NicInterface.RTL8139.value ( ) ; case 2 : return NicInterface.E1000.value ( ) ; case 3 : return NicInterface.VIRTIO.value ( ) ; case 4 : return NicInterface.SPAPR_VLAN.value ( ) ; case 5 : return NicInterface.PCI_PASSTHROUGH.value ( ) ; default : return null ; } }
Source:
public void testPersistentAuthWithSeveralHeaders ( ) { org.junit.Assert.assertTrue ( isPersistentAuth ( "persistent-auth" , "x" , "y" ) ) ; org.junit.Assert.assertTrue ( isPersistentAuth ( "x" , "persistent-auth" , "y" ) ) ; org.junit.Assert.assertTrue ( isPersistentAuth ( "x" , "y" , "persistent-auth" ) ) ; }

Target:
public void testPersistentAuthWithSeveralHeaders ( ) { org.junit.Assert.assertEquals ( FiltersHelper.PREFER_PERSISTENCE_AUTH , getPrefer ( "persistent-auth" , "x" , "y" ) ) ; org.junit.Assert.assertEquals ( FiltersHelper.PREFER_PERSISTENCE_AUTH , getPrefer ( "x" , "persistent-auth" , "y" ) ) ; org.junit.Assert.assertEquals ( FiltersHelper.PREFER_PERSISTENCE_AUTH , getPrefer ( "x" , "y" , "persistent-auth" ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageServerConnectionLunMapDao ( ) ; org.ovirt.engine.core.dao.StorageServerConnectionDao storageServerConnectionDao = dbFacade.getStorageServerConnectionDao ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections existingConnection = storageServerConnectionDao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297e" ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMapId ( "1IET_00180001" , existingConnection.getId ( ) ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDaoTest.FREE_LUN_ID , existingConnection.getId ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageServerConnectionLunMapDao ( ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMapId ( "1IET_00180001" , FixturesTool.STORAGE_CONNECTION_ID ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDaoTest.FREE_LUN_ID , FixturesTool.STORAGE_CONNECTION_ID ) ; }
Source:
public static void GetClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }

Target:
public static 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.GetVmTemplatesDisksParameters ( templateId ) , aQuery ) ; }
Source:
public void parseArgWithMissingRequiredValue ( ) { org.ovirt.engine.core.uutils.cli.ExtendedCliParser parser = new org.ovirt.engine.core.uutils.cli.ExtendedCliParser ( ) ; java.lang.String argName = "-f" ; final java.lang.String [ ] args = new java.lang.String [ ] { argName } ; parser.addArg ( new org.ovirt.engine.core.uutils.cli.ArgumentBuilder ( ) . shortName ( argName ) . valueRequied ( true ) . build ( ) ) ; parser.parse ( args ) ; }

Target:
public void parseArgWithMissingRequiredValue ( ) { org.ovirt.engine.core.uutils.cli.ExtendedCliParser parser = new org.ovirt.engine.core.uutils.cli.ExtendedCliParser ( ) ; java.lang.String argName = "-f" ; final java.lang.String [ ] args = new java.lang.String [ ] { argName } ; parser.addArg ( new org.ovirt.engine.core.uutils.cli.ArgumentBuilder ( ) . shortName ( argName ) . valueRequired ( true ) . build ( ) ) ; parser.parse ( args ) ; }
Source:
private void updateActionAvailability ( ) { java.util.ArrayList items = ( ( ( java.util.ArrayList ) ( getSelectedItems ( ) ) ) != null ) ? ( ( java.util.ArrayList ) ( getSelectedItems ( ) ) ) : new java.util.ArrayList ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( ( items.size ( ) ) > 0 ) && ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( items , org.ovirt.engine.core.common.businessentities.DbUser.class , VdcActionType.RemoveUser ) ) ) ) ; getAssignTagsCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) > 0 ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.ArrayList items = ( ( ( java.util.ArrayList ) ( getSelectedItems ( ) ) ) != null ) ? ( ( java.util.ArrayList ) ( getSelectedItems ( ) ) ) : new java.util.ArrayList ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( ( items.size ( ) ) > 0 ) && ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( items , org.ovirt.engine.core.common.businessentities.aaa.DbUser.class , VdcActionType.RemoveUser ) ) ) ) ; getAssignTagsCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) > 0 ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , setUpClusters ( ) , null ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveCluster , org.ovirt.engine.core.common.action.ClusterParametersBase.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , setUpClusters ( ) , null ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveCluster , org.ovirt.engine.core.common.action.ClusterParametersBase.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
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 getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private boolean matchesOption ( org.ovirt.engine.core.common.businessentities.VDS host , org.ovirt.engine.core.bll.FenceProxyLocator.PMProxyOptions proxyOption ) { if ( proxyOption == ( org.ovirt.engine.core.bll.FenceProxyLocator.PMProxyOptions.CLUSTER ) ) { return host.getVdsGroupId ( ) . equals ( _vds.getVdsGroupId ( ) ) ; } if ( proxyOption == ( org.ovirt.engine.core.bll.FenceProxyLocator.PMProxyOptions.DC ) ) { return host.getStoragePoolId ( ) . equals ( _vds.getStoragePoolId ( ) ) ; } if ( proxyOption == ( org.ovirt.engine.core.bll.FenceProxyLocator.PMProxyOptions.OTHER_DC ) ) { return ! ( host.getStoragePoolId ( ) . equals ( _vds.getStoragePoolId ( ) ) ) ; } return false ; }

Target:
private boolean matchesOption ( org.ovirt.engine.core.common.businessentities.VDS host , org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType fenceProxySource ) { boolean matches = false ; switch ( fenceProxySource ) { case CLUSTER : matches = host.getVdsGroupId ( ) . equals ( _vds.getVdsGroupId ( ) ) ; break ; case DC : matches = host.getStoragePoolId ( ) . equals ( _vds.getStoragePoolId ( ) ) ; break ; case OTHER_DC : matches = ! ( host.getStoragePoolId ( ) . equals ( _vds.getStoragePoolId ( ) ) ) ; } return matches ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( asyncTask.getCommandId ( ) ) ; if ( ( asyncTask.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.finished ) ) { cmdEntity.setCommandStatus ( CommandStatus.SUCCEEDED ) ; } coco.persistCommand ( map ( asyncTask , cmdEntity ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask ) ; return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.CommandEntity getChildCommandEntity ( org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( command.getCommandId ( ) ) ; if ( cmdEntity == null ) { command.persistCommand ( parentCommand , ( ( command.getCallBack ( ) ) != null ) ) ; } return coco.getCommandEntity ( command.getCommandId ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmDevice generateNewEntity ( ) { java.util.Map < java.lang.String , java.lang.String > customProp = new java.util.LinkedHashMap < > ( ) ; customProp.put ( "prop1" , "value1" ) ; return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.VmDeviceDAOTest.EXISTING_VM_ID ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , "floppy" , "type:'drive', controller:'0', bus:'0', unit:'1'" , 2 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , false , false , "alias" , customProp , null , null ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( org.ovirt.engine.core.compat.Guid vmGuid ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmGuid ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , "floppy" , "type:'drive', controller:'0', bus:'0', unit:'1'" , 2 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , false , false , "alias" , java.util.Collections.singletonMap ( "prop1" , "value1" ) , null , null ) ; }
Source:
public static void getMaxSpmPriority ( 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 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public static void UnLockVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVmStatus , new org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters ( vm.getId ( ) , org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ; } else { org.ovirt.engine.core.bll.VmHandler.log.errorFormat ( "Trying to unlock vm {0} in status {1} - not moving to down!" , vm.getvm_name ( ) , vm.getstatus ( ) ) ; } }

Target:
public static void UnLockVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVmStatus , new org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters ( vm.getId ( ) , org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ; vm.setstatus ( VMStatus.Down ) ; } else { org.ovirt.engine.core.bll.VmHandler.log.errorFormat ( "Trying to unlock vm {0} in status {1} - not moving to down!" , vm.getvm_name ( ) , vm.getstatus ( ) ) ; } }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public org.ovirt.engine.core.compat.Guid getOsDefaultIconId ( java.lang.Integer osId , boolean small ) { if ( osId == null ) { return getDefaultIconId ( small ) ; } final org.ovirt.engine.core.common.queries.VmIconIdSizePair pair = osIdToDefaultIconIdMap.get ( osId ) ; if ( pair != null ) { return pair.get ( small ) ; } return getDefaultIconId ( small ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( ( storageDomain.getStatus ( ) ) == null ) || ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , storageDomain.getStatus ( ) . name ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testIsBlockDomain ( ) { junit.framework.Assert.assertTrue ( StorageType.FCP.isBlockDomain ( ) ) ; junit.framework.Assert.assertTrue ( StorageType.ISCSI.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.NFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.LOCALFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.POSIXFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.GLUSTERFS.isBlockDomain ( ) ) ; }

Target:
public void testIsBlockDomain ( ) { junit.framework.Assert.assertTrue ( StorageType.FCP.isBlockDomain ( ) ) ; junit.framework.Assert.assertTrue ( StorageType.ISCSI.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.NFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.LOCALFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.POSIXFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.GLUSTERFS.isBlockDomain ( ) ) ; junit.framework.Assert.assertFalse ( StorageType.GLANCE.isBlockDomain ( ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo host = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ) ( obj ) ) ; return ( ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil.objectsEqual ( getUuid ( ) , host.getUuid ( ) ) ) && ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil.objectsEqual ( getHostnameOrIp ( ) , host.getHostnameOrIp ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil.objectsEqual ( getStatus ( ) , host.getStatus ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo host = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ) ( obj ) ) ; return ( ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getUuid ( ) , host.getUuid ( ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getHostnameOrIp ( ) , host.getHostnameOrIp ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getStatus ( ) , host.getStatus ( ) ) ) ; }
Source:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksDummies ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksDummies = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid storageDomainId : getParameters ( ) . getImageToDestinationDomainMap ( ) . values ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; disksDummies.add ( diskImage ) ; } return disksDummies ; }

Target:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksDummies ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksDummies = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid storageDomainId : org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . getImageToDestinationDomainMap ( ) . values ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; disksDummies.add ( diskImage ) ; } return disksDummies ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.utils.pm.VdsFencingOptions options = new org.ovirt.engine.core.utils.pm.VdsFencingOptions ( ) ; org.ovirt.engine.core.common.queries.ValueObjectMap map = options.getFencingOptionMappingMap ( ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setReturnValue ( map ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( ( ( map.asMap ( ) . size ( ) ) > 0 ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions options = new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( ) ; org.ovirt.engine.core.common.queries.ValueObjectMap map = options.getFencingOptionMappingMap ( ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setReturnValue ( map ) ; org.ovirt.engine.core.bll.GetAgentFenceOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( ( ( map.asMap ( ) . size ( ) ) > 0 ) ) ; }
Source:
public static org.ovirt.engine.core.utils.IPAddress [ ] GetHostAddresses ( java.lang.String hostName ) { try { java.net.InetAddress addr = java.net.InetAddress.getLocalHost ( ) ; byte [ ] ipAddr = addr.getAddress ( ) ; org.ovirt.engine.core.utils.IPAddress [ ] ipAddresses = new org.ovirt.engine.core.utils.IPAddress [ 1 ] ; ipAddresses [ 0 ] = new org.ovirt.engine.core.utils.IPAddress ( ipAddr ) ; return ipAddresses ; } catch ( java.net.UnknownHostException ex ) { java.lang.RuntimeException newEx = new java.lang.RuntimeException ( ex.getMessage ( ) ) ; newEx.setStackTrace ( ex.getStackTrace ( ) ) ; throw newEx ; } }

Target:
public static org.ovirt.engine.core.utils.IPAddress [ ] getHostAddresses ( java.lang.String hostName ) { try { java.net.InetAddress addr = java.net.InetAddress.getLocalHost ( ) ; byte [ ] ipAddr = addr.getAddress ( ) ; org.ovirt.engine.core.utils.IPAddress [ ] ipAddresses = new org.ovirt.engine.core.utils.IPAddress [ 1 ] ; ipAddresses [ 0 ] = new org.ovirt.engine.core.utils.IPAddress ( ipAddr ) ; return ipAddresses ; } catch ( java.net.UnknownHostException ex ) { java.lang.RuntimeException newEx = new java.lang.RuntimeException ( ex.getMessage ( ) ) ; newEx.setStackTrace ( ex.getStackTrace ( ) ) ; throw newEx ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc getDeviceInfo ( java.lang.String devGUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceInfo ( devGUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookAdd ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum , java.lang.Boolean enabled ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookAdd ( glusterCommand , stage , hookName , content , checksum , enabled ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static java.lang.String map ( org.ovirt.engine.api.model.DiskInterface diskInterface , java.lang.String template ) { switch ( diskInterface ) { case IDE : return DiskInterface.IDE.value ( ) ; case VirtIO : return DiskInterface.VIRTIO.value ( ) ; case VirtIO_SCSI : return DiskInterface.VIRTIO_SCSI.value ( ) ; default : return null ; } }

Target:
public static java.lang.String map ( org.ovirt.engine.api.model.DiskInterface diskInterface , java.lang.String template ) { switch ( diskInterface ) { case IDE : return DiskInterface.IDE.value ( ) ; case VirtIO : return DiskInterface.VIRTIO.value ( ) ; case VirtIO_SCSI : return DiskInterface.VIRTIO_SCSI.value ( ) ; case SPAPR_VSCSI : return DiskInterface.SPAPR_VSCSI.value ( ) ; default : return null ; } }
Source:
private org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk initUnregisteredDisks ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmBase > vms ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setDiskAlias ( "Disk Alias" ) ; diskImage.setDiskDescription ( "Disk Description" ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ) ) ; return new org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk ( diskImage , vms ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk initUnregisteredDisks ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmBase > vms ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setDiskAlias ( "Disk Alias" ) ; diskImage.setDiskDescription ( "Disk Description" ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ) ) ; return new org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk ( diskImage , vms ) ; }
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getAncestorImagesByImagesIds ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > > aQuery , java.util.List < org.ovirt.engine.core.compat.Guid > imagesIds ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.core.common.queries.IdsQueryParameters params = new org.ovirt.engine.core.common.queries.IdsQueryParameters ( imagesIds ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAncestorImagesByImagesIds , params , aQuery ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { switch ( org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getAction ( ) ) { case START : status = org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getBroker ( ) . glusterVolumeReplaceBrickStart ( org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getExistingBrickDir ( ) , org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getNewBrickDir ( ) ) ; break ; } org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getBroker ( ) . glusterVolumeReplaceBrickCommitForce ( org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getExistingBrickDir ( ) , org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.getParameters ( ) . getNewBrickDir ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.ReplaceGlusterVolumeBrickVDSCommand.proceedProxyReturnValue ( ) ; }
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 onSuccess ( java.lang.Object model , java.lang.Object result ) { vmInitLoaded ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) ; org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "fn_perms_get_storage_pools_with_permitted_action_on_vds_groups" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , boolean supportsVirtService , boolean supportsGlusterService ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) . addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "fn_perms_get_storage_pools_with_permitted_action_on_vds_groups" , mapper , parameterSource ) ; }
Source:
public void testPrefixChange ( ) { mcr.mockConfigValue ( ConfigValues.OvirtIsoPrefix , "a different prefix" ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.junit.Assert.assertTrue ( "Prefix was changed, no ISOs should be returned" , ( ( java.util.List < org.ovirt.engine.core.compat.RpmVersion > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }

Target:
public void testQueryMultiplePaths ( ) { mcr.mockConfigValue ( ConfigValues.oVirtISOsRepositoryPath , "src/test/resources/ovirt-isos:src/test/resources/rhev-isos" ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValueEmpty ( getQuery ( ) ) ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.StorageDomain > findAllStorageDomainsBySharedStatus ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > items , org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus status ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain i : items ) { if ( ( i.getStorageDomainSharedStatus ( ) ) == status ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.StorageDomain > findAllStorageDomainsBySharedStatus ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > items , final org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus status ) { return org.ovirt.engine.ui.uicommonweb.Linq.where ( items , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.StorageDomain i ) { return ( i.getStorageDomainSharedStatus ( ) ) == status ; } } ) ; }
Source:
public void separeteCustomPropertiesToUserAndPredefined ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { java.lang.String customProperties = vmStatic.getCustomProperties ( ) ; org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties properties = parseProperties ( version , customProperties ) ; vmStatic.setPredefinedProperties ( properties.getPredefinedProperties ( ) ) ; vmStatic.setUserDefinedProperties ( properties.getUseDefinedProperties ( ) ) ; }

Target:
public void separateCustomPropertiesToUserAndPredefined ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { java.lang.String customProperties = vmStatic.getCustomProperties ( ) ; org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties properties = parseProperties ( version , customProperties ) ; vmStatic.setPredefinedProperties ( properties.getPredefinedProperties ( ) ) ; vmStatic.setUserDefinedProperties ( properties.getUseDefinedProperties ( ) ) ; }