auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static org.ovirt.engine.core.compat.Guid getMetadataDiskId ( java.lang.String memoryVolume ) { return org.apache.commons.lang.StringUtils.isEmpty ( memoryVolume ) ? null : org.ovirt.engine.core.utils.GuidUtils.getGuidListFromString ( memoryVolume ) . get ( 4 ) ; }

Target:
public static org.ovirt.engine.core.compat.Guid getMetadataDiskId ( java.lang.String memoryVolume ) { return org.apache.commons.lang.StringUtils.isEmpty ( memoryVolume ) ? null : org.ovirt.engine.core.compat.Guid.createGuidListFromString ( memoryVolume ) . get ( 4 ) ; }
Source:
protected org.ovirt.engine.core.dao.BusinessEntitySnapshotDAO getBusinessEntitySnapshotDAO ( ) { return org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.BusinessEntitySnapshotDAO.class ) ; }

Target:
protected org.ovirt.engine.core.dao.BusinessEntitySnapshotDao getBusinessEntitySnapshotDao ( ) { return org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.BusinessEntitySnapshotDao.class ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getAllForDiskProfile ( org.ovirt.engine.core.compat.Guid diskProfileId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "disk_profile_id" , diskProfileId ) ; return getCallsHandler ( ) . executeReadList ( "GetAllForDiskProfile" , org.ovirt.engine.core.dao.DiskImageDaoImpl.DiskImageRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getAllForDiskProfiles ( java.util.Collection < org.ovirt.engine.core.compat.Guid > diskProfileIds ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "disk_profile_ids" , createArrayOfUUIDs ( diskProfileIds ) ) ; return getCallsHandler ( ) . executeReadList ( "GetAllForDiskProfiles" , org.ovirt.engine.core.dao.DiskImageDaoImpl.DiskImageRowMapper.instance , parameterSource ) ; }
Source:
private void select ( ) { try { this . selector.select ( org.ovirt.vdsm.jsonrpc.client.reactors.Reactor.TIMEOUT ) ; } catch ( java.io.IOException e ) { org.ovirt.vdsm.jsonrpc.client.reactors.Reactor.log.error ( "IOException occured" , e ) ; } }

Target:
private void select ( ) { try { this . selector.select ( org.ovirt.vdsm.jsonrpc.client.reactors.Reactor.TIMEOUT ) ; } catch ( java.io.IOException e ) { org.ovirt.vdsm.jsonrpc.client.reactors.Reactor.LOG.error ( "IOException occured" , e ) ; } }
Source:
public void testGetAllFromDisksIncludingSnapshotsForPrivilegedUserWithoutFilter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshots ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertEquals ( "wrong number of returned disks" , 15 , result.size ( ) ) ; }

Target:
public void testGetAllFromDisksIncludingSnapshotsForPrivilegedUserWithoutFilter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshots ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , false ) ; org.junit.jupiter.api.Assertions.assertEquals ( 15 , result.size ( ) , "wrong number of returned disks" ) ; }
Source:
private void assertValidVolumeInfoCombination ( org.ovirt.engine.core.common.businessentities.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( setupVolumeFormatAndTypeTest ( volumeFormat , volumeType , storageType , 0 ) ) ; }

Target:
private void assertInvalidVolumeInfoCombination ( org.ovirt.engine.core.common.businessentities.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( setupVolumeFormatAndTypeTest ( volumeFormat , volumeType , storageType ) , VdcBllMessages.ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED ) ; }
Source:
public void Search ( ) { if ( ( getEntityStronglyTyped ( ) ) != null ) { super . Search ( ) ; } }

Target:
public void search ( ) { if ( ( getEntityStronglyTyped ( ) ) != null ) { super . search ( ) ; } }
Source:
public void setis_auto_suspend ( boolean value ) { this . mVmStatic.setis_auto_suspend ( value ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "is_auto_suspend" ) ) ; }

Target:
public void setUsbPolicy ( org.ovirt.engine.core.common.businessentities.UsbPolicy value ) { vmStatic.setUsbPolicy ( value ) ; }
Source:
private void unlockImageInDb ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) ; diskImage.setImageStatus ( ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.OK ) ; }

Target:
private void unlockImageInDb ( ) { final org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getOldDisk ( ) ) ) ; diskImage.setImageStatus ( ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.OK ) ; }
Source:
private void assertLunIdInList ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns , java.lang.String requestedLunId ) { org.junit.Assert.assertEquals ( luns.stream ( ) . map ( LUNs :: getLUNId ) . findAny ( ) . orElse ( null ) , requestedLunId ) ; }

Target:
private void assertLunIdInList ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns , java.lang.String requestedLunId ) { org.junit.jupiter.api.Assertions.assertEquals ( luns.stream ( ) . map ( LUNs :: getLUNId ) . findAny ( ) . orElse ( null ) , requestedLunId ) ; }
Source:
public static void addDisk ( org.ovirt.engine.core.common.businessentities.BaseDisk disk ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . exists ( disk.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; } }

Target:
public static void addDisk ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . exists ( disk.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; } }
Source:
public java.lang.String getDefaultTitle ( ) { return org.ovirt.engine.ui.common.widget.table.column.ImageResourceColumn.CONSTANTS.empty ( ) ; }

Target:
public java.lang.String getDefaultTitle ( ) { return org.ovirt.engine.ui.common.widget.table.column.AbstractImageResourceColumn.CONSTANTS.empty ( ) ; }
Source:
public void testRemoveStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics before = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.junit.Assert.assertNotNull ( before ) ; dao.remove ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.ovirt.engine.core.common.businessentities.VmStatistics after = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.junit.Assert.assertNull ( after ) ; }

Target:
public void testRemoveStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics before = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.junit.Assert.assertNotNull ( before ) ; dao.remove ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.ovirt.engine.core.common.businessentities.VmStatistics after = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.junit.Assert.assertNull ( after ) ; }
Source:
private static boolean validNumber ( java.lang.String numberStr ) { return ( numberStr != null ) && ( org.apache.commons.lang.math.NumberUtils.isNumber ( numberStr ) ) ; }

Target:
public static void setDbFacade ( org.ovirt.engine.core.dal.dbbroker.DbFacade value ) { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.dbFacade = value ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( ) { return new org.ovirt.engine.ui.common.uicommon.model.GroupedTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.storage.SubTabStorageGeneralPresenter.constants.storageGeneralSubTabLabel ( ) , 0 ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( ) { return org.ovirt.engine.ui.webadmin.section.main.presenter.tab.DetailTabDataIndex.STORAGE_GENERAL ; }
Source:
private void addDisksDeactivatedMessage ( java.util.List < org.ovirt.engine.core.common.action.MoveDiskParameters > moveDiskParamsList ) { setActionMessageParameters ( ) ; addCanDoActionMessageVariable ( "diskAliases" , org.apache.commons.lang.StringUtils.join ( getDisksAliases ( moveDiskParamsList ) , ", " ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_MOVE_DISKS_MIXED_PLUGGED_STATUS ) ; org.ovirt.engine.core.bll.MoveDisksCommand.getReturnValue ( ) . setCanDoAction ( false ) ; }

Target:
private void addDisksDeactivatedMessage ( java.util.List < org.ovirt.engine.core.common.action.MoveDiskParameters > moveDiskParamsList ) { setActionMessageParameters ( ) ; addCanDoActionMessageVariable ( "diskAliases" , org.apache.commons.lang.StringUtils.join ( getDisksAliases ( moveDiskParamsList ) , ", " ) ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_MOVE_DISKS_MIXED_PLUGGED_STATUS ) ; org.ovirt.engine.core.bll.MoveDisksCommand.getReturnValue ( ) . setCanDoAction ( false ) ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , boolean force ) ;

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) ;
Source:
private void updateHost ( org.ovirt.vdsmfake.domain.Host host ) { org.ovirt.vdsmfake.domain.VdsmManager.getInstance ( ) . updateHost ( host ) ; }

Target:
private void updateHost ( org.ovirt.vdsmfake.domain.Host host ) { javax.enterprise.inject.spi.CDI.current ( ) . select ( org.ovirt.vdsmfake.domain.VdsmManager.class , AppLifecycleListener.DefaultLiteral.INSTANCE ) . get ( ) . updateHost ( host ) ; }
Source:
public void updateWithCpuLowerThanHost ( ) { createCommandWithDefaultVdsGroup ( ) ; setupCpu ( ) ; clusterHasVds ( ) ; cpuFlagsMissing ( ) ; architectureIsUpdatable ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_CANNOT_UPDATE_CPU_WITH_LOWER_HOSTS ) ; }

Target:
public void updateWithCpuLowerThanHost ( ) { createCommandWithDefaultVdsGroup ( ) ; setupCpu ( ) ; clusterHasVds ( ) ; cpuFlagsMissing ( ) ; architectureIsUpdatable ( ) ; canDoActionFailedWithReason ( EngineMessage.VDS_GROUP_CANNOT_UPDATE_CPU_WITH_LOWER_HOSTS ) ; }
Source:
public void executeCommand ( ) { setupMocks ( ) ; mockBackendStatusChange ( true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_DISABLE , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void executeCommand ( ) { setupMocks ( ) ; mockBackendStatusChange ( true ) ; cmd.executeCommand ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_HOOK_DISABLE , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public void osTypeChanged ( java.lang.Integer selectedItem ) { isWindowsOS = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( selectedItem ) ; getDomain ( ) . setIsAvailable ( ( ( selectedItem != null ) && ( isWindowsOS ) ) ) ; }

Target:
public boolean getDomainEnabled ( ) { if ( isWindowsOS ) { return ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( getSysprepDomain ( ) . getSelectedItem ( ) . toString ( ) ) ) ; } return false ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , long sizeRequested ) { return org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( storagePoolId , sizeRequested , java.util.Collections.< org.ovirt.engine.core.common.businessentities.StorageDomain , java.lang.Integer > emptyMap ( ) ) ; }

Target:
public static boolean isUpdateValid ( org.ovirt.engine.core.common.businessentities.VmStatic source , org.ovirt.engine.core.common.businessentities.VmStatic destination , org.ovirt.engine.core.common.businessentities.VMStatus status , boolean hotsetEnabled ) { return org.ovirt.engine.core.bll.VmHandler.mUpdateVmsStatic.IsUpdateValid ( source , destination , status , hotsetEnabled ) ; }
Source:
public void setOverrideEnabledSmartcard ( boolean enabled ) { this . smartcardEnabledOverridden = enabled ; }

Target:
public void setOverrideEnabledSmartcard ( boolean enabled ) { this . consoleOptions.setSmartcardEnabledOverridden ( enabled ) ; }
Source:
private void writeName ( org.ovirt.api.metamodel.concepts.Concept concept ) { org.ovirt.api.metamodel.concepts.Name name = concept.getName ( ) ; if ( name != null ) { writeStartElement ( "name" ) ; writeCharacters ( name.toString ( ) ) ; writeEndElement ( ) ; } }

Target:
private void writeName ( org.ovirt.api.metamodel.concepts.Concept concept ) { org.ovirt.api.metamodel.concepts.Name name = concept.getName ( ) ; if ( name != null ) { writer.writeElement ( "name" , name.toString ( ) ) ; } }
Source:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.GraphicsDevice getGraphicsDevOfType ( org.ovirt.engine.core.common.businessentities.GraphicsType type ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = getGraphicsDevices ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice dev : graphicsDevices ) { if ( ( dev.getGraphicsType ( ) ) == type ) { return dev ; } } return null ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { super . ExecuteVdsBrokerCommand ( ) ; updateNetConfigDirtyFlag ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CollectVdsNetworkDataVDSCommand.persistAndEnforceNetworkCompliance ( getVds ( ) , skipManagementNetwork ( ) ) ; ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { super . ExecuteVdsBrokerCommand ( ) ; updateNetConfigDirtyFlag ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CollectVdsNetworkDataVDSCommand.persistAndEnforceNetworkCompliance ( getVds ( ) , skipManagementNetwork ( ) ) ; proceedProxyReturnValue ( ) ; }
Source:
public void canNotDoWithTwoPinnedHost ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommand ( ) ; vm.setDedicatedVmForVdsList ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_PINNED_TO_MULTIPLE_HOSTS ) ; }

Target:
public void canDetectMissingVM ( ) { org.mockito.Mockito.when ( vmDao.get ( org.mockito.Matchers.eq ( vm.getId ( ) ) ) ) . thenReturn ( null ) ; final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromDb ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; }
Source:
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 > ( ) ; }

Target:
public java.lang.Boolean convert ( java.lang.Object source ) { if ( source != null ) { return ! ( ( ( java.util.Collection < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; }
Source:
public void testRemoveVmFromPool ( ) { org.junit.Assert.assertNotNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) . getVmPoolId ( ) ) ; dao.removeVmFromVmPool ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) ; org.junit.Assert.assertNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) . getVmPoolId ( ) ) ; }

Target:
public void testRemoveVmFromPool ( ) { org.junit.jupiter.api.Assertions.assertNotNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) . getVmPoolId ( ) ) ; dao.removeVmFromVmPool ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) ; org.junit.jupiter.api.Assertions.assertNull ( vmDao.get ( org.ovirt.engine.core.dao.VmPoolDaoTest.EXISTING_VM_ID ) . getVmPoolId ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VMStatus getStatus ( ) { return this . vmDynamic.getstatus ( ) ; }

Target:
public void setClientIp ( java.lang.String value ) { this . vmDynamic.setClientIp ( value ) ; }
Source:
public void testRemove ( ) { dao.remove ( existingTag.gettag_id ( ) ) ; org.ovirt.engine.core.common.businessentities.tags result = dao.get ( existingTag.gettag_id ( ) ) ; assertNull ( result ) ; }

Target:
public void testRemove ( ) { dao.remove ( existingTag.gettag_id ( ) ) ; org.ovirt.engine.core.common.businessentities.tags result = dao.get ( existingTag.gettag_id ( ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.storage.DiskVmElement resolve ( org.ovirt.engine.core.common.businessentities.VmDeviceId id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { org.ovirt.engine.core.common.businessentities.VmDeviceId vmDeviceId = new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskId , vmId ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement.class , VdcQueryType.GetDiskVmElementById , new org.ovirt.engine.core.common.queries.VmDeviceIdQueryParameters ( vmDeviceId ) , vmDeviceId.getDeviceId ( ) . toString ( ) , true ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.DiskVmElement resolve ( org.ovirt.engine.core.common.businessentities.VmDeviceId id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { org.ovirt.engine.core.common.businessentities.VmDeviceId vmDeviceId = new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskId , vmId ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement.class , QueryType.GetDiskVmElementById , new org.ovirt.engine.core.common.queries.VmDeviceIdQueryParameters ( vmDeviceId ) , vmDeviceId.getDeviceId ( ) . toString ( ) , true ) ; }
Source:
private void mockNullVm ( ) { org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; org.mockito.Mockito.when ( vmDao.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( null ) ; cretaeVirtIODisk ( ) ; }

Target:
private void mockNullVm ( ) { org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; org.mockito.Mockito.when ( vmDao.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( null ) ; createVirtIODisk ( ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( "StorageDomainStatic[" + ( getName ( ) ) ) + ", " ) + ( getId ( ) ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "name" , getName ( ) ) . append ( "id" , getId ( ) ) . build ( ) ; }
Source:
public void refreshHostIfAnyVmHasHostDevices ( java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , org.ovirt.engine.core.compat.Guid hostId ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { if ( checkVmNeedsHostDevices ( vmId ) ) { backend.runInternalAction ( VdcActionType.RefreshHost , new org.ovirt.engine.core.common.action.VdsActionParameters ( hostId ) ) ; return ; } } }

Target:
public void refreshHostIfAnyVmHasHostDevices ( java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , org.ovirt.engine.core.compat.Guid hostId ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { if ( checkVmNeedsHostDevices ( vmId ) ) { backend.runInternalAction ( ActionType.RefreshHost , new org.ovirt.engine.core.common.action.VdsActionParameters ( hostId ) ) ; return ; } } }
Source:
public void versionDecreaseNoHostsOrNetwork ( ) { createCommandWithOlderVersion ( ) ; setupCpu ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFS ( ) ) ; initAndAssertValidation ( true ) ; }

Target:
public void versionDecreaseNoHostsOrNetwork ( ) { createCommandWithOlderVersion ( ) ; setupCpu ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFS ( ) ) ; initAndAssertValidation ( true ) ; }
Source:
public static java.lang.Object [ ] [ ] comparisonParameters ( ) { return new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { null , false } , new java.lang.Object [ ] { "" , false } , new java.lang.Object [ ] { "http://" , false } , new java.lang.Object [ ] { "www.redhat.com" , false } , new java.lang.Object [ ] { "192.168.0.1" , false } , new java.lang.Object [ ] { "ftp://www.redhat.com" , false } , new java.lang.Object [ ] { "ftp://192.168.0.1" , false } , new java.lang.Object [ ] { "http://www.redhat.com:/main" , false } , new java.lang.Object [ ] { "http://www.redhat.com:123456/main" , false } , new java.lang.Object [ ] { "http://1.2.3.4:666" , true } , new java.lang.Object [ ] { "http://1.2.3.4" , true } , new java.lang.Object [ ] { "http://[1:2:3:4:5:6:7:8]" , true } , new java.lang.Object [ ] { "http://[1:2:3:4:5:6:7:8]:666" , true } , new java.lang.Object [ ] { "http://www.redhat.com" , true } , new java.lang.Object [ ] { "http://www.redhat.com/main" , true } , new java.lang.Object [ ] { "http://www.redhat.com/main/index.html" , true } , new java.lang.Object [ ] { "http://www.redhat.com:80" , true } , new java.lang.Object [ ] { "http://www.redhat.com:80/main" , true } , new java.lang.Object [ ] { "http://www.redhat.com:80/main/index.html" , true } } ; }

Target:
public static java.util.stream.Stream < org.junit.jupiter.params.provider.Arguments > validate ( ) { return java.util.stream.Stream.of ( org.junit.jupiter.params.provider.Arguments.of ( null , false ) , org.junit.jupiter.params.provider.Arguments.of ( "" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "http://" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "www.redhat.com" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "192.168.0.1" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "ftp://www.redhat.com" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "ftp://192.168.0.1" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com:/main" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com:123456/main" , false ) , org.junit.jupiter.params.provider.Arguments.of ( "http://1.2.3.4:666" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://1.2.3.4" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://[1:2:3:4:5:6:7:8]" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://[1:2:3:4:5:6:7:8]:666" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com/main" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com/main/index.html" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com:80" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com:80/main" , true ) , org.junit.jupiter.params.provider.Arguments.of ( "http://www.redhat.com:80/main/index.html" , true ) ) ; }
Source:
protected org.ovirt.engine.api.model.SchedulingPolicyUnit postPopulate ( org.ovirt.engine.api.model.SchedulingPolicyUnit model ) { model = super . postPopulate ( model ) ; model.setType ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.core.common.scheduling.PolicyUnitType.class ) . name ( ) . toLowerCase ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.SchedulingPolicyUnit postPopulate ( org.ovirt.engine.api.model.SchedulingPolicyUnit model ) { model = super . postPopulate ( model ) ; model.setType ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.PolicyUnitType.class ) ) ; return model ; }
Source:
public void canDetachMaintenanceDomain ( ) { setStorageDomainStatus ( StorageDomainStatus.Inactive ) ; storagePoolExists ( ) ; masterDomainIsUp ( ) ; canDetachDomain ( ) ; org.junit.Assert.assertTrue ( cmd.canDetachDomain ( false , false ) ) ; }

Target:
public void canDetachMaintenanceDomain ( ) { setStorageDomainStatus ( StorageDomainStatus.Maintenance ) ; storagePoolExists ( ) ; masterDomainIsUp ( ) ; canDetachDomain ( ) ; org.junit.Assert.assertTrue ( cmd.canDetachDomain ( false , false ) ) ; }
Source:
public java.util.List < ? > FindAll ( org.ovirt.engine.core.bll.adbroker.LdapQueryData ldapQueryData ) { java.util.List < ? > returnValue = find ( ldapQueryData , 0 ) ; if ( returnValue == null ) { returnValue = java.util.Collections.EMPTY_LIST ; } return returnValue ; }

Target:
public java.util.List < ? > findAll ( org.ovirt.engine.core.bll.adbroker.LdapQueryData ldapQueryData ) { java.util.List < ? > returnValue = find ( ldapQueryData , 0 ) ; if ( returnValue == null ) { returnValue = java.util.Collections.EMPTY_LIST ; } return returnValue ; }
Source:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getOldProvider ( ) { if ( ( oldProvider ) == null ) { oldProvider = org.ovirt.engine.core.bll.provider.UpdateProviderCommand.getProviderDao ( ) . get ( getProvider ( ) . getId ( ) ) ; } return oldProvider ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getOldProvider ( ) { if ( ( oldProvider ) == null ) { oldProvider = providerDao.get ( getProvider ( ) . getId ( ) ) ; } return oldProvider ; }
Source:
static org.ovirt.engine.api.model.Disk setUpStatisticalEntityExpectations ( org.ovirt.engine.core.common.businessentities.DiskImage entity ) { entity.setread_rate ( 1 ) ; entity.setwrite_rate ( 2 ) ; entity.setReadLatency ( 3.0 ) ; entity.setWriteLatency ( 4.0 ) ; entity.setFlushLatency ( 5.0 ) ; return entity ; }

Target:
static org.ovirt.engine.api.model.Disk setUpStatisticalEntityExpectations ( org.ovirt.engine.core.common.businessentities.DiskImage entity ) { entity.setReadRate ( 1 ) ; entity.setWriteRate ( 2 ) ; entity.setReadLatency ( 3.0 ) ; entity.setWriteLatency ( 4.0 ) ; entity.setFlushLatency ( 5.0 ) ; return entity ; }
Source:
private void logDebug ( java.lang.String txt ) { org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageModel.log.debug ( txt ) ; }

Target:
private void logDebug ( java.lang.String txt ) { org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageModel.log.fine ( txt ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.IpConfiguration populateIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration , org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol ipv4BootProtocol , org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol ipv6BootProtocol ) { ipConfiguration.setIPv4Addresses ( java.util.Collections.singletonList ( createIpv4Address ( ipv4BootProtocol ) ) ) ; ipConfiguration.setIpV6Addresses ( java.util.Collections.singletonList ( createIpv6Address ( ipv6BootProtocol ) ) ) ; return ipConfiguration ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IpConfiguration populateIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration , org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol ipv4BootProtocol , org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol ipv6BootProtocol ) { ipConfiguration.setIPv4Addresses ( java.util.Collections.singletonList ( createIpv4Address ( ipv4BootProtocol ) ) ) ; ipConfiguration.setIpV6Addresses ( java.util.Collections.singletonList ( createIpv6Address ( ipv6BootProtocol ) ) ) ; return ipConfiguration ; }
Source:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host ) { return persistAndEnforceNetworkCompliance ( host , false , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host ) { return persistAndEnforceNetworkCompliance ( host , false , new org.ovirt.engine.core.common.vdscommands.UserConfiguredNetworkData ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; diskModel.getWipeAfterDelete ( ) . setEntity ( returnValue ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( result.getState ( ) ) ) ; diskModel.StopProgress ( ) ; diskModel.cancel ( ) ; }
Source:
public static boolean copyNonEditableFieldsToDestination ( org.ovirt.engine.core.common.businessentities.VmStatic source , org.ovirt.engine.core.common.businessentities.VmStatic destination ) { return org.ovirt.engine.core.bll.VmHandler.mUpdateVmsStatic.copyNonEditableFieldsToDestination ( source , destination ) ; }

Target:
public static boolean isUpdateValid ( org.ovirt.engine.core.common.businessentities.VmStatic source , org.ovirt.engine.core.common.businessentities.VmStatic destination , org.ovirt.engine.core.common.businessentities.VMStatus status , boolean hotsetEnabled ) { return org.ovirt.engine.core.bll.VmHandler.mUpdateVmsStatic.IsUpdateValid ( source , destination , status , hotsetEnabled ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroupEntity ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setArchitecture ( ArchitectureType.x86_64 ) ; return cluster ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroupEntity ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setArchitecture ( ArchitectureType.x86_64 ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; return cluster ; }
Source:
public void jsonInvalidJson ( ) throws java.io.IOException { provider.initMigrationPolicies ( "this is not a valid json" ) ; org.ovirt.engine.core.common.migration.MigrationPolicy policy = provider.getMigrationPolicy ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertTrue ( ( policy instanceof org.ovirt.engine.core.common.migration.NoMigrationPolicy ) ) ; }

Target:
public void jsonInvalidJson ( ) throws java.io.IOException { provider.initMigrationPolicies ( "this is not a valid json" , org.ovirt.engine.core.bll.migration.ConvergenceConfigProviderTest.VERSION ) ; org.ovirt.engine.core.common.migration.MigrationPolicy policy = provider.getMigrationPolicy ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.bll.migration.ConvergenceConfigProviderTest.VERSION ) ; org.junit.Assert.assertTrue ( ( policy instanceof org.ovirt.engine.core.common.migration.NoMigrationPolicy ) ) ; }
Source:
protected java.util.List < java.lang.Class < ? > > getValidationGroups ( ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { return addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportClonedEntity.class ) ; } return addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportEntity.class ) ; }

Target:
protected java.util.List < java.lang.Class < ? > > getValidationGroups ( ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { return org.ovirt.engine.core.bll.ImportVmCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportClonedEntity.class ) ; } return org.ovirt.engine.core.bll.ImportVmCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportEntity.class ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.NetworkAttachment addLinks ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { return super . addLinks ( model , getParentClass ( ) ) ; }

Target:
protected org.ovirt.engine.api.model.NetworkAttachment addLinks ( org.ovirt.engine.api.model.NetworkAttachment model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { return super . addLinks ( model , getParentClass ( ) ) ; }
Source:
private void assertGetResult ( org.ovirt.engine.core.common.businessentities.StoragePool result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingEntity , result ) ; }

Target:
private void assertGetResult ( org.ovirt.engine.core.common.businessentities.StoragePool result ) { org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingEntity , result ) ; }
Source:
public void setForceLabelMessage ( java.lang.String forceLabelMessage ) { forceEditor.setLabel ( ( forceLabelMessage == null ? constants.notAvailableLabel ( ) : forceLabelMessage ) ) ; forceEditor.setVisible ( ( forceLabelMessage != null ) ) ; }

Target:
public void setForceLabelMessage ( java.lang.String forceLabelMessage ) { forceEditor.setLabel ( ( forceLabelMessage == null ? org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.GeoRepActionConfirmPopUpView.constants.notAvailableLabel ( ) : forceLabelMessage ) ) ; forceEditor.setVisible ( ( forceLabelMessage != null ) ) ; }
Source:
protected void performLogout ( ) { getLoginModel ( ) . resetAfterLogout ( ) ; user.onUserLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; org.ovirt.engine.ui.common.uicommon.model.CleanupModelEvent.fire ( eventBus ) ; }

Target:
protected void onLogin ( T loginModel ) { restApiSessionManager.recordLoggedInTime ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase parameters = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.getStoragePoolId ( ) ) ; runInternalAction ( VdcActionType.ProcessOvfUpdateForStoragePool , parameters , org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.getContext ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.ProcessOvfUpdateForStorageDomain , createProcessOvfUpdateForDomainParams ( ) ) ; org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase parameters = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.getStoragePoolId ( ) ) ; runInternalAction ( ActionType.ProcessOvfUpdateForStoragePool , parameters , org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.getContext ( ) ) ; runInternalActionWithTasksContext ( ActionType.ProcessOvfUpdateForStorageDomain , createProcessOvfUpdateForDomainParams ( ) ) ; org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand.setSucceeded ( true ) ; }
Source:
protected void revertTask ( ) { }

Target:
protected void revertTask ( ) { org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getEnclosingCommand ( ) . getParameters ( ) . getImageId ( ) , ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) , ImageStatus.OK ) ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc validateStorageServerConnection ( int serverType , java.lang.String spUUID , java.util.Map < java.lang.String , java.lang.String > [ ] args ) ;

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookDisable ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName ) ;
Source:
public void run ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.InstallVds , installVdsParameters , new org.ovirt.engine.core.bll.context.CommandContext ( installCtx ) ) ; }

Target:
public void run ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.InstallVdsInternal , installVdsParameters , new org.ovirt.engine.core.bll.context.CommandContext ( installCtx ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { org.ovirt.engine.sdk4.Connection connection = org.ovirt.engine.sdk4.ConnectionBuilder.connection ( ) . url ( "https://engine40.example.com/ovirt-engine/api" ) . user ( "admin@internal" ) . password ( "redhat123" ) . trustStoreFile ( "truststore.jks" ) . build ( ) ; org.ovirt.engine.sdk4.services.StorageDomainsService sdsService = connection.systemService ( ) . storageDomainsService ( ) ; org.ovirt.engine.sdk4.types.StorageDomain sd = sdsService.list ( ) . search ( "name=myiso" ) . send ( ) . storageDomain ( ) . get ( 0 ) ; org.ovirt.engine.sdk4.services.DataCentersService dcsService = connection.systemService ( ) . dataCentersService ( ) ; org.ovirt.engine.sdk4.types.DataCenter dc = dcsService.list ( ) . search ( "name=mydc" ) . send ( ) . dataCenters ( ) . get ( 0 ) ; org.ovirt.engine.sdk4.services.DataCenterService dcService = dcsService.dataCenterService ( dc.id ( ) ) ; org.ovirt.engine.sdk4.services.AttachedStorageDomainsService attachedSdsService = dcService.storageDomainsService ( ) ; attachedSdsService.add ( ) . storageDomain ( org.ovirt.engine.sdk4.builders.Builders.storageDomain ( ) . id ( sd.id ( ) ) ) . send ( ) ; org.ovirt.engine.sdk4.services.StorageDomainService sdService = sdsService.storageDomainService ( sd.id ( ) ) ; for ( ; ; ) { java.lang.Thread.sleep ( ( 5 * 1000 ) ) ; sd = sdService.get ( ) . send ( ) . storageDomain ( ) ; java.lang.String state = sd.status ( ) . state ( ) ; if ( "active" . equals ( state ) ) { break ; } } connection.close ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { org.ovirt.engine.sdk4.Connection connection = org.ovirt.engine.sdk4.ConnectionBuilder.connection ( ) . url ( "https://engine40.example.com/ovirt-engine/api" ) . user ( "admin@internal" ) . password ( "redhat123" ) . trustStoreFile ( "truststore.jks" ) . build ( ) ; org.ovirt.engine.sdk4.services.StorageDomainsService sdsService = connection.systemService ( ) . storageDomainsService ( ) ; org.ovirt.engine.sdk4.types.StorageDomain sd = sdsService.list ( ) . search ( "name=myiso" ) . send ( ) . storageDomains ( ) . get ( 0 ) ; org.ovirt.engine.sdk4.services.DataCentersService dcsService = connection.systemService ( ) . dataCentersService ( ) ; org.ovirt.engine.sdk4.types.DataCenter dc = dcsService.list ( ) . search ( "name=mydc" ) . send ( ) . dataCenters ( ) . get ( 0 ) ; org.ovirt.engine.sdk4.services.DataCenterService dcService = dcsService.dataCenterService ( dc.id ( ) ) ; org.ovirt.engine.sdk4.services.AttachedStorageDomainsService attachedSdsService = dcService.storageDomainsService ( ) ; attachedSdsService.add ( ) . storageDomain ( org.ovirt.engine.sdk4.builders.Builders.storageDomain ( ) . id ( sd.id ( ) ) ) . send ( ) ; org.ovirt.engine.sdk4.services.StorageDomainService sdService = sdsService.storageDomainService ( sd.id ( ) ) ; for ( ; ; ) { java.lang.Thread.sleep ( ( 5 * 1000 ) ) ; sd = sdService.get ( ) . send ( ) . storageDomain ( ) ; java.lang.String state = sd.status ( ) . state ( ) ; if ( "active" . equals ( state ) ) { break ; } } connection.close ( ) ; }
Source:
public void testGetWithInvalidId ( ) { org.ovirt.engine.core.common.businessentities.VdcOption result = dao.get ( 717 ) ; assertNull ( result ) ; }

Target:
public void testGetWithInvalidId ( ) { org.ovirt.engine.core.common.businessentities.VdcOption result = dao.get ( 717 ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.DbUser user ) { return user.getLoginName ( ) ; }

Target:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { return user.getLoginName ( ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters initVdsCreateVmParams ( ) { return new org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; }

Target:
protected org.ovirt.engine.core.bll.IsoDomainListSyncronizer getIsoDomainListSyncronizer ( ) { return org.ovirt.engine.core.bll.IsoDomainListSyncronizer.getInstance ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; objectID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.Permissions permission = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; permission.setObjectId ( objectID ) ; mockedPermissions = java.util.Collections.singletonList ( permission ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; objectID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.Permission permission = new org.ovirt.engine.core.common.businessentities.Permission ( ) ; permission.setObjectId ( objectID ) ; mockedPermissions = java.util.Collections.singletonList ( permission ) ; }
Source:
public void testTooBigRange ( ) throws java.lang.Exception { new org.ovirt.engine.core.bll.network.macpoolmanager.Range ( 0 , java.lang.Integer.MAX_VALUE ) ; }

Target:
public void testTooBigRange ( ) throws java.lang.Exception { new org.ovirt.engine.core.bll.network.macpool.Range ( 0 , java.lang.Integer.MAX_VALUE ) ; }
Source:
private void AddVmInterfaceStatisticsToList ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > list ) { if ( ( list.size ( ) ) <= 0 ) { return ; } _vmInterfaceStatisticsToSave.put ( list.get ( 0 ) . getVmId ( ) . getValue ( ) , list ) ; }

Target:
private void addVmInterfaceStatisticsToList ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > list ) { if ( ( list.size ( ) ) <= 0 ) { return ; } _vmInterfaceStatisticsToSave.put ( list.get ( 0 ) . getVmId ( ) . getValue ( ) , list ) ; }
Source:
public org.ovirt.engine.core.compat.Version getcompatibility_version ( ) { if ( ( version ) == null ) { version = new org.ovirt.engine.core.compat.Version ( compatibilityVersion ) ; } return version ; }

Target:
public org.ovirt.engine.core.compat.Version getCompatibilityVersion ( ) { if ( ( version ) == null ) { version = new org.ovirt.engine.core.compat.Version ( compatibilityVersion ) ; } return version ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyNativeGotNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy , null ) , currentPolicy ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.DISABLED ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.defaultOSes = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { customPropertiesList = ( ( java.util.Map < org.ovirt.engine.core.compat.Version , java.util.Map < java.lang.String , java.lang.String > > ) ( returnValue ) ) ; }
Source:
public void setDisplay ( java.lang.Integer value ) { this . vmDynamic.setDisplay ( value ) ; }

Target:
public void setGraphicsInfos ( java.util.Map < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.GraphicsInfo > graphicsInfos ) { vmDynamic.setGraphicsInfos ( graphicsInfos ) ; }
Source:
private void readUsbItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setUsbPolicy ( org.ovirt.engine.core.common.businessentities.UsbPolicy.forStringValue ( node.SelectSingleNode ( "rasd:UsbPolicy" , _xmlNS ) . innerText ) ) ; }

Target:
private void readUsbItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setUsbPolicy ( org.ovirt.engine.core.common.businessentities.UsbPolicy.forStringValue ( selectSingleNode ( node , "rasd:UsbPolicy" , _xmlNS ) . innerText ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setname ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; return pool ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setname ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return pool ; }