auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void completeGenerationInfo ( ) { if ( ! ( isDstVdsmImage ( ) ) ) { return ; } org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getVolumeInfoFromVdsm ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , info.getStorageDomainId ( ) , info.getImageGroupId ( ) , info.getImageId ( ) ) ; info.setGeneration ( image.getImage ( ) . getGeneration ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.persistCommandIfNeeded ( ) ; }

Target:
private void completeGenerationInfo ( ) { if ( ! ( isDstVdsmImage ( ) ) ) { return ; } org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image = imagesHandler.getVolumeInfoFromVdsm ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , info.getStorageDomainId ( ) , info.getImageGroupId ( ) , info.getImageId ( ) ) ; info.setGeneration ( image.getImage ( ) . getGeneration ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.persistCommandIfNeeded ( ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ! ( getGlusterVolume ( ) . isOnline ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STOPPED ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ! ( volume.isOnline ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STOPPED ) ; addCanDoActionMessage ( java.lang.String.format ( "$volumeName %1$s" , volume.getName ( ) ) ) ; return false ; } return true ; }
Source:
public boolean isStorageActive ( ) { return ( ( ( getStorage ( ) ) == null ) || ( ( getStorage ( ) . getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) ) || ( ( getStorage ( ) . getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; }

Target:
public boolean isStorageActive ( ) { return ( ( ( getStorage ( ) ) == null ) || ( ( getStorage ( ) . getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) ) || ( ( getStorage ( ) . getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; }
Source:
public void testDeleteUnregisteredEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.Assert.assertEquals ( 1 , ovfEntityDataList.size ( ) ) ; org.junit.Assert.assertFalse ( ovfEntityDataList.isEmpty ( ) ) ; dao.removeEntity ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList2 = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.Assert.assertTrue ( ovfEntityDataList2.isEmpty ( ) ) ; }

Target:
public void testDeleteUnregisteredEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , ovfEntityDataList.size ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( ovfEntityDataList.isEmpty ( ) ) ; dao.removeEntity ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList2 = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.jupiter.api.Assertions.assertTrue ( ovfEntityDataList2.isEmpty ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeActionVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { getReturnValue ( ) . getExecuteFailedMessages ( ) . add ( returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeActionVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_START_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.VmDevice generateNewEntity ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.dao.VmDeviceDAOTest.EXISTING_VM_ID ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , "floppy" , "type:'drive', controller:'0', bus:'0', unit:'1'" , 2 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , false , false , "alias" ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmDevice generateNewEntity ( ) { java.util.Map < java.lang.String , java.lang.String > customProp = new java.util.LinkedHashMap < > ( ) ; customProp.put ( "prop1" , "value1" ) ; return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.dao.VmDeviceDAOTest.EXISTING_VM_ID ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , "floppy" , "type:'drive', controller:'0', bus:'0', unit:'1'" , 2 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , false , false , "alias" , customProp ) ; }
Source:
public javax.ws.rs.core.Response deactivate ( org.ovirt.engine.api.model.Action action ) { boolean stopGlusterService = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostResource.STOP_GLUSTER_SERVICE , true , false ) ; return doAction ( VdcActionType.MaintenanceNumberOfVdss , new org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters ( asList ( guid ) , false , ( action.isSetReason ( ) ? action.getReason ( ) : null ) , stopGlusterService ) , action ) ; }

Target:
public javax.ws.rs.core.Response deactivate ( org.ovirt.engine.api.model.Action action ) { boolean stopGlusterService = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostResource.STOP_GLUSTER_SERVICE , true , false ) ; return doAction ( ActionType.MaintenanceNumberOfVdss , new org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters ( asList ( guid ) , false , ( action.isSetReason ( ) ? action.getReason ( ) : null ) , stopGlusterService ) , action ) ; }
Source:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetDiskAndSnapshotsByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.DISK_ID } , getEntity ( 1 , true ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetDiskAndSnapshotsByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.DISK_ID } , getEntity ( 1 , true ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkCluster > networks = org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.NetworkCluster networkCluster : networks ) { if ( networkCluster.getnetwork_id ( ) . equals ( getNetworkCluster ( ) . getnetwork_id ( ) ) ) { return true ; } } return false ; }

Target:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > networks = org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster : networks ) { if ( networkCluster.getnetwork_id ( ) . equals ( getNetworkCluster ( ) . getnetwork_id ( ) ) ) { return true ; } } return false ; }
Source:
private void unlinkingTest ( org.ovirt.engine.core.bll.ValidationResult expected , boolean networkLinkingSupported , boolean nicLinked ) { mockConfigRule.mockConfigValue ( ConfigValues.NetworkLinkingSupported , version , networkLinkingSupported ) ; org.mockito.Mockito.when ( nic.isLinked ( ) ) . thenReturn ( nicLinked ) ; org.junit.Assert.assertEquals ( expected , validator.linkedCorrectly ( ) ) ; }

Target:
private void unlinkingTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , boolean networkLinkingSupported , boolean nicLinked ) { mockConfigRule.mockConfigValue ( ConfigValues.NetworkLinkingSupported , version , networkLinkingSupported ) ; org.mockito.Mockito.when ( nic.isLinked ( ) ) . thenReturn ( nicLinked ) ; org.junit.Assert.assertThat ( validator.linkedCorrectly ( ) , matcher ) ; }
Source:
public void updateStatusForVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus existing = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; existing.setVdsId ( new org.ovirt.engine.core.compat.Guid ( "afce7a39-8e8c-4819-ba9c-796d316592e7" ) ) ; existing.setStatus ( KdumpFlowStatus.FINISHED ) ; existing.setAddress ( "[\"192.168.122.25\", 4444]" ) ; dbFacade.getVdsKdumpStatusDao ( ) . update ( existing ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( existing.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( existing , found ) ; }

Target:
public void updateStatusForVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus existing = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; existing.setVdsId ( FixturesTool.HOST_ID ) ; existing.setStatus ( KdumpFlowStatus.FINISHED ) ; existing.setAddress ( "[\"192.168.122.25\", 4444]" ) ; dbFacade.getVdsKdumpStatusDao ( ) . update ( existing ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( existing.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( existing , found ) ; }
Source:
public void diskInterfaceNotSupportedByOs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; vm.setVmOs ( 2 ) ; initializeOsRepository ( vm.getOs ( ) , DiskInterface.VirtIO ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertThat ( validator.isDiskInterfaceSupported ( vm , dve ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; }

Target:
public void testDiskAttachedToAnyVM ( ) { org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.isDiskAttachedToAnyVm ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected R addLinks ( R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... subCollectionMembersToExclude ) { model = addParents ( model ) ; model = linkSubCollections ( model , suggestedParent , subCollectionMembersToExclude ) ; model = org.ovirt.engine.api.utils.LinkHelper.addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.getUriInfo ( ) , model , suggestedParent ) ; return model ; }

Target:
protected R addLinks ( R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... subCollectionMembersToExclude ) { model = addParents ( model ) ; model = linkSubCollections ( model , suggestedParent , subCollectionMembersToExclude ) ; model = org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.getUriInfo ( ) , model , suggestedParent ) ; return model ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( isAddingNewVm ) { org.ovirt.engine.core.common.action.VmOperationParameterBase reorderParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( id ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.ReorderVmNics , reorderParams , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getCallback ( ) . vnicCreated ( id ) ; } } ) ; } else { getCallback ( ) . vnicCreated ( id ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( isAddingNewVm ) { org.ovirt.engine.core.common.action.VmOperationParameterBase reorderParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( id ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.ReorderVmNics , reorderParams , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getCallback ( ) . vnicCreated ( id , unitVmModel ) ; } } ) ; } else { getCallback ( ) . vnicCreated ( id , unitVmModel ) ; } }
Source:
private void setUpGetBallooningExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true ) ; }

Target:
private void setUpGetSoundcardExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetSoundDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] } , new java.util.ArrayList < > ( ) ) ; } }
Source:
private static org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion computeNewTemplateWithVersionToSelect ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion > newItems ) { return newItems.isEmpty ( ) ? null : ( newItems.size ( ) ) >= 2 ? newItems.get ( 1 ) : newItems.get ( 0 ) ; }

Target:
private static org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion computeNewTemplateWithVersionToSelect ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion > newItems , boolean addLatest ) { if ( newItems.isEmpty ( ) ) { return null ; } if ( addLatest ) { return ( newItems.size ( ) ) >= 2 ? newItems.get ( 1 ) : newItems.get ( 0 ) ; } return newItems.get ( 0 ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionDelete ( volumeName , remoteHost , remoteVolumeName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigSet ( volumeName , slaveHost , slaveVolumeName , configKey , configValue , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void validateVmShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void validateVmShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }
Source:
public void setSwapTotal ( java.lang.Long value ) { if ( ( ( swapTotal ) == null ) && ( value == null ) ) { return ; } if ( ( ( swapTotal ) == null ) || ( ! ( swapTotal.equals ( value ) ) ) ) { swapTotal = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "SwapTotal" ) ) ; } }

Target:
public void setCpuType ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( cpuType , value ) ) ) { cpuType = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "CpuType" ) ) ; } }
Source:
public boolean test ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface otherIface ) { if ( ( iface ) == otherIface ) { return true ; } if ( otherIface == null ) { return false ; } org.apache.commons.lang.builder.EqualsBuilder eb = new org.apache.commons.lang.builder.EqualsBuilder ( ) ; eb.append ( iface.getName ( ) , otherIface.getName ( ) ) ; eb.append ( iface.getAddress ( ) , otherIface.getAddress ( ) ) ; return eb.isEquals ( ) ; }

Target:
public boolean test ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface otherIface ) { if ( ( iface ) == otherIface ) { return true ; } if ( otherIface == null ) { return false ; } org.apache.commons.lang.builder.EqualsBuilder eb = new org.apache.commons.lang.builder.EqualsBuilder ( ) ; eb.append ( iface.getName ( ) , otherIface.getName ( ) ) ; eb.append ( iface.getIpv4Address ( ) , otherIface.getIpv4Address ( ) ) ; return eb.isEquals ( ) ; }
Source:
public void getMaxNumOfVmCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmCpus ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getLabelListByEntityId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Label > > aQuery , org.ovirt.engine.core.compat.Guid entityId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SortListByNameConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLabelByEntityId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( entityId ) , aQuery ) ; }
Source:
public void setUp ( ) { createStorageDomain ( ) ; parameters = new org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters ( storageDomain.getId ( ) , new java.util.ArrayList < > ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.ExtendSANStorageDomainCommand ( parameters , null ) ) ; command.setStorageDomain ( storageDomain ) ; }

Target:
public void validateFailsDiscardFunctionalityBreaks ( ) { passAllValidations ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( discardHelper ) . isExistingDiscardFunctionalityPreserved ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_LUN_BREAKS_STORAGE_DOMAIN_DISCARD_SUPPORT ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setVmId ( getGuid ( rs , "vm_guid" ) ) ; entity.setMacAddress ( rs.getString ( "mac_addr" ) ) ; entity.setStatistics ( VmNetworkStatisticsRowMapper.INSTANCE.mapRow ( rs , rowNum ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setVmId ( getGuid ( rs , "vm_guid" ) ) ; entity.setMacAddress ( rs.getString ( "mac_addr" ) ) ; entity.setSpeed ( rs.getInt ( "speed" ) ) ; entity.setStatistics ( VmNetworkStatisticsRowMapper.INSTANCE.mapRow ( rs , rowNum ) ) ; return entity ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.lang.String value ) { transitionHandler.handlePlaceTransition ( true ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.lang.String value ) { java.util.Map < java.lang.String , java.lang.String > parameters = new java.util.HashMap < > ( ) ; parameters.put ( FragmentParams.NAME.getName ( ) , storagePool.getName ( ) ) ; getPlaceTransitionHandler ( ) . handlePlaceTransition ( WebAdminApplicationPlaces.dataCenterStorageSubTabPlace , parameters ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute logoff: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; }

Target:
public void onFailure ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.LoginUserParameters > operation , final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to login: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; clearLoggedInUser ( ) ; if ( callback.isHandleFailure ( ) ) { setLoggedInUser ( null ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }
Source:
public void rescheduleAJob ( java.lang.String oldTriggerName , java.lang.String oldTriggerGroup , org.quartz.Trigger newTrigger ) { try { if ( ! ( sched.isShutdown ( ) ) ) { sched.rescheduleJob ( org.quartz.TriggerKey.triggerKey ( oldTriggerName , oldTriggerGroup ) , newTrigger ) ; } } catch ( org.quartz.SchedulerException se ) { log.error ( "failed to reschedule the job" , se ) ; } }

Target:
public void shutDown ( ) { try { sched.shutdown ( true ) ; } catch ( org.quartz.SchedulerException se ) { log.error ( "failed to shut down the scheduler: {}" , se.getMessage ( ) ) ; log.debug ( "Exception" , se ) ; } }
Source:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( getSelectedItem ( ) ) ) ; if ( ( getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel profileModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , profile.getCompatibilityVersion ( ) , profile ) ; setWindow ( profileModel ) ; initNetworkList ( profileModel ) ; }

Target:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( getSelectedItem ( ) ) ) ; if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.StoragePool selectedDc = getSelectedDc ( ) ; final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel profileModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , profile.getCompatibilityVersion ( ) , profile , selectedDc.getId ( ) ) ; setWindow ( profileModel ) ; initNetworkList ( profileModel ) ; }
Source:
public void canDoActionFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeDiskWrongPlug ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_PLUG_DISK_IS_NOT_UNPLUGGED.toString ( ) ) ) ; }

Target:
public void canDoActionFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeDiskWrongPlug ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.HOT_PLUG_DISK_IS_NOT_UNPLUGGED.toString ( ) ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setText ( constants.loginButtonLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameLabel.setText ( constants.loginFormUserNameLabel ( ) ) ; passwordLabel.setText ( constants.loginFormPasswordLabel ( ) ) ; domainLabel.setText ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }
Source:
private void mockSpiceRelatedConfig ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery query ) { org.mockito.Mockito.doReturn ( null ) . when ( query ) . getConfigValue ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.config.ConfigValues.class ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( query ) . getConfigValue ( ConfigValues.SSLEnabled ) ; org.mockito.Mockito.doReturn ( false ) . when ( query ) . getConfigValue ( ConfigValues.EnableUSBAsDefault ) ; }

Target:
private void mockSpiceRelatedConfig ( ) { mcr.mockConfigValue ( ConfigValues.SSLEnabled , false ) ; mcr.mockConfigValue ( ConfigValues.EnableUSBAsDefault , false ) ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Tag > collection ) throws java.lang.Exception { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( ( ( NAMES.length ) + 1 ) , collection.size ( ) ) ; verifyRoot ( collection.get ( NAMES.length ) ) ; collection.remove ( NAMES.length ) ; super . verifyCollection ( collection ) ; }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Tag > collection ) throws java.lang.Exception { org.junit.jupiter.api.Assertions.assertNotNull ( collection ) ; org.junit.jupiter.api.Assertions.assertEquals ( ( ( NAMES.length ) + 1 ) , collection.size ( ) ) ; verifyRoot ( collection.get ( NAMES.length ) ) ; collection.remove ( NAMES.length ) ; super . verifyCollection ( collection ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
protected boolean desiredImage ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.core.common.businessentities.storage.ImageFileType.Unknown ) == ( repoImage.getFileType ( ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForDisk ( ) { org.ovirt.engine.core.common.businessentities.BaseDisk disk = dbFacade.getBaseDiskDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.DISK_ID ) ; org.junit.Assert.assertNotNull ( disk ) ; java.lang.String name = disk.getDiskAlias ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.DISK_ID , VdcObjectType.Disk ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk = dbFacade.getBaseDiskDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.DISK_ID ) ; org.junit.Assert.assertNotNull ( disk ) ; java.lang.String name = disk.getDiskAlias ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.DISK_ID , VdcObjectType.Disk ) ) ) ; }
Source:
public void invalidDefaultManagementNetworkAttachement ( ) { newDefaultManagementNetworkFound ( ) ; final org.ovirt.engine.core.common.errors.EngineMessage expected = org.ovirt.engine.core.common.errors.EngineMessage.Unassigned ; org.mockito.Mockito.when ( networkClusterValidator.managementNetworkChange ( ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( expected ) ) ; createCommandWithDefaultVdsGroup ( ) ; oldGroupIsDetachedDefault ( ) ; setupCpu ( ) ; canDoActionFailedWithReason ( expected ) ; }

Target:
public void invalidDefaultManagementNetworkAttachement ( ) { newDefaultManagementNetworkFound ( ) ; final org.ovirt.engine.core.common.errors.EngineMessage expected = org.ovirt.engine.core.common.errors.EngineMessage.Unassigned ; org.mockito.Mockito.when ( networkClusterValidator.managementNetworkChange ( ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( expected ) ) ; createCommandWithDefaultVdsGroup ( ) ; oldGroupIsDetachedDefault ( ) ; setupCpu ( ) ; validateFailedWithReason ( expected ) ; }
Source:
protected void onFetchVms ( ) { if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { logBuilder = new java.lang.StringBuilder ( ) ; } super . onFetchVms ( ) ; org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.info ( "Fetched VMs from VDS '{}'" , vdsmVms.size ( ) , vdsManager.getVdsId ( ) ) ; if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.debug ( logBuilder.toString ( ) ) ; } }

Target:
private void logNumOfVmsIfChanged ( ) { int numOfVms = vdsmVms.size ( ) ; org.ovirt.engine.core.compat.Guid vdsId = vdsManager.getVdsId ( ) ; java.lang.Integer prevNumOfVms = org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.vdsIdToNumOfVms.put ( vdsId , numOfVms ) ; if ( ( prevNumOfVms == null ) || ( ( prevNumOfVms.intValue ( ) ) != numOfVms ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.info ( "Fetched VMs from VDS '{}'" , numOfVms , vdsId ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession getGeoRepSession ( ) { if ( ( geoRepSession ) == null ) { if ( ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getGeoRepSessionId ( ) ) != null ) { geoRepSession = getGlusterGeoRepDao ( ) . getById ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getGeoRepSessionId ( ) ) ; } else { geoRepSession = getGlusterGeoRepDao ( ) . getGeoRepSession ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getGlusterVolumeId ( ) , org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getSlaveVolumeName ( ) ) ; } } return geoRepSession ; }

Target:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession getGeoRepSession ( ) { if ( ( geoRepSession ) == null ) { if ( ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getGeoRepSessionId ( ) ) != null ) { geoRepSession = getGlusterGeoRepDao ( ) . getById ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getGeoRepSessionId ( ) ) ; } else { geoRepSession = getGlusterGeoRepDao ( ) . getGeoRepSession ( org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getGlusterVolumeId ( ) , org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getSlaveHostId ( ) , org.ovirt.engine.core.bll.gluster.GeoRepSessionCommandBase.getParameters ( ) . getSlaveVolumeName ( ) ) ; } } return geoRepSession ; }
Source:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter ( ) ; org.junit.Assert.assertTrue ( "-02:03:04.05" , comp.validateFieldValue ( "UPTIME" , "-02:03:04.05" ) ) ; org.junit.Assert.assertTrue ( "1" , comp.validateFieldValue ( "UPTIME" , "1" ) ) ; org.junit.Assert.assertFalse ( "Fer Ever" , comp.validateFieldValue ( "UPTIME" , "FerEver" ) ) ; }

Target:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.VmConditionFieldAutoCompleter ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( comp.validateFieldValue ( "UPTIME" , "-02:03:04.05" ) , "-02:03:04.05" ) ; org.junit.jupiter.api.Assertions.assertTrue ( comp.validateFieldValue ( "UPTIME" , "1" ) , "1" ) ; org.junit.jupiter.api.Assertions.assertFalse ( comp.validateFieldValue ( "UPTIME" , "FerEver" ) , "Fer Ever" ) ; }
Source:
private void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSparse ( ) ) ; org.junit.Assert.assertTrue ( model.isPropagateErrors ( ) ) ; }

Target:
private void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSparse ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isPropagateErrors ( ) ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private void setUpMocksForRemove ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( cmd , hookFound , hook ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServers ( status ) ) ; }

Target:
private void setUpMocksForRemove ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( cmd , hookFound , hook ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServers ( status ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > findPermissionCheckSubjects ( org.ovirt.engine.core.compat.Guid networkId , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = clusterPermissionsFinder.findPermissionCheckSubjects ( clusterId , actionType ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , org.ovirt.engine.core.common.businessentities.ActionGroup.ASSIGN_CLUSTER_NETWORK ) ) ; return permissions ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > findPermissionCheckSubjects ( org.ovirt.engine.core.compat.Guid networkId , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.action.ActionType actionType ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = clusterPermissionsFinder.findPermissionCheckSubjects ( clusterId , actionType ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , org.ovirt.engine.core.common.businessentities.ActionGroup.ASSIGN_CLUSTER_NETWORK ) ) ; return permissions ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskInterface getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; return disk.getDiskInterface ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return diskImage.getStoragesNames ( ) . get ( 0 ) ; }
Source:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }