auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void networkDidntChange ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , "net" ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNoChanges ( helper ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public void testSaveAndGetById ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brickToAdd = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_VOL_ID , server , "/export/test-vol-distribute-1/dir3" , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickStatus.UP ) ; dao.save ( brickToAdd ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity retrievedBrick = dao.getById ( brickToAdd.getId ( ) ) ; org.junit.Assert.assertNotNull ( retrievedBrick ) ; org.junit.Assert.assertEquals ( brickToAdd , retrievedBrick ) ; }

Target:
public void testSaveAndGetById ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brickToAdd = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_VOL_ID , server , "/export/test-vol-distribute-1/dir3" , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; dao.save ( brickToAdd ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity retrievedBrick = dao.getById ( brickToAdd.getId ( ) ) ; org.junit.Assert.assertNotNull ( retrievedBrick ) ; org.junit.Assert.assertEquals ( brickToAdd , retrievedBrick ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.VDS > hostNameListModel = getExternalHostName ( ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . setIsChangable ( true ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { externalHostGroups_SelectedItemChanged ( ) ; }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { determineMigrationFailureForAuditLog ( ) ; setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { failedToMigrate ( ) ; _isRerun = true ; } }

Target:
protected void determineMigrationFailureForAuditLog ( ) { if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { try { runVdsCommand ( VDSCommandType.MigrateStatus , new org.ovirt.engine.core.common.vdscommands.MigrateStatusVDSCommandParameters ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { migrationErrorCode = e.getErrorCode ( ) ; } } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.gluster.GlusterVolumeCommandBase.getGlusterVolume ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_INVALID ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.gluster.GlusterVolumeCommandBase.getGlusterVolume ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_INVALID ) ; return false ; } setVdsGroupId ( org.ovirt.engine.core.bll.gluster.GlusterVolumeCommandBase.getGlusterVolume ( ) . getClusterId ( ) ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } return true ; }
Source:
public static int maxMemorySizeWithHotplugInMb ( int osId , org.ovirt.engine.core.compat.Version compatibilityVersion ) { final org.ovirt.engine.core.common.config.ConfigValues configValue = org.ovirt.engine.core.common.utils.VmCommonUtils.getMaxMemConfigValueByOsId ( osId ) ; return compatibilityVersion != null ? org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( configValue , compatibilityVersion.getValue ( ) ) : org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( configValue ) ; }

Target:
public static int maxMemorySizeWithHotplugInMb ( int osId , org.ovirt.engine.core.compat.Version compatibilityVersion ) { final org.ovirt.engine.core.common.config.ConfigValues configValue = org.ovirt.engine.core.common.utils.VmCommonUtils.getMaxMemConfigValueByOsId ( osId ) ; return org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( configValue , ( compatibilityVersion != null ? compatibilityVersion.getValue ( ) : org.ovirt.engine.core.compat.Version.getLast ( ) . getValue ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( serverName , "127.0.0.1" , "0934390834" , 20 , 22 , "root" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , serverId , serverName , true , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) , org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; return brick ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setVolumeId ( volumeId ) ; brick.setServerId ( serverId ) ; brick.setServerName ( serverName ) ; brick.setBrickDirectory ( org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY ) ; brick.setStatus ( GlusterStatus.UP ) ; return brick ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( e.PropertyName.equals ( "STATUS_UPDATED" ) ) { status.setVisible ( object.isStatusAvailable ( ) ) ; } else if ( e.PropertyName.equals ( "STOP_TIME_UPDATED" ) ) { stopTimePanel.setVisible ( object.isStopTimeVisible ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( e.propertyName.equals ( "STATUS_UPDATED" ) ) { status.setVisible ( object.isStatusAvailable ( ) ) ; } else if ( e.propertyName.equals ( "STOP_TIME_UPDATED" ) ) { stopTimePanel.setVisible ( object.isStopTimeVisible ( ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsStaticDAO ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getVdsDynamicDAO ( ) ) ; statisticsDao = prepareDAO ( dbFacade.getVdsStatisticsDAO ( ) ) ; existingVds = dao.get ( org.ovirt.engine.core.dao.VdsStaticDAOTest.EXISTING_VDS_ID ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.sethost_name ( "farkle.redhat.com" ) ; newStaticVds.setvds_group_id ( existingVds.getvds_group_id ( ) ) ; newStaticVds.setSSHKeyFingerprint ( "b5:ad:16:19:06:9f:b3:41:69:eb:1c:42:1d:12:b5:31" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsStaticDao ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getVdsDynamicDao ( ) ) ; statisticsDao = prepareDAO ( dbFacade.getVdsStatisticsDao ( ) ) ; existingVds = dao.get ( org.ovirt.engine.core.dao.VdsStaticDAOTest.EXISTING_VDS_ID ) ; newStaticVds = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; newStaticVds.sethost_name ( "farkle.redhat.com" ) ; newStaticVds.setvds_group_id ( existingVds.getvds_group_id ( ) ) ; newStaticVds.setSSHKeyFingerprint ( "b5:ad:16:19:06:9f:b3:41:69:eb:1c:42:1d:12:b5:31" ) ; }
Source:
private void separateValidationErrorsList ( java.util.List < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError > errorsList , java.util.Map < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationFailureReason , java.util.List < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError > > resultMap ) { if ( ( errorsList == null ) || ( errorsList.isEmpty ( ) ) ) { return ; } for ( org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError error : errorsList ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( error.getReason ( ) , error , resultMap ) ; } }

Target:
private void separateValidationErrorsList ( java.util.List < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError > errorsList , java.util.Map < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationFailureReason , java.util.List < org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError > > resultMap ) { if ( ( errorsList == null ) || ( errorsList.isEmpty ( ) ) ) { return ; } for ( org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.ValidationError error : errorsList ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( error.getReason ( ) , error , resultMap ) ; } }
Source:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmStatistics existingVm = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.ovirt.engine.core.common.businessentities.VmStatistics existingVm2 = dao.get ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setCpuSys ( 50.0 ) ; existingVm2.setCpuUser ( 50.0 ) ; dao.updateAll ( java.util.Arrays.asList ( existingVm , existingVm2 ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }

Target:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmStatistics existingVm = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.ovirt.engine.core.common.businessentities.VmStatistics existingVm2 = dao.get ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setCpuSys ( 50.0 ) ; existingVm2.setCpuUser ( 50.0 ) ; dao.updateAll ( java.util.Arrays.asList ( existingVm , existingVm2 ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }
Source:
public void testWrongFormatCustomProerties ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_0 ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertFalse ( runVmValidator.validateVmProperties ( vm , "sap_agent;" , messages ) ) ; org.junit.Assert.assertFalse ( messages.isEmpty ( ) ) ; }

Target:
public void testWrongFormatCustomProerties ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_0 ) ; vm.setCustomProperties ( "sap_agent;" ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertFalse ( runVmValidator.validateVmProperties ( vm , messages ) ) ; org.junit.Assert.assertFalse ( messages.isEmpty ( ) ) ; }
Source:
public static void setGatewayIfNecessary ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.VDS host , java.lang.String gateway ) { if ( ( ( org.ovirt.engine.core.common.FeatureSupported.multipleGatewaysSupported ( host.getVdsGroupCompatibilityVersion ( ) ) ) || ( org.ovirt.engine.core.utils.NetworkUtils.getEngineNetwork ( ) . equals ( iface.getNetworkName ( ) ) ) ) || ( iface.getName ( ) . equals ( host.getActiveNic ( ) ) ) ) { iface.setGateway ( gateway ) ; } }

Target:
public static void setGatewayIfNecessary ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.VDS host , java.lang.String gateway ) { final org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil managementNetworkUtil = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.getManagementNetworkUtil ( ) ; if ( ( ( org.ovirt.engine.core.common.FeatureSupported.multipleGatewaysSupported ( host.getVdsGroupCompatibilityVersion ( ) ) ) || ( managementNetworkUtil.isManagementNetwork ( iface.getNetworkName ( ) , host.getVdsGroupId ( ) ) ) ) || ( iface.getName ( ) . equals ( host.getActiveNic ( ) ) ) ) { iface.setGateway ( gateway ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( "IsCiscoUcsPrimaryPmTypeSelected" . equals ( propName ) ) { getView ( ) . updatePrimaryPmSlotLabelText ( model.isCiscoUcsPrimaryPmTypeSelected ( ) ) ; } else if ( "IsCiscoUcsSecondaryPmTypeSelected" . equals ( propName ) ) { getView ( ) . updateSecondaryPmSlotLabelText ( model.isCiscoUcsSecondaryPmTypeSelected ( ) ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( ( ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostPopupView ) ( getView ( ) ) ) . rbProvisionedHost.getValue ( ) ) { model.getIsDiscorveredHosts ( ) . setEntity ( false ) ; } }
Source:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : allIfaces ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( i ) ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i.getName ( ) , iface.getName ( ) ) ) ) { 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.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 ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.VDS prevHost = getPreviousHost ( hosts ) ; hosts.add ( 0 , null ) ; getVmwarePropertiesModel ( ) . getProxyHost ( ) . setItems ( hosts ) ; getVmwarePropertiesModel ( ) . getProxyHost ( ) . setSelectedItem ( prevHost ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.VDS prevHost = getPreviousHost ( hosts ) ; hosts.add ( 0 , null ) ; proxyHostPropertiesModel.getProxyHost ( ) . setItems ( hosts ) ; proxyHostPropertiesModel.getProxyHost ( ) . setSelectedItem ( prevHost ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filterClustersWithoutArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( ( cluster.getArchitecture ( ) ) != ( org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined ) ) { filteredClusters.add ( cluster ) ; } } return filteredClusters ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > filterClustersWithoutArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > filteredClusters = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster cluster : clusters ) { if ( ( cluster.getArchitecture ( ) ) != ( org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined ) ) { filteredClusters.add ( cluster ) ; } } return filteredClusters ; }
Source:
private void addVnic ( org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { vmInterfaceManager.add ( iface , getCompensationContext ( ) , getParameters ( ) . isImportAsNewEntity ( ) , getVdsGroup ( ) . getcompatibility_version ( ) ) ; macsAdded.add ( iface.getMacAddress ( ) ) ; }

Target:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setStatus ( VMStatus.ImageLocked ) ; tempVar.setVmHost ( "" ) ; tempVar.setVmIp ( "" ) ; tempVar.setAppList ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getAppList ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getVmDynamicDAO ( ) . save ( tempVar ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getWatchdogByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void initMocks ( ) { injectorRule.bind ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class , scheduler ) ; org.mockito.Mockito.when ( scheduler.scheduleAFixedDelayJob ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.any ( java.lang.Class [ ] . class ) , org.mockito.Matchers.any ( java.lang.Object [ ] . class ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( java.util.concurrent.TimeUnit.class ) ) ) . thenReturn ( "jobId" ) ; }

Target:
protected void initMocks ( ) { injectorRule.bind ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class , scheduler ) ; org.mockito.Mockito.when ( scheduler.scheduleAFixedDelayJob ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.any ( java.lang.Class [ ] . class ) , org.mockito.Matchers.any ( java.lang.Object [ ] . class ) , org.mockito.Matchers.anyLong ( ) , org.mockito.Matchers.anyLong ( ) , org.mockito.Matchers.any ( java.util.concurrent.TimeUnit.class ) ) ) . thenReturn ( "jobId" ) ; }
Source:
private void spice_Disconnected ( java.lang.Object sender , org.ovirt.engine.ui.uicommonweb.models.vms.ErrorCodeEventArgs e ) { getspice ( ) . getDisconnectedEvent ( ) . removeListener ( this ) ; getspice ( ) . getMenuItemSelectedEvent ( ) . removeListener ( this ) ; setIsConnected ( false ) ; updateActionAvailability ( ) ; if ( ( e.getErrorCode ( ) ) > 100 ) { getErrorEvent ( ) . raise ( this , e ) ; } }

Target:
public boolean canBeSelected ( ) { org.ovirt.engine.core.common.businessentities.DisplayType displayType = ( ( getEntity ( ) . getDisplayType ( ) ) != null ) ? getEntity ( ) . getDisplayType ( ) : getEntity ( ) . getDefaultDisplayType ( ) ; boolean hasVmSpiceSupport = java.lang.Boolean.TRUE.equals ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.hasSpiceSupport ( getEntity ( ) . getOs ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ; return ( displayType == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) && hasVmSpiceSupport ; }
Source:
private void optimizationForServerFormatter ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { if ( ( ( ( model.getCluster ( ) ) != null ) && ( ( model.getCluster ( ) . getOptimizationForServer ( ) ) != null ) ) && ( ( model.getCluster ( ) . getOptimizationForServer ( ) . getEntity ( ) ) != null ) ) { optimizationForServerEditor.setLabel ( getMessages ( ) . clusterPopupMemoryOptimizationForServerLabel ( model.getCluster ( ) . getOptimizationForServer ( ) . getEntity ( ) . toString ( ) ) ) ; } }

Target:
private void optimizationForServerFormatter ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { if ( ( ( ( model.getCluster ( ) ) != null ) && ( ( model.getCluster ( ) . getOptimizationForServer ( ) ) != null ) ) && ( ( model.getCluster ( ) . getOptimizationForServer ( ) . getEntity ( ) ) != null ) ) { optimizationForServerEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.messages.clusterPopupMemoryOptimizationForServerLabel ( model.getCluster ( ) . getOptimizationForServer ( ) . getEntity ( ) . toString ( ) ) ) ; } }
Source:
private boolean serverExists ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > serversList , org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { for ( org.ovirt.engine.core.common.businessentities.VDS server : serversList ) { java.lang.String serverHostnameOrIp = ( server.getHostName ( ) . isEmpty ( ) ) ? server.getManagmentIp ( ) : server.getHostName ( ) ; if ( serverHostnameOrIp.equalsIgnoreCase ( glusterServer.getHostnameOrIp ( ) ) ) { return true ; } } return false ; }

Target:
private boolean serverExists ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > serversList , org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { for ( org.ovirt.engine.core.common.businessentities.VDS server : serversList ) { java.lang.String serverHostnameOrIp = ( server.getHostName ( ) . isEmpty ( ) ) ? server.getManagementIp ( ) : server.getHostName ( ) ; if ( serverHostnameOrIp.equalsIgnoreCase ( glusterServer.getHostnameOrIp ( ) ) ) { return true ; } } return false ; }
Source:
private static void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . enrichDiskByJsonDescription ( org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) . generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.Assert.assertEquals ( diskToEnrich , disk ) ; }

Target:
private void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler.enrichDiskByJsonDescription ( metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.Assert.assertEquals ( diskToEnrich , disk ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotDelete ( java.lang.String snapshotName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotDelete ( snapshotName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeConfigListXmlRpc ( vdsServer.glusterVolumeGeoRepConfigList ( volumeName , slaveHost , slaveVolumeName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private boolean checkDomain ( ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) ) != null ) ) { return isDomainLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getReturnValue ( ) . getValidationMessages ( ) ) ; } return true ; }

Target:
protected void updateRngDevice ( org.ovirt.engine.core.compat.Guid templateId ) { if ( ! ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . isUpdateRngDevice ( ) ) ) { final org.ovirt.engine.core.compat.Version newClusterVersion = ( ( getEffectiveCompatibilityVersion ( ) ) != null ) ? getEffectiveCompatibilityVersion ( ) : org.ovirt.engine.core.compat.Version.getLast ( ) ; rngDeviceUtils.handleUrandomRandomChange ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getClusterLevelChangeFromVersion ( ) , newClusterVersion , templateId , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.cloneContextAndDetachFromParent ( ) , false ) ; return ; } super . updateRngDevice ( templateId ) ; }
Source:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { processResponse ( response ) ; } else { org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.logger.warning ( ( "Engine REST API response received with non-OK status code " + ( response.getStatusCode ( ) ) ) ) ; } }

Target:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { processResponse ( response ) ; } else { org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.logger.warning ( ( "Engine REST API responded with non-OK status code " + ( response.getStatusCode ( ) ) ) ) ; } }
Source:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getLunsWithInitializedStorageType ( java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > existingStorageServerConnections = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.LUNs lun : luns ) { for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections storageServerConnection : lun.getLunConnections ( ) ) { storageServerConnection.setstorage_type ( storageType ) ; existingStorageServerConnections.add ( storageServerConnection ) ; } } return existingStorageServerConnections ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getLunsWithInitializedStorageType ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > existingStorageServerConnections = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun : luns ) { for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections storageServerConnection : lun.getLunConnections ( ) ) { storageServerConnection.setstorage_type ( storageType ) ; existingStorageServerConnections.add ( storageServerConnection ) ; } } return existingStorageServerConnections ; }
Source:
private void updateMtuChangeability ( ) { getMtu ( ) . setIsChangable ( ( ( getHasMtu ( ) . getEntity ( ) ) && ( ! ( getExport ( ) . getEntity ( ) ) ) ) ) ; }

Target:
protected void updateMtuSelectorsChangeability ( ) { if ( ( ( getSelectedDc ( ) ) != null ) && ( ! ( isMTUOverrideSupported ( ) ) ) ) { setMtuSelectorsChangeability ( false , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . mtuOverrideNotSupported ( getSelectedDc ( ) . getcompatibility_version ( ) . toString ( ) ) ) ; return ; } if ( getExport ( ) . getEntity ( ) ) { setMtuSelectorsChangeability ( false , null ) ; return ; } setMtuSelectorsChangeability ( true , null ) ; }
Source:
public void setEntity ( java.lang.Object value ) { if ( ( entity ) != value ) { EntityChanging ( value , entity ) ; entity = value ; OnEntityChanged ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Entity" ) ) ; } }

Target:
public void setEntity ( java.lang.Object value ) { if ( ( entity ) != value ) { EntityChanging ( value , entity ) ; entity = value ; OnEntityChanged ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Entity" ) ) ; } }
Source:
public static void GetAllowClusterWithVirtGlusterEnabled ( 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 ? source : java.lang.Boolean.TRUE ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetAllowClusterWithVirtGlusterEnabled ( 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 ? source : java.lang.Boolean.TRUE ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isOsSupportedForVirtIoScsi ( org.ovirt.engine.core.common.businessentities.VM vm ) { final java.util.List < java.lang.String > unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > getValue ( ConfigValues.VirtIoScsiUnsupportedOsList ) ; java.lang.String vmOs = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getUniqueOsNames ( ) . get ( vm.getVmOsId ( ) ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( vmOs ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
private static org.ovirt.engine.core.common.osinfo.OsRepository getOsRepository ( ) { return org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; }
Source:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.infoFormat ( "Lock freed to object {0}" , context.getLock ( ) ) ; context.withLock ( null ) ; } }

Target:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.info ( "Lock freed to object '{}'" , context.getLock ( ) ) ; context.withLock ( null ) ; freeCustomLocks ( ) ; } }
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 static void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( "STATUS" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSStatus.class ) ; } else if ( "TYPE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSNiceType.class ) ; } else { } return retval ; }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( "STATUS" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSStatus.class ) ; } else if ( "TYPE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSNiceType.class ) ; } else if ( "ARCHITECTURE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ; } return retval ; }
Source:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getTargetStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ; }

Target:
protected boolean validatePassDiscardSupportedOnDestinationStorageDomain ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator validator = createDiskVmElementValidator ( parameters.getImageGroupID ( ) , parameters.getVmId ( ) ) ; return validate ( validator.isPassDiscardSupported ( parameters.getTargetStorageDomainId ( ) ) ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void 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.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static synchronized void handleApplicationInit ( java.lang.String applicationName ) throws java.lang.Exception { if ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Utils.firstCallToInit ) { if ( applicationName.equals ( Base.ApplicationNames.OVIRT_ENGINE_AAA_EXTENSION_TOOL ) ) { javax.security.auth.login.Configuration.getConfiguration ( ) . refresh ( ) ; javax.naming.spi.DirectoryManager.setObjectFactoryBuilder ( new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.DirectoryContextFactoryBuilder ( ) ) ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Utils.firstCallToInit = false ; } java.lang.System.setProperty ( "sun.security.krb5.msinterop.kstring" , "true" ) ; }

Target:
public static synchronized void handleApplicationInit ( java.lang.String applicationName ) throws java.lang.Exception { if ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Utils.firstCallToInit ) { if ( applicationName.equals ( Base.ApplicationNames.OVIRT_ENGINE_EXTENSIONS_TOOL ) ) { javax.security.auth.login.Configuration.getConfiguration ( ) . refresh ( ) ; javax.naming.spi.DirectoryManager.setObjectFactoryBuilder ( new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.DirectoryContextFactoryBuilder ( ) ) ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Utils.firstCallToInit = false ; } java.lang.System.setProperty ( "sun.security.krb5.msinterop.kstring" , "true" ) ; }
Source:
public void rerun ( org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand command = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . GetAsyncCommandForVm ( vmId ) ; if ( command != null ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { command.rerun ( ) ; } } ) ; } }

Target:
public void rerun ( org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand command = backend.getResourceManager ( ) . GetAsyncCommandForVm ( vmId ) ; if ( command != null ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { command.rerun ( ) ; } } ) ; } }