auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean isFailedOnSSL ( org.ovirt.engine.core.common.action.VdcReturnValueBase res ) { return ( ( ( res != null ) && ( ! ( res.getSucceeded ( ) ) ) ) && ( ( res.getFault ( ) ) != null ) ) && ( VdcBllErrors.PROVIDER_SSL_FAILURE.equals ( res.getFault ( ) . getError ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.action.ImportProviderCertificateParameters importCertificateParams ( ) { return new org.ovirt.engine.core.common.action.ImportProviderCertificateParameters ( provider , certificate ) ; }
Source:
public void testAttachFailFormatType ( ) { storageDomain.setStorageFormat ( StorageFormatType.V3 ) ; storagePool.setcompatibility_version ( Version.v3_0 ) ; org.ovirt.engine.core.bll.ValidationResult invalidFormatAttachingResult = validator.validateDomainCanBeAttachedToPool ( ) ; org.junit.Assert.assertFalse ( "Attaching domain with unsupported version succeeded while it should have failed" , invalidFormatAttachingResult.isValid ( ) ) ; assertFailingMessage ( "Attaching domain with unsupported version failed with the wrong message" , invalidFormatAttachingResult , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL ) ; }

Target:
public void testAttachFailFormatType ( ) { storageDomain.setStorageFormat ( StorageFormatType.V3 ) ; storagePool.setCompatibilityVersion ( Version.v3_0 ) ; org.ovirt.engine.core.bll.ValidationResult invalidFormatAttachingResult = validator.validateDomainCanBeAttachedToPool ( ) ; org.junit.Assert.assertFalse ( "Attaching domain with unsupported version succeeded while it should have failed" , invalidFormatAttachingResult.isValid ( ) ) ; assertFailingMessage ( "Attaching domain with unsupported version failed with the wrong message" , invalidFormatAttachingResult , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL ) ; }
Source:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public static void getGlusterBricksForServer ( 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.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public static void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void RemoveSnapshot ( org.ovirt.engine.core.common.businessentities.DiskImage snapshot ) { RemoveSnapshotFromDB ( snapshot ) ; AdditionalImageRemoveTreatment ( snapshot ) ; }

Target:
protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { super . setVmId ( parameters.getContainerId ( ) ) ; if ( ( ( getDiskImage ( ) ) != null ) && ( ( getDiskImage ( ) . getstorage_pool_id ( ) ) != null ) ) { setStoragePoolId ( getDiskImage ( ) . getstorage_pool_id ( ) . getValue ( ) ) ; } }
Source:
protected boolean CanAddDomain ( ) { boolean returnValue = true ; if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getstorage ( ) ) ) ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return returnValue ; }

Target:
protected boolean CanAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getstorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return true ; }
Source:
public boolean validate ( ) { getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation ( ) } ) ; getDescription ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation ( ) } ) ; setIsValid ( ( ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel.getIsValid ( ) ) && ( getName ( ) . getIsValid ( ) ) ) && ( getDescription ( ) . getIsValid ( ) ) ) ) ; return org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel.getIsValid ( ) ; }

Target:
public boolean validate ( ) { getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation ( ) } ) ; getDescription ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation ( ) } ) ; getQosParametersModel ( ) . validate ( ) ; setIsValid ( ( ( ( getName ( ) . getIsValid ( ) ) && ( getDescription ( ) . getIsValid ( ) ) ) && ( getQosParametersModel ( ) . getIsValid ( ) ) ) ) ; return org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel.getIsValid ( ) ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { _packagesInfo = ( ( java.lang.String [ ] ) ( _parser.cliEnvironmentGet ( PackagesEnv.PACKAGES_INFO ) ) ) ; if ( ( _packagesInfo.length ) > 0 ) { _messages.post ( InstallerMessages.Severity.INFO , java.lang.String.format ( "Available packages for update: %s" , org.apache.commons.lang.StringUtils.join ( _packagesInfo , "," ) ) ) ; } return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { _packagesInfo = ( ( java.lang.String [ ] ) ( _parser.cliEnvironmentGet ( PackagesEnv.PACKAGES_INFO ) ) ) ; if ( ( _packagesInfo.length ) > 0 ) { org.ovirt.engine.core.bll.hostdeploy.VdsMgmtPackages.log.info ( java.lang.String.format ( "Available packages for update: %s" , org.apache.commons.lang.StringUtils.join ( _packagesInfo , "," ) ) ) ; } return true ; }
Source:
private void removeRedundantVolumesForOrphanedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderVolumesToRemove = org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getCinderVolumesToRemove ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderVolume : cinderVolumesToRemove ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getDbFacade ( ) . getImageStorageDomainMapDao ( ) . remove ( cinderVolume.getImageId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getImageDao ( ) . remove ( cinderVolume.getImageId ( ) ) ; } }

Target:
private void removeRedundantVolumesForOrphanedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderVolumesToRemove = org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getCinderVolumesToRemove ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderVolume : cinderVolumesToRemove ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getDbFacade ( ) . getImageStorageDomainMapDao ( ) . remove ( cinderVolume.getImageId ( ) ) ; imageDao.remove ( cinderVolume.getImageId ( ) ) ; } }
Source:
private static void GetAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleQueries ( queryTypeList , parametersList , callback ) ; }

Target:
private static void getAllChildVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces , org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback callback ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; for ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : ifaces ) { queryTypeList.add ( VdcQueryType.GetAllChildVlanInterfaces ) ; parametersList.add ( new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleQueries ( queryTypeList , parametersList , callback ) ; }
Source:
protected void executeCommand ( ) { boolean result = executeSshReboot ( org.ovirt.engine.core.bll.SshHostRebootCommand.getVds ( ) . getClusterCompatibilityVersion ( ) . toString ( ) ) ; if ( result ) { setVdsStatus ( VDSStatus.Initializing ) ; } org.ovirt.engine.core.bll.SshHostRebootCommand.setSucceeded ( result ) ; }

Target:
protected void executeCommand ( ) { boolean result = executeSshReboot ( org.ovirt.engine.core.bll.SshHostRebootCommand.getVds ( ) . getClusterCompatibilityVersion ( ) . toString ( ) ) ; if ( result ) { if ( ( org.ovirt.engine.core.bll.SshHostRebootCommand.getParameters ( ) . getPrevVdsStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) { setVdsStatus ( VDSStatus.Initializing ) ; } else { setVdsStatus ( VDSStatus.Maintenance ) ; } } org.ovirt.engine.core.bll.SshHostRebootCommand.setSucceeded ( result ) ; }
Source:
protected void endVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmCommand.getVmStaticDao ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getId ( ) ) ; } endActionOnDisks ( ) ; unlockVm ( ) ; org.ovirt.engine.core.bll.VmCommand.setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { vmStaticDao.incrementDbGeneration ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getId ( ) ) ; } endActionOnDisks ( ) ; unlockVm ( ) ; org.ovirt.engine.core.bll.VmCommand.setSucceeded ( true ) ; }
Source:
public void testGetByIdOrNameWhenIdIsNotSpecified ( ) { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.junit.Assert.assertThat ( map.get ( null , "name" ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }

Target:
public void testGetByIdOrNameWhenIdIsNotSpecified ( ) { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.hamcrest.MatcherAssert.assertThat ( map.get ( null , "name" ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.storage.disk.MoveDiskCommand.getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.storage.disk.MoveDiskCommand.getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.storage.disk.MoveDiskCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return permissionList ; }
Source:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ; } return - 1 ; }

Target:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ; } return - 1 ; }
Source:
private void addInjectionsToPerClusterObjects ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster > entry : arem.perClusterMap.entrySet ( ) ) { org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster perCluster = perClusterProvider.get ( ) ; perCluster.setClusterId ( entry.getKey ( ) . getId ( ) ) ; entry.setValue ( perCluster ) ; } }

Target:
private void addInjectionsToPerClusterObjects ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster > entry : arem.perClusterMap.entrySet ( ) ) { org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster perCluster = perClusterProvider.get ( ) ; perCluster.setClusterId ( entry.getKey ( ) . getId ( ) ) ; perCluster.setSchedulingManager ( schedulingManager ) ; entry.setValue ( perCluster ) ; } }
Source:
public void testGetAllByGroupAndNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByGroupAndNetworkName ( org.ovirt.engine.core.dao.VmStaticDaoTest.VDS_GROUP_ID , "engine" ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vm : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmStaticDaoTest.VDS_GROUP_ID , vm.getVdsGroupId ( ) ) ; } }

Target:
public void testGetAllByGroupAndNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByGroupAndNetworkName ( org.ovirt.engine.core.dao.VmStaticDaoTest.CLUSTER_ID , "engine" ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vm : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmStaticDaoTest.CLUSTER_ID , vm.getClusterId ( ) ) ; } }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterBricksForServer ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > glusterBricks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ) ( returnValue ) ) ; java.util.Collections.sort ( glusterBricks , new org.ovirt.engine.ui.uicommonweb.Linq.ServerBricksComparer ( ) ) ; setItems ( glusterBricks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterBricksForServer ( new org.ovirt.engine.ui.uicommonweb.models.hosts.SetSortedRawItemsAsyncQuery ( new org.ovirt.engine.ui.uicommonweb.Linq.ServerBricksComparer ( ) ) , getEntity ( ) . getId ( ) ) ; }
Source:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( CLUSTER_ID , null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
private void processHeartbeat ( ) { if ( ( ( ! ( this . isInInit ( ) ) ) && ( this . policy.isHeartbeat ( ) ) ) && ( ( ( this . lastHeartbeat ) + ( this . policy.getHeartbeat ( ) ) ) < ( java.lang.System.currentTimeMillis ( ) ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exeeded. Closing channel" ) ; this . disconnect ( "Heartbeat exeeded" ) ; } }

Target:
protected void updateLastIncomingHeartbeat ( ) { this . lastIncomingHeartbeat = java.lang.System.currentTimeMillis ( ) ; }
Source:
public void writeData ( java.io.ObjectOutputStream dos ) { try { writeString ( this . var_name , dos ) ; writeString ( this . var_value , dos ) ; writeDate ( this . var_datetime , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( super . toString ( ) ) ; sb.append ( "[" ) ; sb.append ( ( "key=" + ( key ) ) ) ; sb.append ( ( ",value=" + ( value ) ) ) ; sb.append ( "]" ) ; return sb.toString ( ) ; }
Source:
private void createUpStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; pool.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( pool ) ; }

Target:
private void createUpStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; pool.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( pool ) ; }
Source:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { boolean filterInternalDomain = false ; if ( ( org.ovirt.engine.core.bll.GetDomainListQuery.getParameters ( ) ) instanceof org.ovirt.engine.core.common.queries.GetDomainListParameters ) { filterInternalDomain = ( ( org.ovirt.engine.core.common.queries.GetDomainListParameters ) ( org.ovirt.engine.core.bll.GetDomainListQuery.getParameters ( ) ) ) . getFilterInternalDomain ( ) ; } java.util.List < java.lang.String > domains = org.ovirt.engine.core.bll.adbroker.LdapBrokerUtils.getDomainsList ( filterInternalDomain ) ; java.util.Collections.sort ( domains ) ; org.ovirt.engine.core.bll.GetDomainListQuery.getQueryReturnValue ( ) . setReturnValue ( domains ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < java.lang.String > domains = org.ovirt.engine.core.bll.adbroker.LdapBrokerUtils.getDomainsList ( org.ovirt.engine.core.bll.GetDomainListQuery.getParameters ( ) . getFilterInternalDomain ( ) ) ; java.lang.String internalDomainName = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.AdminDomain ) ; java.util.Collections.sort ( domains , new org.ovirt.engine.core.bll.LoginDomainComparator ( internalDomainName ) ) ; org.ovirt.engine.core.bll.GetDomainListQuery.getQueryReturnValue ( ) . setReturnValue ( domains ) ; }
Source:
private boolean nicNameAndNicIdIsIncoherent ( org.ovirt.engine.core.compat.Guid nicId , java.lang.String nicName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface interfaceById = existingInterfacesMap.get ( nicId ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface interfaceByName = existingInterfacesMap.get ( nicName ) ; return ! ( java.util.Objects.equals ( interfaceById , interfaceByName ) ) ; }

Target:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > boolean isNameAndIdIncoherent ( org.ovirt.engine.core.compat.Guid id , java.lang.String name , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { T entityById = map.get ( id ) ; T entityByName = map.get ( name ) ; return ! ( java.util.Objects.equals ( entityById , entityByName ) ) ; }
Source:
public void getTemplateNicList ( 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 < > ( ( ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.String > aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.StringConverter ( ) ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public java.lang.String call ( ) { com.woorea.openstack.cinder.model.VolumeForCreate cinderVolume = new com.woorea.openstack.cinder.model.VolumeForCreate ( ) ; cinderVolume.setName ( cinderDisk.getDiskAlias ( ) ) ; cinderVolume.setDescription ( cinderDisk.getDiskDescription ( ) ) ; cinderVolume.setSize ( ( ( int ) ( cinderDisk.getSizeInGigabytes ( ) ) ) ) ; cinderVolume.setSourceVolid ( cinderDisk.getId ( ) . toString ( ) ) ; return proxy.createVolume ( cinderVolume ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.CinderConnectionInfo call ( ) { com.woorea.openstack.cinder.model.ConnectionForInitialize connectionForInitialize = new com.woorea.openstack.cinder.model.ConnectionForInitialize ( ) ; return proxy.initializeConnectionForVolume ( cinderDisk.getId ( ) . toString ( ) , connectionForInitialize ) ; }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkView > result = dao.getAllWithQuery ( java.lang.String.format ( "SELECT * FROM network_view where id = '%s'" , FixturesTool.NETWORK_ENGINE ) ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.NETWORK_ENGINE , result.get ( 0 ) . getId ( ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkView > result = dao.getAllWithQuery ( java.lang.String.format ( "SELECT * FROM network_view where id = '%s'" , FixturesTool.NETWORK_ENGINE ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.NETWORK_ENGINE , result.get ( 0 ) . getId ( ) ) ; }
Source:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setTop ( ( - 3 ) , Unit.PX ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; } }

Target:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setTop ( ( - 3 ) , Unit.PX ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; } }
Source:
private static void replaceTagInChildren ( org.ovirt.engine.core.common.businessentities.Tags tag , java.util.List < org.ovirt.engine.core.common.businessentities.Tags > parentChildren ) { for ( int counter = 0 ; counter < ( parentChildren.size ( ) ) ; counter ++ ) { if ( parentChildren.get ( counter ) . gettag_id ( ) . equals ( tag.gettag_id ( ) ) ) { parentChildren.set ( counter , tag ) ; break ; } } }

Target:
private static void replaceTagInChildren ( org.ovirt.engine.core.common.businessentities.Tags tag , java.util.List < org.ovirt.engine.core.common.businessentities.Tags > parentChildren ) { for ( int counter = 0 ; counter < ( parentChildren.size ( ) ) ; counter ++ ) { if ( parentChildren.get ( counter ) . getTagId ( ) . equals ( tag.getTagId ( ) ) ) { parentChildren.set ( counter , tag ) ; break ; } } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalDiscoveredHostsListModel = getExternalDiscoveredHosts ( ) ; externalDiscoveredHostsListModel.setItems ( hosts ) ; externalDiscoveredHostsListModel.setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > hostGroups = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalHostGroupsListModel = getExternalHostGroups ( ) ; externalHostGroupsListModel.setItems ( hostGroups ) ; externalHostGroupsListModel.setIsChangable ( true ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.Network getNetworkFromDb ( org.ovirt.engine.core.compat.Guid vdsGroupId ) { for ( org.ovirt.engine.core.common.businessentities.network.Network network : org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getNetworkDAO ( ) . getAllForCluster ( vdsGroupId ) ) { if ( network.getName ( ) . equals ( getNetworkName ( ) ) ) { return network ; } } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.Network getNetworkFromDb ( org.ovirt.engine.core.compat.Guid vdsGroupId , java.lang.String networkName ) { if ( networkName == null ) { return null ; } for ( org.ovirt.engine.core.common.businessentities.network.Network network : org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getNetworkDAO ( ) . getAllForCluster ( vdsGroupId ) ) { if ( network.getName ( ) . equals ( networkName ) ) { return network ; } } return null ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv6StaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpv6ConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV6_BOOT_PROTOCOL , false ) ; iface.setIpv6BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV6_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
protected void throwVdsErrorException ( java.lang.String message , org.ovirt.engine.core.common.errors.VdcBllErrors error ) { org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException outEx = new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException ( message ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( error ) ; tempVar.setMessage ( message ) ; outEx.setVdsError ( tempVar ) ; throw outEx ; }

Target:
protected void throwVdsErrorException ( java.lang.String message , org.ovirt.engine.core.common.errors.VdcBllErrors error ) { org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException outEx = new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException ( message ) ; org.ovirt.engine.core.common.errors.VDSError vdsError = new org.ovirt.engine.core.common.errors.VDSError ( ) ; vdsError.setCode ( error ) ; vdsError.setMessage ( message ) ; outEx.setVdsError ( vdsError ) ; throw outEx ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VmDynamic > getPoweringUpVms ( ) { return poweringUpVms ; }

Target:
public void setup ( ) { initVds ( ) ; initConditions ( ) ; vmsMonitoring = org.mockito.Mockito.spy ( new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( vdsManager , java.util.Arrays.asList ( VmTestPairs.MIGRATION_DONE.build ( ) ) , java.util.Collections.< org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > > emptyList ( ) , auditLogDirector , java.lang.System.nanoTime ( ) ) { @ java.lang.Override public org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } @ java.lang.Override protected java.util.Map [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { return vmInfo ; } } ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpManagementNetworkExpectation ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVdsGroup , org.ovirt.engine.core.common.action.VdsGroupOperationParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; final org.ovirt.engine.api.model.Cluster updatedCluster = resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; verifyModel ( updatedCluster , 0 ) ; verifyManagementNetwork ( updatedCluster ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpManagementNetworkExpectation ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateCluster , org.ovirt.engine.core.common.action.ClusterOperationParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; final org.ovirt.engine.core.common.businessentities.Cluster updatedCluster = resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; verifyModel ( updatedCluster , 0 ) ; verifyManagementNetwork ( updatedCluster ) ; }
Source:
protected boolean validateBallonDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBalloonDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isBalloonEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , getEffectiveCompatibilityVersion ( ) ) ) ) { addValidationMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failValidation ( EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , getEffectiveCompatibilityVersion ( ) ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : domains ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMap ( domain ) ; org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; getCompensationContext ( ) . stateChanged ( ) ; } return null ; }

Target:
protected void changeStorageDomainStatusInTransaction ( final org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : domains ) { for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map : getStoragePoolIsoMap ( domain ) ) { context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; } } getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }
Source:
private void debugAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { if ( org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.isDebugEnabled ( ) ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "Action type: " ) ; builder.append ( actionType ) ; builder.append ( ", Parameters: " ) ; builder.append ( params ) ; org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( builder.toString ( ) ) ; } }

Target:
private void debugAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Action type '{}', Parameters '{}'" , actionType , params ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__TYPE__DESKTOP_POOL ) ; }

Target:
protected boolean verifyAddVM ( ) { final java.util.List < java.lang.String > reasons = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getValidationMessages ( ) ; final int nicsCount = ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ; final int priority = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getPriority ( ) ; return org.ovirt.engine.core.bll.VmHandler.verifyAddVm ( reasons , nicsCount , priority , getMacPool ( ) ) ; }
Source:
protected void onFetchVms ( ) { dbVms = getVmDao ( ) . getAllRunningByVds ( vdsManager.getVdsId ( ) ) ; changedVms = new java.util.ArrayList < > ( ) ; devicesChangedVms = new java.util.ArrayList < > ( ) ; filterVms ( ) ; gatherNonRunningVms ( dbVms ) ; vdsManager.setLastVmsList ( changedVms ) ; }

Target:
protected void onFetchVms ( ) { dbVms = getVmDao ( ) . getAllRunningByVds ( vdsManager.getVdsId ( ) ) ; changedVms = new java.util.ArrayList < > ( ) ; devicesChangedVms = new java.util.ArrayList < > ( ) ; filterVms ( ) ; gatherNonRunningVms ( dbVms ) ; saveLastVmsList ( vdsmVms ) ; }
Source:
public void Rollback ( ) { super . Rollback ( ) ; final org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.RestartVdsCommand.getVdsId ( ) ; org.ovirt.engine.core.bll.RestartVdsCommand.log.warnFormat ( "Restart host action failed, updating host {0} to {1}" , vdsId , VDSStatus.NonResponsive.name ( ) ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vdsId , org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ; return null ; } } ) ; }

Target:
public void rollback ( ) { super . rollback ( ) ; final org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.RestartVdsCommand.getVdsId ( ) ; org.ovirt.engine.core.bll.RestartVdsCommand.log.warnFormat ( "Restart host action failed, updating host {0} to {1}" , vdsId , VDSStatus.NonResponsive.name ( ) ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vdsId , org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ; return null ; } } ) ; }
Source:
private void onOk ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.FenceAgentModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.FenceAgentModel ) ( getWindow ( ) ) ) ; model.validatePmModels ( ) ; if ( model.isValid ( ) ) { copyModelValues ( model ) ; setWindow ( null ) ; } }

Target:
private void onOk ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.FenceAgentModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.FenceAgentModel ) ( getWindow ( ) ) ) ; model.validatePmModels ( ) ; validateDuplicates ( model ) ; if ( model.isValid ( ) ) { copyModelValues ( model ) ; setWindow ( null ) ; } }