auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getDbFacade ( ) . getVmDAO ( ) . getAllVmsRelatedToQuotaId ( org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getParameters ( ) . getQuotaId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.fillImagesBySnapshots ( vm ) ; } org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vms ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getDbFacade ( ) . getVmDao ( ) . getAllVmsRelatedToQuotaId ( org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getParameters ( ) . getQuotaId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.fillImagesBySnapshots ( vm ) ; } org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vms ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getDataCenter ( ) ) ) ) { DataCenter_SelectedItemChanged ( ) ; } else if ( ( ev.matchesDefinition ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } else if ( sender == ( getConsoleAddressEnabled ( ) ) ) { consoleAddressChanged ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( ListModel.selectedItemChangedEventDefinition ) ) && ( sender == ( getDataCenter ( ) ) ) ) { dataCenter_SelectedItemChanged ( ) ; } else if ( ( ev.matchesDefinition ( ListModel.selectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { cluster_SelectedItemChanged ( ) ; } else if ( sender == ( getConsoleAddressEnabled ( ) ) ) { consoleAddressChanged ( ) ; } }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster net_cluster ) { setEnumTitle ( net_cluster.getStatus ( ) ) ; switch ( net_cluster.getStatus ( ) ) { case OPERATIONAL : return getApplicationResources ( ) . upImage ( ) ; case NON_OPERATIONAL : return getApplicationResources ( ) . downImage ( ) ; default : return getApplicationResources ( ) . downImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster net_cluster ) { switch ( net_cluster.getStatus ( ) ) { case OPERATIONAL : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.upImage ( ) ; case NON_OPERATIONAL : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.downImage ( ) ; default : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.downImage ( ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainTypeSupportedInPool ( ) { if ( ( storageDomainStatic.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.GLUSTERFS ) ) { return isGlusterSupportedInDC ( ) ; } if ( ( storageDomainStatic.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) { return isPosixSupportedInDC ( ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainTypeSupportedInPool ( ) { if ( ( storageDomainStatic.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.GLUSTERFS ) ) { return isGlusterSupportedInDC ( ) ; } if ( ( storageDomainStatic.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.POSIXFS ) ) { return isPosixSupportedInDC ( ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected void baseTemplateSelectedItemChanged ( ) { }

Target:
public void onSuccess ( java.lang.Object nothing , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = getModel ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( returnValue ) ) ; model.getBaseTemplate ( ) . setItems ( java.util.Collections.singletonList ( template ) ) ; model.getBaseTemplate ( ) . setSelectedItem ( template ) ; model.getBaseTemplate ( ) . setIsChangable ( false ) ; }
Source:
protected void addVmPayload ( ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmPayload ( ) ; if ( payload != null ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) , VmDeviceGeneralType.DISK , payload.getType ( ) , payload.getSpecParams ( ) , true , true , null ) ; } }

Target:
protected void addVmPayload ( ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmPayload ( ) ; if ( payload != null ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) , VmDeviceGeneralType.DISK , payload.getDeviceType ( ) , payload.getSpecParams ( ) , true , true , null ) ; } }
Source:
public void canDoChangeNameExists ( ) { java.lang.String newName = org.apache.commons.lang.StringUtils.reverse ( sd.getStorageName ( ) ) ; sd.setStorageName ( newName ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ) . when ( sdsDao ) . getByName ( newName ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST ) ; }

Target:
public void canDoChangeNameExists ( ) { java.lang.String newName = org.apache.commons.lang.StringUtils.reverse ( sd.getStorageName ( ) ) ; sd.setStorageName ( newName ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ) . when ( sdsDao ) . getByName ( newName ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST ) ; }
Source:
public void SetVmUnknown ( org.ovirt.engine.core.common.businessentities.VM vm ) { RemoveAsyncRunningVm ( vm.getId ( ) ) ; InternalSetVmStatus ( vm , VMStatus.Unknown ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( vm.getId ( ) ) ; auditLogDirector.log ( logable , AuditLogType.VM_SET_TO_UNKNOWN_STATUS ) ; storeVm ( vm ) ; }

Target:
public void setVmUnknown ( org.ovirt.engine.core.common.businessentities.VM vm ) { removeAsyncRunningVm ( vm.getId ( ) ) ; internalSetVmStatus ( vm , VMStatus.Unknown ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( vm.getId ( ) ) ; auditLogDirector.log ( logable , AuditLogType.VM_SET_TO_UNKNOWN_STATUS ) ; storeVm ( vm ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo populateBrickNames ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo profileInfo ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails > brickProfiles = profileInfo.getBrickProfileDetails ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails brickProfileDetails : brickProfiles ) { brickProfileDetails.setBrickName ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getGlusterBrickDao ( ) . getById ( brickProfileDetails.getBrickId ( ) ) . getQualifiedName ( ) ) ; } return profileInfo ; }

Target:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo populateBrickNames ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo profileInfo ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails > brickProfiles = profileInfo.getBrickProfileDetails ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails brickProfileDetails : brickProfiles ) { brickProfileDetails.setIdentity ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getGlusterBrickDao ( ) . getById ( brickProfileDetails.getBrickId ( ) ) . getQualifiedName ( ) ) ; } return profileInfo ; }
Source:
public void getHostNumaTopologyByHostId ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { 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.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
private org.ovirt.engine.api.model.Permits getPermits ( ) { org.ovirt.engine.api.model.Permits permits = new org.ovirt.engine.api.model.Permits ( ) ; for ( org.ovirt.engine.api.model.PermitType permit : org.ovirt.engine.api.model.PermitType.values ( ) ) { permits.getPermits ( ) . add ( map ( permit ) ) ; } return permits ; }

Target:
private void addQosTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.QosType ... qosTypesToAdd ) { java.util.List < java.lang.String > supportedQosTypeNames = version.getQosTypes ( ) . getQosTypes ( ) ; for ( org.ovirt.engine.api.model.QosType qosType : qosTypesToAdd ) { java.lang.String qosTypeAsString = qosType.name ( ) . toLowerCase ( ) ; supportedQosTypeNames.add ( qosTypeAsString ) ; } }
Source:
public javax.ws.rs.core.Response reorderMacAddresses ( org.ovirt.engine.api.model.Action action ) { getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) , true ) ; final org.ovirt.engine.core.common.action.VmOperationParameterBase params = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( guid ) ; final javax.ws.rs.core.Response response = doAction ( ActionType.ReorderVmNics , params , action ) ; return response ; }

Target:
public javax.ws.rs.core.Response reorderMacAddresses ( org.ovirt.engine.api.model.Action action ) { getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , QueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) , true ) ; final org.ovirt.engine.core.common.action.VmOperationParameterBase params = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( guid ) ; final javax.ws.rs.core.Response response = doAction ( ActionType.ReorderVmNics , params , action ) ; return response ; }
Source:
public void setUp ( ) { mappingLocator = new org.ovirt.engine.api.restapi.types.MappingLocator ( ) ; mappingLocator.populate ( ) ; }

Target:
public void setUp ( ) { mappingLocator = new org.ovirt.engine.api.restapi.types.MappingLocator ( ) ; mappingLocator.populate ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; java.util.HashMap < java.lang.Integer , java.lang.String > osNames = new java.util.HashMap < > ( 1 ) ; osNames.put ( 0 , "Unassigned" ) ; org.mockito.Mockito.when ( osRepository.getOsNames ( ) ) . thenReturn ( osNames ) ; org.mockito.Mockito.when ( osRepository.osNameUpperCasedAndUnderscored ( "Unassigned" ) ) . thenReturn ( "UNASSIGNED" ) ; }
Source:
private void updateSnapshotsFromExport ( ) { if ( ( getVm ( ) . getSnapshots ( ) ) == null ) { return ; } for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( getSnapshotDao ( ) . exists ( getVm ( ) . getId ( ) , snapshot.getId ( ) ) ) { getSnapshotDao ( ) . update ( snapshot ) ; } else { getSnapshotDao ( ) . save ( snapshot ) ; } } }

Target:
private void updateSnapshotsFromExport ( ) { if ( ( getVm ( ) . getSnapshots ( ) ) == null ) { return ; } for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . exists ( getVm ( ) . getId ( ) , snapshot.getId ( ) ) ) { org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . update ( snapshot ) ; } else { org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . save ( snapshot ) ; } } }
Source:
public void testClusterNetworkLinks ( ) { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( network ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }

Target:
public void testClusterNetworkLinks ( ) { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( network ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.network.host.RemoveFenceAgentsByVdsIdCommand.getParameters ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.network.host.RemoveFenceAgentsByVdsIdCommand.getParameters ( ) . getVdsId ( ) ) == null ) ) { return failCanDoAction ( EngineMessage.VDS_REMOVE_FENCE_AGENTS_VDS_ID_REQUIRED ) ; } return super . canDoAction ( ) ; }

Target:
protected boolean validate ( ) { if ( ( ( org.ovirt.engine.core.bll.network.host.RemoveFenceAgentsByVdsIdCommand.getParameters ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.network.host.RemoveFenceAgentsByVdsIdCommand.getParameters ( ) . getVdsId ( ) ) == null ) ) { return failValidation ( EngineMessage.VDS_REMOVE_FENCE_AGENTS_VDS_ID_REQUIRED ) ; } return super . validate ( ) ; }
Source:
private java.util.Set < org.ovirt.engine.core.common.businessentities.VDS > fetchRemoteServers ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.VDS > remoteServers = new java.util.HashSet < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > slaveBricks = slaveVolume.getBricks ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity currentBrick : slaveBricks ) { remoteServers.add ( getVdsDAO ( ) . get ( currentBrick.getServerId ( ) ) ) ; } return remoteServers ; }

Target:
private java.util.Set < org.ovirt.engine.core.common.businessentities.VDS > fetchRemoteServers ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.VDS > remoteServers = new java.util.HashSet < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > slaveBricks = slaveVolume.getBricks ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity currentBrick : slaveBricks ) { remoteServers.add ( getVdsDao ( ) . get ( currentBrick.getServerId ( ) ) ) ; } return remoteServers ; }
Source:
protected java.util.Collection < org.ovirt.engine.core.common.businessentities.VmTemplate > getEntitiesFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParamenters params = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParamenters ( getDataCenterId ( storageDomainId ) , storageDomainId ) ; params.setGetAll ( true ) ; java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.core.common.queries.DiskImageList > ret = getEntity ( java.util.HashMap.class , VdcQueryType.GetTemplatesFromExportDomain , params , ( "Templates under storage domain id : " + ( storageDomainId.toString ( ) ) ) ) ; return ret.keySet ( ) ; }

Target:
protected java.util.Collection < org.ovirt.engine.core.common.businessentities.VmTemplate > getEntitiesFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenterId ( storageDomainId ) , storageDomainId ) ; params.setGetAll ( true ) ; java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.core.common.queries.DiskImageList > ret = getEntity ( java.util.HashMap.class , VdcQueryType.GetTemplatesFromExportDomain , params , ( "Templates under storage domain id : " + ( storageDomainId.toString ( ) ) ) ) ; return ret.keySet ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkDAO ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster clusterAttachment : org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkClusterDAO ( ) . getAllForNetwork ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) . getId ( ) ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( clusterAttachment.getClusterId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; } if ( networkChangedToNonVmNetwork ( ) ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.removeVnicProfiles ( ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getNetworkDAO ( ) . update ( getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster clusterAttachment : getNetworkClusterDAO ( ) . getAllForNetwork ( getNetwork ( ) . getId ( ) ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( clusterAttachment.getClusterId ( ) , getNetwork ( ) ) ; } if ( networkChangedToNonVmNetwork ( ) ) { removeVnicProfiles ( ) ; } return null ; } } ) ; org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }
Source:
public void testGetVmssIdsForOvfUpdateOneVm ( ) { vmAndTemplatesGenerationsDAO.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) , java.util.Collections.singletonList ( java.lang.Long.valueOf ( 0 ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDAO.getVmsIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one vm should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong vm returned as in need for ovf update" , guids.get ( 0 ) , FixturesTool.VM_RHEL5_POOL_50 ) ; }

Target:
public void testGetVmssIdsForOvfUpdateOneVm ( ) { vmAndTemplatesGenerationsDAO.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) , java.util.Collections.singletonList ( java.lang.Long.valueOf ( 0 ) ) , java.util.Arrays.asList ( "a" ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDAO.getVmsIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one vm should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong vm returned as in need for ovf update" , guids.get ( 0 ) , FixturesTool.VM_RHEL5_POOL_50 ) ; }
Source:
public static 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
private void verifyPowerManagement ( org.ovirt.engine.api.model.PowerManagement pm ) { assertNotNull ( pm ) ; assertEquals ( "foo" , pm.getType ( ) ) ; assertEquals ( 2 , pm.getOptions ( ) . getOptions ( ) . size ( ) ) ; verifyOption ( pm.getOptions ( ) . getOptions ( ) . get ( 0 ) , "one" , "int" ) ; verifyOption ( pm.getOptions ( ) . getOptions ( ) . get ( 1 ) , "two" , "bool" ) ; }

Target:
private void verifyCPU ( org.ovirt.engine.api.model.Cpu cpu , java.lang.String name , java.lang.Integer level ) { assertNotNull ( cpu ) ; assertEquals ( name , cpu.getType ( ) ) ; assertEquals ( level , cpu.getLevel ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name , boolean isHostedEngine ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; domain.setHostedEngineStorage ( isHostedEngine ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = dbFacade.getVdcOptionDao ( ) . getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getoption_value ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( VdcBllMessages.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = dbFacade.getVdcOptionDao ( ) . getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getoption_value ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }
Source:
protected boolean validateMTUOverrideSupport ( ) { boolean mtuSupported = true ; if ( ( org.ovirt.engine.core.bll.storage.NetworkCommon.getParameters ( ) . getNetwork ( ) . getMtu ( ) ) != 0 ) { mtuSupported = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.MTUOverrideSupported , org.ovirt.engine.core.bll.storage.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; if ( ! mtuSupported ) { addCanDoActionMessage ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) ; } } return mtuSupported ; }

Target:
protected boolean validateMTUOverrideSupport ( ) { boolean mtuSupported = true ; if ( ( org.ovirt.engine.core.bll.network.dc.NetworkCommon.getParameters ( ) . getNetwork ( ) . getMtu ( ) ) != 0 ) { mtuSupported = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.MTUOverrideSupported , org.ovirt.engine.core.bll.network.dc.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; if ( ! mtuSupported ) { addCanDoActionMessage ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) ; } } return mtuSupported ; }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getAllWithQuery ( ( ( "select * from gluster_volumes_view where vol_type = '" + ( GlusterVolumeType.DISTRIBUTED_REPLICATE.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertNotNull ( volumes ) ; org.junit.Assert.assertEquals ( 1 , volumes.size ( ) ) ; org.junit.Assert.assertEquals ( existingReplVol , volumes.get ( 0 ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getAllWithQuery ( ( ( "select * from gluster_volumes_view where vol_type = '" + ( GlusterVolumeType.DISTRIBUTED_REPLICATE.name ( ) ) ) + "'" ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( volumes ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , volumes.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingReplVol , volumes.get ( 0 ) ) ; }
Source:
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 ; }

Target:
public 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 ) ; }
Source:
public void versionDecreaseNoHostsOrNetwork ( ) { createCommandWithOlderVersion ( true , false ) ; setupCpu ( ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFS ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; initAndAssertValidation ( true ) ; }

Target:
public void hwrngAdditionalRngDeviceUsed ( ) { final org.ovirt.engine.core.common.businessentities.Cluster cluster = org.ovirt.engine.core.bll.UpdateClusterCommandTest.createDefaultCluster ( ) ; cluster.setAdditionalRngSources ( java.util.Collections.singleton ( VmRngDevice.Source.HWRNG ) ) ; createCommand ( cluster ) ; cpuExists ( ) ; initAndAssertValidation ( true ) ; }
Source:
private void validateQueryType ( javax.servlet.http.HttpServletRequest request ) throws java.lang.Exception { java.lang.String queryType = org.ovirt.engine.core.sso.utils.SSOUtils.getRequestParameter ( request , SSOConstants.HTTP_PARAM_SEARCH_QUERY_TYPE ) ; if ( ( ! ( directoryQueries.containsKey ( queryType ) ) ) && ( ! ( directoryPublicQueries.containsKey ( queryType ) ) ) ) { throw new org.ovirt.engine.core.sso.utils.OAuthException ( org.ovirt.engine.core.sso.utils.SSOConstants.ERR_CODE_INVALID_REQUEST , java.lang.String.format ( "The request contains unsupported parameter value '%s' for parameter '%s'." , queryType , SSOConstants.HTTP_PARAM_SEARCH_QUERY_TYPE ) ) ; } }

Target:
private void validateQueryType ( javax.servlet.http.HttpServletRequest request ) throws java.lang.Exception { java.lang.String queryType = org.ovirt.engine.core.sso.utils.SSOUtils.getRequestParameter ( request , SSOConstants.HTTP_PARAM_SEARCH_QUERY_TYPE ) ; if ( ( ! ( directoryQueries.containsKey ( queryType ) ) ) && ( ! ( directoryPublicQueries.containsKey ( queryType ) ) ) ) { throw new org.ovirt.engine.core.sso.utils.OAuthException ( org.ovirt.engine.core.sso.utils.SSOConstants.ERR_CODE_INVALID_REQUEST , java.lang.String.format ( ssoContext.getLocalizationUtils ( ) . localize ( SSOConstants.APP_ERROR_UNSUPPORTED_PARAMETER_IN_REQUEST , ( ( java.util.Locale ) ( request.getAttribute ( SSOConstants.LOCALE ) ) ) ) , queryType , SSOConstants.HTTP_PARAM_SEARCH_QUERY_TYPE ) ) ; } }
Source:
protected java.lang.String transform ( java.util.ArrayList < java.lang.String > fileNameList , org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.ui.uicommonweb.dataprovider.ImagesDataProvider.ISO_PREFIX ) + ( super . transform ( repoImage ) ) ; }

Target:
public static void getUnknownImageList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < java.lang.String > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh ) { org.ovirt.engine.ui.uicommonweb.dataprovider.ImagesDataProvider.getIrsImageList ( aQuery , storagePoolId , forceRefresh , ImageFileType.All , new org.ovirt.engine.ui.uicommonweb.dataprovider.ImagesDataProvider.RepoImageToImageFileNameAsyncConverter ( ( image ) -> ( org.ovirt.engine.ui.uicommonweb.dataprovider.ImagesDataProvider.ISO_PREFIX ) + ( image.getRepoImageId ( ) ) , ( image ) -> ( org.ovirt.engine.core.common.businessentities.storage.ImageFileType.Unknown ) == ( image.getFileType ( ) ) ) ) ; }
Source:
private int getActiveHostsStat ( ) { java.lang.String [ ] activeVdsStatuses = new java.lang.String [ ] { java.lang.String.valueOf ( VDSStatus.Up.getValue ( ) ) , java.lang.String.valueOf ( VDSStatus.PreparingForMaintenance.getValue ( ) ) } ; return org.ovirt.engine.core.bll.GetSystemStatisticsQuery.getDbFacade ( ) . getSystemStatisticsValue ( org.ovirt.engine.core.bll.GetSystemStatisticsQuery.HOST_ENTITY_NAME , org.apache.commons.lang.StringUtils.join ( activeVdsStatuses , org.ovirt.engine.core.bll.GetSystemStatisticsQuery.COMMA_DELIMITER ) ) ; }

Target:
private int getActiveHostsStat ( ) { java.lang.String [ ] activeVdsStatuses = new java.lang.String [ ] { java.lang.String.valueOf ( VDSStatus.Up.getValue ( ) ) , java.lang.String.valueOf ( VDSStatus.PreparingForMaintenance.getValue ( ) ) } ; return systemStatisticsDao.getSystemStatisticsValue ( org.ovirt.engine.core.bll.GetSystemStatisticsQuery.HOST_ENTITY_NAME , org.apache.commons.lang.StringUtils.join ( activeVdsStatuses , org.ovirt.engine.core.bll.GetSystemStatisticsQuery.COMMA_DELIMITER ) ) ; }
Source:
private void initInterface ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface ) { if ( ( iface.getId ( ) ) == null ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } fillMacAddressIfMissing ( iface ) ; iface.setVmTemplateId ( null ) ; iface.setVmId ( getVmId ( ) ) ; iface.setVmName ( getVm ( ) . getvm_name ( ) ) ; }

Target:
private void initInterface ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface ) { if ( ( iface.getId ( ) ) == null ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } fillMacAddressIfMissing ( iface ) ; iface.setVmTemplateId ( null ) ; iface.setVmId ( getVmId ( ) ) ; iface.setVmName ( getVm ( ) . getVmName ( ) ) ; }
Source:
public void testNoIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_CD_WITHOUT_ACTIVE_STORAGE_DOMAIN_ISO ) ; }

Target:
public void failRunStatelessSnapshotInPreview ( ) { java.util.Random rand = new java.util.Random ( ) ; canRunVmAsStateless ( rand.nextBoolean ( ) , true , true , true , false , VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; canRunVmAsStateless ( rand.nextBoolean ( ) , true , true , null , false , VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; canRunVmAsStateless ( rand.nextBoolean ( ) , true , false , true , false , VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
protected void buildChildCommandInfos ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getDisksList ( ) ) { addChildCommandInfo ( image.getImageId ( ) , VdcActionType.CreateSnapshot , buildCreateSnapshotParameters ( image ) ) ; } }

Target:
private void createSnapshotsForDisks ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getDisksList ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateSnapshot , buildCreateSnapshotParameters ( image ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getContext ( ) ) ) ; if ( vdcReturnValue.getSucceeded ( ) ) { getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; } else { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcReturnValue.getFault ( ) . getError ( ) , "Failed to create snapshot!" ) ; } } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { customPropertiesSheetEditor.edit ( object.getCustomPropertySheet ( ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( object.getVersion ( ) . getSelectedItem ( ) ) != null ) { java.lang.String clusterVersion = object.getVersion ( ) . getSelectedItem ( ) . getValue ( ) ; serialNumberPolicyEditor.setVisible ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isSerialNumberPolicySupported ( clusterVersion ) ) ; } }
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.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void updateErrorIconLabel ( org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validation ) { if ( ( ! ( validation.getSuccess ( ) ) ) && ( validation.getReasons ( ) . isEmpty ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Unsuccessful validation without any reason not allowed." ) ; } updateErrorIconLabel ( validation.getReasons ( ) ) ; }

Target:
protected void setIcon ( final java.lang.String icon ) { this . icon = icon ; image.setUrl ( ( icon == null ? "" : icon ) ) ; if ( ( validationResult ) == null ) { validateIcon ( ) ; } else { updateErrorIconLabel ( validationResult ) ; } }
Source:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertTrue ( disk.isSetStatistics ( ) ) ; org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.junit.Assert.assertTrue ( disk.isSetStatistics ( ) ) ; org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; } finally { accepts.clear ( ) ; } }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { boolean isDiskPlugged = getDetailModel ( ) . isDiskPluggedToVm ( object ) ; setTitle ( ( isDiskPlugged ? constants.active ( ) : constants.inactive ( ) ) ) ; return isDiskPlugged ? getCommonResources ( ) . upImage ( ) : getCommonResources ( ) . downImage ( ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.VM object ) { if ( getDetailModel ( ) . isDiskPluggedToVm ( object ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.section.main.view.tab.disk.SubTabDiskVmView.constants.active ( ) ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.section.main.view.tab.disk.SubTabDiskVmView.constants.inactive ( ) ) ; }
Source:
public void testGetFileDataStoreNoNetwork ( ) throws java.io.IOException { final java.util.Map < java.lang.String , byte [ ] > actual = underTest.getFileData ( ) ; final java.util.Map < java.lang.String , java.lang.Object > actualMetaData = parseResult ( actual ) ; org.junit.Assert.assertThat ( actualMetaData , org.hamcrest.Matchers.not ( org.hamcrest.Matchers.hasKey ( "network_config" ) ) ) ; org.junit.Assert.assertThat ( actualMetaData , org.hamcrest.Matchers.not ( org.hamcrest.Matchers.hasKey ( "network-interfaces" ) ) ) ; }

Target:
public void testGetFileDataStoreNoNetwork ( ) throws java.io.IOException { final java.util.Map < java.lang.String , byte [ ] > actual = underTest.getFileData ( ) ; final java.util.Map < java.lang.String , java.lang.Object > actualMetaData = parseResult ( actual ) ; org.junit.Assert.assertThat ( actualMetaData , org.hamcrest.Matchers.not ( org.hamcrest.Matchers.hasKey ( "network_config" ) ) ) ; org.junit.Assert.assertThat ( actualMetaData , org.hamcrest.Matchers.not ( org.hamcrest.Matchers.hasKey ( "network-interfaces" ) ) ) ; assertOpenstackNetworkDataFileNotCreated ( actual ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterBricksForServer ( new org.ovirt.engine.ui.uicommonweb.models.hosts.SetSortedRawItemsAsyncQuery ( new org.ovirt.engine.ui.uicommonweb.Linq.ServerBricksComparer ( ) ) , getEntity ( ) . getId ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterBricksForServer ( new org.ovirt.engine.ui.uicommonweb.models.hosts.SetSortedRawItemsAsyncQuery ( java.util.Comparator.comparing ( GlusterBrickEntity :: getVolumeName ) ) , getEntity ( ) . getId ( ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getBroker ( ) . connectStoragePool ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getvds_spm_id ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getMasterDomainId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getMasterVersion ( ) ) ; proceedProxyReturnValue ( ) ; }

Target:
private boolean isStoragePoolMemoryBackend ( ) { return org.ovirt.engine.core.common.FeatureSupported.storagePoolMemoryBackend ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getStoragePool ( ) . getcompatibility_version ( ) ) ; }