auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Statistic > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS.length , collection.size ( ) ) ; for ( int i = 0 ; i < ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS.length ) ; i ++ ) { org.ovirt.engine.api.model.Statistic statistic = collection.get ( i ) ; org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.verify ( statistic , org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS [ i ] ) ; verifyLinks ( statistic ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Statistic > collection ) throws java.lang.Exception { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS.length , collection.size ( ) ) ; for ( int i = 0 ; i < ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS.length ) ; i ++ ) { org.ovirt.engine.api.model.Statistic statistic = collection.get ( i ) ; org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.verify ( statistic , org.ovirt.engine.api.restapi.resource.BackendStatisticsResourceTest.STATISTICS [ i ] ) ; verifyLinks ( statistic ) ; } }
Source:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpGetPayloadExpectations ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpGetPayloadExpectations ( 0 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
public void testNoChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; java.util.List < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( jedi1 , jedi2 ) ; org.junit.Assert.assertTrue ( "Should be no changes" , ( ( changes.size ( ) ) == 0 ) ) ; }

Target:
public void testNoChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; java.util.List < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.getChangedFields ( jedi1 , jedi2 ) ; org.junit.Assert.assertTrue ( "Should be no changes" , ( ( changes.size ( ) ) == 0 ) ) ; }
Source:
protected org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > createCommand ( boolean format ) { org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > ( getParams ( format ) ) ) ; org.mockito.Mockito.doReturn ( db ) . when ( cmd ) . getDbFacade ( ) ; org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; return cmd ; }

Target:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { return ( ( org.ovirt.engine.core.utils.transaction.TransactionMethod < ? > ) ( invocation.getArguments ( ) [ 0 ] ) ) . runInTransaction ( ) ; }
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > vmDisks ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }
Source:
public void qosNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setQosOverridden ( true ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void qosNotSupported ( ) { 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.setQosOverridden ( true ) ; iface.setQos ( createQos ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkDAO ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkDAO ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : getClusters ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }
Source:
public void testUpdateNotExistingConnection ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetNotExistingEntityExpectations ( ) ; try { resource.update ( getModel ( 3 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotExistingConnection ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetNotExistingEntityExpectations ( ) ; try { resource.update ( getModel ( 3 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { manager = new org.ovirt.engine.core.utils.ovf.OvfManager ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; java.util.HashMap < java.lang.Integer , java.lang.String > osIdsToNames = new java.util.HashMap < > ( ) ; org.mockito.Mockito.when ( osRepository.getArchitectureFromOS ( org.mockito.Matchers.any ( java.lang.Integer.class ) ) ) . thenReturn ( ArchitectureType.x86_64 ) ; org.mockito.Mockito.when ( osRepository.getUniqueOsNames ( ) ) . thenReturn ( osIdsToNames ) ; }

Target:
public java.lang.Integer answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { for ( java.util.Map.Entry < java.lang.Integer , java.lang.String > entry : osIdsToNames.entrySet ( ) ) { if ( invocation.getArguments ( ) [ 0 ] . equals ( entry.getValue ( ) ) ) { return entry.getKey ( ) ; } } return 0 ; }
Source:
public void testGetAllDiskImageSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Disk" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( diskImageResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllDiskImageSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Disk" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.Disk ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( diskImageResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
private void mockVmWithDisk ( org.ovirt.engine.core.compat.Guid storageId ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageId ) ) ) ; mockVm ( ) . getDiskMap ( ) . put ( image.getId ( ) , image ) ; }

Target:
private void mockVmWithDisk ( org.ovirt.engine.core.compat.Guid storageId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageId ) ) ) ; mockVm ( ) . getDiskMap ( ) . put ( image.getId ( ) , image ) ; }
Source:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ) && ( ! ( clusterNetworkModel.isManagement ( ) ) ) ; }

Target:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ) && ( ( ! ( isMultipleSelectionAllowed ( ) ) ) || ( ! ( clusterNetworkModel.isManagement ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotPlugNic ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotplugNic ( info.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookUpdate ( glusterCommand , stage , hookName , content , checksum ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc monitorCommand ( java.lang.String vmId , java.lang.String monitorCommand ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.monitorCommand ( vmId , monitorCommand ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc changeDisk ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.Object > driveSpec ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.changeCD ( vmId , driveSpec ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private boolean deviceCanBeRemoved ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { if ( ( ! ( vmDevice.getDevice ( ) . equals ( VmDeviceType.DISK.getName ( ) ) ) ) || ( ! ( vmDevice.isManaged ( ) ) ) ) { return true ; } return ( ( vmDevice.getSnapshotId ( ) ) == null ) && ( getDiskDao ( ) . get ( vmDevice.getDeviceId ( ) ) . isAllowSnapshot ( ) ) ; }

Target:
private boolean deviceCanBeRemoved ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { if ( ( ! ( vmDevice.getDevice ( ) . equals ( VmDeviceType.DISK.getName ( ) ) ) ) || ( ! ( vmDevice.isManaged ( ) ) ) ) { return true ; } return ( ( vmDevice.getSnapshotId ( ) ) == null ) && ( diskDao.get ( vmDevice.getDeviceId ( ) ) . isAllowSnapshot ( ) ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.row11Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void writeData ( java.io.ObjectOutputStream dos ) { try { writeString ( this . var_name , dos ) ; writeDate ( this . var_datetime , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { actionButtonInterface.onClick ( ) . invoke ( org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.arrayFrom ( table.getSelectedItems ( ) ) , null ) ; }

Target:
public void addSubTabActionButton ( org.ovirt.engine.ui.webadmin.plugin.entity.EntityType mainTabEntityType , org.ovirt.engine.ui.webadmin.plugin.entity.EntityType subTabEntityType , java.lang.String label , org.ovirt.engine.ui.webadmin.plugin.api.ActionButtonInterface actionButtonInterface ) { java.lang.String historyToken = mainTabEntityType.getSubTabHistoryToken ( subTabEntityType ) ; if ( historyToken != null ) { org.ovirt.engine.ui.common.presenter.AddTabActionButtonEvent.fire ( this , historyToken , createButtonDefinition ( label , actionButtonInterface ) ) ; } }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.common.eventqueue.EventResult result = null ; if ( _domainsInProblem.containsKey ( domainId ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.info ( ( "starting processDomainRecovery for domain " + ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData.getDomainIdTuple ( domainId ) ) ) ) ; result = processDomainRecovery ( domainId ) ; } _timers.remove ( domainId ) ; return result ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.common.eventqueue.EventResult result = new org.ovirt.engine.core.common.eventqueue.EventResult ( true , org.ovirt.engine.core.common.eventqueue.EventType.DOMAINMONITORING ) ; updateProblematicVdsData ( vdsId , vdsName , domainsInProblems ) ; updateMaintenanceVdsData ( vdsId , vdsName , domainsInMaintenance ) ; return result ; }
Source:
public void setup ( ) { createValidator ( ) ; org.mockito.Mockito.when ( dbFacade.getInterfaceDao ( ) ) . thenReturn ( interfaceDao ) ; org.mockito.Mockito.when ( dbFacade.getHostNicVfsConfigDao ( ) ) . thenReturn ( vfsConfigDao ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( vdsDao ) ; }

Target:
public void setup ( ) { createValidator ( ) ; org.mockito.Mockito.when ( dbFacade.getInterfaceDao ( ) ) . thenReturn ( interfaceDao ) ; org.mockito.Mockito.when ( dbFacade.getHostNicVfsConfigDao ( ) ) . thenReturn ( vfsConfigDao ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( vdsDao ) ; org.mockito.Mockito.when ( dbFacade.getNetworkDao ( ) ) . thenReturn ( networkDao ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { org.ovirt.engine.api.model.Disk populatedDisk = super . doPopulate ( model , entity ) ; populatedDisk.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; populatedDisk.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk addParents ( org.ovirt.engine.api.model.Disk disk ) { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( storageDomainId.toString ( ) ) ; org.ovirt.engine.api.model.StorageDomains storageDomains = new org.ovirt.engine.api.model.StorageDomains ( ) ; storageDomains.getStorageDomains ( ) . add ( storageDomain ) ; disk.setStorageDomain ( storageDomain ) ; disk.setStorageDomains ( storageDomains ) ; return disk ; }
Source:
public void liveMigrateDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( 1 , command.getLiveMigrateVmDisksParametersList ( ) . size ( ) ) ; }

Target:
public void moveFloatingDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; command.init ( ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( 1 , command.getMoveDiskParametersList ( ) . size ( ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( vds.getvds_group_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( vds.getvds_group_id ( ) , net ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( vds.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( vds.getVdsGroupId ( ) , net ) ; } return null ; }
Source:
private void setupParentExpectations ( ) { org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setName ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumeResourceTest.defaultClusterName ) ; cluster.setId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumeResourceTest.clusterId.toString ( ) ) ; clusterResourceMock = control.createMock ( org.ovirt.engine.api.resource.ClusterResource.class ) ; org.easymock.EasyMock.expect ( clusterResourceMock.get ( ) ) . andReturn ( cluster ) . anyTimes ( ) ; volumesResourceMock = control.createMock ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResource.class ) ; org.easymock.EasyMock.expect ( volumesResourceMock.getParent ( ) ) . andReturn ( clusterResourceMock ) . anyTimes ( ) ; }

Target:
protected org.ovirt.engine.api.model.GlusterVolume addParents ( org.ovirt.engine.api.model.GlusterVolume model ) { org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumeResourceTest.clusterId.toString ( ) ) ; model.setCluster ( cluster ) ; return model ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getEntityId ( ) . toString ( ) , LockMessagesMatchUtil.DISK ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getEntityId ( ) . toString ( ) , new org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > ( LockingGroup.DISK.name ( ) , getDiskIsBeingRemovedLockMessage ( ) ) ) ; }
Source:
private void ProposeDiscover ( ) { boolean proposeDiscover = ( ! ( getProposeDiscoverTargets ( ) ) ) && ( ( ( getItems ( ) ) == null ) || ( ( org.ovirt.engine.ui.uicommonweb.Linq.count ( getItems ( ) ) ) == 0 ) ) ; setProposeDiscoverTargets ( proposeDiscover ) ; }

Target:
private void proposeDiscover ( ) { boolean proposeDiscover = ( ! ( getProposeDiscoverTargets ( ) ) ) && ( ( ( getItems ( ) ) == null ) || ( ( org.ovirt.engine.ui.uicommonweb.Linq.count ( getItems ( ) ) ) == 0 ) ) ; setProposeDiscoverTargets ( proposeDiscover ) ; }
Source:
private void _remoteFileName ( java.lang.String file ) { if ( ( ( ( ( file.indexOf ( '\'' ) ) != ( - 1 ) ) || ( ( file.indexOf ( '\n' ) ) != ( - 1 ) ) ) || ( ( file.indexOf ( '\r' ) ) != ( - 1 ) ) ) || false ) { throw new java.lang.IllegalArgumentException ( "File name should not contain \"\'\"" ) ; } }

Target:
private void remoteFileName ( java.lang.String file ) { if ( ( ( ( ( file.indexOf ( '\'' ) ) != ( - 1 ) ) || ( ( file.indexOf ( '\n' ) ) != ( - 1 ) ) ) || ( ( file.indexOf ( '\r' ) ) != ( - 1 ) ) ) || false ) { throw new java.lang.IllegalArgumentException ( "File name should not contain \"\'\"" ) ; } }
Source:
protected void endSuccessfully ( ) { if ( ! ( org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . getParentParameters ( ) , null ) ; } }

Target:
protected void endSuccessfully ( ) { if ( ( ! ( org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . isParentHasTasks ( ) ) ) && ( org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . isInvokeEndActionOnParent ( ) ) ) { org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.RemoveAllCinderSnapshotDisksCommand.getParameters ( ) . getParentParameters ( ) , null ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.displayTypes = new org.ovirt.engine.ui.uicommonweb.MapWithDefaults < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > ( result , result.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; }
Source:
public void testExecuteQueryWithDirectOnly ( ) { org.ovirt.engine.core.dao.PermissionDAO permissionDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.PermissionDAO.class ) ; org.mockito.Mockito.when ( permissionDAOMock.getAllForEntity ( objectID , getUser ( ) . getUserId ( ) , getQueryParameters ( ) . isFiltered ( ) ) ) . thenReturn ( mockedPermissions ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getPermissionDAO ( ) ) . thenReturn ( permissionDAOMock ) ; assertQueryDAOCall ( true ) ; }

Target:
public void testExecuteQueryWithDirectOnly ( ) { org.ovirt.engine.core.dao.PermissionDAO permissionDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.PermissionDAO.class ) ; org.mockito.Mockito.when ( permissionDAOMock.getAllForEntity ( objectID , getUser ( ) . getUserId ( ) , getQueryParameters ( ) . isFiltered ( ) ) ) . thenReturn ( mockedPermissions ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getPermissionDao ( ) ) . thenReturn ( permissionDAOMock ) ; assertQueryDAOCall ( true ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getBroker ( ) . setNumberOfCpus ( org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) , java.lang.String.valueOf ( org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getParameters ( ) . getNumberOfCpus ( ) ) ) ; org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.setVdsRuntimeError ( e ) ; org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getBroker ( ) . setNumberOfCpus ( org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) , java.lang.String.valueOf ( org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getParameters ( ) . getNumberOfCpus ( ) ) ) ; org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetNumberOfCpusVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }
Source:
private void AddVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( getVmId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStatisticsDAO ( ) . save ( stats ) ; getCompensationContext ( ) . snapshotNewEntity ( stats ) ; getCompensationContext ( ) . stateChanged ( ) ; }

Target:
private void addVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( getVmId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStatisticsDAO ( ) . save ( stats ) ; getCompensationContext ( ) . snapshotNewEntity ( stats ) ; getCompensationContext ( ) . stateChanged ( ) ; }
Source:
public void testValidModifiedBonds_whenAllOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , null , true , true ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) ) ; }
Source:
public void getUserMessageOfTheDayViaPublic ( 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.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.Snapshot.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getSnapshotName ( ) ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; initializeObjectState ( ) ; jobProperties.put ( VdcObjectType.Snapshot.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getSnapshotName ( ) ) ; } return jobProperties ; }
Source:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case FCP : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case NFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case LOCALFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case POSIXFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLUSTERFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLANCE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case CINDER : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.StorageType.ISCSI ; case FCP : return org.ovirt.engine.api.model.StorageType.FCP ; case NFS : return org.ovirt.engine.api.model.StorageType.NFS ; case LOCALFS : return org.ovirt.engine.api.model.StorageType.LOCALFS ; case POSIXFS : return org.ovirt.engine.api.model.StorageType.POSIXFS ; case GLUSTERFS : return org.ovirt.engine.api.model.StorageType.GLUSTERFS ; case GLANCE : return org.ovirt.engine.api.model.StorageType.GLANCE ; case CINDER : return org.ovirt.engine.api.model.StorageType.CINDER ; default : return null ; } }
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.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.dc_aggregate_dateStruct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.row11Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . key = readString ( dis ) ; this . value = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRestoreCommand ( ) ) ) { Restore ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "CancelConfirm" ) ) { CancelConfirm ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRestoreCommand ( ) ) ) { restore ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "CancelConfirm" ) ) { cancelConfirm ( ) ; } }
Source:
public void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { nicHotplugSupportMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }

Target:
public void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.AsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object returnValue ) { nicHotplugSupportMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }
Source:
private boolean canRemoveLunDisk ( ) { if ( ( listVms ) != null ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { if ( ( vm.getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = getVmDeviceDAO ( ) . get ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vm.getId ( ) ) ) ; if ( vmDevice.getIsPlugged ( ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; return false ; } } } } return true ; }

Target:
private boolean canRemoveLunDisk ( ) { if ( ( disk.getVmEntityType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.VM ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : getVmsForDiskId ( ) ) { if ( ( vm.getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = getVmDeviceDAO ( ) . get ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vm.getId ( ) ) ) ; if ( vmDevice.getIsPlugged ( ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; return false ; } } } } return true ; }
Source:
public static void GetClusterNetworkList ( 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 ) { 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 GetDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.GetStoragePoolById , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , 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:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }