auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void connect ( org.ovirt.engine.core.uutils.ssh.SSHClient client , java.lang.String serverName ) { java.lang.Integer timeout = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ConnectToServerTimeoutInSeconds ) ) * 1000 ; client.setHardTimeout ( timeout ) ; client.setSoftTimeout ( timeout ) ; client.setHost ( serverName , org.ovirt.engine.core.bll.utils.GlusterUtil.SSH_PORT ) ; try { client.connect ( ) ; } catch ( java.lang.Exception e ) { log.debug ( java.lang.String.format ( "Could not connect to server %1$s: %2$s" , serverName , e.getMessage ( ) ) ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected void connect ( org.ovirt.engine.core.uutils.ssh.SSHClient client , java.lang.String serverName ) { java.lang.Integer timeout = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ConnectToServerTimeoutInSeconds ) ) * 1000 ; client.setHardTimeout ( timeout ) ; client.setSoftTimeout ( timeout ) ; client.setHost ( serverName , org.ovirt.engine.core.bll.utils.GlusterUtil.SSH_PORT ) ; try { client.connect ( ) ; } catch ( java.lang.Exception e ) { log.debug ( "Could not connect to server '{}': {}" , serverName , e.getMessage ( ) ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
public org.ovirt.engine.api.model.StorageDomains list ( ) { org.ovirt.engine.api.model.StorageDomains storageDomains = new org.ovirt.engine.api.model.StorageDomains ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains entity : getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage_domains.class , VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) ) ) { storageDomains.getStorageDomains ( ) . add ( addLinks ( map ( entity ) ) ) ; } return storageDomains ; }

Target:
public org.ovirt.engine.api.model.StorageDomains list ( ) { org.ovirt.engine.api.model.StorageDomains storageDomains = new org.ovirt.engine.api.model.StorageDomains ( ) ; for ( org.ovirt.engine.api.model.StorageDomain entity : getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) ) ) { storageDomains.getStorageDomains ( ) . add ( addLinks ( map ( entity ) , getLinksToExclude ( entity ) ) ) ; } return storageDomains ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addCanDoActionMessage ( VdcBllMessages.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addCanDoActionMessage ( VdcBllMessages.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }
Source:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( get ( ) . getImageId ( ) ) ; org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( imageId , org.ovirt.engine.core.compat.Guid.Empty , storageDomainId , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ; return doAction ( VdcActionType.MoveOrCopyDisk , params , action ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getSourceStorageDomainId ( org.ovirt.engine.api.model.Disk disk ) { return asGuid ( disk.getStorageDomains ( ) . getStorageDomains ( ) . get ( 0 ) . getId ( ) ) ; }
Source:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.Disk disk ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , disk.getDiskAlias ( ) , org.apache.commons.lang.StringUtils.defaultString ( disk.getDiskDescription ( ) ) ) , metadataDiskDescriptionHandler.getJsonDiskDescription ( disk ) ) ; }

Target:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.Disk disk , java.lang.String ... jsonEntries ) throws java.io.IOException { org.junit.Assert.assertEquals ( java.lang.String.format ( "{%s}" , org.apache.commons.lang.StringUtils.join ( jsonEntries , "," , 0 , jsonEntries.length ) ) , metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { vmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.getBroker ( ) . getAllVmStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm > returnVMs = new java.util.HashMap < > ( ) ; for ( int idx = 0 ; idx < ( vmListReturn.infoList.length ) ; ++ idx ) { org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm vmInternalData = createVdsmVm ( vmListReturn.infoList [ idx ] ) ; returnVMs.put ( vmInternalData.getVmDynamic ( ) . getId ( ) , vmInternalData ) ; } setReturnValue ( returnVMs ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { vmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.getBroker ( ) . getAllVmStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm > returnVMs = java.util.Arrays.stream ( vmListReturn.infoList ) . map ( this :: createVdsmVm ) . collect ( java.util.stream.Collectors.toMap ( ( vm ) -> vm.getVmDynamic ( ) . getId ( ) , ( vm ) -> vm ) ) ; setReturnValue ( returnVMs ) ; }
Source:
private void assertTestNotRemovingLabeledNetworksValid ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . setHost ( host ) . setExistingInterfaces ( java.util.Collections.singletonList ( nic ) ) . addNetworks ( network ) . build ( ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( removedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
private void assertTestNotRemovingLabeledNetworksValid ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . addExistingInterfaces ( nic ) . addNetworks ( network ) . build ( ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( removedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testGuestFQDN ( ) { org.ovirt.engine.api.model.VM vm = new org.ovirt.engine.api.model.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setStatus ( VMStatus.Up ) ; vmDynamic.setVmFQDN ( "localhost.localdomain" ) ; vm.setDynamicData ( vmDynamic ) ; org.ovirt.engine.api.model.VM map = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.api.model.VM ) ( null ) ) ) ; assertNotNull ( map.getFqdn ( ) ) ; assertEquals ( map.getFqdn ( ) , "localhost.localdomain" ) ; }

Target:
public void testGuestFQDN ( ) { org.ovirt.engine.api.restapi.types.VM vm = new org.ovirt.engine.api.restapi.types.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setStatus ( VMStatus.Up ) ; vmDynamic.setVmFQDN ( "localhost.localdomain" ) ; vm.setDynamicData ( vmDynamic ) ; org.ovirt.engine.api.model.Vm map = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; assertNotNull ( map.getFqdn ( ) ) ; assertEquals ( map.getFqdn ( ) , "localhost.localdomain" ) ; }
Source:
private void addVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( getVmId ( ) ) ; getVmStatisticsDAO ( ) . save ( stats ) ; getCompensationContext ( ) . snapshotNewEntity ( stats ) ; getCompensationContext ( ) . stateChanged ( ) ; }

Target:
private void addVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( getVmId ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getVmStatisticsDAO ( ) . save ( stats ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . snapshotNewEntity ( stats ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . stateChanged ( ) ; }
Source:
public static void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getIrsImageList ( aQuery , storagePoolId , false ) ; }

Target:
public void getStorageDomainsWithAttachedStoragePoolGuid ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { 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.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; } } ; org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters parameters = new org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters ( storageDomains , storagePool.getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsWithAttachedStoragePoolGuid , parameters , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult nicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { boolean nicActuallyExistsOrReferencesNewBond = isNicActuallyExistsOrReferencesNewBond ( attachment.getNicName ( ) , attachment.getNicId ( ) ) ; if ( nicActuallyExistsOrReferencesNewBond ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void logout ( final java.lang.Object userObject , final org.ovirt.engine.ui.frontend.communication.VdcUserCallback callback ) { getService ( ) . logOff ( ( ( org.ovirt.engine.core.common.users.VdcUser ) ( userObject ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { callback.onSuccess ( result ) ; } @ java.lang.Override public void onFailure ( final java.lang.Throwable caught ) { callback.onFailure ( caught ) ; } } ) ; }

Target:
public void logout ( final java.lang.Object userObject , final org.ovirt.engine.ui.frontend.communication.UserCallback callback ) { getService ( ) . logOff ( ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( userObject ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { callback.onSuccess ( result ) ; } @ java.lang.Override public void onFailure ( final java.lang.Throwable caught ) { callback.onFailure ( caught ) ; } } ) ; }
Source:
public boolean isRunning ( ) { return ( ( ( ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringUp ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.WaitForLaunch ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RebootInProgress ) ) ; }

Target:
public boolean isRunning ( ) { return ( ( ( ( ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringUp ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.WaitForLaunch ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RebootInProgress ) ) ; }
Source:
private static void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; if ( ( siblingVlanInterfaces.size ( ) ) > 0 ) { return true ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
private void setUpGetBallooningExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true ) ; }

Target:
protected void setUpGetNoPayloadExpectations ( int index , int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , null ) ; } }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void qosValuesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; iface.setQosOverridden ( true ) ; mockExistingIfaces ( iface ) ; iface.setQos ( createQos ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_4 ) ; validateAndAssertNetworkModified ( helper , network ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosBondSpeedSetup ( java.lang.Integer slaveSpeed , java.lang.Integer bondSpeed ) { return setupCompositeQosConfiguration ( true , createQos ( ) , slaveSpeed , bondSpeed , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_MODE_4 ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getVdssByUniqueId ( final org.ovirt.engine.core.compat.Guid vdsId , java.lang.String uniqueIdToCheck ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDAO ( ) . getAllWithUniqueId ( uniqueIdToCheck ) ; return org.ovirt.engine.core.utils.linq.LinqUtils.filter ( list , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return ! ( vds.getId ( ) . equals ( vdsId ) ) ; } } ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getVdssByUniqueId ( final org.ovirt.engine.core.compat.Guid vdsId , java.lang.String uniqueIdToCheck ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAllWithUniqueId ( uniqueIdToCheck ) ; return org.ovirt.engine.core.utils.linq.LinqUtils.filter ( list , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return ! ( vds.getId ( ) . equals ( vdsId ) ) ; } } ) ; }
Source:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult , java.util.List < java.lang.String > message ) { if ( ! ( validationResult.isValid ( ) ) ) { message.add ( validationResult.getMessage ( ) . name ( ) ) ; for ( java.lang.String variableReplacement : validationResult.getVariableReplacements ( ) ) { message.add ( variableReplacement ) ; } } return validationResult.isValid ( ) ; }

Target:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult , java.util.List < java.lang.String > message ) { if ( ! ( validationResult.isValid ( ) ) ) { message.addAll ( validationResult.getMessagesAsStrings ( ) ) ; message.addAll ( validationResult.getVariableReplacements ( ) ) ; } return validationResult.isValid ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM initializeMock ( final int domainSizeGB , final int sizeRequired , final int pctRequired ) { mockVmTemplateDAOReturnVmTemplate ( ) ; mockDiskImageDAOGetSnapshotById ( ) ; mockStorageDomainDAOGetForStoragePool ( domainSizeGB ) ; mockStorageDomainDAOGet ( domainSizeGB ) ; mockStorageDomainDynamicDAOGet ( domainSizeGB , USED_SPACE_GB ) ; mockGetImageDomainsListVdsCommand ( ) ; mockConfig ( ) ; mockConfigSizeRequirements ( sizeRequired , pctRequired ) ; org.ovirt.engine.core.common.businessentities.VM vm = createVm ( 8 ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM initializeMock ( final int domainSizeGB , final int sizeRequired , final int pctRequired ) { mockVmTemplateDAOReturnVmTemplate ( ) ; mockDiskImageDAOGetSnapshotById ( ) ; mockStorageDomainDAOGetForStoragePool ( domainSizeGB ) ; mockStorageDomainDAOGet ( domainSizeGB ) ; mockGetImageDomainsListVdsCommand ( ) ; mockConfig ( ) ; mockConfigSizeRequirements ( sizeRequired , pctRequired ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.AddVmCommandTest.createVm ( ) ; return vm ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 20480 ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.List < java.lang.String > results = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.aaa.ProfileEntry profileEntry : ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) ) { if ( ( ! passwordBasedOnly ) || ( profileEntry.getSupportsPasswordAuthenication ( ) ) ) { results.add ( profileEntry.getProfile ( ) ) ; } } return results ; }
Source:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( ! ( getGlusterTaskUtils ( ) . isTaskOfType ( glusterVolume , GlusterTaskType.REBALANCE ) ) ) || ( ! ( getGlusterTaskUtils ( ) . isTaskStatus ( glusterVolume , JobExecutionStatus.STARTED ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REBALANCE_NOT_STARTED ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( ! ( glusterTaskUtils.isTaskOfType ( glusterVolume , GlusterTaskType.REBALANCE ) ) ) || ( ! ( glusterTaskUtils.isTaskStatus ( glusterVolume , JobExecutionStatus.STARTED ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REBALANCE_NOT_STARTED ) ; } return true ; }
Source:
public java.lang.Object runInTransaction ( ) { detachStorageDomainWithEntities ( getStorageDomain ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapToRemove = getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ; getCompensationContext ( ) . snapshotEntity ( mapToRemove ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( mapToRemove.getstorage_id ( ) , mapToRemove.getstorage_pool_id ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { detachStorageDomainWithEntities ( getStorageDomain ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapToRemove = getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ; getCompensationContext ( ) . snapshotEntity ( mapToRemove ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( mapToRemove.getstorage_id ( ) , mapToRemove.getstorage_pool_id ( ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskProfileDao ( ) . nullifyQosForStorageDomain ( getStorageDomain ( ) . getId ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.volumeSnapshotCreate" ) . withOptionalParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withParameter ( "description" , description ) . 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 glusterSnapshotActivate ( java.lang.String snapshotName , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.activate" ) . withParameter ( "snapName" , snapshotName ) . 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 testAdd ( ) throws java.lang.Exception { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetVmHostDevicesExpectations ( ) ; setUpActionExpectations ( VdcActionType.AddVmHostDevices , org.ovirt.engine.core.common.action.VmHostDevicesParameters.class , new java.lang.String [ ] { "VmId" , "DeviceNames" } , new java.lang.Object [ ] { VM_ID , java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) } , true , true ) ; org.ovirt.engine.api.model.HostDevice device = new org.ovirt.engine.api.model.HostDevice ( ) ; device.setName ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) ; resource.add ( device ) ; }

Target:
public void testAdd ( ) throws java.lang.Exception { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetVmHostDevicesExpectations ( ) ; setUpActionExpectations ( VdcActionType.AddVmHostDevices , org.ovirt.engine.core.common.action.VmHostDevicesParameters.class , new java.lang.String [ ] { "VmId" , "DeviceNames" } , new java.lang.Object [ ] { VM_ID , java.util.Collections.singletonList ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) } , true , true ) ; org.ovirt.engine.api.model.HostDevice device = new org.ovirt.engine.api.model.HostDevice ( ) ; device.setName ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) ; resource.add ( device ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ; resource.remove ( ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; setUpActionExpectations ( ActionType.RemoveProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ; resource.remove ( ) ; }
Source:
private void DataCenter_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.DataCenter_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ; if ( dataCenter != null ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenter.getQuotaEnforcementType ( ) ) ; } }

Target:
private void template_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.template_SelectedItemChanged ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( getGlusterHostAddress ( ) . getEntity ( ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( getGlusterHostAddress ( ) . getEntity ( ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( getGlusterHostAddress ( ) . getEntity ( ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( getGlusterHostAddress ( ) . getEntity ( ) , VdsStatic.DEFAULT_SSH_PORT ) ; }
Source:
public void testCanDoActionNotEnoughSpace ( ) { prepareForVmValidatorTests ( ) ; spySdValidator ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesDisks = mockDisksList ( 4 ) ; org.mockito.Mockito.when ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( imagesDisks ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void testCanDoActionNotEnoughSpace ( ) { prepareForVmValidatorTests ( ) ; spySdValidator ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesDisks = mockDisksList ( 4 ) ; org.mockito.Mockito.when ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( imagesDisks ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete ) , aQuery ) ; }

Target:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void getVdsGroupWithVds ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setVdsGroupId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }

Target:
public void getClusterWithVds ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = b.getCluster ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }
Source:
public static void IsVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( name ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private java.lang.String getInstalledVdsIdIfExists ( org.ovirt.engine.core.uutils.ssh.SSHClient client ) { try { java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.uutils.ssh.ConstraintByteArrayOutputStream ( 256 ) ; client.executeCommand ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.GetVdsmIdByVdsmToolCommand ) , null , out , null ) ; return new java.lang.String ( out.toByteArray ( ) , java.nio.charset.Charset.forName ( "UTF-8" ) ) ; } catch ( java.lang.Exception e ) { log.warnFormat ( "Failed to initiate vdsm-id request on host with message {0}" , e.getMessage ( ) ) ; return null ; } }

Target:
private java.lang.String getInstalledVdsIdIfExists ( org.ovirt.engine.core.uutils.ssh.SSHClient client ) { try { java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.uutils.ssh.ConstraintByteArrayOutputStream ( 256 ) ; client.executeCommand ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.GetVdsmIdByVdsmToolCommand ) , null , out , null ) ; return new java.lang.String ( out.toByteArray ( ) , java.nio.charset.Charset.forName ( "UTF-8" ) ) ; } catch ( java.lang.Exception e ) { log.warn ( "Failed to initiate vdsm-id request on host: {}" , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; return null ; } }
Source:
public void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
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 ) ; }
Source:
public static void GetPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByAdElementIdParameters ( userId ) , aQuery ) ; }

Target:
public static void GetCustomPropertiesList ( 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 < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected org.ovirt.engine.api.model.VMs mapCollection ( java.util.List < org.ovirt.engine.api.model.VM > entities ) { org.ovirt.engine.api.model.VMs collection = new org.ovirt.engine.api.model.VMs ( ) ; for ( org.ovirt.engine.api.model.VM entity : entities ) { org.ovirt.engine.api.model.VM vm = map ( entity ) ; collection.getVMs ( ) . add ( addLinks ( populate ( vm , entity ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.api.model.VMs mapCollection ( java.util.List < org.ovirt.engine.api.model.VM > entities , boolean isFiltered ) { org.ovirt.engine.api.model.VMs collection = new org.ovirt.engine.api.model.VMs ( ) ; for ( org.ovirt.engine.api.model.VM entity : entities ) { org.ovirt.engine.api.model.VM vm = map ( entity ) ; if ( isFiltered ) { removeRestrictedInfoFromVM ( vm ) ; } collection.getVMs ( ) . add ( addLinks ( populate ( vm , entity ) ) ) ; } return collection ; }
Source:
protected void onLoadingStateChanged ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState state ) { super . onLoadingStateChanged ( state ) ; enforceScrollPosition ( ) ; if ( state == ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState.LOADING ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { doAutoSelect = true ; } } ) ; } }

Target:
public void execute ( ) { if ( ( rowVisitor ) != null ) { int count = getVisibleItemCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.google.gwt.dom.client.TableRowElement row = getChildElement ( i ) ; T item = getVisibleItem ( i ) ; rowVisitor.visit ( row , item ) ; } } }
Source:
private java.lang.String getLocalStoragesFormattedString ( ) { java.lang.StringBuilder localStorages = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getSelectedItems ( ) ) ) { if ( ( a.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { localStorages.append ( a.getStorageName ( ) ) . append ( ", " ) ; } } return localStorages.substring ( 0 , ( ( localStorages.length ( ) ) - 2 ) ) ; }

Target:
private java.lang.String getLocalStoragesFormattedString ( ) { java.lang.StringBuilder localStorages = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getSelectedItems ( ) ) ) { if ( ( a.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.LOCALFS ) ) { localStorages.append ( a.getStorageName ( ) ) . append ( ", " ) ; } } return localStorages.substring ( 0 , ( ( localStorages.length ( ) ) - 2 ) ) ; }