auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.FALSE.toString ( ) ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; resource.remove ( ) ; }

Target:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.FALSE.toString ( ) ) ; setUriInfo ( uriInfo ) ; resource.remove ( ) ; }
Source:
protected void init ( ) { resource = new org.ovirt.engine.api.restapi.resource.BackendHostResource ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.restapi.resource.BackendHostsResource ( ) ) ; resource.setBackend ( backend ) ; resource.setMappingLocator ( mapperLocator ) ; resource.setMessageBundle ( messageBundle ) ; resource.setHttpHeaders ( httpHeaders ) ; }

Target:
protected void init ( ) { resource = new org.ovirt.engine.api.restapi.resource.BackendHostResource ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.restapi.resource.BackendHostsResource ( ) ) ; resource.setMappingLocator ( mapperLocator ) ; resource.setMessageBundle ( messageBundle ) ; resource.setHttpHeaders ( httpHeaders ) ; }
Source:
public static org.ovirt.engine.api.model.User map ( org.ovirt.engine.core.aaa.DirectoryUser entity , org.ovirt.engine.api.model.User template ) { org.ovirt.engine.api.model.User model = ( template != null ) ? template : new org.ovirt.engine.api.model.User ( ) ; model.setName ( entity.getFirstName ( ) ) ; model.setUserName ( ( ( ( entity.getName ( ) ) + "@" ) + ( entity.getDirectoryName ( ) ) ) ) ; model.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getId ( ) ) ) ; model.setLastName ( entity.getLastName ( ) ) ; model.setEmail ( entity.getEmail ( ) ) ; model.setDepartment ( entity.getDepartment ( ) ) ; model.setPrincipal ( entity.getPrincipal ( ) ) ; model.setNamespace ( entity.getNamespace ( ) ) ; if ( ( entity.getGroups ( ) ) != null ) { model.setGroups ( new org.ovirt.engine.api.model.Groups ( ) ) ; for ( org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup : entity.getGroups ( ) ) { org.ovirt.engine.api.model.Group group = new org.ovirt.engine.api.model.Group ( ) ; group.setName ( directoryGroup.getName ( ) ) ; model.getGroups ( ) . getGroups ( ) . add ( group ) ; } } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( entity.getDirectoryName ( ) ) ) ) { org.ovirt.engine.api.model.Domain dom = new org.ovirt.engine.api.model.Domain ( ) ; dom.setId ( new org.ovirt.engine.core.compat.Guid ( entity.getDirectoryName ( ) . getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) , true ) . toString ( ) ) ; model.setDomain ( dom ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.User map ( org.ovirt.engine.core.aaa.DirectoryUser entity , org.ovirt.engine.api.model.User template ) { org.ovirt.engine.api.model.User model = ( template != null ) ? template : new org.ovirt.engine.api.model.User ( ) ; model.setName ( entity.getFirstName ( ) ) ; model.setUserName ( ( ( ( entity.getName ( ) ) + "@" ) + ( entity.getDirectoryName ( ) ) ) ) ; model.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getId ( ) ) ) ; model.setLastName ( entity.getLastName ( ) ) ; model.setEmail ( entity.getEmail ( ) ) ; model.setDepartment ( entity.getDepartment ( ) ) ; model.setPrincipal ( entity.getPrincipal ( ) ) ; model.setNamespace ( entity.getNamespace ( ) ) ; if ( ( entity.getGroups ( ) ) != null ) { model.setGroups ( new org.ovirt.engine.api.model.Groups ( ) ) ; for ( org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup : entity.getGroups ( ) ) { org.ovirt.engine.api.model.Group group = new org.ovirt.engine.api.model.Group ( ) ; group.setName ( directoryGroup.getName ( ) ) ; model.getGroups ( ) . getGroups ( ) . add ( group ) ; } } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( entity.getDirectoryName ( ) ) ) ) { org.ovirt.engine.api.model.Domain dom = new org.ovirt.engine.api.model.Domain ( ) ; dom.setName ( entity.getDirectoryName ( ) ) ; dom.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( dom.getName ( ) ) ) ; model.setDomain ( dom ) ; } return model ; }
Source:
public void setMessage ( java.lang.String message ) { if ( ( ( getHashName ( ) ) != null ) && ( getHashName ( ) . startsWith ( "remove_" ) ) ) { super . setMessage ( messages.removeConfirmationPopupMessage ( message ) ) ; } else { super . setMessage ( message ) ; } }

Target:
public void setMessage ( java.lang.String message ) { if ( ( ( getHashName ( ) ) != null ) && ( getHashName ( ) . startsWith ( "remove_" ) ) ) { super . setMessage ( constants.removeConfirmationPopupMessage ( ) ) ; } else { super . setMessage ( message ) ; } }
Source:
public void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status , boolean updateDB ) { this . commandStatus = status ; if ( updateDB ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }

Target:
public void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status , boolean updateDB ) { this . commandStatus = status ; if ( updateDB ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } } }
Source:
public void setModel ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel nodeModel , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > numaNodeList ) { numaPanel.setModel ( nodeModel ) ; this . nodeModel = nodeModel ; if ( nodeModel.isLocked ( ) ) { enableDrag ( false ) ; } else { createMenu ( numaNodeList , nodeModel.getVmNumaNode ( ) . getIndex ( ) ) ; } }

Target:
public void setModel ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel nodeModel , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > numaNodeList ) { numaPanel.setModel ( nodeModel ) ; this . nodeModel = nodeModel ; if ( nodeModel.isLocked ( ) ) { enableDrag ( false ) ; } else { createMenu ( numaNodeList , nodeModel.getIndex ( ) ) ; } }
Source:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult , java.util.ArrayList < java.lang.String > message ) { if ( ! ( validationResult.isValid ( ) ) ) { message.add ( validationResult.getMessage ( ) . name ( ) ) ; if ( ( validationResult.getVariableReplacements ( ) ) != null ) { for ( java.lang.String variableReplacement : validationResult.getVariableReplacements ( ) ) { message.add ( variableReplacement ) ; } } } return validationResult.isValid ( ) ; }

Target:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult , java.util.List < java.lang.String > message ) { if ( ! ( validationResult.isValid ( ) ) ) { message.add ( validationResult.getMessage ( ) . name ( ) ) ; if ( ( validationResult.getVariableReplacements ( ) ) != null ) { for ( java.lang.String variableReplacement : validationResult.getVariableReplacements ( ) ) { message.add ( variableReplacement ) ; } } } return validationResult.isValid ( ) ; }
Source:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > getExclusiveLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isBoot ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) , LockingGroup.VM_DISK_BOOT.name ( ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isBoot ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) . toString ( ) , LockingGroup.VM_DISK_BOOT.name ( ) ) ; } return null ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem > mapOperationSystem ( java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ForemanOperatingSystem > foremanOss ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem > oss = new java.util.ArrayList ( foremanOss.size ( ) ) ; for ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanOperatingSystem os : foremanOss ) { org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem eos = new org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem ( ) ; eos.setName ( os.getName ( ) ) ; eos.setId ( os.getId ( ) ) ; oss.add ( eos ) ; } return oss ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem > mapOperationSystem ( java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ForemanOperatingSystem > foremanOss ) { java.util.List < org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem > oss = new java.util.ArrayList ( foremanOss.size ( ) ) ; for ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanOperatingSystem os : foremanOss ) { org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem eos = new org.ovirt.engine.core.common.businessentities.ExternalOperatingSystem ( ) ; eos.setName ( os.getName ( ) ) ; eos.setId ( os.getId ( ) ) ; oss.add ( eos ) ; } return oss ; }
Source:
public void validateFailsIfStopped ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StopGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( stoppedVolumeId , geoRepSessionId ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getGeoRepSession ( geoRepSessionId , GeoRepSessionStatus.STOPPED ) ) . when ( geoRepDao ) . getById ( geoRepSessionId ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsIfStopped ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StopGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( stoppedVolumeId , geoRepSessionId ) , null ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getGeoRepSession ( geoRepSessionId , GeoRepSessionStatus.STOPPED ) ) . when ( geoRepDao ) . getById ( geoRepSessionId ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > runHostListMethod ( org.apache.commons.httpclient.HttpMethod httpMethod ) { try { runHttpMethod ( httpClient , httpMethod ) ; org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper [ ] hosts = objectMapper.readValue ( httpMethod.getResponseBody ( ) , org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper [ ] . class ) ; return map ( java.util.Arrays.asList ( hosts ) ) ; } catch ( org.codehaus.jackson.JsonParseException e ) { handleException ( e ) ; } catch ( org.codehaus.jackson.map.JsonMappingException e ) { handleException ( e ) ; } catch ( java.io.IOException e ) { handleException ( e ) ; } return null ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > runHostListMethod ( org.apache.commons.httpclient.HttpMethod httpMethod ) { try { runHttpMethod ( httpClient , httpMethod ) ; org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper [ ] hosts = objectMapper.readValue ( httpMethod.getResponseBody ( ) , org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper [ ] . class ) ; return map ( java.util.Arrays.asList ( hosts ) ) ; } catch ( java.io.IOException e ) { handleException ( e ) ; } return null ; }
Source:
private org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel createUnmanagedNetworkModel ( java.lang.String networkName , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.Network unmanagedNetwork = new org.ovirt.engine.core.common.businessentities.Network ( ) ; unmanagedNetwork.setname ( networkName ) ; unmanagedNetwork.setvlan_id ( nic.getVlanId ( ) ) ; unmanagedNetwork.setMtu ( nic.getMtu ( ) ) ; unmanagedNetwork.setVmNetwork ( nic.isBridged ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( unmanagedNetwork , this ) ; networkMap.put ( networkName , networkModel ) ; return networkModel ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel createUnmanagedNetworkModel ( java.lang.String networkName , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.Network unmanagedNetwork = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; unmanagedNetwork.setname ( networkName ) ; unmanagedNetwork.setvlan_id ( nic.getVlanId ( ) ) ; unmanagedNetwork.setMtu ( nic.getMtu ( ) ) ; unmanagedNetwork.setVmNetwork ( nic.isBridged ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ( unmanagedNetwork , this ) ; networkMap.put ( networkName , networkModel ) ; return networkModel ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EngineBackupLogId other = ( ( org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ( obj ) ) ; return ( java.util.Objects.equals ( scope , other.scope ) ) && ( java.util.Objects.equals ( doneAt , other.doneAt ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EngineBackupLogId other = ( ( org.ovirt.engine.core.common.businessentities.EngineBackupLogId ) ( obj ) ) ; return ( java.util.Objects.equals ( scope , other.scope ) ) && ( java.util.Objects.equals ( doneAt , other.doneAt ) ) ; }
Source:
public java.lang.String getTemplate ( java.lang.String type , java.lang.String name ) { org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate paramTemplate = new org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate ( ) ; java.lang.String param = paramTemplate.getTemplate ( type , name ) ; org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) , true ) ; templateWrapper.set ( "param" , param ) ; return templateWrapper.toString ( ) ; }

Target:
public java.lang.String getTemplate ( java.lang.String type , java.lang.String name ) { org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate paramTemplate = new org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate ( ) ; java.lang.String param = paramTemplate.getTemplate ( type , name ) ; org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) ) ; templateWrapper.set ( "param" , param ) ; return templateWrapper.toString ( ) ; }
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 ) ) ; if ( ( siblingVlanInterfaces.size ( ) ) > 0 ) { return true ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = vmStaticDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_ID ) ; org.junit.Assert.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getName ( ) ; org.junit.Assert.assertTrue ( name.equals ( underTest.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = vmStaticDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_ID ) ; org.junit.Assert.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getName ( ) ; org.junit.Assert.assertEquals ( name , underTest.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ; }
Source:
protected java.lang.String getColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }

Target:
protected java.lang.String getColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }
Source:
private void createCluster ( ) { cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setName ( org.ovirt.engine.core.bll.AddClusterCommandTest.CLUSTER_NAME ) ; cluster.setDescription ( org.ovirt.engine.core.bll.AddClusterCommandTest.CLUSTER_DESCRIPTION ) ; cluster.setStoragePoolId ( org.ovirt.engine.core.bll.AddClusterCommandTest.DATA_CENTER_ID ) ; cluster.setCpuName ( org.ovirt.engine.core.bll.AddClusterCommandTest.CPU_NAME ) ; cluster.setMaxVdsMemoryOverCommit ( org.ovirt.engine.core.bll.AddClusterCommandTest.MAX_VDS_MEMORY_OVER_COMMIT ) ; cluster.setCountThreadsAsCores ( org.ovirt.engine.core.bll.AddClusterCommandTest.COUNT_THREADS_AS_CORES ) ; cluster.setTransparentHugepages ( org.ovirt.engine.core.bll.AddClusterCommandTest.SET_TRANSPARENT_HUGE_PAGES ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.AddClusterCommandTest.SET_COMPATIBILITY_VERSION ) ; cluster.setMigrateOnError ( org.ovirt.engine.core.bll.AddClusterCommandTest.MIGRATE_ON_ERROR ) ; cluster.setArchitecture ( org.ovirt.engine.core.bll.AddClusterCommandTest.ARCHITECTURE_TYPE ) ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setName ( org.ovirt.engine.core.bll.AddClusterCommandTest.CLUSTER_NAME ) ; cluster.setDescription ( org.ovirt.engine.core.bll.AddClusterCommandTest.CLUSTER_DESCRIPTION ) ; cluster.setStoragePoolId ( org.ovirt.engine.core.bll.AddClusterCommandTest.DATA_CENTER_ID ) ; cluster.setCpuName ( org.ovirt.engine.core.bll.AddClusterCommandTest.CPU_NAME ) ; cluster.setMaxVdsMemoryOverCommit ( org.ovirt.engine.core.bll.AddClusterCommandTest.MAX_VDS_MEMORY_OVER_COMMIT ) ; cluster.setCountThreadsAsCores ( org.ovirt.engine.core.bll.AddClusterCommandTest.COUNT_THREADS_AS_CORES ) ; cluster.setTransparentHugepages ( org.ovirt.engine.core.bll.AddClusterCommandTest.SET_TRANSPARENT_HUGE_PAGES ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.AddClusterCommandTest.SET_COMPATIBILITY_VERSION ) ; cluster.setMigrateOnError ( org.ovirt.engine.core.bll.AddClusterCommandTest.MIGRATE_ON_ERROR ) ; cluster.setArchitecture ( org.ovirt.engine.core.bll.AddClusterCommandTest.ARCHITECTURE_TYPE ) ; return cluster ; }
Source:
public void testUpdate ( ) { dao.save ( vnicProfile ) ; vnicProfile.setPortMirroring ( true ) ; vnicProfile.setPassthrough ( true ) ; dao.update ( vnicProfile ) ; org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( vnicProfile.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( vnicProfile.getId ( ) , result.getId ( ) ) ; org.junit.Assert.assertEquals ( true , result.isPortMirroring ( ) ) ; org.junit.Assert.assertTrue ( result.isPassthrough ( ) ) ; }

Target:
public void testUpdate ( ) { dao.save ( vnicProfile ) ; vnicProfile.setPortMirroring ( true ) ; vnicProfile.setPassthrough ( true ) ; dao.update ( vnicProfile ) ; org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( vnicProfile.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( vnicProfile.getId ( ) , result.getId ( ) ) ; org.junit.Assert.assertTrue ( result.isPortMirroring ( ) ) ; org.junit.Assert.assertTrue ( result.isPassthrough ( ) ) ; }
Source:
protected void onInitDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : getDiskImages ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( disk ) ) ; } setDisks ( disks ) ; initStorageDomains ( ) ; }

Target:
protected void onInitDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : getDiskImages ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel.diskToModel ( disk ) ) ; } setDisks ( disks ) ; initStorageDomains ( ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLuns ( boolean withDummyLun ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; for ( org.ovirt.engine.core.compat.Guid GUID : org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUN_id ( GUID.toString ( ) ) ; luns.add ( lun ) ; } if ( withDummyLun ) { org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUN_id ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.DUMMY_LUN_ID ) ; luns.add ( dummyLun ) ; } return luns ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLuns ( boolean withDummyLun ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; for ( org.ovirt.engine.core.compat.Guid GUID : org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUN_id ( GUID.toString ( ) ) ; luns.add ( lun ) ; } if ( withDummyLun ) { org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUN_id ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.DUMMY_LUN_ID ) ; luns.add ( dummyLun ) ; } return luns ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( cluster.supportsVirtService ( ) ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.StopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( cluster.supportsVirtService ( ) ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.StopProgress ( ) ; }
Source:
public void storagePoolIdWithStoragePool ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; b.setStoragePoolId ( null ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStoragePool ( p ) ; final org.ovirt.engine.core.compat.Guid n = b.getStoragePoolId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , n ) ; }

Target:
public void storagePoolIdWithStoragePool ( ) { b.setStoragePoolId ( null ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStoragePool ( p ) ; final org.ovirt.engine.core.compat.Guid n = b.getStoragePoolId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , n ) ; }
Source:
public void setUp ( ) { clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.doReturn ( cluster ) . when ( clusterDao ) . get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( glusterUtils.getUpServer ( clusterId ) ) . thenReturn ( getVds ( VDSStatus.Up ) ) ; }

Target:
public void setUp ( ) { clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.doReturn ( cluster ) . when ( clusterDao ) . get ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.when ( glusterUtils.getUpServer ( clusterId ) ) . thenReturn ( getVds ( VDSStatus.Up ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkLabelsByHostNicId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelsResourceTest.nicId } , getEntityList ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkLabelsByHostNicId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelsResourceTest.nicId } , getEntityList ( ) , failure ) ; }
Source:
public boolean hasSqlInjection ( java.lang.String sql ) { sql = removeAllStringValuesFromSql ( sql ) ; if ( ( sql.length ( ) ) > 0 ) { sql = sql.replaceAll ( "\\s+\\(" , "(" ) ; for ( java.lang.String expr : sqlInjectionExpressions ) { if ( sql.contains ( expr ) ) { return true ; } } } return false ; }

Target:
public boolean hasSqlInjection ( java.lang.String sql ) { sql = removeAllStringValuesFromSql ( sql ) ; if ( ! ( sql.isEmpty ( ) ) ) { sql = sql.replaceAll ( "\\s+\\(" , "(" ) ; for ( java.lang.String expr : sqlInjectionExpressions ) { if ( sql.contains ( expr ) ) { return true ; } } } return false ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StatsInfo > getStatsInfo ( ) { org.ovirt.engine.core.common.businessentities.gluster.StatsInfo statInfo = new org.ovirt.engine.core.common.businessentities.gluster.StatsInfo ( ) ; statInfo.setDuration ( 2 ) ; statInfo.setDurationFormatted ( new org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , java.lang.String > ( new java.lang.Integer ( 2 ) , java.util.concurrent.TimeUnit.SECONDS.toString ( ) ) ) ; statInfo.setTotalRead ( 0 ) ; statInfo.setTotalWrite ( 0 ) ; statInfo.setBlockStats ( getBlockStats ( ) ) ; statInfo.setFopStats ( getFopStats ( ) ) ; return java.util.Collections.singletonList ( statInfo ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StatsInfo > getStatsInfo ( ) { org.ovirt.engine.core.common.businessentities.gluster.StatsInfo statInfo = new org.ovirt.engine.core.common.businessentities.gluster.StatsInfo ( ) ; statInfo.setDuration ( 2 ) ; statInfo.setDurationFormatted ( new org.ovirt.engine.core.common.utils.Pair ( new java.lang.Integer ( 2 ) , java.util.concurrent.TimeUnit.SECONDS.toString ( ) ) ) ; statInfo.setTotalRead ( 0 ) ; statInfo.setTotalWrite ( 0 ) ; statInfo.setBlockStats ( getBlockStats ( ) ) ; statInfo.setFopStats ( getFopStats ( ) ) ; return java.util.Collections.singletonList ( statInfo ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM getVmForNonShareableDiskImage ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( ! ( disk.isShareable ( ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.RemoveImageCommand.getVmDAO ( ) . getVmsListForDisk ( disk.getId ( ) ) ; if ( ! ( vms.isEmpty ( ) ) ) { return vms.get ( 0 ) ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM getVmForNonShareableDiskImage ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( ! ( disk.isShareable ( ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.RemoveImageCommand.getVmDAO ( ) . getVmsListForDisk ( disk.getId ( ) , false ) ; if ( ! ( vms.isEmpty ( ) ) ) { return vms.get ( 0 ) ; } } return null ; }
Source:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getimage_group_id ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . get ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . remove ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . endWithFailure ( ) ; }

Target:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getId ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . get ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . remove ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . endWithFailure ( ) ; }
Source:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.vds_spm_id_map > vds_spm_id_mapList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDao ( ) . getAll ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getStoragePoolId ( ) ) ; if ( ( vds_spm_id_mapList.size ( ) ) >= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxNumberOfHostsInStoragePool ) ) ) { buildFaultResult ( ) ; return ; } insertSpmIdToDb ( vds_spm_id_mapList ) ; org.ovirt.engine.core.bll.AddVdsSpmIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.vds_spm_id_map > vds_spm_id_mapList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDao ( ) . getAll ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getStoragePoolId ( ) ) ; if ( ( vds_spm_id_mapList.size ( ) ) >= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumberOfHostsInStoragePool ) ) ) { buildFaultResult ( ) ; return ; } insertSpmIdToDb ( vds_spm_id_mapList ) ; org.ovirt.engine.core.bll.AddVdsSpmIdCommand.setSucceeded ( true ) ; }
Source:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }

Target:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } removeStorageDomainLuns ( storageDomain ) ; return true ; }
Source:
public void init ( ) { initState ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getRedirectServletReportsPage ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { setReportBaseUrl ( ( ( java.lang.String ) ( returnValue ) ) ) ; } } ) ) ; parseReportsXML ( ) ; }

Target:
public void init ( ) { initState ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getRedirectServletReportsPage ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { setReportBaseUrl ( ( ( java.lang.String ) ( returnValue ) ) ) ; } } ) ) ; parseReportsXML ( ) ; }
Source:
public void initDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : vm.getDiskList ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( diskImage ) ) ; } getModel ( ) . setDisks ( disks ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeTypeAvailable ( true ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeTypeChangable ( true ) ; updateIsDisksAvailable ( ) ; }

Target:
public void initDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : vm.getDiskList ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel.diskToModel ( diskImage ) ) ; } getModel ( ) . setDisks ( disks ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeTypeAvailable ( true ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeTypeChangable ( true ) ; updateIsDisksAvailable ( ) ; }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private void mockBackend ( org.ovirt.engine.core.bll.AddVmCommand < ? > cmd ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; returnValue.setReturnValue ( java.lang.Boolean.FALSE ) ; org.mockito.Mockito.when ( backend.runInternalQuery ( org.mockito.Matchers.< org.ovirt.engine.core.common.queries.VdcQueryType > any ( org.ovirt.engine.core.common.queries.VdcQueryType.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ) . thenReturn ( returnValue ) ; org.mockito.Mockito.when ( backend.getResourceManager ( ) ) . thenReturn ( vdsBrokerFrontend ) ; org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; }

Target:
private void mockBackend ( org.ovirt.engine.core.bll.AddVmCommand < ? > cmd ) { org.mockito.Mockito.when ( backend.getResourceManager ( ) ) . thenReturn ( vdsBrokerFrontend ) ; org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; }
Source:
public void refreshLightWeightData ( ) { org.ovirt.engine.core.bll.gluster.GlusterManager.log.debug ( "Refreshing Gluster Data [lightweight]" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = getClusterDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.supportsGlusterService ( ) ) { try { refreshClusterData ( cluster ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.gluster.GlusterManager.log.errorFormat ( "Error while refreshing Gluster lightweight data of cluster {0}!" , cluster.getname ( ) , e ) ; } } } }

Target:
public void refreshLightWeightData ( ) { log.debug ( "Refreshing Gluster Data [lightweight]" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = getClusterDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.supportsGlusterService ( ) ) { try { refreshClusterData ( cluster ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while refreshing Gluster lightweight data of cluster {0}!" , cluster.getname ( ) , e ) ; } } } }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice createVirtioSerialDeviceForVm ( org.ovirt.engine.core.compat.Guid vmId ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.CONTROLLER , VmDeviceType.VIRTIOSERIAL.getName ( ) , "" , 0 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , false , "" , null , null ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice createVirtioSerialDeviceForVm ( org.ovirt.engine.core.compat.Guid vmId ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.CONTROLLER , VmDeviceType.VIRTIOSERIAL.getName ( ) , "" , 0 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , false , "" , null , null , null ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.storage_domains a ) { return ( ( ( ( a.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) && ( ( a.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) && ( ( a.getstatus ( ) ) != null ) ) && ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain a ) { return ( ( ( ( a.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) && ( ( a.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) && ( ( a.getstatus ( ) ) != null ) ) && ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.storage_domains o1 , org.ovirt.engine.core.common.businessentities.storage_domains o2 ) { return ( o1.getLastTimeUsedAsMaster ( ) ) < ( o2.getLastTimeUsedAsMaster ( ) ) ? - 1 : ( o1.getLastTimeUsedAsMaster ( ) ) == ( o2.getLastTimeUsedAsMaster ( ) ) ? 0 : 1 ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.StorageDomain o1 , org.ovirt.engine.core.common.businessentities.StorageDomain o2 ) { return ( o1.getLastTimeUsedAsMaster ( ) ) < ( o2.getLastTimeUsedAsMaster ( ) ) ? - 1 : ( o1.getLastTimeUsedAsMaster ( ) ) == ( o2.getLastTimeUsedAsMaster ( ) ) ? 0 : 1 ; }
Source:
protected void teardown ( ) { if ( ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getParameters ( ) . getKeepPolicyPMEnabled ( ) ) == false ) { org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . setPowerManagementControlledByPolicy ( false ) ; vdsDynamicDao.updateVdsDynamicPowerManagementPolicyFlag ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVdsId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getDynamicData ( ) . isPowerManagementControlledByPolicy ( ) ) ; } }

Target:
protected void teardown ( ) { if ( ! ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getParameters ( ) . getKeepPolicyPMEnabled ( ) ) ) { org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . setPowerManagementControlledByPolicy ( false ) ; vdsDynamicDao.updateVdsDynamicPowerManagementPolicyFlag ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVdsId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getDynamicData ( ) . isPowerManagementControlledByPolicy ( ) ) ; } }
Source:
private static void updateOption ( org.ovirt.engine.core.common.businessentities.VdcOption option ) { java.util.Map < java.lang.String , java.lang.Object > values = org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.get ( option.getOptionName ( ) ) ; if ( values == null ) { values = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.put ( option.getOptionName ( ) , values ) ; } values.put ( option.getVersion ( ) , org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils.getValue ( option ) ) ; }

Target:
private static void updateOption ( org.ovirt.engine.core.common.businessentities.VdcOption option ) { java.util.Map < java.lang.String , java.lang.Object > values = org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.get ( option.getOptionName ( ) ) ; if ( values == null ) { values = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.put ( option.getOptionName ( ) , values ) ; } values.put ( option.getVersion ( ) , getValue ( option ) ) ; }