auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.frontend.AsyncQuery getVmInitQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getVmInitQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVmById ( getVmInitQuery , vm.getId ( ) ) ; }

Target:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.frontend.AsyncQuery getVmInitQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getVmInitQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmById ( getVmInitQuery , vm.getId ( ) ) ; }
Source:
public void testGetAllMultiVdsSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Hosts" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( vdsResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }

Target:
public void testGetAllMultiVdsSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Hosts" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vdsResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public void testFirstMatch ( ) { java.util.List < java.lang.String > source = java.util.Arrays.asList ( "zero" , "one" , "two " , "three" ) ; org.junit.Assert.assertEquals ( "one" , org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( source , "one" , "two" ) ) ; org.junit.Assert.assertEquals ( "one" , org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( source , "two" , "one" ) ) ; }

Target:
public void testFirstMatch ( ) { java.util.List < java.lang.String > source = java.util.Arrays.asList ( "zero" , "one" , "two " , "three" ) ; org.junit.Assert.assertEquals ( "one" , org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( source , "one" , "two" ) ) ; org.junit.Assert.assertEquals ( "one" , org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( source , "two" , "one" ) ) ; org.junit.Assert.assertEquals ( null , org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( source , null ) ) ; }
Source:
public void setColumnVisible ( com.google.gwt.user.cellview.client.Column < T , ? > column , boolean visible ) { if ( isColumnPresent ( column ) ) { columnVisibleMapOverride.put ( column , visible ) ; java.lang.String columnWidth = ( ( getHiddenPersistedColumnWidth ( column ) ) != null ) ? getHiddenPersistedColumnWidth ( column ) : columnWidthMap.get ( column ) ; persistColumnVisibility ( column , visible ) ; ensureColumnVisible ( column , null , visible , columnWidth , false ) ; } }

Target:
public void setColumnVisible ( com.google.gwt.user.cellview.client.Column < T , ? > column , boolean visible ) { if ( isColumnPresent ( column ) ) { columnVisibleMapOverride.put ( column , visible ) ; ensureColumnVisible ( column , null , visible , columnWidthMap.get ( column ) , false ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( getGlusterVolume ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.DOWN ) ) { failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP , getGlusterVolumeName ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session : georepSessions ) { if ( ( ( session.getSlaveVolumeId ( ) ) == null ) || ( ( session.getSlaveNodeUuid ( ) ) == null ) ) { failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_REMOTE_CLUSTER_NOT_MAINTAINED_BY_ENGINE ) ; } } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session : georepSessions ) { if ( ( ( session.getSlaveVolumeId ( ) ) == null ) || ( ( session.getSlaveNodeUuid ( ) ) == null ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_REMOTE_CLUSTER_NOT_MAINTAINED_BY_ENGINE ) ; } } return true ; }
Source:
public void cpuTypeDoesNotSupportVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( clusterDao , dataCenterDao , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CPU_NOT_FOUND ) ) ; }

Target:
public void cpuTypeDoesNotSupportVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CPU_NOT_FOUND ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Integer numOfActiveVms = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( numOfActiveVms != 0 ) { confirmModel.setMessage ( constants.thereAreActiveVMsRequiringRestart ( ) ) ; } checkForNonResponsiveHosts ( confirmModel ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.lang.Integer numOfActiveVms = returnValue.getReturnValue ( ) ; if ( numOfActiveVms != 0 ) { confirmModel.setMessage ( constants.thereAreActiveVMsRequiringRestart ( ) ) ; } checkForNonResponsiveHosts ( confirmModel ) ; }
Source:
public void testSetEmulatedMachine ( ) { java.lang.String preUpdate = existingCluster.getEmulatedMachine ( ) ; java.lang.String updatedValue = "pc-version-1.2.3" ; org.junit.Assert.assertNotSame ( preUpdate , updatedValue ) ; existingCluster.setEmulatedMachine ( updatedValue ) ; dao.setEmulatedMachine ( existingCluster.getId ( ) , updatedValue , false ) ; org.junit.Assert.assertEquals ( updatedValue , dao.get ( existingCluster.getId ( ) ) . getEmulatedMachine ( ) ) ; }

Target:
public void testSetEmulatedMachine ( ) { java.lang.String preUpdate = existingCluster.getEmulatedMachine ( ) ; java.lang.String updatedValue = "pc-version-1.2.3" ; org.junit.Assert.assertNotSame ( updatedValue , preUpdate ) ; existingCluster.setEmulatedMachine ( updatedValue ) ; dao.setEmulatedMachine ( existingCluster.getId ( ) , updatedValue , false ) ; org.junit.Assert.assertEquals ( updatedValue , dao.get ( existingCluster.getId ( ) ) . getEmulatedMachine ( ) ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration that = ( ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration ) ( o ) ) ; return java.util.Objects.equals ( getNameServers ( ) , that.getNameServers ( ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration that = ( ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration ) ( o ) ) ; return ( java.util.Objects.equals ( getId ( ) , that.getId ( ) ) ) && ( java.util.Objects.equals ( getNameServers ( ) , that.getNameServers ( ) ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setText ( constants.loginButtonLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }
Source:
private org.ovirt.engine.ui.common.widget.MenuBar rootMenu ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > item ) { org.ovirt.engine.ui.common.widget.MenuBar menuBar = new org.ovirt.engine.ui.common.widget.MenuBar ( true ) ; menuBar.addItem ( messages.menuFor ( item.getName ( ) ) , ( ( com.google.gwt.user.client.Command ) ( null ) ) ) ; menuBar.addSeparator ( ) ; return menuBar ; }

Target:
private org.ovirt.engine.ui.common.widget.MenuBar rootMenu ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > item ) { org.ovirt.engine.ui.common.widget.MenuBar menuBar = new org.ovirt.engine.ui.common.widget.MenuBar ( true ) ; return menuBar ; }
Source:
private static void addCommandForNewQuota ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid quotaLimitId , java.lang.Double desiredStorageSize , java.lang.Integer desiredCPUSize , java.lang.Double desiredMemSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.QuotaManager.QuotaDeltaValue > commandMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.QuotaManager.QuotaDeltaValue > ( ) ; org.ovirt.engine.core.bll.QuotaManager.addCommandForExistingQuota ( commandId , quotaLimitId , desiredStorageSize , desiredCPUSize , desiredMemSize , commandMap ) ; }

Target:
private static void addCommandForNewQuota ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid quotaLimitId , java.lang.Double desiredStorageSize , java.lang.Integer desiredCPUSize , java.lang.Double desiredMemSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.QuotaManager.QuotaDeltaValue > commandMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.QuotaManager.QuotaDeltaValue > ( ) ; org.ovirt.engine.core.bll.QuotaManager.addCommandForExistingQuota ( commandId , desiredStorageSize , desiredCPUSize , desiredMemSize , commandMap ) ; }
Source:
public boolean canOpenSpiceConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( ( item.isPool ( ) ) || ( ! ( isSpiceAvailable ( ) ) ) ) return false ; if ( ( ( isSpiceAvailable ( ) ) && ( item.getDefaultConsoleModel ( ) . getConnectCommand ( ) . getIsAvailable ( ) ) ) && ( item.getDefaultConsoleModel ( ) . getConnectCommand ( ) . getIsExecutionAllowed ( ) ) ) { return true ; } return false ; }

Target:
public boolean canOpenSpiceConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( item.isPool ( ) ) { return false ; } if ( ( item.getDefaultConsoleModel ( ) . getConnectCommand ( ) . getIsAvailable ( ) ) && ( item.getDefaultConsoleModel ( ) . getConnectCommand ( ) . getIsExecutionAllowed ( ) ) ) { return true ; } return false ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.storage_pool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getcompatibility_version ( ) ) != null ) { entity.setcompatibility_version ( pool.getcompatibility_version ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getcompatibility_version ( ) ) != null ) { entity.setcompatibility_version ( pool.getcompatibility_version ( ) ) ; } return entity ; }
Source:
protected boolean updateVnicForBackwardCompatibility ( ) { if ( ! ( validate ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . isPortMirroring ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) . getUserId ( ) ) ) ) ) { return false ; } return true ; }

Target:
protected boolean updateVnicForBackwardCompatibility ( ) { if ( ! ( validate ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) . getUserId ( ) ) ) ) ) { return false ; } return true ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getstatus ( ) ) ; updateVmData ( getVm ( ) . getDynamicData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getStatus ( ) ) ; updateVmData ( getVm ( ) . getDynamicData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct [ ] struct = fullVmListReturn.mVmList ; setReturnValue ( struct ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.ProceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.mVmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.setReturnValue ( struct ) ; }
Source:
public void testGetAllWithPermissionsPrivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDaoTest.NUMBER_OF_STORAGE_DOMAINS_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingDomain ) ; }

Target:
public void testGetAllWithPermissionsPrivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDaoTest.NUMBER_OF_STORAGE_DOMAINS_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingDomain ) ; }
Source:
public static void updateMemoryBalloon ( org.ovirt.engine.core.compat.Guid vmId , java.lang.Boolean isBalloonEnabled ) { if ( isBalloonEnabled == null ) { return ; } if ( isBalloonEnabled ) { if ( ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.hasMemoryBalloon ( vmId ) ) ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addMemoryBalloon ( vmId ) ; } } else { org.ovirt.engine.core.bll.utils.VmDeviceUtils.removeMemoryBalloons ( vmId ) ; } }

Target:
public void updateMemoryBalloon ( org.ovirt.engine.core.compat.Guid vmId , java.lang.Boolean isBalloonEnabled ) { if ( isBalloonEnabled == null ) { return ; } if ( isBalloonEnabled ) { if ( ! ( hasMemoryBalloon ( vmId ) ) ) { addMemoryBalloon ( vmId ) ; } } else { removeMemoryBalloons ( vmId ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.storage_pool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.VmDevice ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VmPayload other = ( ( org.ovirt.engine.core.common.businessentities.VmPayload ) ( obj ) ) ; return ( ( super . equals ( obj ) ) && ( java.util.Objects.equals ( volumeId , other.volumeId ) ) ) && ( java.util.Objects.equals ( files , other.files ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.VmDevice ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VmPayload other = ( ( org.ovirt.engine.core.common.businessentities.VmPayload ) ( obj ) ) ; return ( ( super . equals ( obj ) ) && ( java.util.Objects.equals ( volumeId , other.volumeId ) ) ) && ( java.util.Objects.equals ( files , other.files ) ) ; }
Source:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabledWithToolTip ( ( ( java.lang.Boolean ) ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) ) ) , constants.importAllocationModifiedCollapse ( ) ) ; }

Target:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabledWithToolTip ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) , constants.importAllocationModifiedCollapse ( ) ) ; }
Source:
protected boolean containsDefaultCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = getVdsGroupDao ( ) . getAllForStoragePool ( storagePool.getId ( ) ) ; boolean hasDefaultCluster = false ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.getId ( ) . equals ( org.ovirt.engine.core.common.config.Config.GetValue ( ConfigValues.AutoRegistrationDefaultVdsGroupID ) ) ) { hasDefaultCluster = true ; break ; } } return hasDefaultCluster ; }

Target:
protected boolean containsDefaultCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = getVdsGroupDao ( ) . getAllForStoragePool ( storagePool.getId ( ) ) ; boolean hasDefaultCluster = false ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.getId ( ) . equals ( org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.AutoRegistrationDefaultVdsGroupID ) ) ) { hasDefaultCluster = true ; break ; } } return hasDefaultCluster ; }
Source:
public void appendCustomValueUsesNullSeparator ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = null ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }

Target:
public void appendCustomValueUsesNullSeparator ( ) { final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = null ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; if ( source != null ) { java.lang.Iterable listEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator listIterator = listEnumerable.iterator ( ) ; while ( listIterator.hasNext ( ) ) { list.add ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( listIterator.next ( ) ) ) ) ; } } return list ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; if ( source != null ) { java.lang.Iterable listEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator listIterator = listEnumerable.iterator ( ) ; while ( listIterator.hasNext ( ) ) { list.add ( ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( listIterator.next ( ) ) ) ) ; } } return list ; }
Source:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; stopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onDataLoad ( ) ; } } ) ; }

Target:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; stopProgress ( ) ; }
Source:
private void assertCorrectSlaveCountInValidBonds ( int numberOfSlaves , java.lang.String reason , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { java.lang.String bondName = "bondName" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( bondName , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > slaves = createGivenCountOfSlavesForBond ( bondName , numberOfSlaves ) ; org.junit.Assert.assertThat ( reason , new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . validBond ( slaves ) , matcher ) ; }

Target:
private void assertCorrectSlaveCountInValidBonds ( int numberOfSlaves , java.lang.String reason , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.lang.String bondName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( bondName , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > slaves = createGivenCountOfSlavesForBond ( bondName , numberOfSlaves ) ; org.junit.Assert.assertThat ( reason , new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . validBond ( slaves ) , matcher ) ; }
Source:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) . ConnectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { final org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue result = getResult ( ) ; result.setFailedVds ( vds ) ; result.setFailedLun ( lun ) ; throw e ; } }

Target:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) . connectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { final org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue result = getResult ( ) ; result.setFailedVds ( vds ) ; result.setFailedLun ( lun ) ; throw e ; } }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , com.google.gwt.safehtml.shared.SafeHtml tooltipContent , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { delegate.onBrowserEvent ( context , parent , value , event , valueUpdater ) ; super . onBrowserEvent ( context , parent , value , tooltipContent , event , valueUpdater ) ; }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { delegate.onBrowserEvent ( context , parent , value , event , valueUpdater ) ; super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; }
Source:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) { setImageStatus ( ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ? org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL : org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ) ) ; } updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; setAuditLogTypeFromPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }

Target:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ) { setImageStatus ( ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ? org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL : org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ) ) ; } updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; setAuditLogTypeFromPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( getVnicProfile ( ) . isPortMirroring ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CANNOT_PERFORM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( ( ( getVnicProfile ( ) ) != null ) && ( getVnicProfile ( ) . isPortMirroring ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CANNOT_PERFORM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertNotNull ( disk ) ; assertEquals ( disk.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID.toString ( ) ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertNotNull ( disk ) ; assertEquals ( disk.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID.toString ( ) ) ; }
Source:
public static void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public 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.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; }
Source:
private static void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; return ! ( siblingVlanInterfaces.isEmpty ( ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
private void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; return ! ( siblingVlanInterfaces.isEmpty ( ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { loadStorageDomain ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getParameters ( ) . isSkipDomainChecks ( ) ) ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( storageDomain ) ; if ( ! ( validate ( storageDomainValidator.isDomainExistAndActive ( ) ) ) ) { return false ; } } return true ; }

Target:
protected boolean validate ( ) { loadStorageDomain ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getParameters ( ) . isSkipDomainChecks ( ) ) ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( storageDomain ) ; if ( ! ( validate ( storageDomainValidator.isDomainExistAndActive ( ) ) ) ) { return false ; } } return true ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkToVdsGroupCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( org.ovirt.engine.core.bll.network.cluster.DetachNetworkToVdsGroupCommand.getParameters ( ) . getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkToVdsGroupCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkToVdsGroupCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkToVdsGroupCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ; }
Source:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData repoFileMetaData , final java.util.concurrent.CountDownLatch latch ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; isRefreshed = refreshIsoDomain ( repoFileMetaData.getRepoDomainId ( ) , problematicRepoFileList , repoFileMetaData.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { latch.countDown ( ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.infoFormat ( "Finished automatic refresh process for {0} file type with {1}, for storage domain id {2}." , repoFileMetaData.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoFileMetaData.getRepoDomainId ( ) ) ; } }

Target:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData repoFileMetaData ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; isRefreshed = refreshIsoDomain ( repoFileMetaData.getRepoDomainId ( ) , problematicRepoFileList , repoFileMetaData.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.infoFormat ( "Finished automatic refresh process for {0} file type with {1}, for storage domain id {2}." , repoFileMetaData.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoFileMetaData.getRepoDomainId ( ) ) ; } }
Source:
private void initVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( org.ovirt.engine.core.compat.Version item : getVersion ( ) . getItems ( ) ) { if ( org.ovirt.engine.core.compat.Version.OpEquality ( item , getEntity ( ) . getcompatibility_version ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }

Target:
private void initVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( org.ovirt.engine.core.compat.Version item : getVersion ( ) . getItems ( ) ) { if ( item.equals ( getEntity ( ) . getcompatibility_version ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( ( ( p.getUsageCpuPercent ( ) ) + ( calcSpmCpuConsumption ( p ) ) ) < lowUtilization ) && ( ( p.getVmCount ( ) ) >= minVmCount ) ) && ( ( ( p.getCpuOverCommitTimestamp ( ) ) == null ) || ( ( ( new java.util.Date ( ) . getTime ( ) ) - ( p.getCpuOverCommitTimestamp ( ) . getTime ( ) ) ) < ( java.util.concurrent.TimeUnit.MINUTES.toMillis ( cpuOverCommitDurationMinutes ) ) ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( ( ( p.getUsageCpuPercent ( ) ) + ( calcSpmCpuConsumption ( p ) ) ) < lowUtilization ) && ( ( p.getVmCount ( ) ) >= minVmCount ) ) && ( ( ( p.getCpuOverCommitTimestamp ( ) ) == null ) || ( ( ( getTime ( ) . getTime ( ) ) - ( p.getCpuOverCommitTimestamp ( ) . getTime ( ) ) ) < ( java.util.concurrent.TimeUnit.MINUTES.toMillis ( cpuOverCommitDurationMinutes ) ) ) ) ; }
Source:
public static void getAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } java.util.Collections.sort ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( source ) ) , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( ) , aQuery ) ; }

Target:
public static void getAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } java.util.Collections.sort ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( source ) ) , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( ) , aQuery ) ; }
Source:
private static java.util.Set < java.lang.String > getClusterEmulatedMachines ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { return new java.util.HashSet ( java.util.Arrays.asList ( cluster.getEmulatedMachine ( ) . split ( "," ) ) ) ; }

Target:
private static java.util.Set < java.lang.String > getClusterEmulatedMachines ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( ( cluster.getEmulatedMachine ( ) ) == null ) { return new java.util.HashSet < > ( ) ; } else { return new java.util.HashSet ( java.util.Arrays.asList ( cluster.getEmulatedMachine ( ) . split ( "," ) ) ) ; } }
Source:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabled ( ( ( java.lang.Boolean ) ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) ) ) ) ; }

Target:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabled ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) ) ; }
Source:
public void validateFailsForVdsNonUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( ) , null ) ) ; prepareMocks ( cmd , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Error ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Maintenance ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForVdsNonUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( ) , null ) ) ; prepareMocks ( VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Error ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Maintenance ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }