auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testExecuteNoTaskHandlers ( ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameterMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ; org.mockito.Mockito.when ( parameterMock.getTransactionScopeOption ( ) ) . thenReturn ( TransactionScopeOption.Required ) ; org.mockito.Mockito.when ( parameterMock.getLockProperties ( ) ) . thenReturn ( org.ovirt.engine.core.common.action.LockProperties.create ( LockProperties.Scope.None ) ) ; org.ovirt.engine.core.bll.CommandBase < org.ovirt.engine.core.common.action.VdcActionParametersBase > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.CommandBaseTest.CommandBaseDummy ( parameterMock ) ) ; command.insertAsyncTaskPlaceHolders ( ) ; command.executeAction ( ) ; org.mockito.Mockito.verify ( command ) . executeCommand ( ) ; }

Target:
public void testExecuteNoTaskHandlers ( ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameterMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ; org.mockito.Mockito.when ( parameterMock.getTransactionScopeOption ( ) ) . thenReturn ( TransactionScopeOption.Required ) ; org.mockito.Mockito.when ( parameterMock.getLockProperties ( ) ) . thenReturn ( org.ovirt.engine.core.common.action.LockProperties.create ( LockProperties.Scope.None ) ) ; org.ovirt.engine.core.bll.CommandBase < org.ovirt.engine.core.common.action.VdcActionParametersBase > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.CommandBaseTest.CommandBaseDummy ( parameterMock ) ) ; command.executeAction ( ) ; org.mockito.Mockito.verify ( command ) . executeCommand ( ) ; }
Source:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.setProtocol ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.HostProtocol.class ) . value ( ) ) ; from.getSpm ( ) . setPriority ( 3 ) ; from.getPowerManagement ( ) . setPmProxies ( new org.ovirt.engine.api.model.PmProxies ( ) ) ; return from ; }

Target:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.setProtocol ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.HostProtocol.class ) ) ; from.getSpm ( ) . setPriority ( 3 ) ; from.getPowerManagement ( ) . setPmProxies ( new org.ovirt.engine.api.model.PmProxies ( ) ) ; return from ; }
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.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 ( ) ) ; }

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.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 static java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice.Source > mapRngSources ( java.util.List < java.lang.String > model ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice.Source > result = new java.util.ArrayList < > ( ( model != null ? model.size ( ) : 0 ) ) ; if ( model != null ) { for ( java.lang.String sourceString : model ) { try { org.ovirt.engine.api.model.RngSource source = org.ovirt.engine.api.model.RngSource.fromValue ( sourceString ) ; result.add ( org.ovirt.engine.api.restapi.types.RngDeviceMapper.map ( source , null ) ) ; } catch ( java.lang.IllegalArgumentException iae ) { } } } return result ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice.Source > mapRngSources ( java.util.List < org.ovirt.engine.api.model.RngSource > model ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice.Source > result = new java.util.ArrayList ( ( model != null ? model.size ( ) : 0 ) ) ; if ( model != null ) { for ( org.ovirt.engine.api.model.RngSource source : model ) { result.add ( org.ovirt.engine.api.restapi.types.RngDeviceMapper.map ( source , null ) ) ; } } return result ; }
Source:
public void poll ( ) { if ( ( this . manager.isMonitoringNeeded ( ) ) && ( getRefreshStatistics ( ) ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this . manager ) ; long fetchTime = java.lang.System.nanoTime ( ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this . manager , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , this . auditLogDirector , fetchTime ) . perform ( ) ; } updateIteration ( ) ; }

Target:
public void poll ( ) { }
Source:
protected void updateTemplate ( ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalNewTemplateVmModelBehavior.CREATE_VM ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) . getHash ( ) ) ; }

Target:
protected void updateTemplate ( ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalNewTemplateVmModelBehavior.CREATE_VM ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getBaseInterface ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > hostNics = org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.UpdateNetworkValidator.getDbFacade ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( vlan.getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface hostNic : hostNics ) { if ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( vlan.getName ( ) , hostNic.getName ( ) ) ) { return hostNic ; } } throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.LABELED_NETWORK_INTERFACE_NOT_FOUND ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getBaseInterface ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > hostNics = org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.UpdateNetworkValidator.getDbFacade ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( vlan.getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface hostNic : hostNics ) { if ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( vlan , hostNic.getName ( ) ) ) { return hostNic ; } } throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.LABELED_NETWORK_INTERFACE_NOT_FOUND ) ; }
Source:
private void updateSuggestedDiskAlias ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getNextAvailableDiskAliasNameByVMId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String suggestedDiskAlias = ( ( java.lang.String ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( model ) ) ; diskModel.getAlias ( ) . setEntity ( suggestedDiskAlias ) ; } } , getHash ( ) ) , getVm ( ) . getId ( ) ) ; }

Target:
private void updateSuggestedDiskAlias ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNextAvailableDiskAliasNameByVMId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String suggestedDiskAlias = ( ( java.lang.String ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( model ) ) ; diskModel.getAlias ( ) . setEntity ( suggestedDiskAlias ) ; } } , getHash ( ) ) , getVm ( ) . getId ( ) ) ; }
Source:
public void validateSucceedsWhenGlusterServerHasPeersThatExistInDB ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void validateSucceedsWhenGlusterServerHasPeersThatExistInDB ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
public void testBootProtocolSetForRoleNetworkWhenBootProtocolIsDhcp ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( Ipv4BootProtocol.DHCP , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , false , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForRoleNetworkWhenBootProtocolIsDhcp ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpv4Configuration ( Ipv4BootProtocol.DHCP ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , false , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }
Source:
public static void getClusterListByName ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public void getClusterListByName ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImages ( ) { if ( ( images ) == null ) { images = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . getImageIds ( ) ) { if ( imageId == null ) { continue ; } images.add ( getDiskImageDao ( ) . getSnapshotById ( imageId ) ) ; } } return images ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImages ( ) { if ( ( images ) == null ) { images = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . getImageIds ( ) ) { if ( imageId == null ) { continue ; } org.ovirt.engine.core.common.businessentities.DiskImage image = getDiskImageDao ( ) . getSnapshotById ( imageId ) ; if ( image != null ) { images.add ( image ) ; } } } return images ; }
Source:
protected void buildVmBootSequence ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmId ( vm.getId ( ) ) ; java.lang.String bootSeqInDB = org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getBootSequence ( devices ) . toString ( ) . toLowerCase ( ) ; java.lang.String bootSeqInBE = vm.getboot_sequence ( ) . toString ( ) . toLowerCase ( ) ; if ( bootSeqInBE.equals ( bootSeqInDB ) ) createInfo.add ( VdsProperties.Boot , bootSeqInDB ) ; else createInfo.add ( VdsProperties.Boot , bootSeqInBE ) ; }

Target:
protected void buildVmBootSequence ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmId ( vm.getId ( ) ) ; java.lang.String bootSeqInDB = org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getBootSequence ( devices ) . toString ( ) . toLowerCase ( ) ; java.lang.String bootSeqInBE = vm.getBootSequence ( ) . toString ( ) . toLowerCase ( ) ; if ( bootSeqInBE.equals ( bootSeqInDB ) ) createInfo.add ( VdsProperties.Boot , bootSeqInDB ) ; else createInfo.add ( VdsProperties.Boot , bootSeqInBE ) ; }
Source:
private boolean hostExists ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > glusterServers , org.ovirt.engine.core.common.businessentities.VDS server ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer : glusterServers ) { if ( glusterServer.getHostnameOrIp ( ) . equals ( server.gethost_name ( ) ) ) { return true ; } for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface vdsNwInterface : getVdsInterfaces ( server.getId ( ) ) ) { if ( glusterServer.getHostnameOrIp ( ) . equals ( vdsNwInterface.getAddress ( ) ) ) { return true ; } } } return false ; }

Target:
private boolean hostExists ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > glusterServers , org.ovirt.engine.core.common.businessentities.VDS server ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer : glusterServers ) { if ( glusterServer.getHostnameOrIp ( ) . equals ( server.gethost_name ( ) ) ) { return true ; } for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNwInterface : getVdsInterfaces ( server.getId ( ) ) ) { if ( glusterServer.getHostnameOrIp ( ) . equals ( vdsNwInterface.getAddress ( ) ) ) { return true ; } } } return false ; }
Source:
private org.ovirt.engine.core.compat.Guid getProxyHostIdFromParameters ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = vdsDao.get ( org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getProxyHostId ( ) ) ; if ( vds == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "No VDS with the given ID '%s' exists" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getProxyHostId ( ) ) ) ; } if ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { logHostCannotBeProxy ( vds.getName ( ) ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vds.getId ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid getProxyHostIdFromParameters ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = vdsDao.get ( org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getProxyHostId ( ) ) ; if ( vds == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "No VDS with the given ID '%s' exists" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getProxyHostId ( ) ) ) ; } if ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { logHostCannotBeProxy ( vds ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vds.getId ( ) ; }
Source:
private void refreshClusterData ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { org.ovirt.engine.core.bll.gluster.GlusterManager.log.debugFormat ( "Refreshing Gluster lightweight Data for cluster {0}" , cluster.getname ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers = getVdsDao ( ) . getAllForVdsGroup ( cluster.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS upServer = getClusterUtils ( ) . getUpServer ( cluster.getId ( ) ) ; if ( upServer == null ) { org.ovirt.engine.core.bll.gluster.GlusterManager.log.debugFormat ( "No server UP in cluster {0}. Can't refresh it's data at this point." , cluster.getname ( ) ) ; return ; } refreshServerData ( cluster , upServer , existingServers ) ; refreshVolumeData ( cluster , upServer , existingServers ) ; }

Target:
private void refreshClusterData ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { log.debugFormat ( "Refreshing Gluster lightweight Data for cluster {0}" , cluster.getname ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers = getVdsDao ( ) . getAllForVdsGroup ( cluster.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS upServer = getClusterUtils ( ) . getUpServer ( cluster.getId ( ) ) ; if ( upServer == null ) { log.debugFormat ( "No server UP in cluster {0}. Can't refresh it's data at this point." , cluster.getname ( ) ) ; return ; } refreshServerData ( cluster , upServer , existingServers ) ; refreshVolumeData ( cluster , upServer , existingServers ) ; }
Source:
public java.util.SortedSet < java.lang.String > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.SortedSet < java.lang.String > sortedSet = new java.util.TreeSet < java.lang.String > ( new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; sortedSet.addAll ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; return sortedSet ; }

Target:
public java.util.SortedSet < java.lang.String > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.SortedSet < java.lang.String > sortedSet = new java.util.TreeSet ( new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; sortedSet.addAll ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; return sortedSet ; }
Source:
public void testAddIncompleteParametersNoPermits ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Role model = new org.ovirt.engine.api.model.Role ( ) ; model.setName ( NAMES [ 0 ] . toString ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Role" , "add" , "permits.id" ) ; } }

Target:
public void testAddIncompleteParametersNoPermits ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Role model = new org.ovirt.engine.api.model.Role ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Role" , "add" , "permits.id" ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { com.woorea.openstack.quantum.model.Networks networks = execute ( getClient ( ) . networks ( ) . list ( ) ) ; return map ( networks.getList ( ) ) ; }
Source:
private static org.apache.commons.httpclient.HttpClient createHttpClient ( int clientRetries ) { org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient ( new org.apache.commons.httpclient.MultiThreadedHttpConnectionManager ( ) ) ; int retries = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.vdsRetries ) ; org.apache.commons.httpclient.HttpMethodRetryHandler handler = new org.apache.commons.httpclient.DefaultHttpMethodRetryHandler ( retries , false ) ; org.apache.commons.httpclient.params.HttpClientParams parameters = client.getParams ( ) ; parameters.setParameter ( HttpMethodParams.RETRY_HANDLER , handler ) ; return client ; }

Target:
private static org.apache.commons.httpclient.HttpClient createHttpClient ( int clientRetries ) { org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient ( new org.apache.commons.httpclient.MultiThreadedHttpConnectionManager ( ) ) ; int retries = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.vdsRetries ) ; org.apache.commons.httpclient.HttpMethodRetryHandler handler = new org.apache.commons.httpclient.DefaultHttpMethodRetryHandler ( retries , false ) ; org.apache.commons.httpclient.params.HttpClientParams parameters = client.getParams ( ) ; parameters.setParameter ( HttpMethodParams.RETRY_HANDLER , handler ) ; return client ; }
Source:
protected void addVmNetwork ( ) { org.ovirt.engine.core.bll.network.vm.VnicProfileHelper vnicProfileHelper = new org.ovirt.engine.core.bll.network.vm.VnicProfileHelper ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroupId ( ) , getStoragePoolId ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroup ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.common.AuditLogType.ADD_VM_FROM_SNAPSHOT_INVALID_INTERFACES ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : vmFromConfiguration.getInterfaces ( ) ) { vnicProfileHelper.updateNicWithVnicProfileForUser ( iface , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getCurrentUser ( ) . getUserId ( ) ) ; } vnicProfileHelper.auditInvalidInterfaces ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmName ( ) ) ; super . addVmNetwork ( ) ; }

Target:
protected void addVmNetwork ( ) { org.ovirt.engine.core.bll.network.vm.VnicProfileHelper vnicProfileHelper = new org.ovirt.engine.core.bll.network.vm.VnicProfileHelper ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroupId ( ) , getStoragePoolId ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroup ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.common.AuditLogType.ADD_VM_FROM_SNAPSHOT_INVALID_INTERFACES ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : vmFromConfiguration.getInterfaces ( ) ) { vnicProfileHelper.updateNicWithVnicProfileForUser ( iface , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getCurrentUser ( ) ) ; } vnicProfileHelper.auditInvalidInterfaces ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmName ( ) ) ; super . addVmNetwork ( ) ; }
Source:
public void onSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getNetworkConnectivityCheckTimeoutInSeconds ( new org.ovirt.engine.ui.frontend.AsyncQuery ( sourceListModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { getConnectivityTimeout ( ) . setEntity ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; postOnSetupNetworks ( ) ; } } ) ) ; }

Target:
public void onSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkConnectivityCheckTimeoutInSeconds ( new org.ovirt.engine.ui.frontend.AsyncQuery ( sourceListModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { getConnectivityTimeout ( ) . setEntity ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; postOnSetupNetworks ( ) ; } } ) ) ; }
Source:
protected java.lang.Object getEntityId ( java.lang.Object entity ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( entity ) ) ; org.ovirt.engine.core.common.businessentities.storage_domains storageDomain = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( diskModel.getStorageDomain ( ) . getSelectedItem ( ) ) ) ; return ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskModel.getDisk ( ) ) ) . getImageId ( ) . toString ( ) ) + ( storageDomain.getId ( ) . toString ( ) ) ; }

Target:
protected java.lang.Object getEntityId ( java.lang.Object entity ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( entity ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( diskModel.getStorageDomain ( ) . getSelectedItem ( ) ) ) ; return ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskModel.getDisk ( ) ) ) . getImageId ( ) . toString ( ) ) + ( storageDomain.getId ( ) . toString ( ) ) ; }
Source:
private void updateShareableDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.ShareableDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupported ( ) ) ; getIsShareable ( ) . setIsChangable ( ( isShareableDiskEnabled && ( isEditEnabled ( ) ) ) ) ; }

Target:
private void updateShareableDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.ShareableDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupported ( ) ) ; getIsShareable ( ) . setIsChangable ( ( isShareableDiskEnabled && ( isEditEnabled ( ) ) ) ) ; }
Source:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
protected void initGraphicsConsoles ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } initGraphicsConsoles ( osType , cluster.getCompatibilityVersion ( ) ) ; }

Target:
protected void initGraphicsConsoles ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } initGraphicsConsoles ( osType , getCompatibilityVersion ( ) ) ; }
Source:
public void test64BitMemoryExceedsLimit ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_0 ) ; vm.setVmMemSizeMb ( ( ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest.MEMORY_LIMIT_64_BIT ) + 1 ) ) ; vm.setVmOs ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ; mockOsRepository ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateMemorySize ( vm ) , false , EngineMessage.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; }

Target:
public void test64BitMemoryExceedsLimit ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_0 ) ; vm.setVmMemSizeMb ( ( ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest.MEMORY_LIMIT_64_BIT ) + 1 ) ) ; vm.setVmOs ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest._64_BIT_OS ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateMemorySize ( vm ) , false , EngineMessage.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; }
Source:
protected com.google.gwt.safehtml.shared.SafeHtml getName ( org.ovirt.engine.core.common.businessentities.Quota item ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; builder.append ( super . getName ( item ) ) ; builder.appendEscaped ( " (" ) ; builder.appendEscaped ( item.getStoragePoolName ( ) ) ; builder.appendEscaped ( ")" ) ; return builder.toSafeHtml ( ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getName ( org.ovirt.engine.core.common.businessentities.Quota item ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; builder.append ( super . getName ( item ) ) ; builder.appendEscaped ( " (" ) ; builder.appendEscaped ( item.getStoragePoolName ( ) ) ; builder.appendEscaped ( ")" ) ; return builder.toSafeHtml ( ) ; }
Source:
private void runSetup ( java.lang.String testMask , boolean isValidFormat , boolean isMaskValidValue , java.lang.String errorMessage ) { org.mockito.Mockito.when ( mockMaskValidator.isValidNetmaskFormat ( testMask ) ) . thenReturn ( isValidFormat ) ; org.mockito.Mockito.when ( mockMaskValidator.isPrefixValid ( testMask ) ) . thenReturn ( isMaskValidValue ) ; org.mockito.Mockito.when ( contextMock.buildConstraintViolationWithTemplate ( errorMessage ) ) . thenReturn ( mockConstraintViolationBuilder ) ; org.mockito.Mockito.when ( mockConstraintViolationBuilder.addNode ( org.mockito.ArgumentMatchers.anyString ( ) ) ) . thenReturn ( mockNodeBuilderDefinedContext ) ; }

Target:
private void runSetup ( java.lang.String testMask , boolean isValidFormat , boolean isMaskValidValue , java.lang.String errorMessage ) { org.mockito.Mockito.when ( mockMaskValidator.isValidNetmaskFormat ( testMask ) ) . thenReturn ( isValidFormat ) ; org.mockito.Mockito.when ( mockMaskValidator.isPrefixValid ( testMask ) ) . thenReturn ( isMaskValidValue ) ; org.mockito.Mockito.when ( contextMock.buildConstraintViolationWithTemplate ( errorMessage ) ) . thenReturn ( mockConstraintViolationBuilder ) ; org.mockito.Mockito.when ( mockConstraintViolationBuilder.addNode ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( mockNodeBuilderDefinedContext ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public 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 static void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getDefaultVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) , vm.getSingleQxlPci ( ) ) , true , true , null ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getDefaultVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) , vm.getSingleQxlPci ( ) ) , true , true , null , false ) ; }
Source:
private void buildDictionaries ( ) { for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { mVerbs.put ( field.fieldName , field.displayName ) ; } buildCompletions ( ) ; for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { getTypeDictionary ( ) . put ( field.fieldName , field.fieldType ) ; } for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { columnNameDict.put ( field.fieldName , field.columnName ) ; } buildBasicValidationTable ( ) ; }

Target:
private void buildDictionaries ( ) { for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { mVerbs.put ( field.fieldName , field.fieldName ) ; } buildCompletions ( ) ; for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { getTypeDictionary ( ) . put ( field.fieldName , field.fieldType ) ; } for ( org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.AutoCompletionField field : org.ovirt.engine.core.searchbackend.gluster.GlusterVolumeConditionFieldAutoCompleter.fields ) { columnNameDict.put ( field.fieldName , field.columnName ) ; } buildBasicValidationTable ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap runInTransaction ( ) { org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map ) ; map.setStatus ( status ) ; getStoragePoolIsoMapDAO ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap runInTransaction ( ) { context.snapshotEntityStatus ( map ) ; map.setStatus ( status ) ; getStoragePoolIsoMapDAO ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; context.stateChanged ( ) ; return null ; }
Source:
public void setValueA ( java.lang.Integer value ) { this . valueA = value ; java.lang.String percentage = value + "%" ; percentageLabelA.setText ( ( value < 10 ? "" : percentage ) ) ; percentageLabelA.setStyleName ( style.percentageLabel ( ) ) ; percentageBarA.setWidth ( percentage ) ; percentageBarA.setVisible ( ( value != 0 ) ) ; percentageBarA.setTitle ( percentage ) ; }

Target:
public void setValueA ( java.lang.Integer value ) { this . valueA = value ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.PostUpdateItemsAvailability ( behavior , storageModelItem , ( returnValue == null ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.ImportStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.PostUpdateItemsAvailability ( behavior , storageModelItem , ( returnValue == null ) ) ; }
Source:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) ; if ( isSuffix ) { template.setName ( ( ( template.getName ( ) ) + name ) ) ; } else { template.setName ( name ) ; } }

Target:
protected void setObjectName ( java.lang.Object object , java.lang.String name ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) . setName ( name ) ; }
Source:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainCommand ( params , org.ovirt.engine.core.bll.context.CommandContext.createContext ( params.getSessionId ( ) ) ) ) ; cmd.init ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }

Target:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd.init ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; }
Source:
private void initExternalProviderList ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getProvidersQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; stopProgress ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllNetworkProviders ( getProvidersQuery ) ; }

Target:
private void initExternalProviderList ( ) { org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; } } ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllNetworkProviders ( getProvidersQuery ) ; }
Source:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterState restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterBrick restVolume = org.ovirt.engine.api.restapi.types.GlusterBrickMapper.map ( brick , null ) ; assertEquals ( restVolume.getState ( ) , restStatus.value ( ) ) ; }

Target:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterState restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterBrick restVolume = org.ovirt.engine.api.restapi.types.GlusterBrickMapper.map ( brick , null ) ; assertEquals ( restVolume.getStatus ( ) . getState ( ) , restStatus.value ( ) ) ; }