auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testExecuteQueryGetAllEntitiesCommand ( ) throws org.ovirt.engine.core.utils.ovf.OvfReaderException { org.mockito.Mockito.when ( getQueryParameters ( ) . getEntityGuidList ( ) ) . thenReturn ( null ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( "Wrong number of Templates in result" , 2 , result.size ( ) ) ; }

Target:
public void testExecuteQueryGetAllEntitiesCommand ( ) throws org.ovirt.engine.core.utils.ovf.OvfReaderException { getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertEquals ( "Wrong number of Templates in result" , 2 , result.size ( ) ) ; }
Source:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RemoveCinderDiskCommandCallback.log.info ( "Volume/Snapshot has been successfully deleted from Cinder. ID: {}" , getDiskId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RemoveCinderDiskCommandCallback.getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RemoveCinderDiskCommandCallback.log.info ( "Volume/Snapshot has been successfully deleted from Cinder. ID: {}" , getDiskId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RemoveCinderDiskCommandCallback.getCommand ( ) . endAction ( ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveDisk , org.ovirt.engine.core.common.action.RemoveDiskParameters.class , new java.lang.String [ ] { "EntityId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveDisk , org.ovirt.engine.core.common.action.RemoveDiskParameters.class , new java.lang.String [ ] { "EntityId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public boolean invokeAsString ( com.google.gwt.core.client.JsArray < ? > args , org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ErrorHandler errorHandler ) { clearResultInformation ( ) ; return function.invoke ( args , JsFunction.RESULT_TYPE_STRING , new org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ResultHandler < java.lang.String > ( ) { @ java.lang.Override public void onResult ( java.lang.String result ) { org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.this . resultValue = result ; org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.this . resultType = JsFunction.RESULT_TYPE_STRING ; } } , errorHandler ) ; }

Target:
public boolean invokeAsString ( com.google.gwt.core.client.JsArray < ? > args , org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ErrorHandler errorHandler ) { clearResultInformation ( ) ; return function.invoke ( args , JsFunction.RESULT_TYPE_STRING , ( java.lang.String result ) -> { this . resultValue = result ; this . resultType = JsFunction.RESULT_TYPE_STRING ; } , errorHandler ) ; }
Source:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; if ( ( vmDynamicToSave ) != null ) { vmsMonitoring.addVmDynamicToList ( vmDynamicToSave ) ; } }

Target:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true , getEntity ( 0 ) ) ; control.replay ( ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true , getEntity ( 0 ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private void detachLabeledNetworksFromClusterHosts ( ) { final org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter attachNetworkToClusterParameter = org.ovirt.engine.core.bll.network.cluster.DetachNetworkToClusterCommand.getParameters ( ) ; runInternalAction ( VdcActionType.PropagateLabeledNetworksToClusterHosts , new org.ovirt.engine.core.common.action.ManageNetworkClustersParameters ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkCluster > emptyList ( ) , java.util.Collections.singleton ( attachNetworkToClusterParameter.getNetworkCluster ( ) ) ) ) ; }

Target:
private void detachLabeledNetworksFromClusterHosts ( ) { final org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter attachNetworkToClusterParameter = org.ovirt.engine.core.bll.network.cluster.DetachNetworkToClusterCommand.getParameters ( ) ; runInternalAction ( VdcActionType.PropagateLabeledNetworksToClusterHosts , new org.ovirt.engine.core.common.action.ManageNetworkClustersParameters ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkCluster > emptyList ( ) , new java.util.ArrayList ( java.util.Collections.singleton ( attachNetworkToClusterParameter.getNetworkCluster ( ) ) ) ) ) ; }
Source:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = loadedEntries.get ( name ) ; if ( entry == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "No configuration was found for extension named '%1$s'" , name ) ) ; } if ( ! ( entry.activated ) ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Extension '%1$s' is not active" , name ) ) ; } return entry.extension ; }

Target:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = loadedEntries.get ( name ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy result = null ; if ( ( entry != null ) && ( entry.activated ) ) { result = entry.extension ; } return result ; }
Source:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }

Target:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.warnFormat ( logMessage ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( mCurrentVdsId ) ; logable.setStorageDomainId ( masterDomainId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.SYSTEM_MASTER_DOMAIN_NOT_IN_SYNC ) ; return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , storagePoolId , false ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.warnFormat ( logMessage ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( mCurrentVdsId ) ; logable.setStorageDomainId ( masterDomainId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.SYSTEM_MASTER_DOMAIN_NOT_IN_SYNC ) ; return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , storagePoolId , false , true ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = queryReturnValue.getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; clearError ( ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = queryReturnValue.getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.api.model.Disk > ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }
Source:
private boolean shouldUpdateStorageDisk ( ) { return ( ( ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Move ) ) || ( ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getParentCommand ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.ImportVm ) ) ) || ( ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getParentCommand ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.ImportVmTemplate ) ) ; }

Target:
private boolean shouldUpdateStorageDisk ( ) { return ( ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Move ) ) || ( ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getParentCommand ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.ImportVm ) ) ; }
Source:
public org.ovirt.engine.api.model.GlusterHook get ( ) { org.ovirt.engine.api.model.GlusterHook hook = performGet ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( guid , true ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.GetGlusterHookContent , new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( guid ) ) ; if ( ( ( result != null ) && ( result.getSucceeded ( ) ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { hook.setContent ( ( ( java.lang.String ) ( result.getReturnValue ( ) ) ) ) ; } return hook ; }

Target:
public org.ovirt.engine.api.model.GlusterHook get ( ) { org.ovirt.engine.api.model.GlusterHook hook = performGet ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( guid , true ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.GetGlusterHookContent , new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( guid ) ) ; if ( ( ( result != null ) && ( result.getSucceeded ( ) ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { hook.setContent ( result.getReturnValue ( ) ) ; } return hook ; }
Source:
public void init ( ) { org.mockito.Mockito.doReturn ( getClusters ( ) ) . when ( clusterDao ) . getAll ( ) ; org.mockito.Mockito.doReturn ( provider ) . when ( tasksSyncJob ) . getProvider ( ) ; org.mockito.Mockito.doReturn ( taskUtils ) . when ( tasksSyncJob ) . getGlusterTaskUtils ( ) ; }

Target:
public void init ( ) { org.mockito.Mockito.doReturn ( getClusters ( ) ) . when ( clusterDao ) . getAll ( ) ; org.mockito.Mockito.doReturn ( taskUtils ) . when ( tasksSyncJob ) . getGlusterTaskUtils ( ) ; }
Source:
public void addPosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addPosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void validateNotEnoughSpace ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void validateNotEnoughSpace ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; mockStorageDomainValidatorWithoutSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public void testValidateVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void testValidateVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.dao.network.VmNicDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.VmNicDao.class ) ; org.mockito.Mockito.doReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) ) . when ( dao ) . getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.N , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }

Target:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.dao.network.VmNicDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.VmNicDao.class ) ; org.mockito.Mockito.doReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) ) . when ( dao ) . getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.N , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) , null ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = ( ( ( ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkStoragePool ( ) ) && ( checkStoragePoolStatusNotEqual ( StoragePoolStatus.Uninitialized , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ) ) && ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkStorageDomain ( ) ) ) && ( storageDomainStatusIsValid ( ) ) ) && ( ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) || ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkMasterDomainIsUp ( ) ) ) ) && ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkForActiveVds ( ) ) != null ) ; return returnValue ; }

Target:
protected boolean validate ( ) { boolean returnValue = ( ( ( ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkStoragePool ( ) ) && ( checkStoragePoolStatusNotEqual ( StoragePoolStatus.Uninitialized , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ) ) && ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkStorageDomain ( ) ) ) && ( storageDomainStatusIsValid ( ) ) ) && ( ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) || ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkMasterDomainIsUp ( ) ) ) ) && ( ( org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand.checkForActiveVds ( ) ) != null ) ; return returnValue ; }
Source:
private static java.lang.Double AssignDoubleValue ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct input , java.lang.String name ) { java.lang.Double returnValue = null ; if ( input.containsKey ( name ) ) { java.lang.String stringValue = ( ( java.lang.String ) ( ( ( input.getItem ( name ) ) instanceof java.lang.String ) ? input.getItem ( name ) : null ) ) ; returnValue = ( stringValue == null ) ? null : java.lang.Double.parseDouble ( stringValue ) ; } return returnValue ; }

Target:
private static java.lang.Double AssignDoubleValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { java.lang.Double returnValue = null ; if ( input.containsKey ( name ) ) { java.lang.String stringValue = ( ( java.lang.String ) ( ( ( input.get ( name ) ) instanceof java.lang.String ) ? input.get ( name ) : null ) ) ; returnValue = ( stringValue == null ) ? null : java.lang.Double.parseDouble ( stringValue ) ; } return returnValue ; }
Source:
public java.util.List < java.lang.String > convert ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > source ) { if ( source != null ) { java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : source ) { if ( desiredImage ( repoImage ) ) { fileNameList.add ( transform ( fileNameList , repoImage ) ) ; } } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; return fileNameList ; } return new java.util.ArrayList < > ( ) ; }

Target:
public java.util.List < java.lang.String > convert ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > source ) { if ( source != null ) { java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : source ) { if ( desiredImage ( repoImage ) ) { fileNameList.add ( transform ( repoImage ) ) ; } } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; return fileNameList ; } return new java.util.ArrayList < > ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( ) { if ( ( selectedActiveDisks ) == null ) { selectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) , true , true ) ; } return selectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( ) { if ( ( selectedActiveDisks ) == null ) { selectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) , true , true ) ; } return selectedActiveDisks ; }
Source:
private void _writeFile ( java.io.File file , java.lang.String content , boolean executable ) throws java.io.IOException { java.io.File f = file.getParentFile ( ) ; if ( f == null ) { throw new java.io.IOException ( ( "File not found " + f ) ) ; } f.mkdirs ( ) ; try ( java.io.OutputStream os = new java.io.FileOutputStream ( file ) ) { os.write ( content.getBytes ( "UTF-8" ) ) ; file.setExecutable ( executable ) ; } }

Target:
private void _writeFile ( java.io.File file , java.lang.String content , boolean executable ) throws java.io.IOException { java.io.File f = file.getParentFile ( ) ; if ( f == null ) { throw new java.io.IOException ( ( "File not found " + f ) ) ; } if ( ! ( f.mkdirs ( ) ) ) { } try ( java.io.OutputStream os = new java.io.FileOutputStream ( file ) ) { os.write ( content.getBytes ( "UTF-8" ) ) ; file.setExecutable ( executable ) ; } }
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.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; } return new java.util.ArrayList < > ( ) ; }
Source:
public void setZeroValue ( ) { percentageBarB.setVisible ( false ) ; percentageBarB.setWidth ( "0px" ) ; percentageBarA.setVisible ( true ) ; tooltip.setHtml ( tooltipText ) ; tooltip.reconfigure ( ) ; percentageBarA.setStyleName ( style.empty ( ) ) ; percentageBarA.setWidth ( ( ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.FULL_WIDTH ) + "%" ) ) ; percentageLabelA.setText ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.ZERO ) ; percentageLabelA.setStyleName ( style.percentageLabelBlack ( ) ) ; }

Target:
public void setZeroValue ( ) { percentageBarB.setVisible ( false ) ; percentageBarB.setWidth ( "0px" ) ; percentageBarA.setVisible ( true ) ; tooltip.setHtml ( tooltipText ) ; percentageBarA.setStyleName ( style.empty ( ) ) ; percentageBarA.setWidth ( ( ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.FULL_WIDTH ) + "%" ) ) ; percentageLabelA.setText ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.ZERO ) ; percentageLabelA.setStyleName ( style.percentageLabelBlack ( ) ) ; }
Source:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel , java.lang.Object ... params ) { assert op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel ; assert op2 == null ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel bondModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel ) ( op1 ) ) ; dataFromHostSetupNetworksModel.removeBondFromParameters ( bondModel.getCreateOrUpdateBond ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachAllNetworks ( bondModel , dataFromHostSetupNetworksModel ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachAllLabels ( bondModel , dataFromHostSetupNetworksModel ) ; }

Target:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel , java.lang.Object ... params ) { assert op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel ; assert op2 == null ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel bondModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.BondNetworkInterfaceModel ) ( op1 ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachAllLabels ( bondModel , dataFromHostSetupNetworksModel ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachAllNetworks ( bondModel , dataFromHostSetupNetworksModel ) ; dataFromHostSetupNetworksModel.removeBondFromParameters ( bondModel.getCreateOrUpdateBond ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; java.util.HashMap < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > map = ( ( java.util.HashMap < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; templates.add ( map.get ( true ) ) ; searchableListModel.setItems ( templates ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.HashMap < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > map = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; templates.add ( map.get ( true ) ) ; setItems ( templates ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel adElementListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel ) ( model ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) ; if ( handleQueryError ( queryReturnValue , adElementListModel ) ) { return ; } setusers ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > ( ) ) ; addUsersToModel ( queryReturnValue , getExcludeUsers ( ) ) ; onAdUsersLoaded ( adElementListModel ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue ) { if ( handleQueryError ( queryReturnValue ) ) { return ; } setusers ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > ( ) ) ; addUsersToModel ( queryReturnValue , getExcludeUsers ( ) ) ; onAdUsersLoaded ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.quota.QuotaVmListModel vmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaVmListModel ) ( model ) ) ; vmModel.setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; vmModel.setIsEmpty ( ( ( ( ( java.util.List ) ( vmModel.getItems ( ) ) ) . size ( ) ) == 0 ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( returnValue.getReturnValue ( ) ) ) ) ; setIsEmpty ( ( ( ( ( java.util.List ) ( getItems ( ) ) ) . size ( ) ) == 0 ) ) ; }
Source:
public static void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.nicHotplugSupportMap = ( ( java.util.Map < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > , java.lang.Boolean > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }

Target:
public static void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.nicHotplugSupportMap = ( ( java.util.Map < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > , java.lang.Boolean > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( ( ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) . getStoragePoolId ( ) ) == null ? null : org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) . getStoragePoolId ( ) . getValue ( ) ) , org.ovirt.engine.core.common.VdcObjectType.StoragePool , org.ovirt.engine.core.bll.AddVdsGroupCommand.getActionType ( ) . getActionGroup ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.common.VdcObjectType.StoragePool , org.ovirt.engine.core.bll.AddVdsGroupCommand.getActionType ( ) . getActionGroup ( ) ) ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < java.lang.Integer > nums = new java.util.ArrayList < > ( ) ; if ( source != null ) { java.lang.Iterable numEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator numIterator = numEnumerable.iterator ( ) ; while ( numIterator.hasNext ( ) ) { nums.add ( java.lang.Integer.parseInt ( numIterator.next ( ) . toString ( ) ) ) ; } } return nums ; }

Target:
public java.util.List < java.lang.Integer > convert ( java.lang.Object source ) { java.util.ArrayList < java.lang.Integer > nums = new java.util.ArrayList < > ( ) ; if ( source != null ) { java.lang.Iterable numEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator numIterator = numEnumerable.iterator ( ) ; while ( numIterator.hasNext ( ) ) { nums.add ( java.lang.Integer.parseInt ( numIterator.next ( ) . toString ( ) ) ) ; } } return nums ; }
Source:
public boolean invokeAsNumber ( com.google.gwt.core.client.JsArray < ? > args , org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ErrorHandler errorHandler ) { clearResultInformation ( ) ; return function.invoke ( args , JsFunction.RESULT_TYPE_NUMBER , new org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ResultHandler < java.lang.Double > ( ) { @ java.lang.Override public void onResult ( java.lang.Double result ) { org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.this . resultValue = result ; org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.this . resultType = JsFunction.RESULT_TYPE_NUMBER ; } } , errorHandler ) ; }

Target:
public boolean invokeAsNumber ( com.google.gwt.core.client.JsArray < ? > args , org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ErrorHandler errorHandler ) { clearResultInformation ( ) ; return function.invoke ( args , JsFunction.RESULT_TYPE_NUMBER , ( java.lang.Double result ) -> { this . resultValue = result ; this . resultType = JsFunction.RESULT_TYPE_NUMBER ; } , errorHandler ) ; }
Source:
public synchronized void StopStoragePoolTasks ( final org.ovirt.engine.core.common.businessentities.storage_pool sp ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to get and stop tasks on storage pool '{0}'" , sp.getname ( ) ) ; AddStoragePoolExistingTasks ( sp ) ; java.util.List < org.ovirt.engine.core.bll.SPMAsyncTask > list = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( _tasks.values ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.bll.SPMAsyncTask > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.bll.SPMAsyncTask a ) { return a.getStoragePoolID ( ) . equals ( sp.getId ( ) ) ; } } ) ; for ( org.ovirt.engine.core.bll.SPMAsyncTask task : list ) { task.stopTask ( ) ; } }

Target:
public synchronized void StopStoragePoolTasks ( final org.ovirt.engine.core.common.businessentities.StoragePool sp ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to get and stop tasks on storage pool '{0}'" , sp.getname ( ) ) ; AddStoragePoolExistingTasks ( sp ) ; java.util.List < org.ovirt.engine.core.bll.SPMAsyncTask > list = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( _tasks.values ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.bll.SPMAsyncTask > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.bll.SPMAsyncTask a ) { return a.getStoragePoolID ( ) . equals ( sp.getId ( ) ) ; } } ) ; for ( org.ovirt.engine.core.bll.SPMAsyncTask task : list ) { task.stopTask ( ) ; } }
Source:
private void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
private void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
protected javax.ws.rs.core.Response performRemove ( java.lang.String id ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; if ( ! ( affinityGroup.getEntityIds ( ) . remove ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( id ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }

Target:
protected javax.ws.rs.core.Response performRemove ( java.lang.String id ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; if ( ! ( affinityGroup.getEntityIds ( ) . remove ( asGuid ( id ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }
Source:
private boolean isRunningConfigurationNeeded ( ) { return ( ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValidForVmDevices ( getVmId ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) ) ) ) ; }

Target:
private boolean isRunningConfigurationNeeded ( ) { return ( ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValidForVmDevices ( getVmId ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) ) ) ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }
Source:
protected int getMaxClonedNameLength ( java.lang.Object object ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( vm.getOs ( ) ) ? org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getMaxVmNameLengthWin ( ) : org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getMaxVmNameLengthNonWin ( ) ; }

Target:
protected int getMaxClonedNameLength ( java.lang.Object object ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isWindowsOsType ( vm.getOs ( ) ) ? org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmNameLengthWin ( ) : org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmNameLengthNonWin ( ) ; }
Source:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }