auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack ) ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; }
Source:
protected void runAddAndVerify ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface , boolean addMacResult , org.mockito.verification.VerificationMode addMacVerification , boolean expectedResult ) { org.mockito.Mockito.when ( macPoolManager.AddMac ( iface.getMacAddress ( ) ) ) . thenReturn ( addMacResult ) ; org.junit.Assert.assertEquals ( expectedResult , vmInterfaceManager.add ( iface , org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) , false ) ) ; verifyAddDelegatedCorrectly ( iface , addMacVerification ) ; }

Target:
protected void runAddAndVerify ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface , boolean addMacResult , org.mockito.verification.VerificationMode addMacVerification ) { org.mockito.Mockito.when ( macPoolManager.AddMac ( iface.getMacAddress ( ) ) ) . thenReturn ( addMacResult ) ; vmInterfaceManager.add ( iface , org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) , false ) ; verifyAddDelegatedCorrectly ( iface , addMacVerification ) ; }
Source:
protected void endWithFailure ( ) { if ( ( getMoveOrCopyImageOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.unLockImage ( ) ; if ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.image_storage_domain_map_id ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } revertTasks ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.markImageAsIllegal ( ) ; } org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.unLockImage ( ) ; if ( ( getMoveOrCopyImageOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { if ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.image_storage_domain_map_id ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } revertTasks ( ) ; } org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.setSucceeded ( true ) ; }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setDestinationVdsId ( null ) ; super . rerun ( ) ; } else { org.ovirt.engine.core.bll.MigrateVmCommand.runningFailed ( ) ; _isRerun = true ; } }

Target:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { super . rerun ( ) ; } else { org.ovirt.engine.core.bll.MigrateVmCommand.runningFailed ( ) ; _isRerun = true ; } }
Source:
public static void cancelRecoveryJob ( org.ovirt.engine.core.compat.Guid vdsId ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "Cancelling the recovery from crash timer for VDS '{}' because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed deleting job '{}' at cancelRecoveryJob: {}" , jobId , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; } } }

Target:
public void cancelRecoveryJob ( ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "Cancelling the recovery from crash timer for VDS '{}' because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed deleting job '{}' at cancelRecoveryJob: {}" , jobId , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; } } }
Source:
public void imageProvidedForOvirtNode ( ) { org.mockito.Mockito.when ( host.getVdsType ( ) ) . thenReturn ( VDSType.oVirtVintageNode ) ; java.lang.String imageName = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 20 ) ; org.junit.Assert.assertThat ( validator.imageProvidedForOvirtNode ( imageName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void imageProvidedForOvirtNode ( ) { java.lang.String imageName = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 20 ) ; org.junit.Assert.assertThat ( validator.imageProvidedForOvirtNode ( imageName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsType > getGraphicsTypesOfEntity ( org.ovirt.engine.core.compat.Guid entityId ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsType > result = new java.util.ArrayList < > ( ) ; if ( entityId != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = org.ovirt.engine.core.bll.utils.VmDeviceUtils.getGraphicsDevices ( entityId ) ; if ( devices != null ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { result.add ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromString ( device.getDevice ( ) ) ) ; } } } return result ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsType > getGraphicsTypesOfEntity ( org.ovirt.engine.core.compat.Guid entityId ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsType > result = new java.util.ArrayList < > ( ) ; if ( entityId != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = getGraphicsDevices ( entityId ) ; if ( devices != null ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { result.add ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromString ( device.getDevice ( ) ) ) ; } } } return result ; }
Source:
public void run ( ) { org.ovirt.engine.core.bll.VdsEventListener.log.info ( "ResourceManager::vdsNotResponding entered for Host '{}', '{}'" , vds.getId ( ) , vds.getHostName ( ) ) ; org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.pm.FenceActionType.RESTART ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.VdsNotRespondingTreatment , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; moveBricksToUnknown ( vds ) ; }

Target:
public void run ( ) { org.ovirt.engine.core.bll.VdsEventListener.log.info ( "ResourceManager::vdsNotResponding entered for Host '{}', '{}'" , vds.getId ( ) , vds.getHostName ( ) ) ; org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.VdsNotRespondingTreatment , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; moveBricksToUnknown ( vds ) ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public void setUp ( ) { hostWithCpus = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; hostWithCpus.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; hostWithCpus.setOnlineCpus ( "0, 1, 2,3, 5" ) ; hostWithoutCpus = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; hostWithoutCpus.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; hostWithoutCpus.setOnlineCpus ( null ) ; perHostMessages = new org.ovirt.engine.core.common.scheduling.PerHostMessages ( ) ; vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
public void setUp ( ) { hostWithCpus = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; hostWithCpus.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; hostWithCpus.setOnlineCpus ( "0, 1, 2,3, 5" ) ; hostWithoutCpus = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; hostWithoutCpus.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; hostWithoutCpus.setOnlineCpus ( null ) ; perHostMessages = new org.ovirt.engine.core.common.scheduling.PerHostMessages ( ) ; vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getQuota ( ) . getId ( ) ) ; setQuotaParameter ( ) ; org.ovirt.engine.core.dao.QuotaDAO dao = getQuotaDAO ( ) ; dao.update ( getParameters ( ) . getQuota ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { removeQuotaFromCache ( ) ; setQuotaParameter ( ) ; org.ovirt.engine.core.dao.QuotaDAO dao = getQuotaDAO ( ) ; dao.update ( getParameters ( ) . getQuota ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void setEntity ( org.ovirt.engine.core.common.businessentities.VDS value ) { if ( ( super . getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDS currentItem = super . getEntity ( ) ; org.ovirt.engine.core.compat.Guid currentItemId = currentItem.getId ( ) ; org.ovirt.engine.core.compat.Guid newItemId = value.getId ( ) ; if ( currentItemId.equals ( newItemId ) ) { setEntity ( value , false ) ; updateActionAvailability ( ) ; return ; } } super . setEntity ( value ) ; }

Target:
public void setEntity ( org.ovirt.engine.core.common.businessentities.VDS value ) { if ( ( ( super . getEntity ( ) ) != null ) && ( value != null ) ) { org.ovirt.engine.core.common.businessentities.VDS currentItem = super . getEntity ( ) ; org.ovirt.engine.core.compat.Guid currentItemId = currentItem.getId ( ) ; org.ovirt.engine.core.compat.Guid newItemId = value.getId ( ) ; if ( currentItemId.equals ( newItemId ) ) { setEntity ( value , false ) ; updateActionAvailability ( ) ; return ; } } super . setEntity ( value ) ; }
Source:
public void legalNotTimedOut ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase t = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase ( ) ; t.setUseTimout ( true ) ; final java.lang.String s = "illegal-timeout" ; t.setTimeoutObjectId ( s ) ; long c = java.lang.System.currentTimeMillis ( ) ; c += 5000 ; final java.util.Date d = new java.util.Date ( c ) ; t.setEndTime ( d ) ; t.getLegal ( ) ; final boolean result = t.getLegal ( ) ; org.junit.Assert.assertFalse ( result ) ; }

Target:
public void legalNotTimedOut ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase t = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase ( ) ; t.setUseTimout ( true ) ; final java.lang.String s = "illegal-timeout" ; t.setTimeoutObjectId ( s ) ; long c = java.lang.System.currentTimeMillis ( ) ; c += 5000 ; t.setEndTime ( c ) ; t.getLegal ( ) ; final boolean result = t.getLegal ( ) ; org.junit.Assert.assertFalse ( result ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( ( pools != null ) && ( ! ( pools.isEmpty ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.VdsNetworkInterface getEntitySpecific ( int index ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setName ( NAMES [ index ] ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setSpeed ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_SPEED ) ; entity = org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , GUIDS [ index ] ) ; entity.getStatistics ( ) . setStatus ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_STATUS ) ; entity.setBootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.BOOT_PROTOCOL ) ; return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getEntitySpecific ( int index ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setName ( NAMES [ index ] ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setSpeed ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_SPEED ) ; entity = org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , GUIDS [ index ] ) ; entity.getStatistics ( ) . setStatus ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_STATUS ) ; entity.setBootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.BOOT_PROTOCOL ) ; return entity ; }
Source:
private void AddVdsStaticToDb ( ) { org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . setServerSslEnabled ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.EncryptHostCommunication ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . save ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.getCompensationContext ( ) . snapshotNewEntity ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; setVdsIdRef ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.setVds ( null ) ; }

Target:
private void AddVdsStaticToDb ( ) { org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . setServerSslEnabled ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EncryptHostCommunication ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . save ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.getCompensationContext ( ) . snapshotNewEntity ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) ) ; setVdsIdRef ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddVdsCommand.setVds ( null ) ; }
Source:
private void attachDisk ( org.ovirt.engine.core.common.businessentities.Disk disk ) { org.ovirt.engine.core.bll.CloneVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AttachDiskToVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }

Target:
private void attachDisk ( org.ovirt.engine.core.common.businessentities.Disk disk ) { runInternalAction ( VdcActionType.AttachDiskToVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }
Source:
public void onResizeEnd ( com.google.gwt.user.cellview.client.Column < T , ? > column , com.google.gwt.dom.client.Element headerElement ) { headerElement.getStyle ( ) . clearBackgroundColor ( ) ; org.ovirt.engine.ui.common.widget.table.resize.ColumnResizeCellTable.redraw ( ) ; if ( columnResizePersistenceEnabled ) { java.lang.String width = getColumnWidth ( column ) ; saveColumnWidth ( column , width ) ; } }

Target:
public void onResizeEnd ( com.google.gwt.user.cellview.client.Column < T , ? > column , com.google.gwt.dom.client.Element headerElement ) { org.ovirt.engine.ui.common.widget.table.resize.ColumnResizeCellTable.redraw ( ) ; if ( columnResizePersistenceEnabled ) { java.lang.String width = getColumnWidth ( column ) ; saveColumnWidth ( column , width ) ; } }
Source:
public void addISCSINonEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addISCSINonEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newISCSIConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
protected boolean validate ( ) { super . 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 ( ) } ) ; setIsValid ( ( ( getIsValid ( ) ) && ( getName ( ) . getIsValid ( ) ) ) ) ; return getIsValid ( ) ; }

Target:
public boolean validate ( ) { super . 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 ( ) } ) ; setIsValid ( ( ( getIsValid ( ) ) && ( getName ( ) . getIsValid ( ) ) ) ) ; return getIsValid ( ) ; }
Source:
public void testBootProtocolSetForRoleNetworkWhenIpConfigurationIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( Ipv4BootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , true , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForRoleNetworkWhenIpConfigurationIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( Ipv4BootProtocol.NONE ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , true , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }
Source:
public void flush ( ) { if ( ( subnet ) == null ) { subnet = new org.ovirt.engine.core.common.businessentities.network.ExternalSubnet ( ) ; } subnet.setName ( getName ( ) . getEntity ( ) ) ; org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getSelectedItem ( ) ; subnet.setExternalNetwork ( ( network != null ? network.getProvidedBy ( ) : null ) ) ; subnet.setCidr ( getCidr ( ) . getEntity ( ) ) ; subnet.setIpVersion ( getIpVersion ( ) . getSelectedItem ( ) ) ; }

Target:
public void flush ( ) { subnet = new org.ovirt.engine.core.common.businessentities.network.ExternalSubnet ( ) ; subnet.setName ( getName ( ) . getEntity ( ) ) ; org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getEntity ( ) ; subnet.setExternalNetwork ( network.getProvidedBy ( ) ) ; subnet.setCidr ( getCidr ( ) . getEntity ( ) ) ; subnet.setIpVersion ( getIpVersion ( ) . getSelectedItem ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > consumptionParameters ; switch ( getActionType ( ) . getQuotaDependency ( ) ) { case NONE : return null ; case STORAGE : consumptionParameters = getThisQuotaStorageDependent ( ) . getQuotaStorageConsumptionParameters ( ) ; break ; case VDS_GROUP : consumptionParameters = getThisQuotaVdsDependent ( ) . getQuotaVdsConsumptionParameters ( ) ; break ; default : consumptionParameters = getThisQuotaStorageDependent ( ) . getQuotaStorageConsumptionParameters ( ) ; consumptionParameters.addAll ( getThisQuotaVdsDependent ( ) . getQuotaVdsConsumptionParameters ( ) ) ; break ; } return consumptionParameters ; }

Target:
private java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaConsumptionParameters ( ) { if ( ( consumptionParameters ) == null ) { switch ( getActionType ( ) . getQuotaDependency ( ) ) { case NONE : return null ; case STORAGE : consumptionParameters = getThisQuotaStorageDependent ( ) . getQuotaStorageConsumptionParameters ( ) ; break ; case VDS_GROUP : consumptionParameters = getThisQuotaVdsDependent ( ) . getQuotaVdsConsumptionParameters ( ) ; break ; default : consumptionParameters = getThisQuotaStorageDependent ( ) . getQuotaStorageConsumptionParameters ( ) ; consumptionParameters.addAll ( getThisQuotaVdsDependent ( ) . getQuotaVdsConsumptionParameters ( ) ) ; break ; } } return consumptionParameters ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , boolean readOnly , java.lang.String address , java.lang.String customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , boolean readOnly , java.lang.String address , java.util.Map < java.lang.String , java.lang.String > customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }
Source:
public static boolean canVDSConnectToGlusterfs ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( org.ovirt.engine.core.common.FeatureSupported.glusterVolumeInfoSupported ( org.ovirt.engine.core.bll.storage.connection.GLUSTERFSStorageHelper.getStoragePool ( vds.getId ( ) ) . getCompatibilityVersion ( ) ) ) { org.ovirt.engine.core.compat.RpmVersion glusterfsCliVer = vds.getGlusterfsCliVersion ( ) ; return ( glusterfsCliVer != null ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( glusterfsCliVer.getRpmRelease ( ) ) ) ; } return true ; }

Target:
public static boolean canVDSConnectToGlusterfs ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.compat.RpmVersion glusterfsCliVer = vds.getGlusterfsCliVersion ( ) ; return ( glusterfsCliVer != null ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( glusterfsCliVer.getRpmRelease ( ) ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { boolean returnValue = super . equals ( obj ) ; if ( ( ( ! returnValue ) && ( obj != null ) ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ) { returnValue = ( ! ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , "" ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( obj ) ) . getid ( ) ) ) ; } return returnValue ; }

Target:
public boolean equals ( java.lang.Object obj ) { boolean returnValue = super . equals ( obj ) ; if ( ( ( ! returnValue ) && ( obj != null ) ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ) { returnValue = ( ! ( "" . equals ( getid ( ) ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( obj ) ) . getid ( ) ) ) ; } return returnValue ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVdsInterface ( java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.Integer vlanId , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setVlanId ( vlanId ) ; iface.setNetworkName ( networkName ) ; return iface ; }

Target:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVdsInterface ( org.ovirt.engine.core.compat.Guid id , java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.Integer vlanId , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; iface.setId ( id ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setVlanId ( vlanId ) ; iface.setNetworkName ( networkName ) ; return iface ; }
Source:
void initListBoxEditors ( ) { timeZoneEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.Map.Entry < java.lang.String , java.lang.String > entry = ( ( java.util.Map.Entry < java.lang.String , java.lang.String > ) ( object ) ) ; return entry.getValue ( ) ; } } ) ; }

Target:
public java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , java.lang.String > object ) { return object.getValue ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; iface.setNetworkName ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; iface.setBridged ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextBoolean ( ) ) ; iface.setMtu ( 100 ) ; iface.setVlanId ( 100 ) ; return iface ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; iface.setNetworkName ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; iface.setBridged ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextBoolean ( ) ) ; iface.setMtu ( 100 ) ; iface.setVlanId ( 100 ) ; return iface ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase removeVmImages ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RemoveAllVmImages , buildRemoveAllVmImagesParameters ( images ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveVmCommand.getExecutionContext ( ) ) ) ; if ( vdcRetValue.getSucceeded ( ) ) { org.ovirt.engine.core.bll.RemoveVmCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } return vdcRetValue ; }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase removeVmImages ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RemoveAllVmImages , buildRemoveAllVmImagesParameters ( images ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) ; if ( vdcRetValue.getSucceeded ( ) ) { getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } return vdcRetValue ; }
Source:
private boolean isDevicesChanged ( org.ovirt.engine.core.common.businessentities.VM dbVm , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vdsmVm ) { org.ovirt.engine.core.common.businessentities.VmDynamic vdsmVmDynamic = vdsmVm.getVmDynamic ( ) ; return ( ( ( ( vdsmVmDynamic != null ) && ( ( vdsmVmDynamic.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) ) && ( ( vdsmVmDynamic.getHash ( ) ) != null ) ) && ( dbVm != null ) ) && ( ! ( java.util.Objects.equals ( dbVm.getHash ( ) , vdsmVmDynamic.getHash ( ) ) ) ) ; }

Target:
public static boolean isDevicesChanged ( org.ovirt.engine.core.common.businessentities.VM dbVm , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vdsmVm ) { org.ovirt.engine.core.common.businessentities.VmDynamic vdsmVmDynamic = vdsmVm.getVmDynamic ( ) ; return ( ( ( ( vdsmVmDynamic != null ) && ( ( vdsmVmDynamic.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) ) && ( ( vdsmVmDynamic.getHash ( ) ) != null ) ) && ( dbVm != null ) ) && ( ! ( java.util.Objects.equals ( dbVm.getHash ( ) , vdsmVmDynamic.getHash ( ) ) ) ) ; }
Source:
private java.lang.String addressesAsString ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > nameServers ) { if ( nameServers == null ) { return null ; } return nameServers.stream ( ) . map ( NameServer :: getAddress ) . sorted ( ) . collect ( java.util.stream.Collectors.joining ( "," ) ) ; }

Target:
private java.lang.String addressesAsString ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > nameServers ) { if ( nameServers.isEmpty ( ) ) { return null ; } return nameServers.stream ( ) . map ( NameServer :: getAddress ) . sorted ( ) . collect ( java.util.stream.Collectors.joining ( "," ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.ImportSanStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportSanStorageModel ) ( target ) ) ; java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( result != null ) { model.setCandidates ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( result ) ) ) ; } else { setError ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorWhileRetrievingListOfDomainsImportSanStorage ( ) ) ; } model.getContainer ( ) . StopProgress ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.ImportSanStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportSanStorageModel ) ( target ) ) ; java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( result != null ) { model.setCandidates ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( result ) ) ) ; } else { setError ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorWhileRetrievingListOfDomainsImportSanStorage ( ) ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface createNewViewableInterface ( boolean plugged ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; iface.setMacAddress ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; iface.setPlugged ( plugged ) ; return iface ; }

Target:
private static org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface createNewViewableInterface ( boolean plugged ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; iface.setMacAddress ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; iface.setPlugged ( plugged ) ; return iface ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filterTemplatesByArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > list , org.ovirt.engine.core.common.businessentities.ArchitectureType architecture ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : list ) { if ( ( template.getId ( ) . equals ( Guid.Empty ) ) || ( template.getClusterArch ( ) . equals ( architecture ) ) ) { filteredList.add ( template ) ; } } return filteredList ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filterTemplatesByArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > list , org.ovirt.engine.core.common.businessentities.ArchitectureType architecture ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : list ) { if ( ( template.getId ( ) . equals ( Guid.Empty ) ) || ( template.getClusterArch ( ) . equals ( architecture ) ) ) { filteredList.add ( template ) ; } } return filteredList ; }
Source:
private boolean unmanagedNetworkChanged ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface existingIface = getExistingIfaces ( ) . get ( iface.getName ( ) ) ; return ( existingIface == null ) || ( ! ( networkName.equals ( existingIface.getNetworkName ( ) ) ) ) ; }

Target:
private boolean unmanagedNetworkChanged ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface existingIface = getExistingIfaces ( ) . get ( iface.getName ( ) ) ; return ( existingIface == null ) || ( ! ( iface.getNetworkName ( ) . equals ( existingIface.getNetworkName ( ) ) ) ) ; }
Source:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfVmWriterTest.createVM ( ) ; java.lang.String xml = manager.ExportVm ( vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.ImportVm ( xml , newVm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }

Target:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfVmWriterTest.createVM ( ) ; java.lang.String xml = manager.ExportVm ( vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.ImportVm ( xml , newVm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; org.ovirt.engine.core.utils.ovf.OvfVmWriterTest.assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommandTest.CLUSTER_ID ) , null ) ) ; setupMocks ( ) ; org.mockito.Mockito.doNothing ( ) . when ( hookSyncJob ) . refreshHooksInCluster ( getCluster ( ) , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_REFRESH ) ; }

Target:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommandTest.CLUSTER_ID ) , null ) ) ; setupMocks ( ) ; org.mockito.Mockito.doNothing ( ) . when ( hookSyncJob ) . refreshHooksInCluster ( getCluster ( ) , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_REFRESH , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public void twoNetworkInterfacesWithSameIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; validateAndAssertResult ( listOfInterfaces , false ) ; }

Target:
public void twoNetworkInterfacesWithSameIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.IP_1 ) ) ; validateAndAssertResult ( listOfInterfaces , false ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = userProfileDao.getByUserId ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserId ( ) ) ; profile.setSshPublicKey ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . getSshPublicKey ( ) ) ; profile.setUserPortalVmLoginAutomatically ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . isUserPortalVmLoginAutomatically ( ) ) ; userProfileDao.update ( profile ) ; org.ovirt.engine.core.bll.UpdateUserProfileCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserProfile ( ) ; profile.setSshPublicKey ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . getSshPublicKey ( ) ) ; profile.setUserPortalVmLoginAutomatically ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . isUserPortalVmLoginAutomatically ( ) ) ; userProfileDao.update ( profile ) ; org.ovirt.engine.core.bll.UpdateUserProfileCommand.setSucceeded ( true ) ; }