auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec ) ; 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.irsbroker.StatusReturnForXmlRpc teardownImage ( java.lang.String sdID , java.lang.String spID , java.lang.String imageID , java.lang.String volumeID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.teardownImage ( sdID , spID , imageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Snapshot > collection ) { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( 2 , collection.size ( ) ) ; for ( int i = 0 ; i < 2 ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Snapshot > collection ) { org.junit.jupiter.api.Assertions.assertNotNull ( collection ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , collection.size ( ) ) ; for ( int i = 0 ; i < 2 ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testIncreaseStoragePoolMasterVersion ( ) { int result = dao.increaseStoragePoolMasterVersion ( getExistingEntityId ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dbPool = dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertEquals ( result , ( ( existingEntity.getMasterDomainVersion ( ) ) + 1 ) ) ; org.junit.Assert.assertEquals ( result , dbPool.getMasterDomainVersion ( ) ) ; }

Target:
public void testIncreaseStoragePoolMasterVersion ( ) { int result = dao.increaseStoragePoolMasterVersion ( getExistingEntityId ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dbPool = dao.get ( getExistingEntityId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( result , ( ( existingEntity.getMasterDomainVersion ( ) ) + 1 ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( result , dbPool.getMasterDomainVersion ( ) ) ; }
Source:
public void customPropertiesNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NOT_SUPPORTED , network.getName ( ) ) ; }

Target:
public void customPropertiesNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; customProperties.add ( iface , createCustomProperties ( ) ) ; customProperties.add ( iface , createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NOT_SUPPORTED , network.getName ( ) ) ; }
Source:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.delete_vm_device_connectionStruct other ) { int returnValue = - 1 ; return returnValue ; }

Target:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.delete_vm_device_connectionStruct other ) { int returnValue = - 1 ; returnValue = checkNullsAndCompare ( this . vm_id , other.vm_id ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . device_id , other.device_id ) ; if ( returnValue != 0 ) { return returnValue ; } return returnValue ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllWithIpAddress ( java.lang.String address ) { return getCallsHandler ( ) . executeReadList ( "GetVdsByIp" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "ip" , address ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDS getFirstUpRhelForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vds = getCallsHandler ( ) . executeReadList ( "getFirstUpRhelForVdsGroupId" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) ) ; return ( vds.size ( ) ) != 0 ? vds.iterator ( ) . next ( ) : null ; }
Source:
public void testGetAllWithTemplate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllWithTemplate ( existingTemplate.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : result ) { org.junit.Assert.assertEquals ( existingTemplate.getId ( ) , vm.getvmt_guid ( ) ) ; } }

Target:
public void testGetAllWithTemplate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllWithTemplate ( existingTemplate.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : result ) { org.junit.Assert.assertEquals ( existingTemplate.getId ( ) , vm.getVmtGuid ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.users.VdcUser getLoggedInUser ( javax.servlet.http.HttpServletRequest request ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = backend.RunQuery ( VdcQueryType.GetUserBySessionId , createQueryParams ( request.getSession ( ) . getId ( ) , filterQueries ( ) ) ) ; if ( returnValue.getSucceeded ( ) ) { return ( ( org.ovirt.engine.core.common.users.VdcUser ) ( returnValue.getReturnValue ( ) ) ) ; } else { return null ; } }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , javax.servlet.http.HttpServletRequest request ) { initQueryParams ( queryParams , request ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.RunQuery ( queryType , queryParams ) ; if ( result.getSucceeded ( ) ) { return result.getReturnValue ( ) ; } else { return null ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getModifiedNetworks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > modifiedNetworks = new java.util.ArrayList ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) ) { modifiedNetworks.add ( getClusterNetworks ( ) . get ( attachment.getNetworkId ( ) ) ) ; } return modifiedNetworks ; }

Target:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getNetworkDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsGroupId ( ) ) ; networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ; } return networkBusinessEntityMap ; }
Source:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildTryBackToSnapshotParameters ( final org.ovirt.engine.core.compat.Guid newActiveSnapshotId , org.ovirt.engine.core.common.businessentities.DiskImage image ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase params = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( image.getImageId ( ) ) ; params.setParentCommand ( VdcActionType.TryBackToAllSnapshotsOfVm ) ; params.setVmSnapshotId ( newActiveSnapshotId ) ; params.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; params.setParentParameters ( getParameters ( ) ) ; params.setQuotaId ( image.getQuotaId ( ) ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildTryBackToSnapshotParameters ( final org.ovirt.engine.core.compat.Guid newActiveSnapshotId , org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase params = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( image.getImageId ( ) ) ; params.setParentCommand ( VdcActionType.TryBackToAllSnapshotsOfVm ) ; params.setVmSnapshotId ( newActiveSnapshotId ) ; params.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; params.setParentParameters ( getParameters ( ) ) ; params.setQuotaId ( image.getQuotaId ( ) ) ; return params ; }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vmStatic , org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.EntityModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel ( vmStatic , vm , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vmStatic , org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.IModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel ( vmStatic , vm , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
protected void onHide ( ) { super . onHide ( ) ; roleModelProvider.getModel ( ) . stopRefresh ( ) ; permissionModelProvider.getModel ( ) . stopRefresh ( ) ; systemPermissionModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyClusterModelProvider.getModel ( ) . stopRefresh ( ) ; }

Target:
protected void onHide ( ) { super . onHide ( ) ; roleModelProvider.getModel ( ) . stopRefresh ( ) ; permissionModelProvider.getModel ( ) . stopRefresh ( ) ; systemPermissionModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyClusterModelProvider.getModel ( ) . stopRefresh ( ) ; instanceTypeModelProvider.getModel ( ) . stopRefresh ( ) ; }
Source:
private void addSelectionHandler ( boolean topTable ) { final com.google.gwt.view.client.MultiSelectionModel < T > selectionModel = getSelectionModel ( topTable ) ; final org.ovirt.engine.ui.common.widget.dialog.ShapedButton button = getButton ( topTable ) ; selectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { button.setEnabled ( ( ! ( selectionModel.getSelectedSet ( ) . isEmpty ( ) ) ) ) ; } } ) ; }

Target:
private void addSelectionHandler ( boolean excludedTable ) { final com.google.gwt.view.client.MultiSelectionModel < T > selectionModel = getSelectionModel ( excludedTable ) ; final org.ovirt.engine.ui.common.widget.dialog.ShapedButton button = getButton ( excludedTable ) ; selectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { button.setEnabled ( ( ! ( selectionModel.getSelectedSet ( ) . isEmpty ( ) ) ) ) ; } } ) ; }
Source:
private boolean consoleDeviceChanged ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > consoleDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , VmDeviceGeneralType.CONSOLE ) ; return ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . isConsoleEnabled ( ) ) == ( consoleDevices.isEmpty ( ) ) ; }

Target:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }
Source:
public void testQuotaClusterByQuotaGuidWithGeneralDefaultWithDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_GENERAL ) ; org.junit.Assert.assertNotNull ( quotaClusterList ) ; org.junit.Assert.assertEquals ( "wrong number of quotas returned" , 1 , quotaClusterList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaCluster group : quotaClusterList ) { org.junit.Assert.assertEquals ( "VDS ID should be empty in general mode" , Guid.Empty , group.getClusterId ( ) ) ; org.junit.Assert.assertNull ( "VDS name should be null in general mode" , group.getClusterName ( ) ) ; } }

Target:
public void testQuotaClusterByQuotaGuidWithGeneralDefaultNoDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_SPECIFIC ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quotaClusterList ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , quotaClusterList.size ( ) , "wrong number of quotas returned" ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaCluster group : quotaClusterList ) { org.junit.jupiter.api.Assertions.assertNotNull ( group.getClusterId ( ) , "VDS ID should not be null in specific mode" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( group.getClusterName ( ) , "VDS name should not be null in specific mode" ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getapp_list ( ) ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getAppList ( ) ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { importModel.getDiskImportData ( disk.getId ( ) ) . setSelectedStorageDomainString ( value ) ; diskTable.edit ( importModel.getImportDiskListModel ( ) ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { java.lang.String storageDomainName = value.substring ( 0 , value.lastIndexOf ( " (" ) ) ; importModel.getDiskImportData ( disk.getId ( ) ) . setSelectedStorageDomainString ( storageDomainName ) ; diskTable.edit ( importModel.getImportDiskListModel ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.DataCenter dataCenter = new org.ovirt.engine.api.model.DataCenter ( ) ; dataCenter.setId ( dataCenterId.toString ( ) ) ; network.setDataCenter ( dataCenter ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , "name" ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( dataCenterId , entity ) ; if ( network.isSetProfileRequired ( ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return performCreate ( VdcActionType.AddNetwork , parameters , new org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworksResource.AddedNetworkResolver ( ) ) ; }
Source:
public void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid lookupStorageDomainIdByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.core.common.businessentities.storage_domains.class , SearchType.StorageDomain , ( "Storage: name=" + name ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid lookupStorageDomainIdByName ( java.lang.String name ) { if ( ! ( org.ovirt.engine.api.restapi.resource.AbstractBackendActionableResource.isFiltered ( ) ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.storage_domains.class , SearchType.StorageDomain , ( "Storage: name=" + name ) ) . getId ( ) ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage_domains.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { if ( storageDomain.getstorage_name ( ) . equals ( name ) ) { return storageDomain.getId ( ) ; } } return null ; } }
Source:
private org.ovirt.engine.core.common.businessentities.StoragePool getStoragePoolIdByStorageDomainName ( java.lang.String storageDomainName ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain = getEntity ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class , VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , ( "StorageDomain: name=" + storageDomainName ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePools = getEntity ( java.util.List.class , VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomain.getId ( ) ) , "Datacenters" ) ; if ( ! ( storagePools.isEmpty ( ) ) ) { return storagePools.get ( 0 ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.StoragePool getStoragePoolIdByStorageDomainName ( java.lang.String storageDomainName ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain = getEntity ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class , QueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , ( "StorageDomain: name=" + storageDomainName ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePools = getEntity ( java.util.List.class , QueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomain.getId ( ) ) , "Datacenters" ) ; if ( ! ( storagePools.isEmpty ( ) ) ) { return storagePools.get ( 0 ) ; } return null ; }
Source:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { testServlet = new org.ovirt.engine.core.SplashServlet ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockConfig.getServletContext ( ) ) . thenReturn ( mockContext ) ; org.mockito.Mockito.when ( mockContext.getContextPath ( ) ) . thenReturn ( "" ) ; testServlet = new org.ovirt.engine.core.SplashServlet ( ) ; testServlet.init ( mockConfig ) ; }
Source:
private void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameterList = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Provider provider : providers ) { parameterList.add ( new org.ovirt.engine.core.common.action.ProviderParameters ( provider ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.RemoveProvider , parameterList ) ; cancel ( ) ; }

Target:
private void onRemove ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameterList = new java.util.LinkedList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Provider provider : providers ) { parameterList.add ( new org.ovirt.engine.core.common.action.ProviderParameters ( provider ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleActions ( VdcActionType.RemoveProvider , parameterList , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { sourceListModel.getSearchCommand ( ) . execute ( ) ; } } ) ; cancel ( ) ; }
Source:
void initEditors ( ) { versionEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor < java.lang.Object > ( new com.google.gwt.text.shared.AbstractRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String render ( java.lang.Object object ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( object ) ) ; return model.getTitle ( ) ; } } ) ; overrideEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }

Target:
void initEditors ( ) { versionEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor < java.lang.Object > ( new com.google.gwt.text.shared.AbstractRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String render ( java.lang.Object object ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( object ) ) ; return model.getTitle ( ) ; } } ) ; overrideEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT , new org.ovirt.engine.ui.common.widget.VisibilityRenderer.SimpleVisibilityRenderer ( ) , true ) ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , null ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public static org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy getFromStorageDomainId ( org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = getDbFacade ( ) . getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; if ( storageDomainStatic != null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = getDbFacade ( ) . getProviderDao ( ) . get ( new org.ovirt.engine.core.compat.Guid ( storageDomainStatic.getStorage ( ) ) ) ; return org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; } return null ; }
Source:
private boolean isLiveSnapshotEnabled ( ) { return org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.LiveSnapshotEnabled , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; }

Target:
protected boolean validateVM ( org.ovirt.engine.core.bll.validator.VmValidator vmValidator ) { org.ovirt.engine.core.bll.validator.LiveSnapshotValidator validator = new org.ovirt.engine.core.bll.validator.LiveSnapshotValidator ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVds ( ) ) ; return ( ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . isDown ( ) ) || ( validate ( validator.canDoSnapshot ( ) ) ) ) && ( validate ( vmValidator.vmNotSavingRestoring ( ) ) ) ) && ( validate ( vmValidator.validateVmStatusUsingMatrix ( VdcActionType.CreateAllSnapshotsFromVm ) ) ) ; }
Source:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.storage_server_connections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getstorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } return true ; }

Target:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getstorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } return true ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ! ( newModel.getName ( ) . getEntity ( ) . equals ( getName ( ) . getEntity ( ) ) ) ) { getName ( ) . getEntityChangedEvent ( ) . removeListener ( networkNameListener ) ; newModel.getName ( ) . getEntityChangedEvent ( ) . removeListener ( this ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; stopProgress ( ) ; }
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.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
private boolean hasFreeSpace ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain ) { if ( ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getvolume_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { return org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.hasSpaceForRequest ( storageDomain , ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getSizeInGigabytes ( ) ) ; } else { return org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( storageDomain ) ; } }

Target:
protected boolean isStorageDomainBelowThresholds ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain ) { return org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( storageDomain ) ; }
Source:
private void restoreVmFromBaseSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { log.info ( "Deleting snapshots for stateless vm '{}'" , vm.getId ( ) ) ; org.ovirt.engine.core.common.action.VmOperationParameterBase restoreParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( vm.getId ( ) ) ; restoreParams.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , restoreParams , org.ovirt.engine.core.bll.DetachUserFromVmFromPoolCommand.getContext ( ) . withCompensationContext ( null ) ) ; } }

Target:
private void restoreVmFromBaseSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( snapshotDao.exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { log.info ( "Deleting snapshots for stateless vm '{}'" , vm.getId ( ) ) ; org.ovirt.engine.core.common.action.VmOperationParameterBase restoreParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( vm.getId ( ) ) ; restoreParams.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , restoreParams , org.ovirt.engine.core.bll.DetachUserFromVmFromPoolCommand.getContext ( ) . withCompensationContext ( null ) ) ; } }
Source:
public void testGetAllAfterDate ( ) throws java.lang.Exception { java.util.Date cutoff = org.ovirt.engine.core.dao.AuditLogDAOTest.EXPECTED_DATE_FORMAT.parse ( "2010-12-20 13:00:00" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAllAfterDate ( cutoff ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.EXISTING_COUNT , result.size ( ) ) ; cutoff = org.ovirt.engine.core.dao.AuditLogDAOTest.EXPECTED_DATE_FORMAT.parse ( "2010-12-20 14:00:00" ) ; result = dao.getAllAfterDate ( cutoff ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( null , false ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.TOTAL_COUNT , result.size ( ) ) ; }
Source:
public java.lang.Object runInTransaction ( ) { getStorageHelper ( dom ) . StorageDomainRemoved ( dom.getStorageStaticData ( ) ) ; getDbFacade ( ) . getStorageDomainDynamicDao ( ) . remove ( dom.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . remove ( dom.getId ( ) ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getStorageHelper ( dom ) . storageDomainRemoved ( dom.getStorageStaticData ( ) ) ; getDbFacade ( ) . getStorageDomainDynamicDao ( ) . remove ( dom.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . remove ( dom.getId ( ) ) ; return null ; }
Source:
private void setJobOrStepId ( org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { java.lang.String jobId = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendResource.JOB_ID_CONSTRAINT ) ; if ( jobId != null ) { params.setJobId ( asGuid ( jobId ) ) ; } java.lang.String stepId = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendResource.STEP_ID_CONSTRAINT ) ; if ( stepId != null ) { params.setJobId ( asGuid ( stepId ) ) ; } }

Target:
private void setJobOrStepId ( org.ovirt.engine.core.common.action.ActionParametersBase params ) { java.lang.String jobId = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendResource.JOB_ID_CONSTRAINT ) ; if ( jobId != null ) { params.setJobId ( asGuid ( jobId ) ) ; } java.lang.String stepId = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendResource.STEP_ID_CONSTRAINT ) ; if ( stepId != null ) { params.setJobId ( asGuid ( stepId ) ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskImage getImage ( ) { if ( ( mImage ) == null ) { org.ovirt.engine.core.common.businessentities.DiskImage image = getDiskImageDao ( ) . get ( getImageId ( ) ) ; if ( image != null ) { mImage = image ; } else { image = getDiskImageDao ( ) . getSnapshotById ( getImageId ( ) ) ; if ( image != null ) { mImage = image ; } } } return mImage ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DiskImage getImage ( ) { if ( ( mImage ) == null ) { org.ovirt.engine.core.common.businessentities.DiskImage image = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . get ( getImageId ( ) ) ; if ( image != null ) { mImage = image ; } else { image = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getSnapshotById ( getImageId ( ) ) ; if ( image != null ) { mImage = image ; } } } return mImage ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ( ) ; }

Target:
public void getClusterFeaturesByVersionAndCategory ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > > aQuery , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.mode.ApplicationMode category ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SetConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByVersionAndCategory , new org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters ( version , category ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > getAllForVm ( org.ovirt.engine.core.compat.Guid id ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; }

Target:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer mock = mockIsoDomainListSyncronizer ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.compat.Guid ( ) ) . when ( mock ) . findActiveISODomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , true , null ) ; }
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 ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createClusterWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }