auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void appendCustomValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.appendCustomValue ( key , value , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }

Target:
public void appendCustomValueAppend ( ) { final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
protected void EndWithFailure ( ) { SetIsVmRunningStateless ( ) ; rollbackQuota ( ) ; if ( _isVmRunningStateless ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . EndWithFailure ( ) ; } }

Target:
protected void endWithFailure ( ) { SetIsVmRunningStateless ( ) ; rollbackQuota ( ) ; if ( _isVmRunningStateless ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { vlanNetwork = createNetworkWithId ( ) ; vlanNetwork.setVlanId ( 1 ) ; vmNetwork1 = createNetworkWithId ( ) ; vmNetwork1.setVmNetwork ( true ) ; vmNetwork2 = createNetworkWithId ( ) ; vmNetwork2.setVmNetwork ( true ) ; nonVmNetwork1 = createNetworkWithId ( ) ; nonVmNetwork1.setVmNetwork ( false ) ; nonVmNetwork2 = createNetworkWithId ( ) ; nonVmNetwork2.setVmNetwork ( false ) ; networkMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Arrays.asList ( vlanNetwork , vmNetwork1 , vmNetwork2 , nonVmNetwork1 , nonVmNetwork2 ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network createNetworkWithIdAndName ( java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithId ( ) ; network.setName ( networkName ) ; return network ; }
Source:
public boolean disconnectStorageFromDomainByVdsId ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId ) { return unregisterLibvirtSecrets ( storageDomain , vdsId ) ; }

Target:
public boolean disconnectStorageFromDomainByVdsId ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.Provider provider = getProviderDao ( ) . get ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( storageDomain.getStorage ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > libvirtSecrets = getLibvirtSecretDao ( ) . getAllByProviderId ( provider.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS vds = getVdsDao ( ) . get ( vdsId ) ; return org.ovirt.engine.core.bll.storage.CINDERStorageHelper.unregisterLibvirtSecrets ( storageDomain , vds , libvirtSecrets ) ; }
Source:
public void validateSpaceAndThreshold ( ) { mockGetAllSnapshots ( ) ; org.junit.Assert.assertTrue ( cmd.validateSpaceRequirements ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.times ( org.ovirt.engine.core.bll.TOTAL_NUM_DOMAINS ) ) . hasSpaceForClonedDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.never ( ) ) . hasSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void validateSpaceAndThreshold ( ) { mockGetAllSnapshots ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.validateSpaceRequirements ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.times ( org.ovirt.engine.core.bll.TOTAL_NUM_DOMAINS ) ) . hasSpaceForClonedDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.never ( ) ) . hasSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { org.ovirt.engine.api.model.InstanceType instanceType = performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , VdcActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; if ( instanceType != null ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; } return instanceType ; }

Target:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { org.ovirt.engine.api.model.InstanceType instanceType = performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , ActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; if ( instanceType != null ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; } return instanceType ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData object ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.column.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( object.getClusterNames ( ) ) ; return ( object.getCluster ( ) . getSelectedItem ( ) ) != null ? object.getCluster ( ) . getSelectedItem ( ) . getName ( ) : constants.empty ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { refreshEntityTable ( ) ; }
Source:
public void testAlerts ( ) { org.ovirt.engine.core.searchbackend.SyntaxChecker chkr = new org.ovirt.engine.core.searchbackend.SyntaxChecker ( 100 ) ; org.ovirt.engine.core.searchbackend.ISyntaxChecker curSyntaxChecker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createBackendSyntaxChecker ( "foo" ) ; org.ovirt.engine.core.searchbackend.SyntaxContainer res = curSyntaxChecker.analyzeSyntaxState ( "Events: severity=error" , true ) ; java.lang.String query = chkr.generateQueryFromSyntaxContainer ( res , true ) ; junit.framework.Assert.assertEquals ( "SELECT * FROM (SELECT audit_log.* FROM audit_log WHERE audit_log.severity = '2' and (not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" , query ) ; }

Target:
public void testEvents ( ) { testValidSql ( "Events: " , "SELECT * FROM ((SELECT audit_log.* FROM audit_log WHERE not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { runInternalAction ( ActionType.UpdateOvfStoreForStorageDomain , createUpdateOvfStoreParams ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getContext ( ) ) ; } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalAction ( ActionType.UpdateOvfStoreForStorageDomain , createUpdateOvfStoreParams ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.cloneContext ( ) . withoutCompensationContext ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; return ; } } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }
Source:
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 ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private java.lang.String getManagementOptions ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder order ) { java.lang.String managementOptions = "" ; if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Primary ) ) { managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( _vds.getPmType ( ) , _vds.getPmOptions ( ) ) ; } else if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Secondary ) ) { managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( _vds.getPmSecondaryType ( ) , _vds.getPmSecondaryOptions ( ) ) ; } return managementOptions ; }

Target:
private java.lang.String getOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent ) { org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType = org.ovirt.engine.core.bll.VdsArchitectureHelper.getArchitecture ( _vds.getStaticData ( ) ) ; java.lang.String managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , agent.getOptions ( ) , architectureType ) ; return managementOptions ; }
Source:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }

Target:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }
Source:
public void managedNetworkAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( net.getName ( ) ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , net ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; }

Target:
private void validateAndAssertNetworkModified ( org.ovirt.engine.core.bll.SetupNetworksHelper helper , org.ovirt.engine.core.common.businessentities.network net ) { validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , net ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.Boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , remoteHost ) . withParameter ( "remoteVolumeName" , remoteVolumeName ) . withParameter ( "force" , force ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , remoteHost ) . withParameter ( "remoteVolumeName" , remoteVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . withParameter ( "force" , force ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { int selectedIndex = bootSequenceBox.getSelectedIndex ( ) ; bootSequenceModel.setSelectedItem ( bootSequenceModel.getItems ( ) . get ( selectedIndex ) ) ; bootSequenceUpButton.setEnabled ( bootSequenceModel.getMoveItemUpCommand ( ) . getIsExecutionAllowed ( ) ) ; bootSequenceDownButton.setEnabled ( bootSequenceModel.getMoveItemDownCommand ( ) . getIsExecutionAllowed ( ) ) ; localizeBootSequenceButtons ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateBootSequenceItems ( ) ; bootSequenceBox.setSelectedIndex ( bootSequenceModel.getSelectedItemIndex ( ) ) ; }
Source:
protected boolean validateQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { if ( ( quotaId == null ) || ( Guid.Empty.equals ( quotaId ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Quota quota = quotaDao.getById ( quotaId ) ; if ( quota == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; } if ( ! ( java.util.Objects.equals ( quota.getStoragePoolId ( ) , getStoragePoolId ( ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; } return true ; }

Target:
protected boolean validateQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.bll.validator.QuotaValidator validator = createQuotaValidator ( quotaId ) ; return ( validate ( validator.isValid ( ) ) ) && ( validate ( validator.isDefinedForStoragePool ( getStoragePoolId ( ) ) ) ) ; }
Source:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.storage.export.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.storage.export.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }

Target:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }
Source:
private org.ovirt.engine.api.model.Clusters mapVirtOnlyCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > entities ) { org.ovirt.engine.api.model.Clusters collection = new org.ovirt.engine.api.model.Clusters ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup entity : entities ) { collection.getClusters ( ) . add ( addLinks ( map ( entity ) , org.ovirt.engine.api.restapi.resource.BackendClustersResource.VIRT_ONLY_MODE_COLLECTIONS_TO_HIDE ) ) ; } return collection ; }

Target:
private org.ovirt.engine.api.model.Clusters mapVirtOnlyCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > entities ) { org.ovirt.engine.api.model.Clusters collection = new org.ovirt.engine.api.model.Clusters ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup entity : entities ) { collection.getClusters ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) , org.ovirt.engine.api.restapi.resource.BackendClustersResource.VIRT_ONLY_MODE_COLLECTIONS_TO_HIDE ) ) ; } return collection ; }
Source:
public void testGetAllVMSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "VM" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllVMSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "VM" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.VM ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionDelete ( volumeName , remoteHost , remoteVolumeName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , null ) ; try { resource.update ( getUpdate ( ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , null ) ; try { resource.update ( getUpdate ( ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.storage_server_connections connection = ( ( org.ovirt.engine.core.common.businessentities.storage_server_connections ) ( returnValue ) ) ; model.getPath ( ) . setEntity ( connection.getconnection ( ) ) ; model.getVfsType ( ) . setEntity ( connection.getVfsType ( ) ) ; model.getMountOptions ( ) . setEntity ( connection.getMountOptions ( ) ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( returnValue ) ) ; model.getPath ( ) . setEntity ( connection.getconnection ( ) ) ; model.getVfsType ( ) . setEntity ( connection.getVfsType ( ) ) ; model.getMountOptions ( ) . setEntity ( connection.getMountOptions ( ) ) ; }
Source:
public void testDetermineMessageReturnsClassNameForNoParameterExpansion ( ) throws java.lang.Exception { org.ovirt.engine.core.utils.log.Log log = org.mockito.Mockito.mock ( org.ovirt.engine.core.utils.log.Log.class ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion for a disabled log level." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclassNoParameters.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion when diabled completely." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; }

Target:
public void testDetermineMessageReturnsClassNameForNoParameterExpansion ( ) throws java.lang.Exception { org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion for a disabled log level." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclassNoParameters.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion when diabled completely." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; }
Source:
private void handleResult ( org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result ) { if ( wasSkippedDueToPolicy ( result ) ) { org.ovirt.engine.core.bll.FenceVdsBaseCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( false ) ; } else { setSucceeded ( result.getSucceeded ( ) ) ; } setActionReturnValue ( result ) ; }

Target:
private void handleResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ) { switch ( result.getStatus ( ) ) { case SKIPPED_DUE_TO_POLICY : org.ovirt.engine.core.bll.FenceVdsBaseCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( false ) ; break ; case SUCCESS : handleSpecificCommandActions ( ) ; org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( true ) ; break ; default : org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( false ) ; } setActionReturnValue ( result ) ; }
Source:
private org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( ) { try { javax.naming.InitialContext ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.CommandBase.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { log.error ( ( "Getting backend command objects handler failed" + ( e.getMessage ( ) ) ) ) ; log.debug ( "" , e ) ; return null ; } }

Target:
public java.lang.Void runInTransaction ( ) { buildChildCommandInfos ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > > entry : childCommandInfoMap.entrySet ( ) ) { org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( log ) . createAction ( entry.getValue ( ) . getFirst ( ) , entry.getValue ( ) . getSecond ( ) ) ; command.insertAsyncTaskPlaceHolders ( ) ; childCommandsMap.put ( entry.getKey ( ) , command ) ; } return null ; }
Source:
private void initPanel ( ) { initGeneralForm ( ) ; initDisksTable ( ) ; initNicsTable ( ) ; initAppsTable ( ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( generalForm ) , constants.generalLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( disksTable ) , constants.disksLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( nicsTable ) , constants.nicsLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( appsTable ) , constants.applicationsLabel ( ) ) ; }

Target:
private void initPanel ( ) { initGeneralForm ( ) ; initDisksTable ( ) ; initNicsTable ( ) ; initAppsTable ( ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( generalForm ) , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.generalLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( disksTable ) , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.disksLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( nicsTable ) , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.nicsLabel ( ) ) ; add ( new com.google.gwt.user.client.ui.ScrollPanel ( appsTable ) , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.applicationsLabel ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getServer ( org.ovirt.engine.core.compat.Guid id , java.lang.String name , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS server = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; server.setId ( id ) ; server.setVdsName ( name ) ; server.setStatus ( status ) ; server.setVdsGroupId ( clusterId ) ; return server ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDS getServer ( org.ovirt.engine.core.compat.Guid id , java.lang.String name , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS server = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; server.setId ( id ) ; server.setVdsName ( name ) ; server.setStatus ( status ) ; server.setClusterId ( clusterId ) ; return server ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.users.VdcUser loggedUser = loginModel.getLoggedUser ( ) ; org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( loggedUser ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.users.VdcUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = ( ( java.lang.String ) ( loginModel.getPassword ( ) . getEntity ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( cluster.supportsVirtService ( ) ? ( dataCenter.getCompatibilityVersion ( ) . compareTo ( cluster.getCompatibilityVersion ( ) ) ) > 0 : false ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.CLUSTER_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( cluster.supportsVirtService ( ) ? ( dataCenter.getCompatibilityVersion ( ) . compareTo ( cluster.getCompatibilityVersion ( ) ) ) > 0 : false ) ) ) ; }
Source:
public void testUpdateWithExistingNetwork ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getUpdate ( true ) ) ; assertNotNull ( nic ) ; }

Target:
public void testUpdateWithExistingNetwork ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( true ) ) ; assertNotNull ( nic ) ; }
Source:
private static org.ovirt.engine.api.model.Sessions mapGuestSessions ( org.ovirt.engine.api.model.VM vm , org.ovirt.engine.api.model.Sessions sessions ) { java.lang.String guestUserName = vm.getGuestCurentUserName ( ) ; if ( ( guestUserName != null ) && ( ! ( guestUserName.isEmpty ( ) ) ) ) { org.ovirt.engine.api.model.Session guestSession = new org.ovirt.engine.api.model.Session ( ) ; org.ovirt.engine.api.model.User user = new org.ovirt.engine.api.model.User ( ) ; user.setName ( guestUserName ) ; guestSession.setUser ( user ) ; sessions.getSessions ( ) . add ( guestSession ) ; } return sessions ; }

Target:
private static org.ovirt.engine.api.model.Sessions mapGuestSessions ( org.ovirt.engine.api.model.VM vm , org.ovirt.engine.api.model.Sessions sessions ) { java.lang.String guestUserName = vm.getGuestCurentUserName ( ) ; if ( ( guestUserName != null ) && ( ! ( guestUserName.isEmpty ( ) ) ) ) { org.ovirt.engine.api.model.Session guestSession = new org.ovirt.engine.api.model.Session ( ) ; org.ovirt.engine.api.model.User user = new org.ovirt.engine.api.model.User ( ) ; user.setUserName ( guestUserName ) ; guestSession.setUser ( user ) ; sessions.getSessions ( ) . add ( guestSession ) ; } return sessions ; }
Source:
public static java.lang.Object GetConfigValue ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue , java.lang.String version , org.ovirt.engine.ui.frontend.IAsyncConverter converter ) { if ( converter == null ) { return null ; } org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > key = new org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > ( configValue , version ) ; return converter.Convert ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.get ( key ) , null ) ; }

Target:
public static java.lang.Object getConfigValue ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue , java.lang.String version , org.ovirt.engine.ui.frontend.IAsyncConverter converter ) { if ( converter == null ) { return null ; } org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > key = new org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > ( configValue , version ) ; return converter.Convert ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.get ( key ) , null ) ; }
Source:
public static void failTaskWithoutVdsmId ( final org.ovirt.engine.core.common.businessentities.AsyncTasks task ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) @ java.lang.Override public void run ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { org.ovirt.engine.core.bll.AsyncTaskManager.logAndFailTaskWithoutVdsmId ( task ) ; return null ; } } ) ; } } ) ; }

Target:
public void handleTasksOfCommandWithEmptyVdsmId ( final java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTasks > tasks ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) @ java.lang.Override public void run ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { boolean isPartiallySubmittedCommand = isPartiallySubmittedCommand ( tasks ) ; for ( org.ovirt.engine.core.common.businessentities.AsyncTasks task : tasks ) { handleTaskOfCommandWithEmptyVdsmId ( isPartiallySubmittedCommand , task ) ; } return null ; } } ) ; } } ) ; }
Source:
public static void getDefaultTimeZone ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return "" ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDefaultTimeZone , params , aQuery ) ; }

Target:
public static boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } boolean archMemorySnapshotSupported = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) && archMemorySnapshotSupported ; }
Source:
private static java.lang.String getPath ( java.lang.Class < ? > clz , java.lang.Class < ? > parent ) { for ( java.lang.reflect.Method method : parent.getMethods ( ) ) { if ( ( method.getName ( ) . startsWith ( "get" ) ) && ( ( method.getReturnType ( ) ) == clz ) ) { javax.ws.rs.Path pathAnnotation = method.getAnnotation ( javax.ws.rs.Path.class ) ; return pathAnnotation.value ( ) ; } } return null ; }

Target:
private static java.lang.String getRelativePath ( java.lang.Class < ? > clz , java.lang.Class < ? > parent ) { for ( java.lang.reflect.Method method : parent.getMethods ( ) ) { if ( ( method.getName ( ) . startsWith ( "get" ) ) && ( ( method.getReturnType ( ) ) == clz ) ) { javax.ws.rs.Path pathAnnotation = method.getAnnotation ( javax.ws.rs.Path.class ) ; return pathAnnotation.value ( ) ; } } return null ; }
Source:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommandBase.getVmStaticDAO ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getId ( ) ) ; return duplicateVm == null ? true : failCanDoAction ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS , java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; }

Target:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommandBase.getVmStaticDao ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getId ( ) ) ; return duplicateVm == null ? true : failCanDoAction ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS , java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; }
Source:
public static void cancelTimer ( java.lang.String timerName ) { for ( java.lang.String name : org.ovirt.engine.ui.common.uicommon.TimerFactory.timerList.keySet ( ) ) { if ( name.equals ( timerName ) ) { org.ovirt.engine.ui.common.uicommon.TimerFactory.logger.info ( ( ( "Cancelling the timer '" + name ) + "'" ) ) ; org.ovirt.engine.ui.common.uicommon.TimerFactory.timerList.get ( name ) . cancel ( ) ; } } }

Target:
public static void cancelTimer ( java.lang.String timerName ) { for ( java.lang.String name : org.ovirt.engine.ui.common.uicommon.TimerFactory.timerList.keySet ( ) ) { if ( name.equals ( timerName ) ) { org.ovirt.engine.ui.common.uicommon.TimerFactory.logger.fine ( ( ( "Cancelling the timer '" + name ) + "'" ) ) ; org.ovirt.engine.ui.common.uicommon.TimerFactory.timerList.get ( name ) . cancel ( ) ; } } }
Source:
void addStyles ( ) { storageTypeListEditor.setLabelStyleName ( style.label ( ) ) ; storageTypeListEditor.addContentWidgetContainerStyleName ( style.storageContentWidget ( ) ) ; formatListEditor.setLabelStyleName ( style.label ( ) ) ; formatListEditor.addContentWidgetContainerStyleName ( style.formatContentWidget ( ) ) ; activateDomainEditor.addContentWidgetContainerStyleName ( style.activateDomainEditor ( ) ) ; advancedParametersExpanderContent.setStyleName ( style.advancedParametersExpanderContent ( ) ) ; warningLowSpaceIndicatorEditor.addContentWidgetContainerStyleName ( style.warningTextBoxEditor ( ) ) ; criticalSpaceActionBlockerEditor.addContentWidgetStyleName ( style.blockerTextBoxEditor ( ) ) ; }

Target:
void addStyles ( ) { activateDomainEditor.addContentWidgetContainerStyleName ( style.activateDomainEditor ( ) ) ; advancedParametersExpanderContent.setStyleName ( style.advancedParametersExpanderContent ( ) ) ; warningLowSpaceIndicatorEditor.addContentWidgetContainerStyleName ( style.warningTextBoxEditor ( ) ) ; criticalSpaceActionBlockerEditor.addContentWidgetStyleName ( style.blockerTextBoxEditor ( ) ) ; formatListEditor.addContentWidgetStyleName ( style.formatListEditor ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VnicProfile findVnicProfileForUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user , org.ovirt.engine.core.common.businessentities.network.Network network ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > networkProfiles = org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.getVnicProfileDao ( ) . getAllForNetwork ( network.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : networkProfiles ) { if ( ( ( user == null ) && ( ! ( profile.isPortMirroring ( ) ) ) ) || ( ( user != null ) && ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.isVnicProfilePermitted ( user , profile , false ) ) ) ) { return profile ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VnicProfile findVnicProfileForUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user , org.ovirt.engine.core.common.businessentities.network.Network network ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > networkProfiles = getVnicProfileDao ( ) . getAllForNetwork ( network.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : networkProfiles ) { if ( ( ( user == null ) && ( ! ( profile.isPortMirroring ( ) ) ) ) || ( ( user != null ) && ( getBackwardCompatibilityVnicHelper ( ) . isVnicProfilePermitted ( user , profile , false ) ) ) ) { return profile ; } } return null ; }
Source:
public void getClusterServerMemoryOverCommit ( 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDefaultSpmPriority ( 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 ( ) , 5 ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getParameters ( ) . getClusterId ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getVdsGroup ( ) ) == null ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID ) ; return false ; } if ( ! ( super . canDoAction ( ) ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getParameters ( ) . getClusterId ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getVdsGroup ( ) ) == null ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID ) ; return false ; } if ( ! ( super . validate ( ) ) ) { return false ; } return true ; }