auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }

Target:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }
Source:
protected boolean Validate ( ) { getUserName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getDomain ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( ( getUserName ( ) . getIsValid ( ) ) && ( getPassword ( ) . getIsValid ( ) ) ) && ( getDomain ( ) . getIsValid ( ) ) ; }

Target:
protected boolean validate ( ) { getUserName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getDomain ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( ( getUserName ( ) . getIsValid ( ) ) && ( getPassword ( ) . getIsValid ( ) ) ) && ( getDomain ( ) . getIsValid ( ) ) ; }
Source:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( disksUsages ) ; validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDbUsers , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { "Refresh" , "Filtered" } , new java.lang.Object [ ] { true , false } , getUsers ( ) ) ; setUpGetEntityExpectations ( 1 ) ; control.replay ( ) ; verifyModel ( resource.get ( ) , 0 ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDbUsers , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { "Refresh" , "Filtered" } , new java.lang.Object [ ] { false , false } , getUsers ( ) ) ; setUpGetEntityExpectations ( 1 ) ; control.replay ( ) ; verifyModel ( resource.get ( ) , 0 ) ; }
Source:
public void putList ( org.ovirt.engine.sdk.entities.DetailedLink link , java.lang.String key , java.util.List < java.lang.String > values ) { if ( values == null ) { values = java.util.Collections.emptyList ( ) ; } java.lang.String value = java.lang.String.join ( " " , values ) ; put ( link , key , value ) ; }

Target:
public void putList ( java.lang.String key , java.util.List < java.lang.String > values ) { if ( values == null ) { values = java.util.Collections.emptyList ( ) ; } java.lang.String value = java.lang.String.join ( " " , values ) ; put ( key , value ) ; }
Source:
private boolean propertiesRequiringUnplugPlugWereUpdated ( ) { return ( ( ! ( oldIface.getType ( ) . equals ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getInterface ( ) . getType ( ) ) ) ) || ( ! ( oldIface.getMacAddress ( ) . equals ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getMacAddress ( ) ) ) ) ) || ( ( oldIface.isPortMirroring ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getInterface ( ) . isPortMirroring ( ) ) ) ; }

Target:
private boolean propertiesRequiringUnplugPlugWereUpdated ( ) { return ( ! ( oldIface.getType ( ) . equals ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getInterface ( ) . getType ( ) ) ) ) || ( ! ( oldIface.getMacAddress ( ) . equals ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getMacAddress ( ) ) ) ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . isPlugAvailableByDisks ( true ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . isPlugAvailableByDisks ( false ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public static void getAAAProfilesListViaPublic ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAAProfilesListViaPublic ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void setUp ( ) { parameters = new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommand ( parameters , null ) ) ; org.mockito.Mockito.doReturn ( storageDomainStaticDao ) . when ( command ) . getStorageDomainStaticDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . addStorageDomainInDb ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateStorageDomainDynamicFromIrs ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . saveLUNsInDB ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.doReturn ( storageDomainStaticDao ) . when ( command ) . getStorageDomainStaticDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . addStorageDomainInDb ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateStorageDomainDynamicFromIrs ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . saveLUNsInDB ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) ) ; }
Source:
public boolean isCacheUpdateNeeded ( ) { int quotaCount = getQuotaDAO ( ) . getQuotaCount ( ) ; int cacheCount = 0 ; lock.readLock ( ) . lock ( ) ; try { for ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Quota > quotaMap : storagePoolQuotaMap.values ( ) ) { cacheCount += quotaMap.size ( ) ; } } finally { lock.readLock ( ) . unlock ( ) ; } return cacheCount < ( ( quotaCount * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MinimumPercentageToUpdateQuotaCache ) ) ) / 100 ) ; }

Target:
public boolean isCacheUpdateNeeded ( ) { int quotaCount = getQuotaDAO ( ) . getQuotaCount ( ) ; int cacheCount = 0 ; lock.readLock ( ) . lock ( ) ; try { for ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Quota > quotaMap : storagePoolQuotaMap.values ( ) ) { cacheCount += quotaMap.size ( ) ; } } finally { lock.readLock ( ) . unlock ( ) ; } return cacheCount < ( ( quotaCount * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MinimumPercentageToUpdateQuotaCache ) ) ) / 100 ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , boolean readOnly , java.lang.String address , java.util.Map < java.lang.String , java.lang.String > customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , java.lang.Boolean readOnly , java.lang.String address , java.util.Map < java.lang.String , java.lang.String > customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }
Source:
private void watchdogModelSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getWatchdogModel ( ) . getSelectedItem ( ) ) == null ) { getWatchdogAction ( ) . setIsChangeable ( false ) ; getWatchdogAction ( ) . setSelectedItem ( null ) ; } else { getWatchdogAction ( ) . setIsChangeable ( true ) ; } }

Target:
private void watchdogModelSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getWatchdogModel ( ) . getSelectedItem ( ) ) == null ) { getWatchdogAction ( ) . setIsChangeable ( false ) ; } else { getWatchdogAction ( ) . setIsChangeable ( true ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenGuestDistributionScore ( vds , parameters ) ) ) ; } return scores ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenGuestDistributionScore ( vds , parameters ) ) ) ; } return scores ; }
Source:
public java.lang.String getTemplate ( java.lang.String realUrlParamName , java.lang.String urlParamName , java.lang.String urlParamType ) { org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) , true ) ; templateWrapper.set ( "realUrlParamName" , realUrlParamName ) ; templateWrapper.set ( "urlParamName" , urlParamName ) ; templateWrapper.set ( "urlParamType" , urlParamType ) ; return templateWrapper.toString ( ) ; }

Target:
public java.lang.String getTemplate ( java.lang.String realUrlParamName , java.lang.String urlParamName , java.lang.String urlParamType ) { org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) ) ; templateWrapper.set ( "realUrlParamName" , realUrlParamName ) ; templateWrapper.set ( "urlParamName" , urlParamName ) ; templateWrapper.set ( "urlParamType" , urlParamType ) ; return templateWrapper.toString ( ) ; }
Source:
public org.ovirt.engine.core.compat.NGuid getStorageDomainId ( ) { return ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) ) != null ? ! ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) . getStorageDomainId ( ) . equals ( Guid.Empty ) ) ? org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) . getStorageDomainId ( ) : super . getStorageDomainId ( ) : super . getStorageDomainId ( ) ; }

Target:
public org.ovirt.engine.core.compat.NGuid getStorageDomainId ( ) { return ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) ) != null ? ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) . getStorageDomainId ( ) ) ) ? org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getParameters ( ) . getStorageDomainId ( ) : super . getStorageDomainId ( ) : super . getStorageDomainId ( ) ; }
Source:
private static void cacheConfigValues ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ; aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private static void cacheConfigValues ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ; aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testGetForDisk ( ) { java.util.Map < java.lang.Boolean , java.util.List < org.ovirt.engine.core.common.businessentities.VM > > result = dao.getForDisk ( FixturesTool.IMAGE_GROUP_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( "wrong number of VMs with unplugged image" , 1 , result.get ( false ) . size ( ) ) ; }

Target:
public void testGetForDisk ( ) { java.util.Map < java.lang.Boolean , java.util.List < org.ovirt.engine.core.common.businessentities.VM > > result = dao.getForDisk ( FixturesTool.IMAGE_GROUP_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( "wrong number of VMs with unplugged image" , 1 , result.get ( java.lang.Boolean.TRUE ) . size ( ) ) ; }
Source:
public static void printContext ( org.ovirt.engine.core.bll.exportimport.vnics.MapVnicContext ctx , java.lang.String ctxName ) { java.lang.System.out.println ( ( ( ctxName + " " ) + ( ctx.print ( ) ) ) ) ; if ( ( ctx.getException ( ) ) != null ) { java.lang.System.out.println ( ctx.getException ( ) ) ; } }

Target:
private static void printContext ( org.ovirt.engine.core.bll.exportimport.vnics.MapVnicContext ctx , java.lang.String ctxName ) { java.lang.System.out.println ( ( ( ctxName + " " ) + ( ctx.print ( ) ) ) ) ; if ( ( ctx.getException ( ) ) != null ) { java.lang.System.out.println ( ctx.getException ( ) ) ; } }
Source:
public void testValidateVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void testValidateVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public void testDiskStats ( ) { java.util.Map < java.lang.String , java.lang.Object > disksStats = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > disk = new java.util.HashMap < > ( ) ; disk.put ( VdsProperties.DISK_STATS_FREE , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.SIZE_FOR_DISK_STATS ) ; disksStats.put ( "a" , disk ) ; disksStats.put ( "b" , disk ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksStats ( disksStats ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.validateDisksStatsList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVds ( ) , xml , false ) ; }

Target:
public void testDiskStats ( ) { java.util.Map < java.lang.String , java.lang.Object > disksStats = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > disk = new java.util.HashMap < > ( ) ; disk.put ( VdsProperties.DISK_STATS_FREE , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.SIZE_FOR_DISK_STATS ) ; disksStats.put ( "a" , disk ) ; disksStats.put ( "b" , disk ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksStats ( disksStats ) ; validateDisksStatsList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVds ( ) , xml , false ) ; }
Source:
public void testTemplateTagLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Tag tag = new org.ovirt.engine.api.model.Tag ( ) ; tag.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TAG_ID ) ; tag.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; tag.getTemplate ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TEMPLATE_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( setUpUriExpectations ( ) , tag ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TEMPLATE_TAG_HREF , tag.getHref ( ) ) ; }

Target:
public void testTemplateTagLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Tag tag = new org.ovirt.engine.api.model.Tag ( ) ; tag.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TAG_ID ) ; tag.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; tag.getTemplate ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TEMPLATE_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( tag ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.TEMPLATE_TAG_HREF , tag.getHref ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.job.JobRepositoryTest.ejbRule.mockResource ( ContainerManagedResourceType.TRANSACTION_MANAGER , new org.ovirt.engine.core.bll.utils.TransactionManagerMock ( ) ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; jobRepository = new org.ovirt.engine.core.bll.job.JobRepositoryImpl ( jobDao , jobSubjectEntityDao , stepDao ) ; job = createJob ( ) ; mockDaos ( job ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; jobRepository = new org.ovirt.engine.core.bll.job.JobRepositoryImpl ( jobDao , jobSubjectEntityDao , stepDao ) ; job = createJob ( ) ; mockDaos ( job ) ; }
Source:
private void fetchCpuProfiles ( org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCpuProfilesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfiles = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getCpuProfiles ( ) . setItems ( cpuProfiles ) ; } } ) ) ; }

Target:
private void fetchCpuProfiles ( org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCpuProfilesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfiles = returnValue.getReturnValue ( ) ; getCpuProfiles ( ) . setItems ( cpuProfiles ) ; } } ) ) ; }
Source:
private java.lang.String GetValue ( java.lang.Object obj ) { if ( obj instanceof org.ovirt.engine.core.common.businessentities.VM ) { return ( ( org.ovirt.engine.core.common.businessentities.VM ) ( obj ) ) . getVmName ( ) ; } if ( obj instanceof org.ovirt.engine.core.common.businessentities.VmPool ) { return ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( obj ) ) . getVmPoolName ( ) ; } throw new org.ovirt.engine.core.compat.NotImplementedException ( ) ; }

Target:
private java.lang.String GetValue ( java.lang.Object obj ) { if ( obj instanceof org.ovirt.engine.core.common.businessentities.VM ) { return ( ( org.ovirt.engine.core.common.businessentities.VM ) ( obj ) ) . getName ( ) ; } if ( obj instanceof org.ovirt.engine.core.common.businessentities.VmPool ) { return ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( obj ) ) . getName ( ) ; } throw new org.ovirt.engine.core.compat.NotImplementedException ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { setClusterPolicyModel ( object.getClusterPolicyModel ( ) ) ; if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.PowerSave ) ) { policyRadioButton_powerSave.setValue ( true ) ; } else if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.EvenlyDistribute ) ) { policyRadioButton_evenDist.setValue ( true ) ; } else { policyRadioButton_none.setValue ( true ) ; } setSelectionAlgorithm ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.PowerSave ) ) { policyRadioButton_powerSave.setValue ( true ) ; } else if ( getClusterPolicyModel ( ) . getSelectionAlgorithm ( ) . equals ( VdsSelectionAlgorithm.EvenlyDistribute ) ) { policyRadioButton_evenDist.setValue ( true ) ; } else { policyRadioButton_none.setValue ( true ) ; } setSelectionAlgorithm ( ) ; }
Source:
private static void nonOperationalPoolTreatment ( org.ovirt.engine.core.common.businessentities.StoragePool pool ) { if ( ! ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.getAllRunningVdssInPool ( pool ) . isEmpty ( ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.log.info ( ( "Moving data center '{}' with Id '{}' to status Problematic from status NotOperational on a one" + " time basis to try to recover" ) , pool.getName ( ) , pool.getId ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.SetStoragePoolStatus , new org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters ( pool.getId ( ) , org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NonResponsive , org.ovirt.engine.core.common.AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_FROM_NON_OPERATIONAL ) ) ; synchronized ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools.remove ( pool.getId ( ) ) ; } } }

Target:
private static void nonOperationalPoolTreatment ( org.ovirt.engine.core.common.businessentities.StoragePool pool ) { if ( ! ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.getAllRunningVdssInPool ( pool ) . isEmpty ( ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.log.info ( ( "Moving data center '{}' with Id '{}' to status Problematic from status NotOperational on a one" + " time basis to try to recover" ) , pool.getName ( ) , pool.getId ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.SetStoragePoolStatus , new org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters ( pool.getId ( ) , org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NonResponsive , org.ovirt.engine.core.common.AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_FROM_NON_OPERATIONAL ) ) ; org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools.remove ( pool.getId ( ) ) ; } }
Source:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.EngineSession result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( dao.remove ( existingEngineSession.getId ( ) ) , 1 ) ; result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNull ( result ) ; org.junit.Assert.assertEquals ( dao.remove ( existingEngineSession.getId ( ) ) , 0 ) ; }

Target:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.EngineSession result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , dao.remove ( existingEngineSession.getId ( ) ) ) ; result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNull ( result ) ; org.junit.Assert.assertEquals ( 0 , dao.remove ( existingEngineSession.getId ( ) ) ) ; }
Source:
public void testIncompleteImport ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { control.replay ( ) ; resource.doImport ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "doImport" , "cluster.id|name" , "storageDomain.id|name" ) ; } }

Target:
public void testIncompleteImport ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.doImport ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "doImport" , "cluster.id|name" , "storageDomain.id|name" ) ; } }
Source:
protected void initQuery ( Q query ) { sessionDataContainer.setUser ( query.getParameters ( ) . getSessionId ( ) , dbUserMock ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacadeMock = org.ovirt.engine.core.bll.AbstractQueryTest.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; org.mockito.Mockito.doReturn ( dbFacadeMock ) . when ( query ) . getDbFacade ( ) ; query.postConstruct ( ) ; }

Target:
protected void initQuery ( Q query ) { sessionDataContainer.setUser ( query.getParameters ( ) . getSessionId ( ) , dbUserMock ) ; query.postConstruct ( ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType parentCommandType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = parameters.getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; return parentParameters ; }

Target:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType parentCommandType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = parameters.getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; return parentParameters ; }
Source:
public void updateCallBackNotified ( final org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCallBackNotified ( true ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . updateNotified ( commandId ) ; return null ; } } ) ; } }

Target:
public void updateCallBackNotified ( final org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCallBackNotified ( true ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . updateNotified ( commandId ) ; } }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel consoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel ) ( model ) ) ; consoleModel.postGetHost ( ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel consoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel ) ( model ) ) ; consoleModel.postGetHost ( ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
private void initCapacityLabel ( ) { this . volumeTotalCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel < java.lang.Long > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; this . volumeFreeCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel < java.lang.Long > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; this . volumeUsedCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel < java.lang.Long > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; }

Target:
private void initCapacityLabel ( ) { this . volumeTotalCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; this . volumeFreeCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; this . volumeUsedCapacity = new org.ovirt.engine.ui.webadmin.widget.label.VolumeCapacityLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.gluster.SubTabVolumeGeneralView.constants ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj.getClass ( ) ) ) { return false ; } org.ovirt.engine.ui.uicommonweb.models.GridTimerStateChangeEvent other = ( ( org.ovirt.engine.ui.uicommonweb.models.GridTimerStateChangeEvent ) ( obj ) ) ; if ( ( refreshRate ) != ( other.refreshRate ) ) return false ; return true ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.ui.uicommonweb.models.GridTimerStateChangeEvent ) ) { return false ; } org.ovirt.engine.ui.uicommonweb.models.GridTimerStateChangeEvent other = ( ( org.ovirt.engine.ui.uicommonweb.models.GridTimerStateChangeEvent ) ( obj ) ) ; return ( refreshRate ) == ( other.refreshRate ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getCompatibilityVersion ( ) ) ) ; }
Source:
private void plugToExternalNetwork ( ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = getProviderProxy ( ) . allocate ( getNetwork ( ) , vnicProfile , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVds ( ) ) ; if ( runtimeProperties != null ) { org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getRuntimeDeviceCustomProperties ( ) . put ( vmDevice.getId ( ) , runtimeProperties ) ; } }

Target:
private void plugToExternalNetwork ( ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = getProviderProxy ( ) . allocate ( getNetwork ( ) , vnicProfile , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVds ( ) , false ) ; if ( runtimeProperties != null ) { org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getRuntimeDeviceCustomProperties ( ) . put ( vmDevice.getId ( ) , runtimeProperties ) ; } }
Source:
private void updateSnapshotDisks ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > filterNonSnapableDisks ( disks ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; getSnapshotDisks ( ) . setItems ( diskImages ) ; }

Target:
private void updateSnapshotDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > filterNonSnapableDisks ( disks ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; getSnapshotDisks ( ) . setItems ( diskImages ) ; }
Source:
public void saveGlusterServerHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook ) { getCallsHandler ( ) . executeModification ( "InsertGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , serverHook.getHookId ( ) ) . addValue ( "server_id" , serverHook.getServerId ( ) ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( serverHook.getStatus ( ) ) ) . addValue ( "content_type" , serverHook.getContentType ( ) ) . addValue ( "checksum" , serverHook.getChecksum ( ) ) ) ; }

Target:
public void saveGlusterServerHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook ) { getCallsHandler ( ) . executeModification ( "InsertGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , serverHook.getHookId ( ) ) . addValue ( "server_id" , serverHook.getServerId ( ) ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( serverHook.getStatus ( ) ) ) . addValue ( "content_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( serverHook.getContentType ( ) ) ) . addValue ( "checksum" , serverHook.getChecksum ( ) ) ) ; }
Source:
private void initNetworkModels ( ) { java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networkModels = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network network : allNetworks ) { networkModels.put ( network.getname ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( network , this ) ) ; } setNetworks ( networkModels ) ; }

Target:
private void initNetworkModels ( ) { java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networkModels = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Network network : allNetworks ) { networkModels.put ( network.getname ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( network , this ) ) ; } setNetworks ( networkModels ) ; }
Source:
protected void initHosts ( ) { startProgress ( null ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostListByClusterId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getPinnedHost ( ) . setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; stopProgress ( ) ; selectCurrentPinnedHost ( ) ; } } ) , vm.getVdsGroupId ( ) ) ; }

Target:
protected void initHosts ( ) { startProgress ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostListByClusterId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getPinnedHost ( ) . setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; stopProgress ( ) ; selectCurrentPinnedHost ( ) ; } } ) , vm.getVdsGroupId ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( result ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( result ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }
Source:
private java.lang.String getPasswordInput ( ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { java.lang.String pass = null ; if ( args.contains ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) { try { pass = readPasswordFile ( args.get ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) ; } catch ( java.lang.Exception e ) { throw new org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult ( ManageDomainsResultEnum.FAILURE_READING_PASSWORD_FILE , e.getMessage ( ) ) ; } if ( pass == null ) { throw new org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult ( ManageDomainsResultEnum.EMPTY_PASSWORD_FILE ) ; } } else { pass = readInteractively ( "Enter password:" , true ) ; } validatePassword ( pass ) ; return pass ; }

Target:
private java.lang.String getPasswordInput ( ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { java.lang.String pass = null ; if ( args.contains ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) { try { pass = readPasswordFile ( args.get ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) ; } catch ( java.lang.Exception e ) { throw new org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult ( ManageDomainsResultEnum.FAILURE_READING_PASSWORD_FILE , e.getMessage ( ) ) ; } } else { pass = readInteractively ( "Enter password:" , true ) ; } validatePassword ( pass ) ; return pass ; }