auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static boolean isBondVlan ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaces ) { if ( ( java.lang.Boolean.TRUE.equals ( i.getBonded ( ) ) ) && ( i.getName ( ) . equals ( iface.getBaseInterface ( ) ) ) ) { return true ; } } } return false ; }

Target:
public static boolean isBondVlan ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { if ( org.ovirt.engine.core.common.utils.NetworkCommonUtils.isVlan ( iface ) ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaces ) { if ( ( java.lang.Boolean.TRUE.equals ( i.getBonded ( ) ) ) && ( i.getName ( ) . equals ( iface.getBaseInterface ( ) ) ) ) { return true ; } } } return false ; }
Source:
public void setSearchStringPrefix ( java.lang.String searchStringPrefix ) { searchStringPrefixLabel.setText ( searchStringPrefix ) ; oracle.setSearchPrefix ( searchStringPrefix ) ; int searchStringInputWidth = ( org.ovirt.engine.ui.webadmin.section.main.view.SearchPanelView.SEARCH_PANEL_WIDTH ) - ( searchStringPrefixLabel.getElement ( ) . getOffsetWidth ( ) ) ; searchStringInput.getElement ( ) . getStyle ( ) . setWidth ( searchStringInputWidth , Unit.PX ) ; }

Target:
public void hideSuggestionBox ( ) { searchStringInput.hideSuggestion ( ) ; }
Source:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; mcr.mockConfigValue ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }

Target:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "provisionedSize|size" , "format" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }
Source:
public void testGetLunsThatBreakPassDiscardFunctionalityPassDiscardBreaks ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardFunctionality ( 0L , false ) ; assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }

Target:
public void testGetLunsThatBreakPassDiscardFunctionalityDiscardFunctionalityDoesntBreak ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , createLunWithDiscardSupport ( 2048L ) ) , java.util.Collections.emptyList ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = createVmWithSnapshots ( ) ; vm.setName ( "testVm" ) ; org.ovirt.engine.core.compat.Guid vdsGroupId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vm.setVdsGroupId ( vdsGroupId ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( vm , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , vdsGroupId ) ; }

Target:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = createVmWithSnapshots ( ) ; vm.setName ( "testVm" ) ; org.ovirt.engine.core.compat.Guid clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vm.setClusterId ( clusterId ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( vm , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , clusterId ) ; }
Source:
public boolean supportedForUnitVmModel ( org.ovirt.engine.core.common.queries.ConfigurationValues feature , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.core.compat.Version version = model.getCompatibilityVersion ( ) ; if ( version == null ) { return false ; } else { return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( feature , version.getValue ( ) ) ) ) ; } }

Target:
public boolean isMemoryHotUnplugSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } return isMemoryHotUnplugSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getCompatibilityVersion ( ) ) ; }
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.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 static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
protected boolean checkNumberOfMonitors ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypesToBeSet = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . graphicsTypesToBeModified ( ) ; int numOfMonitors = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfMonitors ( ) ; return org.ovirt.engine.core.bll.VmHandler.isNumOfMonitorsLegal ( graphicsTypesToBeSet , numOfMonitors , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkNumberOfMonitors ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypes = org.ovirt.engine.core.bll.VmHandler.getResultingVmGraphics ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.getGraphicsTypesOfEntity ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) ) ; int numOfMonitors = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfMonitors ( ) ; return org.ovirt.engine.core.bll.VmHandler.isNumOfMonitorsLegal ( graphicsTypes , numOfMonitors , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
private static void doTestNoStringSubstitution ( java.lang.String name ) { java.util.Locale locale = java.util.Locale.ENGLISH ; try { java.util.Locale.setDefault ( java.util.Locale.ENGLISH ) ; org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.lang.String error = et.translateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ; org.junit.Assert.assertEquals ( "String should equal" , "VM not found" , error ) ; } finally { java.util.Locale.setDefault ( locale ) ; } }

Target:
private static void doTestNoStringSubstitution ( java.lang.String name ) { java.util.Locale locale = java.util.Locale.ENGLISH ; try { java.util.Locale.setDefault ( java.util.Locale.ENGLISH ) ; org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.lang.String error = et.translateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ; org.junit.jupiter.api.Assertions.assertEquals ( "VM not found" , error , "String should equal" ) ; } finally { java.util.Locale.setDefault ( locale ) ; } }
Source:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions ) { model.getGeoRepSession ( ) . setItems ( geoRepSessions ) ; model.stopProgress ( ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions ) { model.getGeoRepSession ( ) . setItems ( geoRepSessions ) ; if ( geoRepSessions.isEmpty ( ) ) { model.setMessage ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . noGeoRepSessionForGlusterVolume ( ) ) ; } model.stopProgress ( ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.events.EventListModel < java.lang.Void > > modelProvider , org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.eventMainTabPlace ) ; return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( menuTabDetails.getPrimaryTitle ( ) , 0 , null , menuTabDetails.getPrimaryPriority ( ) , modelProvider , menuTabDetails.getIcon ( ) ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.events.EventListModel < java.lang.Void > > modelProvider , org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.eventMainTabPlace ) ; return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getPrimaryPriority ( ) , modelProvider , menuTabDetails.getIcon ( ) ) ; }
Source:
private static org.ovirt.engine.core.bll.IconLoader.ResolvedIcon resolveIconName ( java.nio.file.Path dir , java.lang.String osName ) { for ( org.ovirt.engine.core.bll.validator.IconValidator.FileType fileType : IconValidator.FileType.values ( ) ) { for ( java.lang.String extension : fileType.getExtensions ( ) ) { final java.nio.file.Path iconPath = dir.resolve ( ( ( osName + "." ) + extension ) ) ; if ( java.nio.file.Files.exists ( iconPath ) ) { return new org.ovirt.engine.core.bll.IconLoader.ResolvedIcon ( iconPath , fileType ) ; } } } throw new java.lang.RuntimeException ( ( ( ( "Icon for " + osName ) + " was not found in " ) + dir ) ) ; }

Target:
private static org.ovirt.engine.core.bll.IconLoader.ResolvedIcon resolveIconName ( java.nio.file.Path dir , java.lang.String osName ) { for ( org.ovirt.engine.core.bll.validator.IconValidator.FileType fileType : IconValidator.FileType.values ( ) ) { for ( java.lang.String extension : fileType.getExtensions ( ) ) { final java.nio.file.Path iconPath = dir.resolve ( ( ( osName + "." ) + extension ) ) ; if ( iconPath.toFile ( ) . exists ( ) ) { return new org.ovirt.engine.core.bll.IconLoader.ResolvedIcon ( iconPath , fileType ) ; } } } throw new java.lang.RuntimeException ( ( ( ( "Icon for " + osName ) + " was not found in " ) + dir ) ) ; }
Source:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setCompatibilityVersion ( Version.v3_2 ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }

Target:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getCluster ( ) . setCompatibilityVersion ( Version.v3_2 ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }
Source:
public void testCronExpressionForWeeklyNoDays ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageSyncSchedule schedule = new org.ovirt.engine.core.common.businessentities.gluster.StorageSyncSchedule ( ) ; schedule.setFrequency ( Frequency.WEEKLY ) ; schedule.setHour ( 12 ) ; schedule.setMins ( 50 ) ; java.lang.String expectedExpression = "" ; org.junit.Assert.assertEquals ( expectedExpression , schedule.toCronExpression ( ) ) ; java.util.List < java.lang.Class < ? > > validationGroup = new java.util.ArrayList < > ( ) ; java.util.List < java.lang.String > result = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( validationGroup , schedule ) ; org.junit.Assert.assertEquals ( true , result.isEmpty ( ) ) ; }

Target:
public void testCronExpressionForWeeklyNoDays ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageSyncSchedule schedule = new org.ovirt.engine.core.common.businessentities.gluster.StorageSyncSchedule ( ) ; schedule.setFrequency ( Frequency.WEEKLY ) ; schedule.setHour ( 12 ) ; schedule.setMins ( 50 ) ; java.lang.String expectedExpression = "" ; org.junit.Assert.assertEquals ( expectedExpression , schedule.toCronExpression ( ) ) ; java.util.List < java.lang.Class < ? > > validationGroup = new java.util.ArrayList < > ( ) ; java.util.List < java.lang.String > result = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( validationGroup , schedule ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > getQuotaStorages ( long storageSize , double storageSizeUsed ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.QuotaStorage > ( ) ; quotaStorages.add ( getQuotaStorage ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.UNLIMITED_STORAGE , 0 ) ) ; quotaStorages.add ( getQuotaStorage ( 50 , 5 ) ) ; quotaStorages.get ( 0 ) . setStorageId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; quotaStorages.get ( 1 ) . setStorageId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; quotaStorages.add ( getQuotaStorage ( storageSize , storageSizeUsed ) ) ; return quotaStorages ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > getQuotaStorages ( long storageSize , double storageSizeUsed ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.QuotaStorage > ( ) ; quotaStorages.add ( getQuotaStorage ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.UNLIMITED_STORAGE , 0 ) ) ; quotaStorages.add ( getQuotaStorage ( 50 , 5 ) ) ; quotaStorages.get ( 0 ) . setStorageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; quotaStorages.get ( 1 ) . setStorageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; quotaStorages.add ( getQuotaStorage ( storageSize , storageSizeUsed ) ) ; return quotaStorages ; }
Source:
public static void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < java.lang.String > > getCustomPropertiesList ( ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.customPropertiesList ; }
Source:
public static void getHostById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public org.ovirt.vdsm.jsonrpc.client.JsonRpcClient register ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client ) { final org.ovirt.vdsm.jsonrpc.client.JsonRpcClient jsonRpcClient = new org.ovirt.vdsm.jsonrpc.client.JsonRpcClient ( client ) ; client.addEventListener ( new org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.EventListener ( ) { @ java.lang.Override public void onMessageReceived ( byte [ ] message ) { queue.add ( new org.ovirt.vdsm.jsonrpc.client.internal.MessageContext ( jsonRpcClient , message ) ) ; } } ) ; return jsonRpcClient ; }

Target:
public org.ovirt.vdsm.jsonrpc.client.JsonRpcClient register ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client ) { final org.ovirt.vdsm.jsonrpc.client.JsonRpcClient jsonRpcClient = new org.ovirt.vdsm.jsonrpc.client.JsonRpcClient ( client ) ; client.addEventListener ( new org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.MessageListener ( ) { @ java.lang.Override public void onMessageReceived ( byte [ ] message ) { queue.add ( new org.ovirt.vdsm.jsonrpc.client.internal.MessageContext ( jsonRpcClient , message ) ) ; } } ) ; return jsonRpcClient ; }
Source:
private void setUpGetEntityExpectationsAllContent ( int times , boolean notFound ) throws java.lang.Exception { java.util.List < java.lang.String > populateValue = new java.util.ArrayList < java.lang.String > ( ) ; populateValue.add ( "true" ) ; org.easymock.EasyMock.expect ( httpHeaders.getRequestHeader ( AbstractBackendResource.POPULATE ) ) . andReturn ( populateValue ) . anyTimes ( ) ; setupEntityExpectationAdvancedDetails ( times , notFound , false ) ; }

Target:
private void setupParentPopulateExpectations ( boolean notFound ) { org.easymock.EasyMock.expect ( bricksResourceMock.populateAdvancedDetails ( org.easymock.EasyMock.isA ( org.ovirt.engine.api.model.GlusterBrick.class ) , org.easymock.EasyMock.isA ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity.class ) ) ) . andDelegateTo ( new org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResource ( ) { @ java.lang.Override protected org.ovirt.engine.api.model.GlusterBrick populateAdvancedDetails ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { model.setPort ( GlusterTestHelper.BRICK_PORT ) ; model.setMntOptions ( GlusterTestHelper.BRICK_MNT_OPT ) ; return model ; } } ) . anyTimes ( ) ; }
Source:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void revealDiskPanel ( final org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel disk ) { boolean isInVm = ( disk.getVm ( ) ) != null ; diskTypePanel.setVisible ( isNewLunDiskEnabled ) ; externalDiskPanel.setVisible ( ( ( isNewLunDiskEnabled ) && ( ( disk.getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) ) ) ; aliasEditor.setFocus ( ( ! isInVm ) ) ; }

Target:
private void revealDiskPanel ( final org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel disk ) { boolean isInVm = ( disk.getVm ( ) ) != null ; diskTypePanel.setVisible ( isNewLunDiskEnabled ) ; externalDiskPanel.setVisible ( ( ( isNewLunDiskEnabled ) && ( ( disk.getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.LUN ) ) ) ) ; aliasEditor.setFocus ( ( ! isInVm ) ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.LunDisk > filterDiskBasedOnLuns ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Disk > listOfDisks ) { java.util.List < org.ovirt.engine.core.common.businessentities.LunDisk > diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LunDisk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : listOfDisks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) { diskImages.add ( ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( disk ) ) ) ; } } return diskImages ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.LunDisk > filterDiskBasedOnLuns ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Disk > listOfDisks ) { java.util.List < org.ovirt.engine.core.common.businessentities.LunDisk > lunDisks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LunDisk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : listOfDisks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) { lunDisks.add ( ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( disk ) ) ) ; } } return lunDisks ; }
Source:
protected void handlePlaceTransition ( ) { if ( hasSelection ( ) ) { placeManager.revealPlace ( getSubTabRequest ( ) ) ; } else { org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.setSubTabPanelVisible ( false ) ; placeManager.revealPlace ( org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.getMainTabRequest ( ) ) ; } }

Target:
protected void handlePlaceTransition ( ) { if ( ( hasSelection ( ) ) && ( hasSelectionDetails ( ) ) ) { placeManager.revealPlace ( getSubTabRequest ( ) ) ; } else { org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.setSubTabPanelVisible ( false ) ; placeManager.revealPlace ( org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainTabWithDetailsPresenter.getMainTabRequest ( ) ) ; } }
Source:
protected void moveOrCopyAllImageGroups ( org.ovirt.engine.core.compat.Guid containerID , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalAction ( VdcActionType.CopyImageGroup , buildMoveOrCopyImageGroupParametersForDisk ( disk , containerID ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) ; if ( ! ( vdcRetValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcRetValue.getFault ( ) . getError ( ) , "ImportVmCommand::MoveOrCopyAllImageGroups: Failed to copy disk!" ) ; } getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } }

Target:
protected void moveOrCopyAllImageGroups ( org.ovirt.engine.core.compat.Guid containerID , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( VdcActionType.CopyImageGroup , buildMoveOrCopyImageGroupParametersForDisk ( disk , containerID ) ) ; if ( ! ( vdcRetValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcRetValue.getFault ( ) . getError ( ) , "ImportVmCommand::MoveOrCopyAllImageGroups: Failed to copy disk!" ) ; } getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public void validateFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) , null ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }

Target:
public void validateFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command.getParameters ( ) . setForceAction ( true ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }
Source:
private void initListBoxEditors ( ) { isoImageEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ( ) { @ java.lang.Override protected java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.storage.RepoImage object ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( object.getRepoImageName ( ) ) ) { return object.getRepoImageId ( ) ; } return object.getRepoImageName ( ) ; } } ) ; }

Target:
private void initListBoxEditors ( ) { isoImageEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ( ) { @ java.lang.Override protected java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.storage.RepoImage object ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( object.getRepoImageName ( ) ) ) { return object.getRepoImageId ( ) ; } return object.getRepoImageName ( ) ; } } ) ; isoImageEditor.asListBox ( ) . setDropdownHeight ( "300px" ) ; }
Source:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parametersForTask = getParametersForTask ( parentCommand , getParameters ( ) ) ; org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , parametersForTask , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) ) ) ; p.setEntityId ( getParameters ( ) . getEntityId ( ) ) ; return org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( getTaskType ( ) , p ) ; }
Source:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { super . initialize ( systemTreeSelectedItem ) ; getModel ( ) . getVmType ( ) . setIsChangeable ( true ) ; getModel ( ) . getPoolStateful ( ) . setIsChangeable ( true ) ; templateValidate ( ) ; instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.NewPoolInstanceTypeManager ( getModel ( ) ) ; getModel ( ) . getVmInitModel ( ) . init ( null ) ; }

Target:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { super . initialize ( systemTreeSelectedItem ) ; getModel ( ) . getVmType ( ) . setIsChangeable ( true ) ; getModel ( ) . getPoolStateful ( ) . setIsChangeable ( true ) ; templateValidate ( ) ; instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.NewPoolInstanceTypeManager ( getModel ( ) ) ; getModel ( ) . getVmInitModel ( ) . init ( null ) ; getModel ( ) . getDisksAllocationModel ( ) . initializeAutoSelectTarget ( true , false ) ; }
Source:
protected void updateDetailsAvailability ( ) { super . updateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.Provider provider = getSelectedItem ( ) ; if ( provider != null ) { providerNetworkListModel.setIsAvailable ( provider.getType ( ) . getProvidedTypes ( ) . contains ( VdcObjectType.Network ) ) ; } }

Target:
protected void updateDetailsAvailability ( ) { super . updateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.Provider provider = getSelectedItem ( ) ; if ( provider != null ) { providerNetworkListModel.setIsAvailable ( provider.getType ( ) . getProvidedTypes ( ) . contains ( VdcObjectType.Network ) ) ; providerSecretListModel.setIsAvailable ( ( ( provider.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_VOLUME ) ) ) ; } }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.image_storage_domain_map imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }

Target:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.image_storage_domain_map imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }
Source:
protected boolean activateOrDeactivateNic ( org.ovirt.engine.core.compat.Guid nicId , org.ovirt.engine.core.common.action.PlugAction plugAction ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateDeactivateVmNic , createActivateDeactivateParameters ( nicId , plugAction ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; } return returnValue.getSucceeded ( ) ; }

Target:
protected boolean activateOrDeactivateNic ( org.ovirt.engine.core.compat.Guid nicId , org.ovirt.engine.core.common.action.PlugAction plugAction , java.lang.String oldMacAddress ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateDeactivateVmNic , createActivateDeactivateParameters ( nicId , plugAction , oldMacAddress ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; } return returnValue.getSucceeded ( ) ; }
Source:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; 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:
public void getClusterList ( 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.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( 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.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.IPv4Address createIPv4Address ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address result = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; result.setAddress ( nic.getAddress ( ) ) ; result.setNetmask ( nic.getSubnet ( ) ) ; result.setGateway ( nic.getGateway ( ) ) ; result.setBootProtocol ( nic.getBootProtocol ( ) ) ; return result ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.IPv4Address createIPv4Address ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address result = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; if ( ( nic.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { result.setAddress ( nic.getAddress ( ) ) ; result.setNetmask ( nic.getSubnet ( ) ) ; result.setGateway ( nic.getGateway ( ) ) ; } result.setBootProtocol ( nic.getBootProtocol ( ) ) ; return result ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetTagsExpectations ( true ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachTemplateFromTag , org.ovirt.engine.core.common.action.AttachEntityToTagParameters.class , new java.lang.String [ ] { "TagId" , "EntitiesId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateTagResourceTest.TAG_ID , asList ( org.ovirt.engine.api.restapi.resource.BackendTemplateTagResourceTest.TEMPLATE_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetTagsExpectations ( true ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachTemplateFromTag , org.ovirt.engine.core.common.action.AttachEntityToTagParameters.class , new java.lang.String [ ] { "TagId" , "EntitiesId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateTagResourceTest.TAG_ID , asList ( org.ovirt.engine.api.restapi.resource.BackendTemplateTagResourceTest.TEMPLATE_ID ) } , valid , success ) ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , resource :: remove ) , detail ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.FencingPolicy ) ) { return false ; } org.ovirt.engine.core.common.businessentities.FencingPolicy other = ( ( org.ovirt.engine.core.common.businessentities.FencingPolicy ) ( obj ) ) ; return ( skipFencingIfSDActive ) == ( other.skipFencingIfSDActive ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.FencingPolicy ) ) { return false ; } org.ovirt.engine.core.common.businessentities.FencingPolicy other = ( ( org.ovirt.engine.core.common.businessentities.FencingPolicy ) ( obj ) ) ; return ( ( ( ( fencingEnabled ) == ( other.fencingEnabled ) ) && ( ( skipFencingIfSDActive ) == ( other.skipFencingIfSDActive ) ) ) && ( ( skipFencingIfConnectivityBroken ) == ( other.skipFencingIfConnectivityBroken ) ) ) && ( ( hostsWithBrokenConnectivityThreshold ) == ( other.hostsWithBrokenConnectivityThreshold ) ) ; }