auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void testGetAllForSubscriber ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > result = dao.getAllForSubscriber ( existingSubscriber ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber subscription : result ) { assertEquals ( existingSubscriber , subscription.getsubscriber_id ( ) ) ; } }

Target:
public void testGetEventNotificationMethodsById ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsById ( 1 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( org.ovirt.engine.core.compat.Guid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getvm_guid ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( org.ovirt.engine.core.compat.Guid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getVmId ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) { return map.getVmId ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
private void updateAlerts ( final org.ovirt.engine.ui.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenter.ViewDef view , final org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel model ) { view.clearAlerts ( ) ; if ( model.getHasNewGlusterHostsAlert ( ) ) { addTextAndLinkAlert ( view , messages.clusterHasNewGlusterHosts ( ) , model.getImportNewGlusterHostsCommand ( ) , model.getDetachNewGlusterHostsCommand ( ) ) ; } if ( model.isConsoleAddressPartiallyOverridden ( ) ) { view.addAlert ( new com.google.gwt.user.client.ui.Label ( constants.consolePartiallyOverridden ( ) ) ) ; } }

Target:
private void updateAlerts ( final org.ovirt.engine.ui.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenter.ViewDef view , final org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel model ) { view.clearAlerts ( ) ; if ( model.getHasNewGlusterHostsAlert ( ) ) { addTextAndLinkAlert ( view , org.ovirt.engine.ui.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenter.messages.clusterHasNewGlusterHosts ( ) , model.getImportNewGlusterHostsCommand ( ) , model.getDetachNewGlusterHostsCommand ( ) ) ; } if ( model.isConsoleAddressPartiallyOverridden ( ) ) { view.addAlert ( new com.google.gwt.user.client.ui.Label ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenter.constants.consolePartiallyOverridden ( ) ) ) ; } }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
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 ) ; }
Source:
private boolean isPowerManagementLegal ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { if ( ( fenceAgents == null ) || ( fenceAgents.isEmpty ( ) ) ) { messages.add ( EngineMessage.ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT.name ( ) ) ; return false ; } else { return isCompatibleAgentExists ( fenceAgents , vdsGroup , messages ) ; } }

Target:
private boolean isPowerManagementLegal ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < java.lang.String > messages ) { if ( ( fenceAgents == null ) || ( fenceAgents.isEmpty ( ) ) ) { messages.add ( EngineMessage.ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT.name ( ) ) ; return false ; } else { return isCompatibleAgentExists ( fenceAgents , cluster , messages ) ; } }
Source:
private void mockNullVm ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseMockUtils.mockVmDao ( command , vmDAO ) ; mockGetForDisk ( null ) ; mockGetVmsListForDisk ( null ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( null ) ; }

Target:
private void mockNullVm ( ) { org.mockito.Mockito.doReturn ( vmDAO ) . when ( command ) . getVmDAO ( ) ; mockGetForDisk ( null ) ; mockGetVmsListForDisk ( null ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( null ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.NetworkInterface > FindAllInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.NetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.NetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.NetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.NetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > FindAllInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { ret.add ( i ) ; } } return ret ; }
Source:
public void testSave ( ) { dao.save ( newVmStatic ) ; org.ovirt.engine.core.common.businessentities.VmStatic result = dao.get ( newVmStatic.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( newVmStatic , result ) ; }

Target:
public void testSave ( ) { newVmStatic.setDedicatedVmForVdsList ( java.util.Arrays.asList ( org.ovirt.engine.core.dao.VmStaticDaoTest.HOST_GUIDS ) ) ; dao.save ( newVmStatic ) ; org.ovirt.engine.core.common.businessentities.VmStatic result = dao.get ( newVmStatic.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( "Add 3 dedicated hosts" , org.apache.commons.collections.CollectionUtils.isEqualCollection ( result.getDedicatedVmForVdsList ( ) , newVmStatic.getDedicatedVmForVdsList ( ) ) ) ; org.junit.Assert.assertEquals ( newVmStatic , result ) ; }
Source:
public void canDoActionFailsOnCompat ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.gluster.StartRemoveGlusterVolumeBricksCommandTest.UNSUPPORTED_VERSION ) . when ( vdsGroup ) . getCompatibilityVersion ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.GLUSTER_TASKS_NOT_SUPPORTED_FOR_CLUSTER_LEVEL.toString ( ) ) ) ; }

Target:
public void validateFailsOnCompat ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.gluster.StartRemoveGlusterVolumeBricksCommandTest.UNSUPPORTED_VERSION ) . when ( vdsGroup ) . getCompatibilityVersion ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.GLUSTER_TASKS_NOT_SUPPORTED_FOR_CLUSTER_LEVEL.toString ( ) ) ) ; }
Source:
public void labeledNetworkRemovedFromNic ( ) { java.lang.String networkName = "net" ; java.lang.String label = "lbl1" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createLabeledNic ( "nic0" , networkName , label ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( null ) ; mockExistingNetworks ( createLabeledNetwork ( networkName , label ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , networkName ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNic ( java.lang.String nicName , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , nicName , false , null , null , null , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenBaseNicIsPassed ( nic ) ; return nic ; }
Source:
public void testInterfaceIsValidSlaveWhenInterfaceIsBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBonded ( true ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_INTERFACE_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }

Target:
public void testInterfaceIsValidSlaveWhenInterfaceIsBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBonded ( true ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }
Source:
public void testGetAllInterfacesForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { assertEquals ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , iface.getVmId ( ) ) ; } }

Target:
public void testGetAllInterfacesForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , iface.getVmId ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.EventMap > getAllEventMaps ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventMap > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventMap > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.EventMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.EventMap entity = new org.ovirt.engine.core.common.businessentities.EventMap ( ) ; entity.setEventUpName ( rs.getString ( "event_up_name" ) ) ; entity.setEventDownName ( rs.getString ( "event_down_name" ) ) ; return entity ; } } ; return getCallsHandler ( ) . executeReadList ( "GetAllFromevent_map" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.EventMap > getEventMapByName ( java.lang.String event_up_name ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "event_name" , event_up_name ) ; return getCallsHandler ( ) . executeReadList ( "GetEventMapByName" , org.ovirt.engine.core.dao.EventDAODbFacadeImpl.EventMapRowMapper.instance , parameterSource ) ; }
Source:
public static void getMaxNumOfVmSockets ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static void RunMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state , service ) ; }

Target:
public static void RunMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state ) ; }
Source:
public javax.net.ssl.SSLContext getSSLContext ( ) throws java.security.GeneralSecurityException { final javax.net.ssl.SSLContext context ; try { context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( getKeyManagers ( ) , getTustManagers ( ) , null ) ; } catch ( java.security.KeyManagementException | java.security.NoSuchAlgorithmException ex ) { throw new java.lang.RuntimeException ( ex ) ; } return context ; }

Target:
public javax.net.ssl.SSLContext getSSLContext ( ) throws java.security.GeneralSecurityException { final javax.net.ssl.SSLContext context ; try { context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( getKeyManagers ( ) , getTrustManagers ( ) , null ) ; } catch ( java.security.KeyManagementException | java.security.NoSuchAlgorithmException ex ) { throw new java.lang.RuntimeException ( ex ) ; } return context ; }
Source:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
private java.lang.String getManagementAgent ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder order ) { java.lang.String agent = "" ; if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Primary ) ) { agent = org.ovirt.engine.core.utils.pm.VdsFencingOptions.getRealAgent ( _vds.getpm_type ( ) ) ; } else if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Secondary ) ) { agent = org.ovirt.engine.core.utils.pm.VdsFencingOptions.getRealAgent ( _vds.getPmSecondaryType ( ) ) ; } return agent ; }

Target:
private java.lang.String getManagementAgent ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder order ) { java.lang.String agent = "" ; if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Primary ) ) { agent = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getRealAgent ( _vds.getpm_type ( ) ) ; } else if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Secondary ) ) { agent = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getRealAgent ( _vds.getPmSecondaryType ( ) ) ; } return agent ; }
Source:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } } }

Target:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } tearDownImage ( context.entity.getVdsId ( ) ) ; } }
Source:
public static void getRpmVersionViaPublic ( 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.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
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.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
protected javax.ws.rs.core.UriInfo setUpChangeCdUriQueryExpectations ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > queries = control.createMock ( javax.ws.rs.core.MultivaluedMap.class ) ; org.easymock.EasyMock.expect ( queries.containsKey ( "current" ) ) . andReturn ( true ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( uriInfo.getQueryParameters ( ) ) . andReturn ( queries ) . anyTimes ( ) ; return uriInfo ; }

Target:
protected javax.ws.rs.core.UriInfo setUpChangeCdUriQueryExpectations ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > queries = control.createMock ( javax.ws.rs.core.MultivaluedMap.class ) ; org.easymock.EasyMock.expect ( queries.getFirst ( "current" ) ) . andReturn ( "true" ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( uriInfo.getQueryParameters ( ) ) . andReturn ( queries ) . anyTimes ( ) ; return uriInfo ; }
Source:
protected boolean evaluateReturnValue ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { boolean succeeded = returnValue.isValid ( ) ; if ( ! succeeded ) { handleVdsErrors ( auditLogType , returnValue.getValidationMessages ( ) ) ; } succeeded = succeeded && ( returnValue.getSucceeded ( ) ) ; if ( ! succeeded ) { handleVdsErrors ( auditLogType , returnValue.getExecuteFailedMessages ( ) ) ; } return succeeded ; }

Target:
protected boolean evaluateReturnValue ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.action.ActionReturnValue returnValue ) { boolean succeeded = returnValue.isValid ( ) ; if ( ! succeeded ) { handleVdsErrors ( auditLogType , returnValue.getValidationMessages ( ) ) ; } succeeded = succeeded && ( returnValue.getSucceeded ( ) ) ; if ( ! succeeded ) { handleVdsErrors ( auditLogType , returnValue.getExecuteFailedMessages ( ) ) ; } return succeeded ; }
Source:
public org.ovirt.engine.api.model.KatelloErrata list ( ) { org.ovirt.engine.core.common.businessentities.ErrataData errataData = null ; try { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runQuery ( QueryType.GetErrataForEngine , new org.ovirt.engine.core.common.queries.GetErrataCountsParameters ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { backendFailure ( returnValue.getExceptionString ( ) ) ; } errataData = returnValue.getReturnValue ( ) ; } catch ( java.lang.Exception e ) { handleError ( e , false ) ; } if ( errataData == null ) { return new org.ovirt.engine.api.model.KatelloErrata ( ) ; } return mapCollection ( errataData.getErrata ( ) ) ; }

Target:
public org.ovirt.engine.api.model.KatelloErrata list ( ) { org.ovirt.engine.core.common.businessentities.ErrataData errataData = null ; try { org.ovirt.engine.core.common.queries.QueryReturnValue returnValue = runQuery ( QueryType.GetErrataForEngine , new org.ovirt.engine.core.common.queries.GetErrataCountsParameters ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { backendFailure ( returnValue.getExceptionString ( ) ) ; } errataData = returnValue.getReturnValue ( ) ; } catch ( java.lang.Exception e ) { handleError ( e , false ) ; } if ( errataData == null ) { return new org.ovirt.engine.api.model.KatelloErrata ( ) ; } return mapCollection ( errataData.getErrata ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageDomain storageDomain ) { validateParameters ( storageDomain , "id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId ; if ( storageDomain.isSetId ( ) ) { storageDomainId = asGuid ( storageDomain.getId ( ) ) ; } else { storageDomainId = lookupStorageDomainIdByName ( storageDomain.getName ( ) ) ; } return performCreate ( VdcActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters ( storageDomainId , dataCenterId ) , new org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResource.StorageDomainIdResolver ( storageDomainId ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageDomain storageDomain ) { validateParameters ( storageDomain , "id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId ; if ( storageDomain.isSetId ( ) ) { storageDomainId = asGuid ( storageDomain.getId ( ) ) ; } else { storageDomainId = lookupStorageDomainIdByName ( storageDomain.getName ( ) ) ; } return performCreate ( ActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters ( storageDomainId , dataCenterId ) , new org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResource.StorageDomainIdResolver ( storageDomainId ) ) ; }
Source:
protected boolean isNotLocalData ( final boolean isInternal ) { if ( ( ( this . getStoragePool ( ) . isLocal ( ) ) && ( ( org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBase.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) ) && ( ! isInternal ) ) { return failCanDoAction ( EngineMessage.VDS_GROUP_CANNOT_DETACH_DATA_DOMAIN_FROM_LOCAL_STORAGE ) ; } return true ; }

Target:
protected boolean isNotLocalData ( final boolean isInternal ) { if ( ( ( this . getStoragePool ( ) . isLocal ( ) ) && ( ( org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBase.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) ) && ( ! isInternal ) ) { return failValidation ( EngineMessage.VDS_GROUP_CANNOT_DETACH_DATA_DOMAIN_FROM_LOCAL_STORAGE ) ; } return true ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) ) ; }

Target:
public void testValidModifiedBondsFailsWhenReferencingExistingNonBondInterface ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; org.ovirt.engine.core.bll.ValidationResult notABondValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND , org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NETWORK_INTERFACE_IS_NOT_BOND_ENTITY , bond.getName ( ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , notABondValidationResult , notABondValidationResult , ValidationResult.VALID ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... params ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand ) ( uiCommand ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 = command.getOp1 ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 = command.getOp2 ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = command.getAllNics ( ) ; ExecuteNetworkCommand ( op1 , op2 , allNics , params ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... params ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand ) ( uiCommand ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 = command.getOp1 ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 = command.getOp2 ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = command.getAllNics ( ) ; ExecuteNetworkCommand ( op1 , op2 , allNics , params ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateDiskIsNotLun ( ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_LUN_DISK ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateUnsupportedDiskStorageType ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType ... diskStorageTypes ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskStorageType > diskStorageTypeList = java.util.Arrays.asList ( diskStorageTypes ) ; if ( diskStorageTypeList.contains ( disk.getDiskStorageType ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE , java.lang.String.format ( "$diskStorageType %s" , disk.getDiskStorageType ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void isTemplateNameUnique ( 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.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { boolean retValue = super . canDoAction ( ) ; if ( ( job ) != null ) { if ( ! ( job.isExternal ( ) ) ) { retValue = false ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_NOT_EXTERNAL ) ; } } if ( ! retValue ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__ADD ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__EXTERNAL_JOB ) ; } return retValue ; }

Target:
protected boolean canDoAction ( ) { boolean retValue = super . canDoAction ( ) ; if ( ( job ) != null ) { if ( ! ( job.isExternal ( ) ) ) { retValue = false ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_NOT_EXTERNAL ) ; } } if ( ! retValue ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__ADD ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__EXTERNAL_JOB ) ; } return retValue ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult mixedClusterServicesSupported ( ) { boolean mixedClusterEnabled = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) . when ( ( ( ( cluster.supportsGlusterService ( ) ) && ( cluster.supportsVirtService ( ) ) ) && ( ! mixedClusterEnabled ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult mixedClusterServicesSupported ( ) { boolean mixedClusterEnabled = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) . when ( ( ( ( cluster.supportsGlusterService ( ) ) && ( cluster.supportsVirtService ( ) ) ) && ( ! mixedClusterEnabled ) ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStoragePoolIsoMapDao ( ) ; storagePoolIsoMapDao = dbFacade.getStoragePoolDao ( ) ; existingPool = storagePoolIsoMapDao.get ( new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; existingStoragePoolIsoMap = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.EXISTING_ISO_ID , existingPool.getId ( ) ) ) ; newStoragePoolIsoMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.FREE_ISO_ID , existingPool.getId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Unattached ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStoragePoolIsoMapDao ( ) ; storagePoolIsoMapDao = dbFacade.getStoragePoolDao ( ) ; existingPool = storagePoolIsoMapDao.get ( FixturesTool.DATA_CENTER ) ; existingStoragePoolIsoMap = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.EXISTING_ISO_ID , existingPool.getId ( ) ) ) ; newStoragePoolIsoMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.FREE_ISO_ID , existingPool.getId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Unattached ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( getNetworkMappings ( ) ) == null ? 0 : getNetworkMappings ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getQpidConfiguration ( ) ) == null ? 0 : getQpidConfiguration ( ) . hashCode ( ) ) ; return result ; }

Target:
public org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties.MessagingConfiguration getMessagingConfiguration ( ) { return messagingConfiguration ; }
Source:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.ProcessDownVmCommand.getQuotaManager ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; boolean vmHasDirectPassthroughDevices = releaseUsedHostDevices ( ) ; org.ovirt.engine.core.compat.Guid hostId = cleanupVfs ( ) ; refreshHostIfNeeded ( ( hostId == null ? vmHasDirectPassthroughDevices ? org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVds ( ) : null : hostId ) ) ; applyNextRunConfiguration ( ) ; }

Target:
private boolean releaseUsedHostDevices ( ) { if ( hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) ) ) { try { hostDeviceManager.acquireHostDevicesLock ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . get ( 0 ) ) ; hostDeviceManager.freeVmHostDevices ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; } finally { hostDeviceManager.releaseHostDevicesLock ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . get ( 0 ) ) ; } return true ; } return false ; }
Source:
public void testJsonSerializationAndDeserialization ( ) throws java.lang.Exception { org.ovirt.engine.core.common.utils.ExternalId original = new org.ovirt.engine.core.common.utils.ExternalId ( 0 , 1 , 2 , 3 ) ; org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; java.lang.String value = mapper.writeValueAsString ( original ) ; org.ovirt.engine.core.common.utils.ExternalId deserialized = mapper.readValue ( value , org.ovirt.engine.core.common.utils.ExternalId.class ) ; junit.framework.Assert.assertEquals ( original , deserialized ) ; }

Target:
public void testJsonSerializationAndDeserialization ( ) throws java.lang.Exception { org.ovirt.engine.core.common.utils.ExternalId original = new org.ovirt.engine.core.common.utils.ExternalId ( org.ovirt.engine.core.common.utils.ExternalIdTest.BYTES ) ; org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; java.lang.String value = mapper.writeValueAsString ( original ) ; org.ovirt.engine.core.common.utils.ExternalId deserialized = mapper.readValue ( value , org.ovirt.engine.core.common.utils.ExternalId.class ) ; junit.framework.Assert.assertEquals ( original , deserialized ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc glusterVolumeSnapshotConfigGet ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue ; if ( volumeName == null ) { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( "" ) ; } else { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( volumeName ) ; } org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc ( clusterId , 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.gluster.OneStorageDeviceReturnForXmlRpc glusterCreateBrick ( java.lang.String lvName , java.lang.String mountPoint , java.util.Map < java.lang.String , java.lang.Object > raidParams , java.lang.String fsType , java.lang.String [ ] storageDevices ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.OneStorageDeviceReturnForXmlRpc ( vdsServer.glusterCreateBrick ( lvName , mountPoint , storageDevices , fsType , raidParams ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException exp ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( exp ) ; } }