auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = getBackendResourceManager ( ) . RunVdsCommand ( VDSCommandType.GetGlusterVolumeProfileInfo , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeProfileInfoVDSParameters ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getClusterId ( ) , getUpServerId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getClusterId ( ) ) , getGlusterVolumeName ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getVolumeId ( ) ) ) ) ; org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getQueryReturnValue ( ) . setReturnValue ( returnValue.getReturnValue ( ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getBackendResourceManager ( ) . RunVdsCommand ( VDSCommandType.GetGlusterVolumeProfileInfo , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeProfileInfoVDSParameters ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getClusterId ( ) , getUpServerId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getClusterId ( ) ) , getGlusterVolumeName ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getParameters ( ) . getVolumeId ( ) ) ) ) ; org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQuery.getQueryReturnValue ( ) . setReturnValue ( returnValue.getReturnValue ( ) ) ; }
Source:
protected void handleCredentials ( java.net.HttpURLConnection connection ) { if ( ( ( hostProvider.getUsername ( ) ) != null ) && ( ( hostProvider.getPassword ( ) ) != null ) ) { connection.setRequestProperty ( "Authorization" , java.lang.String.format ( "Basic %1$s" , new org.apache.commons.codec.binary.Base64 ( 0 ) . encodeToString ( java.lang.String.format ( "%1$s:%2$s" , hostProvider.getUsername ( ) , hostProvider.getPassword ( ) ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ) . toString ( ) ) ; } }

Target:
protected void handleCredentials ( java.net.HttpURLConnection connection ) { if ( ( ( hostProvider.getUsername ( ) ) != null ) && ( ( hostProvider.getPassword ( ) ) != null ) ) { connection.setRequestProperty ( "Authorization" , java.lang.String.format ( "Basic %1$s" , new org.apache.commons.codec.binary.Base64 ( 0 ) . encodeToString ( java.lang.String.format ( "%1$s:%2$s" , hostProvider.getUsername ( ) , hostProvider.getPassword ( ) ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Provider > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( returnValue == null ) { return new java.util.ArrayList < > ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.filterProvidersByProvidedType ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Provider > ) ( returnValue ) ) , providedEntity ) ) ; java.util.Collections.sort ( providers , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return providers ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Provider > convert ( java.lang.Object returnValue ) { if ( returnValue == null ) { return new java.util.ArrayList < > ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.filterProvidersByProvidedType ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Provider > ) ( returnValue ) ) , providedEntity ) ) ; java.util.Collections.sort ( providers , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return providers ; }
Source:
private boolean isHostNetworkUnreacable ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = vds.getDynamicData ( ) ; return ( ( vdsDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Reboot ) ) || ( ( ( vdsDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) && ( ( vdsDynamic.getNonOperationalReason ( ) ) == ( org.ovirt.engine.core.common.businessentities.NonOperationalReason.NETWORK_UNREACHABLE ) ) ) ; }

Target:
private boolean isHostNetworkUnreacable ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = vds.getDynamicData ( ) ; return ( ( vdsDynamic.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Reboot ) ) || ( ( ( vdsDynamic.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) && ( ( vdsDynamic.getNonOperationalReason ( ) ) == ( org.ovirt.engine.core.common.businessentities.NonOperationalReason.NETWORK_UNREACHABLE ) ) ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworksByDataCenterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; control.replay ( ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworksByDataCenterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > FindAllInterfaceVlanIdIsEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i : items ) { if ( ( i.getVlanId ( ) ) == null ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > FindAllInterfaceVlanIdIsEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( ( i.getVlanId ( ) ) == null ) { ret.add ( i ) ; } } return ret ; }
Source:
private org.quartz.JobDetail createJobWithBasicMapValues ( java.lang.Object instance , java.lang.String methodName , java.lang.Class < ? > [ ] inputTypes , java.lang.Object [ ] inputParams ) { java.lang.String jobName = generateUniqueNameForInstance ( instance , methodName ) ; org.quartz.JobDetail job = org.quartz.JobBuilder.newJob ( ) . withIdentity ( jobName , Scheduler.DEFAULT_GROUP ) . ofType ( org.ovirt.engine.core.utils.timer.JobWrapper.class ) . build ( ) ; setBasicMapValues ( job.getJobDataMap ( ) , instance , methodName , inputTypes , inputParams ) ; return job ; }

Target:
protected org.quartz.JobDetail createJobWithBasicMapValues ( java.lang.Object instance , java.lang.String methodName , java.lang.Class < ? > [ ] inputTypes , java.lang.Object [ ] inputParams ) { java.lang.String jobName = generateUniqueNameForInstance ( instance , methodName ) ; org.quartz.JobDetail job = org.quartz.JobBuilder.newJob ( ) . withIdentity ( jobName , Scheduler.DEFAULT_GROUP ) . ofType ( org.ovirt.engine.core.utils.timer.JobWrapper.class ) . build ( ) ; setBasicMapValues ( job.getJobDataMap ( ) , instance , methodName , inputTypes , inputParams ) ; return job ; }
Source:
private boolean canEditRequired ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isManagement ( ) ) ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ; }

Target:
private boolean canEditRequired ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel ) { return ( ( clusterNetworkModel.isAttached ( ) ) && ( ! ( clusterNetworkModel.isManagement ( ) ) ) ) && ( ! ( clusterNetworkModel.isExternal ( ) ) ) ; }
Source:
public void initialize ( java.util.ArrayList parameters ) { super . initialize ( parameters ) ; if ( ! ( ( parameters.get ( 3 ) ) instanceof java.lang.Boolean ) ) { throw new org.ovirt.engine.core.bll.storage.InvalidOperationException ( ) ; } _isLastMaster = ( ( java.lang.Boolean ) ( parameters.get ( 3 ) ) ) ; if ( ! ( ( parameters.get ( 4 ) ) instanceof org.ovirt.engine.core.bll.storage.Guid ) ) { throw new org.ovirt.engine.core.bll.storage.InvalidOperationException ( ) ; } _newMasterStorageDomainId = ( ( org.ovirt.engine.core.bll.storage.Guid ) ( parameters.get ( 4 ) ) ) ; }

Target:
public void initialize ( java.util.ArrayList parameters ) { super . initialize ( parameters ) ; if ( ! ( ( parameters.get ( 3 ) ) instanceof java.lang.Boolean ) ) { throw new org.ovirt.engine.core.bll.storage.InvalidOperationException ( ) ; } _isLastMaster = ( ( java.lang.Boolean ) ( parameters.get ( 3 ) ) ) ; if ( ! ( ( parameters.get ( 4 ) ) instanceof org.ovirt.engine.core.compat.Guid ) ) { throw new org.ovirt.engine.core.bll.storage.InvalidOperationException ( ) ; } _newMasterStorageDomainId = ( ( org.ovirt.engine.core.compat.Guid ) ( parameters.get ( 4 ) ) ) ; }
Source:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.DiskProfile diskProfile ) { validateParameters ( diskProfile ) ; org.ovirt.engine.core.common.action.DiskProfileParameters parameters = new org.ovirt.engine.core.common.action.DiskProfileParameters ( ) ; org.ovirt.engine.api.model.DiskProfile map = map ( diskProfile ) ; parameters.setProfile ( map ) ; return performCreate ( VdcActionType.AddDiskProfile , parameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetDiskProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.DiskProfile diskProfile ) { validateParameters ( diskProfile ) ; org.ovirt.engine.api.model.DiskProfile map = map ( diskProfile ) ; org.ovirt.engine.core.common.action.DiskProfileParameters parameters = new org.ovirt.engine.core.common.action.DiskProfileParameters ( map ) ; return performCreate ( VdcActionType.AddDiskProfile , parameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetDiskProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( true , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , 1L , vmID , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( true , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , 1L , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }
Source:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceType.SMARTCARD.getName ( ) , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct = new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct ( ) ; struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getType ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }

Target:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceType.SMARTCARD.getName ( ) , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { java.util.Map struct = new java.util.HashMap ( ) ; struct.put ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getType ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }
Source:
private void mockProxyHost ( boolean anotherProxyAvailable ) { org.ovirt.engine.core.common.businessentities.VDS proxyHost = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; proxyHost.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.PROXY_HOST_ID ) ; org.mockito.Mockito.when ( proxyLocator.findProxyHost ( ) ) . thenReturn ( proxyHost ) ; org.mockito.Mockito.when ( proxyLocator.findProxyHost ( true ) ) . thenReturn ( proxyHost ) ; if ( anotherProxyAvailable ) { org.ovirt.engine.core.common.businessentities.VDS secondProxyHost = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; secondProxyHost.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.SECOND_PROXY_HOST_ID ) ; org.mockito.Mockito.when ( proxyLocator.findProxyHost ( true , org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.PROXY_HOST_ID ) ) . thenReturn ( secondProxyHost ) ; } }

Target:
private void mockProxyHost ( boolean anotherProxyAvailable ) { org.ovirt.engine.core.common.businessentities.VDS proxyHost = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; proxyHost.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.PROXY_HOST_ID ) ; org.mockito.Mockito.when ( proxyLocator.findProxyHost ( true ) ) . thenReturn ( proxyHost ) ; if ( anotherProxyAvailable ) { org.ovirt.engine.core.common.businessentities.VDS secondProxyHost = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; secondProxyHost.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.SECOND_PROXY_HOST_ID ) ; org.mockito.Mockito.when ( proxyLocator.findProxyHost ( true , org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.PROXY_HOST_ID ) ) . thenReturn ( secondProxyHost ) ; } }
Source:
protected static java.util.Set < org.ovirt.engine.core.common.businessentities.storage.BaseDisk > getDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.BaseDisk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.BaseDisk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk diskImage : diskImages ) { diskMap.put ( diskImage.getId ( ) , diskImage ) ; } return new java.util.HashSet < org.ovirt.engine.core.common.businessentities.storage.BaseDisk > ( diskMap.values ( ) ) ; }

Target:
public static java.util.Set < org.ovirt.engine.core.common.businessentities.storage.BaseDisk > getDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.BaseDisk > diskMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk diskImage : diskImages ) { diskMap.put ( diskImage.getId ( ) , diskImage ) ; } return new java.util.HashSet ( diskMap.values ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.NetworkAttachment postPopulate ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model ) { model.getIpAddressAssignments ( ) . getIpAddressAssignments ( ) . get ( 0 ) . setAssignmentMethod ( "dhcp" ) ; model.getQos ( ) . setType ( QosType.HOSTNETWORK.name ( ) . toLowerCase ( ) ) ; return super . postPopulate ( model ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.NetworkAttachment postPopulate ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model ) { model.getIpAddressAssignments ( ) . getIpAddressAssignments ( ) . get ( 0 ) . setAssignmentMethod ( "dhcp" ) ; model.getQos ( ) . setType ( QosType.HOSTNETWORK ) ; return super . postPopulate ( model ) ; }
Source:
private void setDataCenterDetails ( ) { org.ovirt.engine.core.common.businessentities.storage_pool dc = org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getParameters ( ) . getStoragePool ( ) ; setCompatibilityVersion ( dc.getcompatibility_version ( ) . toString ( ) ) ; setStoragePoolType ( dc.getstorage_pool_type ( ) . name ( ) ) ; setQuotaEnforcementType ( dc.getQuotaEnforcementType ( ) . name ( ) ) ; }

Target:
private void setDataCenterDetails ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dc = org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getParameters ( ) . getStoragePool ( ) ; setCompatibilityVersion ( dc.getcompatibility_version ( ) . toString ( ) ) ; setStoragePoolType ( dc.getstorage_pool_type ( ) . name ( ) ) ; setQuotaEnforcementType ( dc.getQuotaEnforcementType ( ) . name ( ) ) ; }
Source:
protected java.security.MessageDigest getMd5Digest ( javax.servlet.http.HttpServletRequest request ) throws java.io.UnsupportedEncodingException , java.security.NoSuchAlgorithmException { java.security.MessageDigest digest = super . getMd5Digest ( request ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_APPLICATION_MODE ) . toString ( ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_PLUGIN_DEFS ) . toString ( ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_ENGINE_REPORTS_BASE_URL ) . toString ( ) . getBytes ( ) ) ; return digest ; }

Target:
protected java.security.MessageDigest getMd5Digest ( javax.servlet.http.HttpServletRequest request ) throws java.io.UnsupportedEncodingException , java.security.NoSuchAlgorithmException { java.security.MessageDigest digest = super . getMd5Digest ( request ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_APPLICATION_MODE ) . toString ( ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_PLUGIN_DEFS ) . toString ( ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; return digest ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid diskId = ( diskImage == null ) ? org.ovirt.engine.core.compat.Guid.Empty : diskImage.getId ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskId , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = org.ovirt.engine.core.bll.MoveDisksCommand.getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid diskId = ( diskImage == null ) ? org.ovirt.engine.core.compat.Guid.Empty : diskImage.getId ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskId , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }
Source:
public void updateAuditLogEventProcessed ( long auditLogId ) throws java.sql.SQLException { java.sql.Connection connection = null ; java.sql.PreparedStatement ps = null ; try { connection = ds.getConnection ( ) ; ps = connection.prepareStatement ( ( "" + ( ( "UPDATE audit_log " + "SET processed = 'true' " ) + "WHERE audit_log_id = ? ;" ) ) ) ; ps.setLong ( 1 , auditLogId ) ; int updated = ps.executeUpdate ( ) ; if ( updated != 1 ) { org.ovirt.engine.core.notifier.dao.EventsManager.log.error ( "Failed to mark audit_log entry as processed for audit_log_id: {}" , auditLogId ) ; } } finally { org.ovirt.engine.core.utils.db.DbUtils.closeQuietly ( ps , connection ) ; } }

Target:
public void updateAuditLogEventProcessed ( long auditLogId ) throws java.sql.SQLException { java.sql.Connection connection = null ; java.sql.PreparedStatement ps = null ; try { connection = ds.getConnection ( ) ; ps = connection.prepareStatement ( ( "UPDATE audit_log " + ( "SET processed = 'true' " + "WHERE audit_log_id = ? ;" ) ) ) ; ps.setLong ( 1 , auditLogId ) ; int updated = ps.executeUpdate ( ) ; if ( updated != 1 ) { org.ovirt.engine.core.notifier.dao.EventsManager.log.error ( "Failed to mark audit_log entry as processed for audit_log_id: {}" , auditLogId ) ; } } finally { org.ovirt.engine.core.utils.db.DbUtils.closeQuietly ( ps , connection ) ; } }
Source:
protected void RemoveSnapshot ( org.ovirt.engine.core.common.businessentities.DiskImage snapshot ) { org.ovirt.engine.core.bll.BaseImagesCommand.getImageStorageDomainMapDao ( ) . remove ( snapshot.getImageId ( ) ) ; getImageDao ( ) . remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesForDisk = getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { getBaseDiskDao ( ) . remove ( snapshot.getId ( ) ) ; } }

Target:
protected void RemoveSnapshot ( org.ovirt.engine.core.common.businessentities.DiskImage snapshot ) { org.ovirt.engine.core.bll.BaseImagesCommand.getImageStorageDomainMapDao ( ) . remove ( snapshot.getImageId ( ) ) ; getImageDao ( ) . remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesForDisk = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { getBaseDiskDao ( ) . remove ( snapshot.getId ( ) ) ; } }
Source:
protected java.lang.String executePeerStatusCommand ( org.ovirt.engine.core.utils.ssh.SSHClient client ) { java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.utils.ssh.ConstraintByteArrayOutputStream ( 500 ) ; java.lang.String command = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.GlusterPeerStatusCommand ) ; try { client.executeCommand ( command , null , out , null ) ; return new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while executing command {0} on server {1}!" , command , client.getHost ( ) , e ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected java.lang.String executePeerStatusCommand ( org.ovirt.engine.core.utils.ssh.SSHClient client ) { java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.utils.ssh.ConstraintByteArrayOutputStream ( 500 ) ; java.lang.String command = org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.GlusterPeerStatusCommand ) ; try { client.executeCommand ( command , null , out , null ) ; return new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while executing command {0} on server {1}!" , command , client.getHost ( ) , e ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void storageDomain ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.storage_domains s = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.common.businessentities.storage_domains st = b.getStorageDomain ( ) ; org.junit.Assert.assertEquals ( s , st ) ; }

Target:
public void storageDomain ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain st = b.getStorageDomain ( ) ; org.junit.Assert.assertEquals ( s , st ) ; }
Source:
public org.ovirt.engine.core.utils.ovf.xml.XmlNode selectSingleNode ( java.lang.String string ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; java.lang.Object o = xPath.evaluate ( string , doc , javax.xml.xpath.XPathConstants.NODE ) ; return new org.ovirt.engine.core.utils.ovf.xml.XmlNode ( ( ( org.w3c.dom.Node ) ( o ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }

Target:
public org.ovirt.engine.core.utils.ovf.xml.XmlNode selectSingleNode ( java.lang.String string ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; java.lang.Object o = xPath.evaluate ( string , doc , javax.xml.xpath.XPathConstants.NODE ) ; return o != null ? new org.ovirt.engine.core.utils.ovf.xml.XmlNode ( ( ( org.w3c.dom.Node ) ( o ) ) ) : null ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface getModel ( int i ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; nic.setId ( GUIDS [ 1 ] ) ; nic.setNetworkName ( NAMES [ i ] ) ; nic.setAddress ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.IPS [ i ] ) ; nic.setSubnet ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.MASKS [ i ] ) ; nic.setGateway ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.GATEWAYS [ i ] ) ; return nic ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getModel ( int i ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; nic.setId ( GUIDS [ 1 ] ) ; nic.setNetworkName ( NAMES [ i ] ) ; nic.setAddress ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.IPS [ i ] ) ; nic.setSubnet ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.MASKS [ i ] ) ; nic.setGateway ( org.ovirt.engine.api.restapi.resource.BackendHostNicResourceTest.GATEWAYS [ i ] ) ; return nic ; }
Source:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.codehaus.jackson.JsonNode id = response.getId ( ) ; if ( org.codehaus.jackson.node.NullNode.class . isInstance ( id ) ) { this . tracker.processIssue ( response ) ; } org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { this . log.error ( "Not able to update response for {}" , response.getId ( ) ) ; return ; } call.addResponse ( response ) ; }

Target:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.codehaus.jackson.JsonNode id = response.getId ( ) ; if ( ( org.codehaus.jackson.node.NullNode.class . isInstance ( id ) ) || ( id == null ) ) { this . tracker.processIssue ( response ) ; return ; } org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { this . log.error ( "Not able to update response for {}" , response.getId ( ) ) ; return ; } call.addResponse ( response ) ; }
Source:
protected void onReveal ( ) { super . onReveal ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; _asyncQuery.setModel ( this ) ; _asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String version = ( ( java.lang.String ) ( result ) ) ; getView ( ) . setVersion ( version ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getRpmVersion ( _asyncQuery ) ; }

Target:
protected void onReveal ( ) { super . onReveal ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; _asyncQuery.setModel ( this ) ; _asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String version = ( ( java.lang.String ) ( result ) ) ; getView ( ) . setVersion ( version ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getRpmVersion ( _asyncQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase ) ( target ) ) ; java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; model.PostDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase ) ( target ) ) ; java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; model.PostDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }
Source:
protected void moveSelectionDown ( ) { if ( suggestionPopup.isShowing ( ) ) { suggestionsTable.focusItemByIndex ( suggestionsTable.getSelectedItemIndex ( ) ) ; if ( ( suggestionsTable.getSelectedItemIndex ( ) ) == 0 ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { suggestionsTable.getElement ( ) . getParentElement ( ) . setScrollTop ( 0 ) ; } } ) ; } } }

Target:
protected void moveSelectionDown ( ) { if ( ( ( suggestionPopup ) != null ) && ( suggestionPopup.isShowing ( ) ) ) { suggestionsTable.focusItemByIndex ( suggestionsTable.getSelectedItemIndex ( ) ) ; if ( ( suggestionsTable.getSelectedItemIndex ( ) ) == 0 ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { suggestionsTable.getElement ( ) . getParentElement ( ) . setScrollTop ( 0 ) ; } } ) ; } } }
Source:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; org.ovirt.engine.core.bll.utils.EngineSSHClient dialog = getEngineSSHClient ( ) ; try { dialog.setHost ( serverName ) ; dialog.connect ( ) ; fingerPrint = dialog.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.errorFormat ( "Could not fetch fingerprint of host {0} with message: {1}" , serverName , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } finally { dialog.disconnect ( ) ; } return fingerPrint ; }

Target:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.errorFormat ( "Could not fetch fingerprint of host {0} with message: {1}" , serverName , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } return fingerPrint ; }
Source:
private org.ovirt.engine.ui.uicommonweb.models.networks.AsyncQuery createProviderReadOnlyCallback ( ) { org.ovirt.engine.ui.uicommonweb.models.networks.AsyncQuery asyncQuery = new org.ovirt.engine.ui.uicommonweb.models.networks.AsyncQuery ( ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.AsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object returnValue ) { setCommandExecutionAllowedForProvider ( ( ( org.ovirt.engine.core.common.businessentities.Provider ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; } } ; return asyncQuery ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.networks.AsyncQuery < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > createProviderReadOnlyCallback ( ) { return new org.ovirt.engine.ui.uicommonweb.models.networks.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { setCommandExecutionAllowedForProvider ( ( ( org.ovirt.engine.core.common.businessentities.Provider ) ( returnValue.getReturnValue ( ) ) ) ) ; } } ) ; }
Source:
public void postOnSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.action.SimpleAction closeAction = getCloseAction ( ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters hostSetupNetworksParameters = createHostSetupNetworksParameters ( ) ; org.ovirt.engine.ui.uicommonweb.action.UiAction setupNetworksAction = new org.ovirt.engine.ui.uicommonweb.action.UiVdcAction ( org.ovirt.engine.core.common.action.VdcActionType.HostSetupNetworks , hostSetupNetworksParameters , this , true ) ; org.ovirt.engine.ui.uicommonweb.action.UiAction uiAction = setupNetworksAction.then ( getVfsConfigAction ( ) ) . then ( getCommitNetworkChangesAction ( ) ) . then ( getLabelUnlabelUiAction ( ) ) ; setupNetworksAction.onAllExecutionsFinish ( closeAction ) ; setupNetworksAction.runAction ( ) ; }

Target:
public void postOnSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.action.SimpleAction closeAction = getCloseAction ( ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters hostSetupNetworksParameters = createHostSetupNetworksParameters ( ) ; org.ovirt.engine.ui.uicommonweb.action.UiAction setupNetworksAction = new org.ovirt.engine.ui.uicommonweb.action.UiVdcAction ( org.ovirt.engine.core.common.action.VdcActionType.HostSetupNetworks , hostSetupNetworksParameters , this , true ) ; setupNetworksAction.then ( getVfsConfigAction ( ) ) . then ( getCommitNetworkChangesAction ( ) ) . onAllExecutionsFinish ( closeAction ) ; setupNetworksAction.runAction ( ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllRunningVdssInPool ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.VDSStatus > vdsStatus = java.util.EnumSet.copyOf ( StoragePoolDomainHelper.vdsDomainsActiveMonitoringStatus ) ; if ( isStoragePoolMemoryBackend ( ) ) { vdsStatus.addAll ( StoragePoolDomainHelper.vdsDomainsMaintenanceMonitoringStatus ) ; } return org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getVdsDao ( ) . getAllForStoragePoolAndStatuses ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStoragePool ( ) . getId ( ) , vdsStatus ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllRunningVdssInPool ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.VDSStatus > vdsStatus = java.util.EnumSet.copyOf ( StoragePoolDomainHelper.vdsDomainsActiveMonitoringStatus ) ; vdsStatus.addAll ( StoragePoolDomainHelper.vdsDomainsMaintenanceMonitoringStatus ) ; return org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getVdsDao ( ) . getAllForStoragePoolAndStatuses ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStoragePool ( ) . getId ( ) , vdsStatus ) ; }
Source:
void bindConfiguration ( ) { bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultLoginSectionPlace.class ) . to ( WebAdminApplicationPlaces.DEFAULT_LOGIN_SECTION_PLACE ) ; bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultMainSectionPlace.class ) . to ( WebAdminApplicationPlaces.DEFAULT_MAIN_SECTION_PLACE ) ; bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.system.ClientStorageKeyPrefix.class ) . to ( org.ovirt.engine.ui.webadmin.gin.SystemModule.CLIENT_STORAGE_KEY_PREFIX ) ; bindResourceConfiguration ( org.ovirt.engine.ui.webadmin.ApplicationConstants.class , org.ovirt.engine.ui.webadmin.ApplicationMessages.class , org.ovirt.engine.ui.webadmin.ApplicationResources.class , org.ovirt.engine.ui.webadmin.ApplicationTemplates.class , org.ovirt.engine.ui.webadmin.ApplicationDynamicMessages.class ) ; }

Target:
void bindConfiguration ( ) { bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultMainSectionPlace.class ) . to ( WebAdminApplicationPlaces.DEFAULT_MAIN_SECTION_PLACE ) ; bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.system.ClientStorageKeyPrefix.class ) . to ( org.ovirt.engine.ui.webadmin.gin.SystemModule.CLIENT_STORAGE_KEY_PREFIX ) ; bindResourceConfiguration ( org.ovirt.engine.ui.webadmin.ApplicationConstants.class , org.ovirt.engine.ui.webadmin.ApplicationMessages.class , org.ovirt.engine.ui.webadmin.ApplicationResources.class , org.ovirt.engine.ui.webadmin.ApplicationTemplates.class , org.ovirt.engine.ui.webadmin.ApplicationDynamicMessages.class ) ; }
Source:
public void onForceRemove ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } org.ovirt.engine.core.common.action.VdcActionParametersBase parametersBase = new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase tempVar = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSelectedItem ( ) ) ) . getId ( ) ) ; tempVar.setForceDelete ( true ) ; parametersBase = tempVar ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveStoragePool , parametersBase ) ; cancel ( ) ; }

Target:
public void onForceRemove ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } org.ovirt.engine.core.common.action.StoragePoolParametersBase tempVar = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSelectedItem ( ) ) ) . getId ( ) ) ; tempVar.setForceDelete ( true ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parametersBase = tempVar ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveStoragePool , parametersBase ) ; cancel ( ) ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }

Target:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null , false ) ; }
Source:
public void validateFailsWhenGlusterServerHasPeers ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.SERVER_ALREADY_PART_OF_ANOTHER_CLUSTER.toString ( ) ) ) ; }

Target:
public void validateFailsWhenGlusterServerHasPeers ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.SERVER_ALREADY_PART_OF_ANOTHER_CLUSTER.toString ( ) ) ) ; }
Source:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isMemorySizeLegal ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( ) ; }

Target:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( ) ; }