auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testClusterNetworkLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.common.util.LinkHelper.addLinks ( setUpUriExpectations ( ) , network ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }

Target:
public void testClusterNetworkLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , network ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Network" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "Network" , "add" , "name" ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult passthroughProfileContainsSupportedProperties ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_PASSTHROUGH_PROFILE_CONTAINS_NOT_SUPPORTED_PROPERTIES ) . when ( ( ( vnicProfile.isPassthrough ( ) ) && ( ( vnicProfile.isPortMirroring ( ) ) || ( ( vnicProfile.getNetworkQosId ( ) ) != null ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult passthroughProfileContainsSupportedProperties ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_PASSTHROUGH_PROFILE_CONTAINS_NOT_SUPPORTED_PROPERTIES ) . when ( ( ( vnicProfile.isPassthrough ( ) ) && ( ( vnicProfile.isPortMirroring ( ) ) || ( ( vnicProfile.getNetworkQosId ( ) ) != null ) ) ) ) ; }
Source:
public static < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > boolean hasConstructor ( org.ovirt.engine.core.common.action.VdcActionType action , P parameters ) { return ( org.ovirt.engine.core.utils.ReflectionUtils.findConstructor ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) , org.ovirt.engine.core.bll.CommandsFactory.CommandSuffix ) , parameters.getClass ( ) ) ) != null ; }

Target:
public static < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > boolean hasConstructor ( org.ovirt.engine.core.common.action.VdcActionType action , P parameters ) { return ( org.ovirt.engine.core.utils.ReflectionUtils.findConstructor ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) , org.ovirt.engine.core.bll.CommandsFactory.COMMAND_SUFFIX ) , parameters.getClass ( ) ) ) != null ; }
Source:
protected org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator createGroupsGeneratorForUser ( org.ovirt.engine.core.common.businessentities.AdUser user ) { java.util.List < java.lang.String > dnsList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ad_groups adGroup : user.getGroups ( ) . values ( ) ) { dnsList.add ( adGroup.getDistinguishedName ( ) ) ; } org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator generator = new org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator ( new java.util.HashSet < java.lang.String > ( dnsList ) ) ; return generator ; }

Target:
protected org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator createGroupsGeneratorForUser ( org.ovirt.engine.core.common.businessentities.LdapUser user ) { java.util.List < java.lang.String > dnsList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ad_groups adGroup : user.getGroups ( ) . values ( ) ) { dnsList.add ( adGroup.getDistinguishedName ( ) ) ; } org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator generator = new org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator ( new java.util.HashSet < java.lang.String > ( dnsList ) ) ; return generator ; }
Source:
protected void executeQueryCommand ( ) { setReturnValue ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllAttachableDisksByPoolId ( org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { setReturnValue ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllAttachableDisksByPoolId ( org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllAttachableDisksQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateNetworkAttachment , org.ovirt.engine.core.common.action.NetworkAttachmentParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateNetworkAttachment , org.ovirt.engine.core.common.action.NetworkAttachmentParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void removeUnreportedInterfaces ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface dbNic : dbNics ) { if ( ! ( reportedNicsByNames.containsKey ( dbNic.getName ( ) ) ) ) { interfaceDao.removeInterfaceFromVds ( dbNic.getId ( ) ) ; interfaceDao.removeStatisticsForVds ( dbNic.getId ( ) ) ; } } }

Target:
private void removeUnreportedInterfaces ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface dbNic : dbNics ) { if ( nicShouldBeRemoved ( dbNic.getName ( ) ) ) { interfaceDao.removeInterfaceFromVds ( dbNic.getId ( ) ) ; interfaceDao.removeStatisticsForVds ( dbNic.getId ( ) ) ; } } }
Source:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false ) ; }

Target:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false ) ; }
Source:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }

Target:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }
Source:
public void canDoActionSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }

Target:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
private int getRowIndexByObject ( T object ) { for ( int row = 0 ; row < ( dataDisplay.getRowCount ( ) ) ; row ++ ) { if ( dataDisplay.getVisibleItems ( ) . get ( row ) . equals ( object ) ) { return row ; } } return - 1 ; }

Target:
private int getRowIndexByObject ( T object ) { for ( int row = 0 ; row < ( dataDisplay.getRowCount ( ) ) ; row ++ ) { if ( visibleItemsAsList ( ) . get ( row ) . equals ( object ) ) { return row ; } } return - 1 ; }
Source:
private void handleError ( java.lang.Exception ex , org.ovirt.engine.core.compat.CommandStatus status , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Error invoking callback method '{}' for '{}' command '{}'" , getCallBackMethod ( status ) , status , cmdId ) ; org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Exception" , ex ) ; if ( ! ( CommandStatus.FAILED.equals ( status ) ) ) { coco.updateCommandStatus ( cmdId , CommandStatus.FAILED ) ; } }

Target:
private void handleError ( java.lang.Exception ex , org.ovirt.engine.core.compat.CommandStatus status , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Error invoking callback method '{}' for '{}' command '{}'" , getCallbackMethod ( status ) , status , cmdId ) ; org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Exception" , ex ) ; if ( ! ( CommandStatus.FAILED.equals ( status ) ) ) { coco.updateCommandStatus ( cmdId , CommandStatus.FAILED ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getDbFacade ( ) . getProviderDao ( ) . get ( org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy proxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . getProvidedBy ( ) . setExternalId ( proxy.add ( org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) ) ) ; org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . setVlanId ( null ) ; super . executeCommand ( ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.provider.ProviderValidator validator = new org.ovirt.engine.core.bll.provider.ProviderValidator ( getProvider ( ) ) ; return ( validate ( validator.providerIsSet ( ) ) ) && ( super . canDoAction ( ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assert query.equals ( "" ) ; setUpEntityQueryExpectations ( queryType , queryParams.getClass ( ) , new java.lang.String [ ] { queryParameterName } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpPermissions ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assert query.equals ( "" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = setUpPermissions ( ) ; setUpEntityQueryExpectations ( queryType , queryParams.getClass ( ) , new java.lang.String [ ] { queryParameterName } , new java.lang.Object [ ] { GUIDS [ 1 ] } , perms , failure ) ; control.replay ( ) ; }
Source:
protected boolean hostToRunExist ( ) { if ( ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) != null ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDAO ( ) . get ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }

Target:
protected boolean hostToRunExist ( ) { if ( ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) != null ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }
Source:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; updatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.updatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface vmGuestAgentInterface = new org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface ( ) ; vmGuestAgentInterface.setVmId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; vmGuestAgentInterface.setInterfaceName ( rs.getString ( "interface_name" ) ) ; vmGuestAgentInterface.setMacAddress ( rs.getString ( "mac_address" ) ) ; vmGuestAgentInterface.setIpv4Addresses ( getListOfIpAddresses ( rs.getString ( "ipv4_addresses" ) ) ) ; vmGuestAgentInterface.setIpv6Addresses ( getListOfIpAddresses ( rs.getString ( "ipv6_addresses" ) ) ) ; return vmGuestAgentInterface ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface vmGuestAgentInterface = new org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface ( ) ; vmGuestAgentInterface.setVmId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; vmGuestAgentInterface.setInterfaceName ( rs.getString ( "interface_name" ) ) ; vmGuestAgentInterface.setMacAddress ( rs.getString ( "mac_address" ) ) ; vmGuestAgentInterface.setIpv4Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv4_addresses" ) ) ) ; vmGuestAgentInterface.setIpv6Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv6_addresses" ) ) ) ; return vmGuestAgentInterface ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "{ skipFencingIfSDActive=" ) ; sb.append ( skipFencingIfSDActive ) ; sb.append ( " }" ) ; return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "{ skipFencingIfSDActive=" ) ; sb.append ( skipFencingIfSDActive ) ; sb.append ( ", skipFencingIfConnectivityBroken=" ) ; sb.append ( skipFencingIfConnectivityBroken ) ; sb.append ( ", hostsWithBrokenConnectivityThreshold=" ) ; sb.append ( hostsWithBrokenConnectivityThreshold ) ; sb.append ( " }" ) ; return sb.toString ( ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( 0 ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setcompatibility_version ( Version.v3_2 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }

Target:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setcompatibility_version ( Version.v3_2 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > resultMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ActionVersionMap actionVersionMap : org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getActionGroupDao ( ) . getAllActionVersionMap ( ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo info = new org.ovirt.engine.core.common.queries.CommandVersionsInfo ( actionVersionMap.getstorage_pool_minimal_version ( ) , actionVersionMap.getcluster_minimal_version ( ) ) ; resultMap.put ( actionVersionMap.getaction_type ( ) , info ) ; } org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getQueryReturnValue ( ) . setReturnValue ( resultMap ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > resultMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ActionVersionMap actionVersionMap : org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getActionGroupDao ( ) . getAllActionVersionMap ( ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo info = new org.ovirt.engine.core.common.queries.CommandVersionsInfo ( actionVersionMap.getStoragePoolMinimalVersion ( ) , actionVersionMap.getClusterMinimalVersion ( ) ) ; resultMap.put ( actionVersionMap.getActionType ( ) , info ) ; } org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getQueryReturnValue ( ) . setReturnValue ( resultMap ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterGeoRepMountBrokerSetup ( java.lang.String remoteVolumeName , java.lang.String remoteUserName , java.lang.String remoteGroupName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepMountBrokerSetup ( remoteUserName , remoteGroupName , remoteVolumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterGeoRepKeysUpdate ( java.util.List < java.lang.String > geoRepPubKeys , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepKeysUpdate ( userName , geoRepPubKeys ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testClear ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.ClearExternalJob , org.ovirt.engine.core.common.action.VdcActionParametersBase.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; verifyActionResponse ( resource.clear ( action ) ) ; }

Target:
public void testClear ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.ClearExternalJob , org.ovirt.engine.core.common.action.ActionParametersBase.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; verifyActionResponse ( resource.clear ( action ) ) ; }
Source:
private void initComparators ( ) { java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > comparators = java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.SmallestStorageDomainComparator ( validStorageDomain2 ) , new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.BiggestStorageDomainComparator ( validStorageDomain3 ) ) ; org.mockito.Mockito.doReturn ( comparators ) . when ( memoryStorageHandler ) . getStorageDomainComparators ( org.mockito.ArgumentMatchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }

Target:
private void initComparators ( ) { java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > comparators = java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.SmallestStorageDomainComparator ( validStorageDomain2 ) , new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.BiggestStorageDomainComparator ( validStorageDomain3 ) ) ; org.mockito.Mockito.doReturn ( comparators ) . when ( memoryStorageHandler ) . getStorageDomainComparators ( org.mockito.ArgumentMatchers.anyList ( ) ) ; }
Source:
protected boolean validateVmProperties ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.List < java.lang.String > messages ) { java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > validationErrors = getVmPropertiesUtils ( ) . validateVMProperties ( vm.getVdsGroupCompatibilityVersion ( ) , vm.getStaticData ( ) ) ; if ( ! ( validationErrors.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.getInstance ( ) . handleCustomPropertiesError ( validationErrors , messages ) ; return false ; } return true ; }

Target:
protected boolean validateVmProperties ( org.ovirt.engine.core.common.businessentities.VM vm , java.lang.String runOnceCustomProperties , java.util.List < java.lang.String > messages ) { java.lang.String customProperties = ( runOnceCustomProperties != null ) ? runOnceCustomProperties : vm.getCustomProperties ( ) ; java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > validationErrors = getVmPropertiesUtils ( ) . validateVmProperties ( vm.getVdsGroupCompatibilityVersion ( ) , customProperties ) ; if ( ! ( validationErrors.isEmpty ( ) ) ) { getVmPropertiesUtils ( ) . handleCustomPropertiesError ( validationErrors , messages ) ; return false ; } return true ; }
Source:
public static void GetLocalFSPath ( 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.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RhevhLocalFSPath , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetStorageDomainMaxNameLength ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVdsInterface ( java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.String bondOptions , org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , java.lang.String networkName , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setBondOptions ( bondOptions ) ; iface.setBootProtocol ( bootProtocol ) ; iface.setNetworkName ( networkName ) ; iface.setVlanId ( vlanId ) ; return iface ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVdsInterface ( java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.String bondOptions , org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , java.lang.String networkName , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setBondOptions ( bondOptions ) ; iface.setBootProtocol ( bootProtocol ) ; iface.setNetworkName ( networkName ) ; iface.setVlanId ( vlanId ) ; return iface ; }
Source:
public void testAllDomainsWithinThresholdsOneLacking ( ) { domain1.getStorageDynamicData ( ) . setAvailableDiskSize ( 15 ) ; domain2.getStorageDynamicData ( ) . setAvailableDiskSize ( 7 ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsWithinThresholds ( ) ; org.junit.Assert.assertFalse ( "domain2 should not be within thresholds" , result.isValid ( ) ) ; org.junit.Assert.assertEquals ( "Wrong validation error" , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , result.getMessage ( ) ) ; }

Target:
public void testAllDomainsWithinThresholdsOneLacking ( ) { domain1.getStorageDynamicData ( ) . setAvailableDiskSize ( 15 ) ; domain2.getStorageDynamicData ( ) . setAvailableDiskSize ( 7 ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsWithinThresholds ( ) ; org.junit.Assert.assertFalse ( "domain2 should not be within thresholds" , result.isValid ( ) ) ; org.junit.Assert.assertEquals ( "Wrong validation error" , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN , result.getMessage ( ) ) ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }

Target:
public void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , org.ovirt.engine.core.compat.Guid vmId ) { addDiskImage ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) , vmId ) ; }
Source:
public 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.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }
Source:
public void testGetEventNotificationMethodsByType ( ) { java.lang.String target = "Email" ; java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsByType ( target ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventNotificationMethod method : result ) { assertEquals ( EventNotificationMethods.EMAIL , method.getmethod_type ( ) ) ; } }

Target:
public void testGetEventNotificationMethodsByType ( ) { java.lang.String target = "Email" ; java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsByType ( target ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventNotificationMethod method : result ) { org.junit.Assert.assertEquals ( EventNotificationMethods.EMAIL , method.getmethod_type ( ) ) ; } }
Source:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "AsyncTaskManager::CancelTask: Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . StopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }

Target:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . StopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }
Source:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( diskInterfaces ) ; }

Target:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( diskInterfaces ) ; }
Source:
public static void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] snapParams ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , snapParams ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void test64BitMemoryExceedsLimit ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v3_3 ) ; vm.setVmMemSizeMb ( ( ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest.MEMORY_LIMIT_64_BIT ) + 1 ) ) ; vm.setVmOs ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ; mockOsRepository ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateMemorySize ( vm ) , false , EngineMessage.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; }

Target:
public void test64BitMemoryExceedsLimit ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_0 ) ; vm.setVmMemSizeMb ( ( ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest.MEMORY_LIMIT_64_BIT ) + 1 ) ) ; vm.setVmOs ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ; mockOsRepository ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateMemorySize ( vm ) , false , EngineMessage.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setTitle ( ( ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? getDefaultTitle ( ) : null ) ) ; return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.externalDiskIcon ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { setTitle ( ( ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.LUN ) ? getDefaultTitle ( ) : null ) ) ; return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.LUN ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.externalDiskIcon ( ) : null ; }
Source:
public void test_ETag_Format ( ) { java.io.File mockFile = org.mockito.Mockito.mock ( java.io.File.class ) ; org.mockito.Mockito.when ( mockFile.length ( ) ) . thenReturn ( 1234L ) ; org.mockito.Mockito.when ( mockFile.lastModified ( ) ) . thenReturn ( 8271L ) ; org.junit.Assert.assertEquals ( "ETag does not match" , "W/\"1234-8271\"" , org.ovirt.engine.core.utils.servlet.ServletUtils.getETag ( mockFile ) ) ; }

Target:
public void test_ETag_Format ( ) { java.io.File mockFile = org.mockito.Mockito.mock ( java.io.File.class ) ; org.mockito.Mockito.when ( mockFile.length ( ) ) . thenReturn ( 1234L ) ; org.mockito.Mockito.when ( mockFile.lastModified ( ) ) . thenReturn ( 8271L ) ; org.junit.jupiter.api.Assertions.assertEquals ( "W/\"1234-8271\"" , org.ovirt.engine.core.utils.servlet.ServletUtils.getETag ( mockFile ) , "ETag does not match" ) ; }