auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testChangeClusterForbidden ( ) { prepareVmToPassValidate ( ) ; org.ovirt.engine.core.common.businessentities.Cluster newGroup = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; newGroup.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newGroup.setCompatibilityVersion ( Version.v3_6 ) ; vmStatic.setClusterId ( newGroup.getId ( ) ) ; org.mockito.Mockito.doReturn ( clusterDao ) . when ( command ) . getClusterDao ( ) ; org.junit.Assert.assertFalse ( "validate should have failed with can't change cluster." , command.validate ( ) ) ; assertValidateMessage ( EngineMessage.VM_CANNOT_UPDATE_CLUSTER ) ; }

Target:
public void testChangeClusterForbidden ( ) { prepareVmToPassValidate ( ) ; org.ovirt.engine.core.common.businessentities.Cluster newGroup = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; newGroup.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newGroup.setCompatibilityVersion ( Version.v3_6 ) ; vmStatic.setClusterId ( newGroup.getId ( ) ) ; org.junit.Assert.assertFalse ( "validate should have failed with can't change cluster." , command.validate ( ) ) ; assertValidateMessage ( EngineMessage.VM_CANNOT_UPDATE_CLUSTER ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser getByExternalId ( java.lang.String domain , org.ovirt.engine.core.common.utils.ExternalId externalId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "domain" , domain ) . addValue ( "external_id" , externalId.getBytes ( ) ) ; return getCallsHandler ( ) . executeRead ( "GetUserByExternalId" , org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.DbUserRowMapper.instance , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.DbUser getByExternalId ( java.lang.String domain , java.lang.String externalId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "domain" , domain ) . addValue ( "external_id" , externalId ) ; return getCallsHandler ( ) . executeRead ( "GetUserByExternalId" , org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.DbUserRowMapper.instance , parameterSource ) ; }
Source:
protected org.ovirt.engine.api.model.Network getClusterNetwork ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.api.model.Network entity : getBackendCollection ( org.ovirt.engine.api.model.Network.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters ( clusterId ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getName ( ) ) ) ) ) { return entity ; } } return null ; }

Target:
protected org.ovirt.engine.api.model.Network getClusterNetwork ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.api.model.Network entity : getBackendCollection ( org.ovirt.engine.api.model.Network.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getName ( ) ) ) ) ) { return entity ; } } return null ; }
Source:
public void testRpmRelease ( ) { org.junit.Assert.assertEquals ( new org.ovirt.engine.core.compat.RpmVersion ( "ovirt-node-iso-2.6.0-20130212.fc18.noarch" ) . getRpmRelease ( ) , "20130212.fc18.noarch" ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.compat.RpmVersion ( "test-javadb-common-10.2.2.2.2-1.1.i386" ) . getRpmRelease ( ) , "1.1.i386" ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.compat.RpmVersion ( "java-1.7.0-openjdk-devel-1.7.0.25-2.3.10.4.fc18.x86_64" ) . getRpmRelease ( ) , "2.3.10.4.fc18.x86_64" ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.compat.RpmVersion ( "rhev-agent-2.3.7.10.3-1.el6" , "RHEV-Agent" , true ) . getRpmRelease ( ) , "1.el6" ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.compat.RpmVersion ( "rhev-agent-2.3.7.10.3-1.el6" , "rhev-agent" , false ) . getRpmRelease ( ) , "1.el6" ) ; }

Target:
public void testRpmRelease ( ) { org.junit.Assert.assertEquals ( "20130212.fc18.noarch" , new org.ovirt.engine.core.compat.RpmVersion ( "ovirt-node-iso-2.6.0-20130212.fc18.noarch" ) . getRpmRelease ( ) ) ; org.junit.Assert.assertEquals ( "1.1.i386" , new org.ovirt.engine.core.compat.RpmVersion ( "test-javadb-common-10.2.2.2.2-1.1.i386" ) . getRpmRelease ( ) ) ; org.junit.Assert.assertEquals ( "2.3.10.4.fc18.x86_64" , new org.ovirt.engine.core.compat.RpmVersion ( "java-1.7.0-openjdk-devel-1.7.0.25-2.3.10.4.fc18.x86_64" ) . getRpmRelease ( ) ) ; org.junit.Assert.assertEquals ( "1.el6" , new org.ovirt.engine.core.compat.RpmVersion ( "rhev-agent-2.3.7.10.3-1.el6" , "RHEV-Agent" , true ) . getRpmRelease ( ) ) ; org.junit.Assert.assertEquals ( "1.el6" , new org.ovirt.engine.core.compat.RpmVersion ( "rhev-agent-2.3.7.10.3-1.el6" , "rhev-agent" , false ) . getRpmRelease ( ) ) ; }
Source:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( true , false ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( dbFacadeMock ) . getStoragePoolDao ( ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }

Target:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( dbFacadeMock ) . getStoragePoolDao ( ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }
Source:
protected void refreshVmStats ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.DebugTimerLogging ) ) { org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.debug ( "vds::refreshVmList entered" ) ; } if ( fetchRunningVms ( ) ) { java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = checkVmsStatusChanged ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedDownVms ( ) ; proceedGuaranteedMemoryCheck ( ) ; processExternallyManagedVms ( ) ; updateRepository ( staleRunningVms ) ; refreshCommitedMemory ( ) ; if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isOldClusterVersion ( _vds.getVdsGroupCompatibilityVersion ( ) ) ) ) { handleVmDeviceChange ( ) ; } prepareGuestAgentNetworkDevicesForUpdate ( ) ; } }

Target:
protected void refreshVmStats ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.DebugTimerLogging ) ) { org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.debug ( "vds::refreshVmList entered" ) ; } if ( fetchRunningVms ( ) ) { refreshCommitedMemory ( ) ; java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = checkVmsStatusChanged ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedDownVms ( ) ; proceedGuaranteedMemoryCheck ( ) ; processExternallyManagedVms ( ) ; updateRepository ( staleRunningVms ) ; if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isOldClusterVersion ( _vds.getVdsGroupCompatibilityVersion ( ) ) ) ) { handleVmDeviceChange ( ) ; } prepareGuestAgentNetworkDevicesForUpdate ( ) ; } }
Source:
public void testExecuteQueryCommand ( ) { org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters params = getQueryParameters ( ) ; org.mockito.Mockito.when ( params.getVmId ( ) ) . thenReturn ( vmId ) ; org.ovirt.engine.core.bll.GetAllVmSnapshotsByVmIdQuery < org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > snapshots = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( query.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertTrue ( "snapshot should be in the return value" , snapshots.contains ( snapshot ) ) ; org.junit.Assert.assertEquals ( "there should be exactly one snapshot returned" , 1 , snapshots.size ( ) ) ; }

Target:
public void testExecuteQueryCommand ( ) { org.ovirt.engine.core.common.queries.IdQueryParameters params = getQueryParameters ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( vmId ) ; org.ovirt.engine.core.bll.GetAllVmSnapshotsByVmIdQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > snapshots = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( query.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertTrue ( "snapshot should be in the return value" , snapshots.contains ( snapshot ) ) ; org.junit.Assert.assertEquals ( "there should be exactly one snapshot returned" , 1 , snapshots.size ( ) ) ; }
Source:
protected void executeCommand ( ) { MoveVdssToGoingToMaintananceMode ( ) ; MigrateAllVdss ( ) ; for ( org.ovirt.engine.core.compat.Guid id : _vdsGroupIds ) { java.util.List < org.ovirt.engine.core.common.businessentities.network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDAO ( ) . getAllForCluster ( id ) ; for ( org.ovirt.engine.core.common.businessentities.network net : networks ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( id , net ) ; } } org.ovirt.engine.core.bll.MaintananceNumberOfVdssCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { MoveVdssToGoingToMaintananceMode ( ) ; MigrateAllVdss ( ) ; for ( org.ovirt.engine.core.compat.Guid id : _vdsGroupIds ) { java.util.List < org.ovirt.engine.core.common.businessentities.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDAO ( ) . getAllForCluster ( id ) ; for ( org.ovirt.engine.core.common.businessentities.Network net : networks ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( id , net ) ; } } org.ovirt.engine.core.bll.MaintananceNumberOfVdssCommand.setSucceeded ( true ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateVmModelBehavior ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateVmModelBehavior behavior = this ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }
Source:
private void setupExpectedGlusterServersInfo ( ) { expectedServers = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.server_id1 ) ; server.setHostnameOrIp ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.TEST_SERVER1 ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.server_id3 ) ; server.setHostnameOrIp ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.TEST_SERVER3 ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; }

Target:
private void setupExpectedGlusterServersInfo ( ) { expectedServers = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.server_id3 ) ; server.setHostnameOrIp ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.TEST_SERVER3 ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( returnValue ) ) ; quotas = ( quotas != null ) ? quotas : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ( ) ; getStorageQuota ( ) . setItems ( quotas ) ; getStorageQuota ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( quotas ) ) ; }

Target:
public void onSuccess ( java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( returnValue ) ) ; quotas = ( quotas != null ) ? quotas : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ( ) ; getStorageQuota ( ) . setItems ( quotas ) ; getStorageQuota ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( quotas ) ) ; }
Source:
private static void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.util.Map < java.lang.String , java.lang.Object > struct ) { struct.put ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.put ( VdsProperties.Index , "2" ) ; struct.put ( VdsProperties.INTERFACE , VdsProperties.Ide ) ; struct.put ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.put ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }

Target:
private static void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.util.Map < java.lang.String , java.lang.Object > struct ) { struct.put ( VdsProperties.Type , vmDevice.getType ( ) . getValue ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.put ( VdsProperties.Index , "2" ) ; struct.put ( VdsProperties.INTERFACE , VdsProperties.Ide ) ; struct.put ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.put ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
protected void executeCommand ( ) { getQuotaDao ( ) . remove ( getParameters ( ) . getQuotaId ( ) ) ; getQuotaManager ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getParameters ( ) . getQuotaId ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getQuotaDao ( ) . remove ( getParameters ( ) . getId ( ) ) ; getQuotaManager ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getParameters ( ) . getId ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; model.postDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.lang.Object result = returnValue.getReturnValue ( ) ; model.postDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }
Source:
private void mockVdsGroupDAO ( ) { org.mockito.Mockito.doReturn ( vdsGroupDAO ) . when ( command ) . getVdsGroupDAO ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; org.mockito.Mockito.when ( vdsGroupDAO.getFromCache ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; }

Target:
private void mockVdsGroupDAO ( ) { org.mockito.Mockito.doReturn ( vdsGroupDAO ) . when ( command ) . getVdsGroupDAO ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.String documentationBaseURL = ( ( java.lang.String ) ( returnValue ) ) ; boolean isDocumentationAvailable = ! ( documentationBaseURL.equals ( "" ) ) ; setDocumentationAvailable ( isDocumentationAvailable ) ; setDocumentationBasePath ( documentationBaseURL ) ; onUpdateDocumentationBaseURL ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.String documentationBaseURL = ( ( java.lang.String ) ( returnValue ) ) ; boolean isDocumentationAvailable = ! ( documentationBaseURL.equals ( "" ) ) ; setDocumentationAvailable ( isDocumentationAvailable ) ; setDocumentationBasePath ( documentationBaseURL ) ; onUpdateDocumentationBaseURL ( ) ; }
Source:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.storage.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCurrentUser ( ) ) ) ; }

Target:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.storage.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCurrentUser ( ) ) ) ; }
Source:
public void storagePoolIdWithStorageDomain ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; b.setStoragePoolId ( null ) ; b.setStoragePool ( null ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setStoragePoolId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.compat.Guid n = b.getStoragePoolId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , n ) ; }

Target:
public void storagePoolIdWithStorageDomain ( ) { b.setStoragePoolId ( null ) ; b.setStoragePool ( null ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setStoragePoolId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.compat.Guid n = b.getStoragePoolId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , n ) ; }
Source:
private void addDefaultNetworks ( ) { org.ovirt.engine.core.common.businessentities.Network net = new org.ovirt.engine.core.common.businessentities.Network ( ) ; net.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; net.setname ( org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ) ; net.setdescription ( AddVdsGroupCommand.DefaultNetworkDescription ) ; net.setstorage_pool_id ( org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . getId ( ) ) ; net.setVmNetwork ( true ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getNetworkDAO ( ) . save ( net ) ; }

Target:
private void addDefaultNetworks ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; net.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; net.setname ( org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ) ; net.setdescription ( AddVdsGroupCommand.DefaultNetworkDescription ) ; net.setstorage_pool_id ( org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . getId ( ) ) ; net.setVmNetwork ( true ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getNetworkDAO ( ) . save ( net ) ; }
Source:
public static java.util.Collection < java.lang.Object [ ] > data ( ) { return java.util.Arrays.asList ( new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { false , java.util.Collections.emptyList ( ) } , new java.lang.Object [ ] { false , java.util.Collections.singletonList ( ActionGroup.CREATE_VM ) } , new java.lang.Object [ ] { true , java.util.Collections.singletonList ( ActionGroup.CONFIGURE_ENGINE ) } , new java.lang.Object [ ] { true , java.util.Arrays.asList ( ActionGroup.CONFIGURE_ENGINE , ActionGroup.CREATE_VM ) } } ) ; }

Target:
public static java.lang.Object [ ] [ ] data ( ) { return new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { false , java.util.Collections.emptyList ( ) } , new java.lang.Object [ ] { false , java.util.Collections.singletonList ( ActionGroup.CREATE_VM ) } , new java.lang.Object [ ] { true , java.util.Collections.singletonList ( ActionGroup.CONFIGURE_ENGINE ) } , new java.lang.Object [ ] { true , java.util.Arrays.asList ( ActionGroup.CONFIGURE_ENGINE , ActionGroup.CREATE_VM ) } } ; }
Source:
protected void configure ( ) { super . configure ( ) ; bind ( org.ovirt.engine.ui.common.utils.ConsoleUtils.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemMessagesTranslator.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.section.login.presenter.ConnectAutomaticallyProvider.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.utils.ConsoleManager.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void configure ( ) { super . configure ( ) ; bind ( org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemMessagesTranslator.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.section.login.presenter.ConnectAutomaticallyProvider.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.class ) . in ( com.google.inject.Singleton.class ) ; }
Source:
protected void updateCustomPropertySheet ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; getModel ( ) . getCustomPropertySheet ( ) . setKeyValueString ( getModel ( ) . getCustomPropertiesKeysList ( ) . get ( cluster.getcompatibility_version ( ) ) ) ; }

Target:
protected void updateCustomPropertySheet ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; updateCustomPropertySheet ( cluster.getcompatibility_version ( ) ) ; }
Source:
private void initCPU ( ) { if ( ( ! ( isCPUinitialized ) ) && ( getIsEdit ( ) ) ) { isCPUinitialized = true ; getCPU ( ) . setSelectedItem ( null ) ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu a : getCPU ( ) . getItems ( ) ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( a.getCpuName ( ) , getEntity ( ) . getcpu_name ( ) ) ) { getCPU ( ) . setSelectedItem ( a ) ; break ; } } } }

Target:
private void initCPU ( ) { if ( ( ! ( isCPUinitialized ) ) && ( getIsEdit ( ) ) ) { isCPUinitialized = true ; getCPU ( ) . setSelectedItem ( null ) ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu a : getCPU ( ) . getItems ( ) ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( a.getCpuName ( ) , getEntity ( ) . getCpuName ( ) ) ) { getCPU ( ) . setSelectedItem ( a ) ; break ; } } } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { if ( ( ( java.lang.Boolean ) ( returnValue ) ) ) { postCloneVmNameUnique ( targetModel , makeCreatorExplicitOwner ) ; } else { stopProgress ( ) ; getCloneName ( ) . getInvalidityReasons ( ) . add ( uiConstants.nameMustBeUniqueInvalidReason ( ) ) ; getCloneName ( ) . setIsValid ( false ) ; } }

Target:
public void onSuccess ( java.lang.Boolean returnValue ) { if ( returnValue ) { postCloneVmNameUnique ( targetModel , makeCreatorExplicitOwner ) ; } else { stopProgress ( ) ; getCloneName ( ) . getInvalidityReasons ( ) . add ( uiConstants.nameMustBeUniqueInvalidReason ( ) ) ; getCloneName ( ) . setIsValid ( false ) ; } }
Source:
public static void addDiskToVm ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , false ) ; }

Target:
public static void addDiskToVm ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , false , null ) ; }
Source:
private void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; tempVar.setSaveToDb ( true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
private void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IAutoCompleter getFieldRelationshipAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IAutoCompleter retval ; if ( ( ( ( org.ovirt.engine.core.compat.StringHelper.EqOp ( fieldName , "CREATIONDATE" ) ) || ( org.ovirt.engine.core.compat.StringHelper.EqOp ( fieldName , "SIZE" ) ) ) || ( org.ovirt.engine.core.compat.StringHelper.EqOp ( fieldName , "ACTUAL_SIZE" ) ) ) || ( org.ovirt.engine.core.compat.StringHelper.EqOp ( fieldName , "PROVISIONED_SIZE" ) ) ) { retval = BiggerOrSmallerRelationAutoCompleter.INTSANCE ; } else if ( org.ovirt.engine.core.compat.StringHelper.EqOp ( fieldName , "NUMBER_OF_VMS" ) ) { retval = NumericConditionRelationAutoCompleter.INSTANCE ; } else { retval = StringConditionRelationAutoCompleter.INSTANCE ; } return retval ; }

Target:
public org.ovirt.engine.core.searchbackend.IAutoCompleter getFieldRelationshipAutoCompleter ( java.lang.String fieldName ) { if ( ( ( ( "CREATIONDATE" . equals ( fieldName ) ) || ( "SIZE" . equals ( fieldName ) ) ) || ( "ACTUAL_SIZE" . equals ( fieldName ) ) ) || ( "PROVISIONED_SIZE" . equals ( fieldName ) ) ) { return BiggerOrSmallerRelationAutoCompleter.INTSANCE ; } else if ( "NUMBER_OF_VMS" . equals ( fieldName ) ) { return NumericConditionRelationAutoCompleter.INSTANCE ; } else { return StringConditionRelationAutoCompleter.INSTANCE ; } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( getOldMacPool ( ) ) ; return ( ( validate ( validator.macPoolExists ( ) ) ) && ( validate ( validator.notRemovingDefaultPool ( ) ) ) ) && ( validate ( validator.notRemovingUsedPool ( ) ) ) ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( getOldMacPool ( ) ) ; return ( ( validate ( validator.macPoolExists ( ) ) ) && ( validate ( validator.notRemovingDefaultPool ( ) ) ) ) && ( validate ( validator.notRemovingUsedPool ( ) ) ) ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos persistedQos = dao.get ( FixturesTool.HOST_NETWORK_QOS_A ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos referenceQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; referenceQos.setId ( FixturesTool.HOST_NETWORK_QOS_A ) ; referenceQos.setName ( "host_network_qos_a" ) ; referenceQos.setStoragePoolId ( FixturesTool.STORAGE_POOL_MIXED_TYPES ) ; referenceQos.setOutAverageLinkshare ( 1000 ) ; referenceQos.setOutAverageUpperlimit ( 2000 ) ; referenceQos.setOutAverageRealtime ( 500 ) ; org.junit.Assert.assertNotNull ( persistedQos ) ; org.junit.Assert.assertEquals ( persistedQos , referenceQos ) ; }

Target:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos persistedQos = dao.get ( FixturesTool.HOST_NETWORK_QOS_A ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos referenceQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; referenceQos.setId ( FixturesTool.HOST_NETWORK_QOS_A ) ; referenceQos.setName ( "host_network_qos_a" ) ; referenceQos.setStoragePoolId ( FixturesTool.STORAGE_POOL_MIXED_TYPES ) ; referenceQos.setOutAverageLinkshare ( 1000 ) ; referenceQos.setOutAverageUpperlimit ( 2000 ) ; referenceQos.setOutAverageRealtime ( 500 ) ; org.junit.Assert.assertNotNull ( persistedQos ) ; org.junit.Assert.assertEquals ( referenceQos , persistedQos ) ; }
Source:
private void setUpMocksForUpdate ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( hookFound , hook ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServer ( org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID , "gfs1" , org.ovirt.engine.core.bll.gluster.CLUSTER_ID , status ) ) ; }

Target:
private void setUpMocksForUpdate ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( hookFound , hook ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServer ( org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID , "gfs1" , org.ovirt.engine.core.bll.gluster.CLUSTER_ID , status ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initTemplate ( ) ; initCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initCdImage ( ) ; }
Source:
public void onSuccess ( java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; vfMap = returnValue.getReturnValue ( ) ; if ( ( vfMap ) == null ) { vfMap = java.util.Collections.emptyMap ( ) ; } queryFreeBonds ( ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { vfMap = returnValue.getReturnValue ( ) ; if ( ( vfMap ) == null ) { vfMap = java.util.Collections.emptyMap ( ) ; } queryFreeBonds ( ) ; }
Source:
public void testUpdateSetAndUploadIconFailure ( ) throws java.lang.Exception { control.replay ( ) ; final org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }

Target:
public void testUpdateSetAndUploadIconFailure ( ) throws java.lang.Exception { final org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newProfile ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newProfile ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EngineBackupLogId other = ( ( org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ( obj ) ) ; return ( java.util.Objects.equals ( scope , other.scope ) ) && ( java.util.Objects.equals ( doneAt , other.doneAt ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EngineBackupLogId other = ( ( org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ( obj ) ) ; return ( java.util.Objects.equals ( scope , other.scope ) ) && ( java.util.Objects.equals ( doneAt , other.doneAt ) ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass ) ; } }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { return runMultipleActions ( actionType , parameters , isRunOnlyIfAllCanDoPass , false ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult passwordModifyResult = ( ( org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult ) ( getConnectionPoolEntry ( pool , vars ) . connectionPool.processExtendedOperation ( new org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( ResultCode.SUCCESS ) ) { throw new org.ovirt.engineextensions.aaa.ldap.LDAPException ( passwordModifyResult ) ; } }

Target:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult passwordModifyResult = ( ( org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult ) ( getConnectionPoolEntry ( pool , null , vars ) . connectionPool.processExtendedOperation ( new org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( ResultCode.SUCCESS ) ) { throw new org.ovirt.engineextensions.aaa.ldap.LDAPException ( passwordModifyResult ) ; } }
Source:
protected org.ovirt.engine.core.dao.VmDAO getVmDAO ( ) { final org.ovirt.engine.core.dao.VmDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDAO.class ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.VM ( ) ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ) . thenThrow ( new java.lang.RuntimeException ( ) ) ; return v ; }

Target:
public org.ovirt.engine.core.dao.VmDAO getVmDAO ( ) { final org.ovirt.engine.core.dao.VmDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDAO.class ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.VM ( ) ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ) . thenThrow ( new java.lang.RuntimeException ( ) ) ; return v ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Nic nic ) { validateEnums ( org.ovirt.engine.api.model.Nic.class , nic ) ; validateParameters ( nic , "name" ) ; return performCreate ( VdcActionType.AddVmInterface , new org.ovirt.engine.core.common.action.AddVmInterfaceParameters ( vmId , map ( nic ) ) , new org.ovirt.engine.api.restapi.resource.NicResolver ( nic.getName ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Nic nic ) { validateParameters ( nic , "name" ) ; return performCreate ( VdcActionType.AddVmInterface , new org.ovirt.engine.core.common.action.AddVmInterfaceParameters ( vmId , map ( nic ) ) , new org.ovirt.engine.api.restapi.resource.NicResolver ( nic.getName ( ) ) ) ; }
Source:
public void vdsIdRefVds ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; b.setVdsIdRef ( null ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.compat.Guid g = b.getVdsIdRef ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }

Target:
public void vdsIdRefVds ( ) { b.setVdsIdRef ( null ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.compat.Guid g = b.getVdsIdRef ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.VDS entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } if ( ! notFound ) { setUpGetCertificateInfo ( ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.VDS entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }