auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void getGlusterRebalanceStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeRebalanceStatus , parameters , aQuery ) ; }
Source:
public void testGetAllDiskImageSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Disk" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( diskImageResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllVMSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "VM" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.VM ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > > aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private void cycleRate ( ) { currentRate = ( ( currentRate ) + 1 ) % ( rateCycle.length ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.RATE rate = rateCycle [ currentRate ] ; repetitions = rate.getRepetitions ( ) ; com.google.gwt.core.client.GWT.log ( ( ( ( ( ( ( ( "GridTimer[" + ( name ) ) + "] Rate Cycled: Current Rate: " ) + rate ) + " Reps: " ) + ( repetitions ) ) + " Interval: " ) + ( rate.getInterval ( ) ) ) ) ; start ( ) ; }

Target:
private void cycleRate ( ) { currentRate = ( ( currentRate ) + 1 ) % ( rateCycle.length ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.RATE rate = rateCycle [ currentRate ] ; repetitions = rate.getRepetitions ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( ( ( ( ( "GridTimer[" + ( name ) ) + "] Rate Cycled: Current Rate: " ) + rate ) + " Reps: " ) + ( repetitions ) ) + " Interval: " ) + ( rate.getInterval ( ) ) ) ) ; start ( ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel model ) { splitTable.edit ( model.getProviderNetworks ( ) , model.getImportedNetworks ( ) , null , model.getCancelImportCommand ( ) ) ; dcColumn.edit ( model.getDataCenters ( ) ) ; driver.edit ( model ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel model ) { splitTable.edit ( model.getProviderNetworks ( ) , model.getImportedNetworks ( ) , model.getAddImportCommand ( ) , model.getCancelImportCommand ( ) ) ; dcColumn.edit ( model.getDataCenters ( ) ) ; driver.edit ( model ) ; }
Source:
public void getClustersHavingHosts ( 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 ) { 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 ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , 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 != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
public void testDiskAttachedToVMValid ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; org.junit.Assert.assertThat ( validator.isDiskAttachedToVm ( vm ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testDiskAttachedToVMValid ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; org.junit.Assert.assertThat ( validator.isDiskAttachedToVm ( vm ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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 ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig mapRow ( java.sql.ResultSet rs , int index ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig entity = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; entity.setId ( getGuid ( rs , "id" ) ) ; entity.setNicId ( getGuid ( rs , "nic_id" ) ) ; entity.setAllNetworksAllowed ( rs.getBoolean ( "is_all_networks_allowed" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig mapRow ( java.sql.ResultSet rs , int index ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig entity = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; entity.setId ( getGuid ( rs , "id" ) ) ; entity.setNicId ( getGuid ( rs , "nic_id" ) ) ; entity.setAllNetworksAllowed ( rs.getBoolean ( "is_all_networks_allowed" ) ) ; fillNetworksAndLabelsDataOnConfig ( entity ) ; return entity ; }
Source:
private void setVmWatchdogToParams ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParams ) { org.ovirt.engine.core.common.businessentities.VmWatchdogType wdModel = model.getWatchdogModel ( ) . getSelectedItem ( ) ; updateVmParams.setUpdateWatchdog ( true ) ; if ( wdModel != null ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = new org.ovirt.engine.core.common.businessentities.VmWatchdog ( ) ; vmWatchdog.setAction ( model.getWatchdogAction ( ) . getSelectedItem ( ) ) ; vmWatchdog.setModel ( wdModel ) ; updateVmParams.setWatchdog ( vmWatchdog ) ; } }

Target:
protected boolean validateName ( java.lang.String newVmName , org.ovirt.engine.ui.uicommonweb.models.EntityModel entity , org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] validators ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel temp = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; temp.setIsValid ( true ) ; temp.setEntity ( newVmName ) ; temp.validateEntity ( validators ) ; if ( ! ( temp.getIsValid ( ) ) ) { entity.setInvalidityReasons ( temp.getInvalidityReasons ( ) ) ; entity.setIsValid ( false ) ; } return temp.getIsValid ( ) ; }
Source:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( org.ovirt.engine.core.bll.CommandBase command ) { if ( command.hasTaskHandlers ( ) ) { if ( ( command.getParameters ( ) . getExecutionReason ( ) ) == ( VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return command.getCurrentTaskHandler ( ) . getTaskType ( ) ; } return command.getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return command.getAsyncTaskType ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.createAsyncTask ( command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public int getTabIndex ( ) { return asSuggestBox ( ) . getTabIndex ( ) ; }

Target:
public void setAcceptableValues ( java.util.Collection < java.lang.Object > values ) { java.util.Collection < java.lang.String > stringValues = org.ovirt.engine.ui.uicommonweb.Linq.cast ( values ) ; com.google.gwt.user.client.ui.MultiWordSuggestOracle suggestOracle = ( ( com.google.gwt.user.client.ui.MultiWordSuggestOracle ) ( asSuggestBox ( ) . getSuggestOracle ( ) ) ) ; suggestOracle.clear ( ) ; suggestOracle.addAll ( stringValues ) ; suggestOracle.setDefaultSuggestionsFromText ( stringValues ) ; }
Source:
protected boolean attachUserToSession ( ) { boolean authenticated = true ; if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) ) ) ) { org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ; } else if ( ! ( org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING ) ; authenticated = false ; } return authenticated ; }

Target:
protected boolean attachUserToSession ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) ) ) ) { org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ; } else if ( ! ( org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING ) ; } return true ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc prepareImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID , boolean allowIllegal ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.prepareImage ( sdID , spID , imageID , volumeID , allowIllegal ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( java.util.Collections.emptyList ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( java.util.Collections.emptyList ( ) ) ; verifyNotFoundException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.resource.get ( ) ) ) ; }
Source:
public void edit ( ) { T qos = ( ( T ) ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getSelectedItem ( ) ) ) ; if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.EditQosModel < T , P > qosModel = getEditQosModel ( qos ) ; setWindow ( qosModel ) ; qosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) , getEntity ( ) ) ; }

Target:
public void edit ( ) { T qos = org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getSelectedItem ( ) ; if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel < T , P > qosModel = getEditQosModel ( qos ) ; setWindow ( qosModel ) ; qosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getEntity ( ) ) , org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getEntity ( ) ) ; }
Source:
protected void updateMemoryBalloon ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; boolean hasMemoryBalloon = ( cluster.getcompatibility_version ( ) . compareTo ( VmListModel.BALLOON_DEVICE_MIN_VERSION ) ) >= 0 ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setIsAvailable ( hasMemoryBalloon ) ; } }

Target:
protected void updateMemoryBalloon ( org.ovirt.engine.core.compat.Version clusterVersion ) { boolean hasMemoryBalloon = ( clusterVersion.compareTo ( VmListModel.BALLOON_DEVICE_MIN_VERSION ) ) >= 0 ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setIsAvailable ( hasMemoryBalloon ) ; }
Source:
public static void IsMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetAllProviders ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskSnapshot ( org.ovirt.engine.core.compat.Guid diskId ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextBoolean ( ) , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , 1L , diskId , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskSnapshot ( org.ovirt.engine.core.compat.Guid diskId ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextBoolean ( ) , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , 1L , diskId , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.VmPool pool , java.lang.String value ) { transitionHandler.handlePlaceTransition ( true ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.VmPool pool , java.lang.String value ) { java.util.Map < java.lang.String , java.lang.String > parameters = new java.util.HashMap < > ( ) ; parameters.put ( FragmentParams.NAME.getName ( ) , pool.getName ( ) ) ; getPlaceTransitionHandler ( ) . handlePlaceTransition ( WebAdminApplicationPlaces.poolGeneralSubTabPlace , parameters ) ; }
Source:
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.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void testUpdateSnapshotStatus ( ) { dao.updateSnapshotStatus ( existingSnapshot.getSnapshotId ( ) , GlusterSnapshotStatus.DEACTIVATED ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot = dao.getById ( existingSnapshot.getSnapshotId ( ) ) ; org.junit.Assert.assertNotNull ( snapshot ) ; org.junit.Assert.assertFalse ( snapshot.equals ( existingSnapshot ) ) ; existingSnapshot.setStatus ( GlusterSnapshotStatus.DEACTIVATED ) ; org.junit.Assert.assertEquals ( existingSnapshot , snapshot ) ; }

Target:
public void testUpdateSnapshotStatus ( ) { dao.updateSnapshotStatus ( existingSnapshot.getSnapshotId ( ) , GlusterSnapshotStatus.DEACTIVATED ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot = dao.getById ( existingSnapshot.getSnapshotId ( ) ) ; org.junit.Assert.assertNotNull ( snapshot ) ; org.junit.Assert.assertNotEquals ( snapshot , existingSnapshot ) ; existingSnapshot.setStatus ( GlusterSnapshotStatus.DEACTIVATED ) ; org.junit.Assert.assertEquals ( existingSnapshot , snapshot ) ; }
Source:
public javax.ws.rs.core.Response reorderMacAddresses ( org.ovirt.engine.api.model.Action action ) { getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) , true ) ; final org.ovirt.engine.core.common.action.VmOperationParameterBase params = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( guid ) ; final javax.ws.rs.core.Response response = doAction ( VdcActionType.ReorderVmNics , params , action ) ; return response ; }

Target:
public javax.ws.rs.core.Response reorderMacAddresses ( org.ovirt.engine.api.model.Action action ) { getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) , true ) ; final org.ovirt.engine.core.common.action.VmOperationParameterBase params = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( guid ) ; final javax.ws.rs.core.Response response = doAction ( ActionType.ReorderVmNics , params , action ) ; return response ; }
Source:
protected void setUpGetCertificateInfo ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , BackendHostsResourceTest.CERTIFICATE_SUBJECT ) ; }

Target:
public void testUpdateCantDo ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; resource.setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { "" } , false , true , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" , 409 ) ; } }
Source:
public void testNotEnoughSpaceToMergeSnapshotsWithOneDisk ( ) { spySdValidatorForOneDomain ( ) ; org.mockito.Mockito.when ( diskImageDAO.get ( mockSourceImage ( ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; mockStorageDomainDAOGetForStoragePool ( 3 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertFalse ( "Validation should fail. Free space minus threshold should be smaller then disk size" , cmd.validateStorageDomains ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage mockSourceImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = createDiskImage ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( image ) ) . when ( cmd ) . getSourceImages ( ) ; org.mockito.Mockito.when ( diskImageDAO.get ( image.getImageId ( ) ) ) . thenReturn ( image ) ; return image ; }
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
void initListBoxEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { org.ovirt.engine.core.compat.RpmVersion version = ( ( org.ovirt.engine.core.compat.RpmVersion ) ( object ) ) ; return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextAreaLabelEditor ( ) ; }

Target:
void initListBoxEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.compat.RpmVersion > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.RpmVersion > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.RpmVersion version ) { return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor ( ) ; }
Source:
public void customPropertiesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , network ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; assertInterfaceModified ( helper , iface ) ; }

Target:
public void customPropertiesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , network ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; assertInterfaceModified ( helper , iface ) ; }
Source:
private void testUpdateManagementNetworkChange ( boolean emptyCluster , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > expectedResult ) { org.mockito.Mockito.when ( networkCluster.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroup ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ) . thenReturn ( ( emptyCluster ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDS > emptyList ( ) : java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDS > singletonList ( null ) ) ) ; org.junit.Assert.assertThat ( validator.managementNetworkChange ( ) , expectedResult ) ; }

Target:
private void testUpdateManagementNetworkChange ( boolean emptyCluster , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > expectedResult ) { org.mockito.Mockito.when ( networkCluster.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ) . thenReturn ( ( emptyCluster ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDS > emptyList ( ) : java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDS > singletonList ( null ) ) ) ; org.junit.Assert.assertThat ( validator.managementNetworkChange ( ) , expectedResult ) ; }
Source:
public void testVmRunningStateless ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS ) ) . when ( vmValidator ) . vmNotRunningStateless ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS.name ( ) ) ) ; }

Target:
public void testVmLocked ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_LOCKED ) ) . when ( vmValidator ) . vmNotLocked ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_LOCKED ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { showRemoveBricksStatus ( ) ; disableRemoveBrickStatusPopUpActions ( ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.AsyncTaskStatus checkTaskExist ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedStatusTask ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus returnedStatusTask = null ; if ( cachedStatusTask == null ) { returnedStatusTask = new org.ovirt.engine.core.common.businessentities.AsyncTaskStatus ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.unknown ) ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.errorFormat ( ( "SPMAsyncTask::PollTask: Task '{0}' (Parent Command {1}, Parameters Type {2}) " + "was not found in VDSM, will change its status to unknown." ) , getVdsmTaskId ( ) , getParameters ( ) . getDbAsyncTask ( ) . getActionType ( ) , getParameters ( ) . getClass ( ) . getName ( ) ) ; } else { returnedStatusTask = cachedStatusTask ; } return returnedStatusTask ; }

Target:
protected org.ovirt.engine.core.common.businessentities.AsyncTaskStatus checkTaskExist ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedStatusTask ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus returnedStatusTask = null ; if ( cachedStatusTask == null ) { returnedStatusTask = new org.ovirt.engine.core.common.businessentities.AsyncTaskStatus ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.unknown ) ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.error ( ( "SPMAsyncTask::PollTask: Task '{}' (Parent Command '{}', Parameters Type '{}') " + "was not found in VDSM, will change its status to unknown." ) , getVdsmTaskId ( ) , getParameters ( ) . getDbAsyncTask ( ) . getActionType ( ) , getParameters ( ) . getClass ( ) . getName ( ) ) ; } else { returnedStatusTask = cachedStatusTask ; } return returnedStatusTask ; }
Source:
private void setPanel ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel > list = ( ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel > ) ( object.getKeyValueLines ( ) . getItems ( ) ) ) ; panel.clear ( ) ; widgetList = new java.util.ArrayList < org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel keyValueLineModel : list ) { org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget keyValueLineWidget = new org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget ( ) ; widgetList.add ( keyValueLineWidget ) ; panel.add ( keyValueLineWidget ) ; keyValueLineWidget.edit ( keyValueLineModel ) ; } }

Target:
private void setPanel ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel > list = ( ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel > ) ( object.getKeyValueLines ( ) . getItems ( ) ) ) ; panel.clear ( ) ; widgetList = new java.util.ArrayList < org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel keyValueLineModel : list ) { org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget keyValueLineWidget = new org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget ( ) ; widgetList.add ( keyValueLineWidget ) ; panel.add ( keyValueLineWidget ) ; keyValueLineWidget.edit ( keyValueLineModel ) ; keyValueLineWidget.setEnabled ( enabled ) ; } }
Source:
public void shouldDoNothingWhenSatisfied ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup positiveGroup = createAffinityGroup ( vdsGroup , true , vm1 , vm2 ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup negativeGroup = createAffinityGroup ( vdsGroup , false , vm1 , vm4 ) ; affinityGroups.add ( positiveGroup ) ; affinityGroups.add ( negativeGroup ) ; org.junit.Assert.assertNull ( enforcer.chooseNextVmToMigrate ( vdsGroup ) ) ; }

Target:
public void shouldDoNothingWhenSatisfied ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup positiveGroup = createAffinityGroup ( vdsGroup , true , vm1 , vm2 ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup negativeGroup = createAffinityGroup ( vdsGroup , false , vm1 , vm4 ) ; affinityGroups.add ( positiveGroup ) ; affinityGroups.add ( negativeGroup ) ; org.assertj.core.api.Assertions.assertThat ( enforcer.chooseNextVmToMigrate ( vdsGroup ) ) . isNull ( ) ; }
Source:
public void talendLogs_LOGS_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.samplerunjobs_3_6.SampleRunJobs.TalendException { end_Hash.put ( "talendLogs_LOGS" , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; talendLogs_LOGS_onSubJobError ( exception , errorComponent , globalMap ) ; }

Target:
public void talendLogs_LOGS_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.samplerunjobs_3_6.SampleRunJobs.TalendException { talendLogs_CONSOLE_error ( exception , errorComponent , globalMap ) ; }
Source:
public void clearVdsFromCache ( org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.infoFormat ( "Clearing cache of pool: {0} for problematic entities of VDS: {1}." , _storagePoolId , vdsName ) ; clearDomainFromCache ( null , java.util.Arrays.asList ( vdsId ) ) ; }

Target:
public void clearPoolTimers ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "clear domain error-timers for pool '{}'." , _storagePoolId ) ; for ( java.lang.String jobId : _timers.values ( ) ) { try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.warn ( "failed deleting job '{}'." , jobId ) ; } } }
Source:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , java.lang.String expectedDiskAlias , java.lang.String expectedDiskDescription ) throws java.io.IOException { org.jgroups.util.Util.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , expectedDiskAlias , org.apache.commons.lang.StringUtils.defaultString ( expectedDiskDescription ) ) , org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) ) ; }

Target:
private static java.lang.String generateDiskAliasJsonEntry ( java.lang.String diskAlias ) { return org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.getInstance ( ) . generateJsonField ( "DiskAlias" , diskAlias ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getBroker ( ) . glusterHookEnable ( org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getBroker ( ) . glusterHookEnable ( org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.EnableGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }