auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowedInPrepForMaintMode ( org.ovirt.engine.core.common.action.VdcActionType action ) { java.lang.Class < org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > clazz = org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) ) ; if ( clazz.isAnnotationPresent ( org.ovirt.engine.core.bll.DisableInPrepareMode.class ) ) { return getErrorCommandReturnValue ( VdcBllMessages.ENGINE_IS_RUNNING_IN_PREPARE_MODE ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowedInPrepForMaintMode ( org.ovirt.engine.core.common.action.VdcActionType action ) { java.lang.Class < org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > clazz = org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) ) ; if ( clazz.isAnnotationPresent ( org.ovirt.engine.core.bll.DisableInPrepareMode.class ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_PREPARE_MODE ) ; } return null ; }
Source:
private org.ovirt.engine.core.common.businessentities.Cluster getValidCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSnapshotSyncJobTest.CLUSTER_ID_1 ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setCompatibilityVersion ( Version.v3_5 ) ; return cluster ; }

Target:
private org.ovirt.engine.core.common.businessentities.Cluster getValidCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSnapshotSyncJobTest.CLUSTER_ID_1 ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setCompatibilityVersion ( Version.v4_0 ) ; return cluster ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StorageDomainListReturnForXmlRpc reconstructMaster ( java.lang.String spUUID , int hostSpmId , java.lang.String msdUUID , java.lang.String masterVersion ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc resizeStorageDomainPV ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.resizePV" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc ( response ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.networkExists ( ) ) ) ) && ( validate ( validator.vnicProfileNameNotUsed ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.networkExists ( ) ) ) ) && ( validate ( validator.vnicProfileForVmNetworkOnly ( ) ) ) ) && ( validate ( validator.vnicProfileNameNotUsed ( ) ) ) ; }
Source:
public static void GetClusterDesktopMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { 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.storage_domains > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }
Source:
private void clearAsyncTasksWithOutVdsmId ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.CommandBase.getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }
Source:
private void StyleTextBoxEditor ( org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxOnlyEditor editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( ! ( model.getIsChangable ( ) ) ) { editor.setEnabled ( true ) ; com.google.gwt.user.client.ui.ValueBox < java.lang.Object > valueBox = editor.asValueBox ( ) ; valueBox.setReadOnly ( true ) ; valueBox.getElement ( ) . getStyle ( ) . setBorderWidth ( 0 , Style.Unit.PX ) ; } editor.asValueBox ( ) . setTitle ( model.getTitle ( ) ) ; }

Target:
private void StyleTextBoxEditor ( org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( ! ( model.getIsChangable ( ) ) ) { editor.setEnabled ( true ) ; com.google.gwt.user.client.ui.ValueBox < java.lang.String > valueBox = editor.asValueBox ( ) ; valueBox.setReadOnly ( true ) ; valueBox.getElement ( ) . getStyle ( ) . setBorderWidth ( 0 , Style.Unit.PX ) ; } editor.asValueBox ( ) . setTitle ( model.getTitle ( ) ) ; }
Source:
public void testExecuteQueryCommand ( ) { getQuery ( ) . executeQueryCommand ( ) ; java.util.Map < java.lang.String , java.lang.String > serverFingerprintMap = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertNotNull ( serverFingerprintMap ) ; org.junit.Assert.assertEquals ( EXPECTED_MAP , serverFingerprintMap ) ; }

Target:
public void testQuerySuccess ( ) { mockQueryParameters ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.NEW_SERVER , org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.PASSWORD ) ; getQuery ( ) . executeQueryCommand ( ) ; java.util.Map < java.lang.String , java.lang.String > serverFingerprintMap = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertNotNull ( serverFingerprintMap ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.EXPECTED_MAP , serverFingerprintMap ) ; }
Source:
public void testScore ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.HashMap < java.lang.String , java.lang.Integer > result = proxy.score ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME } , new java.lang.Integer [ ] { 2 } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == 2 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) == 100 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) == 100 ) ) ; }

Target:
public void testScore ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.HashMap < java.lang.String , java.lang.Integer > result = proxy.score ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.CLASS_NAME } , new java.lang.Integer [ ] { 2 } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == 2 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) == 100 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) == 100 ) ) ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }

Target:
public void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { runQueryByIdParameter ( VdcQueryType.IsClusterEmpty , aQuery , clusterId ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetClusterByNameQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetClusterByNameQuery.getDbFacade ( ) . getClusterDao ( ) . getByName ( org.ovirt.engine.core.bll.GetClusterByNameQuery.getParameters ( ) . getName ( ) , org.ovirt.engine.core.bll.GetClusterByNameQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetClusterByNameQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetClusterByNameQuery.getQueryReturnValue ( ) . setReturnValue ( clusterDao.getByName ( org.ovirt.engine.core.bll.GetClusterByNameQuery.getParameters ( ) . getName ( ) , org.ovirt.engine.core.bll.GetClusterByNameQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetClusterByNameQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public void onFailure ( final java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.VdcQueryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase > > operationList , final java.lang.Throwable caught ) { try { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute runMultipleQueries: " + caught ) , caught ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , null ) ; failureEventHandler ( caught ) ; callback.executed ( f ) ; } finally { org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent.fire ( this , state ) ; } }

Target:
public void onFailure ( final java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.VdcQueryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase > > operationList , final java.lang.Throwable caught ) { try { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute runMultipleQueries: " + caught ) , caught ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , null ) ; failureEventHandler ( caught ) ; callback.executed ( f ) ; } finally { fireAsyncQueryFailedEvent ( state ) ; } }
Source:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) ; RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }

Target:
private void updateDisksAfterVmRemoved ( ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) , true , false ) ; if ( ! ( diskImages.isEmpty ( ) ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : diskImages ) { disksLeftInVm.add ( diskImage.getDiskAlias ( ) ) ; } AddCustomValue ( "DisksNames" , org.apache.commons.lang.StringUtils.join ( disksLeftInVm , "," ) ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getImageInfoFromVdsm ( final org.ovirt.engine.core.common.businessentities.storage.DiskImage targetImage ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = runVdsCommand ( VDSCommandType.GetImageInfo , new org.ovirt.engine.core.common.vdscommands.GetImageInfoVDSCommandParameters ( targetImage.getStoragePoolId ( ) , targetImage.getStorageIds ( ) . get ( 0 ) , targetImage.getId ( ) , targetImage.getImageId ( ) ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ret.getReturnValue ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.warn ( "Failed to get info of volume '{0}' using GetImageInfo" , targetImage.getImageId ( ) , e ) ; return null ; } }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getImageInfoFromVdsm ( final org.ovirt.engine.core.common.businessentities.storage.DiskImage targetImage ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = runVdsCommand ( VDSCommandType.GetImageInfo , new org.ovirt.engine.core.common.vdscommands.GetImageInfoVDSCommandParameters ( targetImage.getStoragePoolId ( ) , targetImage.getStorageIds ( ) . get ( 0 ) , targetImage.getId ( ) , targetImage.getImageId ( ) ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ret.getReturnValue ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.warn ( "Failed to get info of volume '{}' using GetImageInfo" , targetImage.getImageId ( ) , e ) ; return null ; } }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public void onScroll ( com.google.gwt.event.dom.client.ScrollEvent event ) { int currentScrollPosition = scrollPanel.getVerticalScrollPosition ( ) ; int maxScrollPosition = scrollPanel.getMaximumVerticalScrollPosition ( ) ; if ( currentScrollPosition >= maxScrollPosition ) { int pageSize = getDataDisplayWidget ( ) . getPageSize ( ) ; com.google.gwt.view.client.Range visibleRange = getDataDisplayWidget ( ) . getVisibleRange ( ) ; getDataDisplayWidget ( ) . setVisibleRange ( visibleRange.getStart ( ) , ( ( visibleRange.getLength ( ) ) + pageSize ) ) ; } }

Target:
public void onScroll ( com.google.gwt.event.dom.client.ScrollEvent event ) { if ( ( scrollPanel.getVerticalScrollPosition ( ) ) >= ( scrollPanel.getMaximumVerticalScrollPosition ( ) ) ) { setProperVisibleRange ( ) ; } }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; assertEquals ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN.getBytes ( ) , true ) . toString ( ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; assertEquals ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN.getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) , true ) . toString ( ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }
Source:
public void twoNetworkInterfacesWithEmptyIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; validateAndAssertResult ( listOfInterfaces , true ) ; }

Target:
public void twoNetworkInterfacesWithEmptyIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; listOfInterfaces.add ( org.ovirt.engine.core.common.validation.NoRepetitiveStaticIpInListConstraintTest.createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; validateAndAssertResult ( listOfInterfaces , true ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( domain.getstorage_type ( ) ) . storageDomainRemoved ( domain.getStorageStaticData ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . remove ( domain.getId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( domain.getStorageType ( ) ) . storageDomainRemoved ( domain.getStorageStaticData ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . remove ( domain.getId ( ) ) ; return null ; }
Source:
public void updatePosixNonEmptyVFSType ( ) { 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 ( true ) . when ( command ) . InitializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void updatePosixNonEmptyVFSType ( ) { 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 ( true ) . when ( command ) . initializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void testPatternBasedNameFails ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( initializeMock ( 1 , 1 ) ) ; cmd.getParameters ( ) . getVm ( ) . setName ( "aa-??bb" ) ; org.junit.Assert.assertFalse ( "Pattern-based name should not be supported for VM" , cmd.validateInputs ( ) ) ; }

Target:
public void testStoragePoolDoesntExist ( ) { final int domainSizeGB = 20 ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( domainSizeGB ) ; org.mockito.Mockito.doReturn ( null ) . when ( cmd ) . getStoragePool ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; }
Source:
public void remove ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( ( ( org.ovirt.engine.core.common.businessentities.Provider ) ( getSelectedItem ( ) ) ) ) ) ; }

Target:
public void remove ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( ( ( org.ovirt.engine.core.common.businessentities.Provider ) ( getSelectedItem ( ) ) ) ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getSearchCommand ( ) . execute ( ) ; } } ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { glusterServices = org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getBroker ( ) . glusterServicesList ( org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getParameters ( ) . getServiceNames ( ) . toArray ( new java.lang.String [ 0 ] ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( glusterServices.getServices ( ) ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { glusterServices = org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getBroker ( ) . glusterServicesList ( org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getParameters ( ) . getServiceNames ( ) . toArray ( new java.lang.String [ 0 ] ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesListVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( glusterServices.getServices ( ) ) ; } }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsList = getVMs ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsList ) { org.ovirt.engine.core.bll.VmHandler.updateVmGuestAgentVersion ( vm ) ; } org.ovirt.engine.core.bll.GetAllVmsQueryBase.getQueryReturnValue ( ) . setReturnValue ( vmsList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsList = getVMs ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsList ) { org.ovirt.engine.core.bll.VmHandler.updateVmGuestAgentVersion ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateVmStatistics ( vm ) ; } org.ovirt.engine.core.bll.GetAllVmsQueryBase.getQueryReturnValue ( ) . setReturnValue ( vmsList ) ; }
Source:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > ( ) ; for ( java.lang.String groupFullName : getEntity ( ) . getgroups ( ) . split ( "[,]" , ( - 1 ) ) ) { items.add ( org.ovirt.engine.ui.uicommonweb.models.users.UserGroupListModel.CreateUserGroup ( groupFullName ) ) ; } setItems ( items ) ; } else { setItems ( null ) ; } }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > ( ) ; for ( java.lang.String groupFullName : getEntity ( ) . getgroups ( ) . split ( "[,]" , ( - 1 ) ) ) { items.add ( org.ovirt.engine.ui.uicommonweb.models.users.UserGroupListModel.CreateUserGroup ( groupFullName ) ) ; } setItems ( items ) ; } else { setItems ( null ) ; } }
Source:
public void initTable ( ) { super . initTable ( ) ; getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > portMirroringColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroringEnabled ( ) ) { @ java.lang.Override public java.lang.Boolean getRawValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return object.isPortMirroring ( ) ; } } ; portMirroringColumn.makeSortable ( ) ; getTable ( ) . addColumn ( portMirroringColumn , org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroring ( ) , "85px" ) ; }

Target:
protected void generateIds ( ) { org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.ViewIdHandler.idHandler.generateAndSetIds ( this ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ipConfiguration != null ) && ( ( ipConfiguration.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( ( ( ipConfiguration.getAddress ( ) ) == null ) || ( ( ipConfiguration.getNetmask ( ) ) == null ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ipConfiguration != null ) && ( ( ipConfiguration.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( unsetAddress ( ipConfiguration ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }
Source:
protected org.ovirt.engine.core.bll.scheduling.utils.FindVmAndDestinations getFindVmAndDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.Map < java.lang.String , java.lang.String > parameters ) { final int highUtilization = tryParseWithDefault ( parameters.get ( "HighUtilization" ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.HighUtilizationForPowerSave ) ) ; final long overUtilizedMemory = ( parameters.containsKey ( EvenDistributionBalancePolicyUnit.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( EvenDistributionBalancePolicyUnit.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; return new org.ovirt.engine.core.bll.scheduling.utils.FindVmAndDestinations ( cluster , highUtilization , overUtilizedMemory ) ; }

Target:
protected org.ovirt.engine.core.bll.scheduling.utils.FindVmAndDestinations getFindVmAndDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.Map < java.lang.String , java.lang.String > parameters ) { final int highUtilization = tryParseWithDefault ( parameters.get ( "HighUtilization" ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.HighUtilizationForPowerSave ) ) ; final long overUtilizedMemory = ( parameters.containsKey ( EvenDistributionBalancePolicyUnit.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.parseLong ( parameters.get ( EvenDistributionBalancePolicyUnit.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; return new org.ovirt.engine.core.bll.scheduling.utils.FindVmAndDestinations ( cluster , highUtilization , overUtilizedMemory ) ; }
Source:
protected com.gwtplatform.mvp.shared.proxy.PlaceRequest getSubTabRequest ( ) { org.ovirt.engine.ui.uicommonweb.models.HasEntity < org.ovirt.engine.core.common.businessentities.VDS > activeDetailModel = modelProvider.getModel ( ) . getActiveDetailModel ( ) ; if ( activeDetailModel instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.HostHardwareGeneralModel ) { java.lang.String requestToken = ( ( getMainTabRequest ( ) . getNameToken ( ) ) + ( org.ovirt.engine.ui.uicommonweb.place.WebAdminApplicationPlaces.SUB_TAB_PREFIX ) ) + "general" ; return org.ovirt.engine.ui.common.place.PlaceRequestFactory.get ( requestToken ) ; } else { return super . getSubTabRequest ( ) ; } }

Target:
protected com.gwtplatform.mvp.shared.proxy.PlaceRequest getSubTabRequest ( ) { org.ovirt.engine.ui.uicommonweb.models.HasEntity < ? > activeDetailModel = modelProvider.getModel ( ) . getActiveDetailModel ( ) ; if ( ( activeDetailModel instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.HostHardwareGeneralModel ) || ( activeDetailModel instanceof org.ovirt.engine.ui.uicommonweb.models.AbstractErrataCountModel ) ) { java.lang.String requestToken = ( ( getMainTabRequest ( ) . getNameToken ( ) ) + ( org.ovirt.engine.ui.uicommonweb.place.WebAdminApplicationPlaces.SUB_TAB_PREFIX ) ) + "general" ; return org.ovirt.engine.ui.common.place.PlaceRequestFactory.get ( requestToken ) ; } else { return super . getSubTabRequest ( ) ; } }
Source:
public boolean ValidateStoragePoolConnectionsInHost ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > connections , org.ovirt.engine.core.compat.Guid storagePoolId ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.HashMap < java.lang.String , java.lang.String > validateConnections = ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ValidateStorageServerConnection , new org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters ( vds.getId ( ) , storagePoolId , getType ( ) , connections ) ) . getReturnValue ( ) ) ) ; return IsConnectSucceeded ( validateConnections , connections ) ; }

Target:
public boolean validateStoragePoolConnectionsInHost ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections , org.ovirt.engine.core.compat.Guid storagePoolId ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.HashMap < java.lang.String , java.lang.String > validateConnections = ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ValidateStorageServerConnection , new org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters ( vds.getId ( ) , storagePoolId , getType ( ) , connections ) ) . getReturnValue ( ) ) ) ; return IsConnectSucceeded ( validateConnections , connections ) ; }
Source:
public void testUpdateGlusterHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity existingHook = getGlusterHook ( ) ; existingHook.setName ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME ) ; dao.updateGlusterHook ( getGlusterHook ( ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getById ( FixturesTool.HOOK_ID ) ; org.junit.Assert.assertNotNull ( hook ) ; org.junit.Assert.assertEquals ( existingHook , hook ) ; }

Target:
public void testUpdateGlusterHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity existingHook = getGlusterHook ( ) ; existingHook.setName ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME ) ; dao.updateGlusterHook ( getGlusterHook ( ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getById ( FixturesTool.HOOK_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( hook ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingHook , hook ) ; }
Source:
public void shouldReturnCorrectOsFamiliy ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "RHEV Hypervisor" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "RHEL" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "oVirt Node" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; }

Target:
public void shouldReturnCorrectOsFamiliy ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "RHEV Hypervisor" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "RHEL" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "oVirt Node" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) . getOsFamily ( ) ) . isEqualTo ( "RHEL" ) ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) || ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ) ; }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? java.lang.Math.round ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getActualDiskWithSnapshotsSize ( ) ) : ( ( long ) ( ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) ) ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ? java.lang.Math.round ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object ) ) . getActualDiskWithSnapshotsSize ( ) ) : ( ( long ) ( ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid findImageForSameDrive ( org.ovirt.engine.core.compat.Guid snapshotId ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesFromSanpshot = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDAO ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : imagesFromSanpshot ) { if ( getDiskImage ( ) . getId ( ) . equals ( diskImage.getId ( ) ) ) { return diskImage.getImageId ( ) ; } } return null ; }

Target:
protected org.ovirt.engine.core.compat.Guid findImageForSameDrive ( org.ovirt.engine.core.compat.Guid snapshotId ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesFromSanpshot = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : imagesFromSanpshot ) { if ( getDiskImage ( ) . getId ( ) . equals ( diskImage.getId ( ) ) ) { return diskImage.getImageId ( ) ; } } return null ; }
Source:
public void versionNotSupported ( ) { org.mockito.Mockito.when ( cluster.getcompatibility_version ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.junit.Assert.assertThat ( validator.versionSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( org.ovirt.engine.core.bll.utils.VersionSupport.getUnsupportedVersionMessage ( ) ) ) ; }

Target:
public void versionNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.junit.Assert.assertThat ( validator.versionSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( org.ovirt.engine.core.bll.utils.VersionSupport.getUnsupportedVersionMessage ( ) ) ) ; }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }

Target:
org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) ;
Source:
public void testGetAllInterfacesForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , iface.getVmId ( ) ) ; } }

Target:
public void testGetAllInterfacesForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , iface.getVmId ( ) ) ; } }