auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static java.lang.String getConstraint ( javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > queries , java.lang.String constraint ) { return ( ( queries != null ) && ( ( queries.get ( constraint ) ) != null ) ) && ( ( queries.get ( constraint ) . size ( ) ) > 0 ) ? queries.get ( constraint ) . get ( 0 ) : null ; }

Target:
public static java.lang.String getConstraint ( javax.ws.rs.core.HttpHeaders headers , javax.ws.rs.core.UriInfo ui , java.lang.String defaultQuery , java.lang.Class < ? > clz , boolean typePrefix ) { java.lang.String prefix = ( typePrefix ) ? org.ovirt.engine.api.common.util.QueryHelper.RETURN_TYPES.get ( clz ) : "" ; java.lang.String search = org.ovirt.engine.api.common.util.ParametersHelper.getParameter ( headers , ui , org.ovirt.engine.api.common.util.QueryHelper.CONSTRAINT_PARAMETER ) ; if ( search != null ) { return prefix + search ; } if ( defaultQuery != null ) { return prefix + defaultQuery ; } return null ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers , org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( providers ) ) ; providersListModel.setIsChangable ( true ) ; getIsDiscoveredHosts ( ) . setEntity ( null ) ; getIsDiscoveredHosts ( ) . setEntity ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers , org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( providers ) ) ; providersListModel.setIsChangeable ( true ) ; getIsDiscoveredHosts ( ) . setEntity ( null ) ; getIsDiscoveredHosts ( ) . setEntity ( true ) ; }
Source:
public void PostOnSaveNew ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleModel ) ( getWindow ( ) ) ) ; model.StopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { Cancel ( ) ; getSearchCommand ( ) . Execute ( ) ; } }

Target:
public void postOnSaveNew ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; getSearchCommand ( ) . execute ( ) ; } }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters p = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = getBackend ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , p ) ; if ( ! ( qRetVal.getSucceeded ( ) ) ) { return null ; } return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > ) ( qRetVal.getReturnValue ( ) ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters p = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = org.ovirt.engine.core.bll.ImportVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , p ) ; return qRetVal.getSucceeded ( ) ? qRetVal.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; }
Source:
public void testCheckIfRoleIsReadOnlyTrue ( ) { getRole ( ) . setReadonly ( true ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "Role should be read only" , getCommand ( ) . checkIfRoleIsReadOnly ( messages ) ) ; org.junit.Assert.assertEquals ( "Wrong canDoAction message" , VdcBllMessages.ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY.toString ( ) , messages.get ( 0 ) ) ; }

Target:
public void testCheckIfRoleIsReadOnlyTrue ( ) { getRole ( ) . setReadonly ( true ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "Role should be read only" , getCommand ( ) . checkIfRoleIsReadOnly ( messages ) ) ; org.junit.Assert.assertEquals ( "Wrong canDoAction message" , EngineMessage.ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY.toString ( ) , messages.get ( 0 ) ) ; }
Source:
private void initClustersTable ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { clusterTable = new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < org.ovirt.engine.core.common.businessentities.VDSGroup > ( clusterPolicyClusterModelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , eventBus , clientStorage ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDSGroup object ) { return object.getName ( ) ; } } ; clusterTable.addColumn ( clusterColumn , constants.clusterPolicyAttachedCluster ( ) ) ; }

Target:
private void initClustersTable ( ) { clusterTable = new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < org.ovirt.engine.core.common.businessentities.VDSGroup > ( clusterPolicyClusterModelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , eventBus , clientStorage ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDSGroup object ) { return object.getName ( ) ; } } ; clusterTable.addColumn ( clusterColumn , org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyView.constants.clusterPolicyAttachedCluster ( ) ) ; }
Source:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getStorageIds ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }

Target:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getStorageIds ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }
Source:
public void testGetDbFieldType ( ) { org.ovirt.engine.core.searchbackend.IConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.AdGroupConditionFieldAutoCompleter ( ) ; org.junit.Assert.assertEquals ( "NAME" , java.lang.String.class , comp.getDbFieldType ( "NAME" ) ) ; org.junit.Assert.assertNull ( "name" , comp.getDbFieldType ( "name" ) ) ; org.junit.Assert.assertNull ( "22" , comp.getDbFieldType ( "22" ) ) ; }

Target:
public void testGetDbFieldType ( ) { org.ovirt.engine.core.searchbackend.IConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.AdGroupConditionFieldAutoCompleter ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.lang.String.class , comp.getDbFieldType ( "NAME" ) , "NAME" ) ; org.junit.jupiter.api.Assertions.assertNull ( comp.getDbFieldType ( "name" ) , "name" ) ; org.junit.jupiter.api.Assertions.assertNull ( comp.getDbFieldType ( "22" ) , "22" ) ; }
Source:
void initUncaughtExceptionHandler ( final java.util.logging.Logger rootLogger ) { com.google.gwt.core.client.GWT.setUncaughtExceptionHandler ( new com.google.gwt.core.client.GWT.UncaughtExceptionHandler ( ) { @ java.lang.Override public void onUncaughtException ( java.lang.Throwable t ) { rootLogger.log ( java.util.logging.Level.SEVERE , "Uncaught exception: " , t ) ; alertManager.showUncaughtExceptionAlert ( t ) ; } } ) ; }

Target:
void initUncaughtExceptionHandler ( final java.util.logging.Logger rootLogger , final java.util.logging.Logger remoteLogger ) { com.google.gwt.core.client.GWT.setUncaughtExceptionHandler ( new com.google.gwt.core.client.GWT.UncaughtExceptionHandler ( ) { @ java.lang.Override public void onUncaughtException ( java.lang.Throwable t ) { rootLogger.log ( java.util.logging.Level.SEVERE , "Uncaught exception: " , t ) ; remoteLogger.log ( java.util.logging.Level.SEVERE , "Uncaught exception: " , t ) ; alertManager.showUncaughtExceptionAlert ( t ) ; } } ) ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , com.google.gwt.dom.client.Element parent , T value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < T > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; com.google.gwt.dom.client.EventTarget eventTarget = event.getEventTarget ( ) ; if ( ! ( com.google.gwt.dom.client.Element.is ( eventTarget ) ) ) { return ; } if ( ( "click" . equals ( event.getType ( ) ) ) && ( isEnabled ( value ) ) ) { onClick ( value ) ; } }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , com.google.gwt.dom.client.Element parent , T value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < T > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; com.google.gwt.dom.client.EventTarget eventTarget = event.getEventTarget ( ) ; if ( ! ( com.google.gwt.dom.client.Element.is ( eventTarget ) ) ) { return ; } if ( ( BrowserEvents.CLICK.equals ( event.getType ( ) ) ) && ( isEnabled ( value ) ) ) { onClick ( value ) ; } }
Source:
public static void GetRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetGlusterHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress , java.lang.String rootPassword , java.lang.String fingerprint ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters ( hostAddress , rootPassword ) ; parameters.setFingerprint ( fingerprint ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServers , parameters , aQuery ) ; }
Source:
public static void GetVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void GetoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
private java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > getDiskMap ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > map = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID ) ; map.put ( org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID , disk ) ; return map ; }

Target:
private java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskMap ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > map = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID ) ; map.put ( org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID , disk ) ; return map ; }
Source:
protected void markDomainsWithOvfsForOvfUpdate ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ovfIds ) { java.util.List < org.ovirt.engine.core.compat.Guid > relevantDomains = org.ovirt.engine.core.bll.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDAO ( ) . loadStorageDomainIdsForOvfIds ( ovfIds ) ; proccessedDomains.addAll ( relevantDomains ) ; org.ovirt.engine.core.bll.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDAO ( ) . updateOvfUpdatedInfo ( proccessedDomains , StorageDomainOvfInfoStatus.OUTDATED , StorageDomainOvfInfoStatus.DISABLED ) ; }

Target:
protected void markDomainsWithOvfsForOvfUpdate ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ovfIds ) { java.util.List < org.ovirt.engine.core.compat.Guid > relevantDomains = org.ovirt.engine.core.bll.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDao ( ) . loadStorageDomainIdsForOvfIds ( ovfIds ) ; proccessedDomains.addAll ( relevantDomains ) ; org.ovirt.engine.core.bll.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDao ( ) . updateOvfUpdatedInfo ( proccessedDomains , StorageDomainOvfInfoStatus.OUTDATED , StorageDomainOvfInfoStatus.DISABLED ) ; }
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.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.ui.uicommonweb.Linq.CaseInsensitiveComparer ( ) ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
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.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.host.NicNameNicIdCompleter completer = new org.ovirt.engine.core.bll.network.host.NicNameNicIdCompleter ( getHostInterfaces ( ) ) ; completer.completeNetworkAttachment ( org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ; if ( networkAttachment == null ) { return failCanDoAction ( VdcBllMessages.NETWORK_ATTACHMENT_NOT_SPECIFIED ) ; } if ( ( networkAttachment.getId ( ) ) != null ) { return failCanDoAction ( VdcBllMessages.NETWORK_ATTACHMENT_CANNOT_BE_CREATED_WITH_SPECIFIC_ID ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.host.NicNameNicIdCompleter completer = new org.ovirt.engine.core.bll.network.host.NicNameNicIdCompleter ( getHostInterfaces ( ) ) ; completer.completeNetworkAttachment ( org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ; if ( networkAttachment == null ) { return failCanDoAction ( EngineMessage.NETWORK_ATTACHMENT_NOT_SPECIFIED ) ; } if ( ( networkAttachment.getId ( ) ) != null ) { return failCanDoAction ( EngineMessage.NETWORK_ATTACHMENT_CANNOT_BE_CREATED_WITH_SPECIFIC_ID ) ; } return true ; }
Source:
private void addInt ( org.snmp4j.PDU v2pdu , org.snmp4j.smi.OID prefix , int suffix , java.lang.Integer val , boolean allowEmpty ) { if ( allowEmpty || ( val != null ) ) { v2pdu.add ( new org.snmp4j.smi.VariableBinding ( new org.snmp4j.smi.OID ( prefix ) . append ( suffix ) , new org.snmp4j.smi.Integer32 ( ( val == null ? 0 : val ) ) ) ) ; } }

Target:
private void addInt ( org.snmp4j.PDU pdu , org.snmp4j.smi.OID prefix , int suffix , java.lang.Integer val , boolean allowEmpty ) { if ( allowEmpty || ( val != null ) ) { pdu.add ( new org.snmp4j.smi.VariableBinding ( new org.snmp4j.smi.OID ( prefix ) . append ( suffix ) , new org.snmp4j.smi.Integer32 ( ( val == null ? 0 : val ) ) ) ) ; } }
Source:
public void setTemplateExistsInSetup ( boolean templateExistsInSetup ) { if ( ! templateExistsInSetup ) { getCollapseSnapshots ( ) . setEntity ( true ) ; getCollapseSnapshots ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVMWithTemplateNotInSystemMustCollapseSnapshots ( ) ) ; getCollapseSnapshots ( ) . setIsChangable ( false ) ; } this . templateExistsInSetup = templateExistsInSetup ; }

Target:
public void setTemplateExistsInSetup ( boolean templateExistsInSetup ) { if ( ! templateExistsInSetup ) { getCollapseSnapshots ( ) . setEntity ( true ) ; getCollapseSnapshots ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVMWithTemplateNotInSystemMustCollapseSnapshots ( ) ) ; getCollapseSnapshots ( ) . setIsChangeable ( false ) ; } this . templateExistsInSetup = templateExistsInSetup ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( vetoRemoveWidget ( item , value , widget ) ) { return ; } doRemoveItem ( item , value , widget ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { final T value = item.getFirst ( ) ; final V widget = item.getSecond ( ) ; if ( vetoRemoveWidget ( item , value , widget ) ) { return ; } doRemoveItem ( item , value , widget ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_VM_TEMPLATE ; case END_SUCCESS : return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_FAILURE ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_FAILURE ; } }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getActionState ( ) ) { case EXECUTE : if ( isVmInDb ) { if ( pendingAsyncTasks ) { return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_VM_TEMPLATE ; } else { return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_FAILURE ; } } else { return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FAILURE ; } case END_SUCCESS : return org.ovirt.engine.core.bll.AddVmTemplateCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_FAILURE ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_TEMPLATE_FINISHED_FAILURE ; } }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowDuplicateMacAddresses ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_MAC_ADDRESS_IN_USE ) ; } }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.String macAddress = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) . getMacAddress ( ) ; return new org.ovirt.engine.core.bll.validator.MacAddressValidator ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) , macAddress ) . isMacAssignableValidator ( ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setTitle ( ( object.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return object.isBoot ( ) ? resources.bootableDiskIcon ( ) : null ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel diskViewType = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; if ( ! ( disksViewRadioGroup.getAllButton ( ) . getValue ( ) ) ) { disksViewRadioGroup.getAllButton ( ) . setValue ( ( ( diskViewType.getEntity ( ) ) == null ) ) ; handleRadioButtonClick ( null ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterGeoRepMountBrokerSetup ( java.lang.String remoteVolumeName , java.lang.String userName , java.lang.String remoteGroupName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepMountBrokerSetup ( userName , remoteGroupName , remoteVolumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterGeoRepMountBrokerSetup ( java.lang.String remoteVolumeName , java.lang.String userName , java.lang.String remoteGroupName , java.lang.Boolean partial ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepMountBrokerSetup ( userName , remoteGroupName , remoteVolumeName , partial ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected boolean canDoAction ( ) { java.util.List < java.lang.String > canDoMessages = org.ovirt.engine.core.bll.AttachActionGroupsToRoleCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ; if ( org.ovirt.engine.core.bll.AttachActionGroupsToRoleCommand.checkIfRoleIsReadOnly ( canDoMessages ) ) { canDoMessages.add ( EngineMessage.VAR__TYPE__ROLE.toString ( ) ) ; canDoMessages.add ( EngineMessage.VAR__ACTION__ATTACH_ACTION_TO.toString ( ) ) ; return false ; } if ( checkIfGroupsCanBeAttached ( canDoMessages ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { java.util.List < java.lang.String > validationMessages = org.ovirt.engine.core.bll.AttachActionGroupsToRoleCommand.getReturnValue ( ) . getValidationMessages ( ) ; if ( org.ovirt.engine.core.bll.AttachActionGroupsToRoleCommand.checkIfRoleIsReadOnly ( validationMessages ) ) { validationMessages.add ( EngineMessage.VAR__TYPE__ROLE.toString ( ) ) ; validationMessages.add ( EngineMessage.VAR__ACTION__ATTACH_ACTION_TO.toString ( ) ) ; return false ; } if ( checkIfGroupsCanBeAttached ( validationMessages ) ) { return false ; } return true ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmDataFromPoolByPoolGuid ( org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmDataFromPoolByPoolGuid ( org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm != null ) { org.ovirt.engine.core.bll.VmHandler.updateVmInitFromDB ( vm.getStaticData ( ) , true ) ; } org.ovirt.engine.core.bll.GetVmDataByPoolIdQuery.getQueryReturnValue ( ) . setReturnValue ( vm ) ; }
Source:
private void fillVolumeInformation ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage ancestor = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDiskImageDao ( ) . getAncestor ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; disk.setvolumeFormat ( ancestor.getVolumeFormat ( ) ) ; disk.setVolumeType ( ancestor.getVolumeType ( ) ) ; }

Target:
private void fillVolumeInformation ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage ancestor = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDiskImageDao ( ) . getAncestor ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; disk.setVolumeFormat ( ancestor.getVolumeFormat ( ) ) ; disk.setVolumeType ( ancestor.getVolumeType ( ) ) ; }
Source:
public void setTemplateExistsInSetup ( boolean templateExistsInSetup ) { if ( ! templateExistsInSetup ) { getCollapseSnapshots ( ) . setEntity ( true ) ; getCollapseSnapshots ( ) . getChangeProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVMWithTemplateNotInSystemMustCollapseSnapshots ( ) ) ; getCollapseSnapshots ( ) . setIsChangable ( false ) ; } this . templateExistsInSetup = templateExistsInSetup ; }

Target:
public void setTemplateExistsInSetup ( boolean templateExistsInSetup ) { if ( ! templateExistsInSetup ) { getCollapseSnapshots ( ) . setEntity ( true ) ; getCollapseSnapshots ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . importVMWithTemplateNotInSystemMustCollapseSnapshots ( ) ) ; getCollapseSnapshots ( ) . setIsChangable ( false ) ; } this . templateExistsInSetup = templateExistsInSetup ; }
Source:
private static void raiseQueryEvent ( final org.ovirt.engine.core.compat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { org.ovirt.engine.ui.frontend.Frontend.currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.Empty ) ; } } } }

Target:
private static void raiseQueryEvent ( final org.ovirt.engine.ui.uicompat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { org.ovirt.engine.ui.frontend.Frontend.currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.Empty ) ; } } } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { mVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.getBroker ( ) . getAllVmStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.ProceedProxyReturnValue ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > returnVMs = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > ( ) ; for ( int idx = 0 ; idx < ( mVmListReturn.mInfoList.length ) ; ++ idx ) { org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vmInternalData = createVmInternalData ( mVmListReturn.mInfoList [ idx ] ) ; returnVMs.put ( vmInternalData.getVmDynamic ( ) . getId ( ) , vmInternalData ) ; } setReturnValue ( returnVMs ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { mVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.getBroker ( ) . getAllVmStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetAllVmStatsVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > returnVMs = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > ( ) ; for ( int idx = 0 ; idx < ( mVmListReturn.mInfoList.length ) ; ++ idx ) { org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vmInternalData = createVmInternalData ( mVmListReturn.mInfoList [ idx ] ) ; returnVMs.put ( vmInternalData.getVmDynamic ( ) . getId ( ) , vmInternalData ) ; } setReturnValue ( returnVMs ) ; }
Source:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setCompatibilityVersion ( version ) ; existingCluster.setGlusterCliBasedSchedulingOn ( true ) ; createObjects ( version ) ; }

Target:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setCompatibilityVersion ( version ) ; existingCluster.setGlusterCliBasedSchedulingOn ( true ) ; createObjects ( version ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult a ) { stopProgress ( a.getState ( ) ) ; cancel ( ) ; } } , this ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( ( ( java.lang.Boolean ) ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult a ) { stopProgress ( a.getState ( ) ) ; cancel ( ) ; } } , this ) ; }
Source:
public void testPackages ( ) { for ( org.ovirt.engine.core.common.vdscommands.VDSCommandType type : org.ovirt.engine.core.common.vdscommands.VDSCommandType.values ( ) ) { java.lang.String className = ( ( ( type.getPackageName ( ) ) + "." ) + type ) + ( org.ovirt.engine.core.common.vdscommands.VdsCommandTypeTest.VDSCommandsuffix ) ; try { java.lang.Class.forName ( className ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; java.lang.System.out.println ( ( "failed to generate the class " + className ) ) ; org.junit.Assert.fail ( ( "failed to generate the class " + className ) ) ; } } }

Target:
public void testPackages ( org.ovirt.engine.core.common.vdscommands.VDSCommandType type ) throws java.lang.ClassNotFoundException { java.lang.Class.forName ( ( ( ( ( type.getPackageName ( ) ) + "." ) + type ) + ( org.ovirt.engine.core.common.vdscommands.VdsCommandTypeTest.VDSCommandsuffix ) ) ) ; }
Source:
public void nameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getByName ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }

Target:
public void nameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getByName ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }
Source:
public static void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public static void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { removeListeners ( model ) ; hideAndUnbind ( ) ; }

Target:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { this . model = model ; initView ( model ) ; initListeners ( model ) ; java.lang.String vmName = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( model.getModel ( ) . getSelectedItem ( ) ) ) . getName ( ) ; getView ( ) . setVmName ( vmName ) ; super . init ( model ) ; }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( java.util.Collections.emptyList ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( java.util.Collections.emptyList ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyNotFoundException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.resource.remove ( ) ) ) ; }
Source:
public void testUpdateIncompleteParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Cdrom cdrom = new org.ovirt.engine.api.model.Cdrom ( ) ; cdrom.setFile ( null ) ; try { resource.update ( cdrom ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Cdrom" , "update" , "file" ) ; } }

Target:
public void testUpdateIncompleteParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Cdrom cdrom = new org.ovirt.engine.api.model.Cdrom ( ) ; cdrom.setFile ( null ) ; try { resource.update ( cdrom ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Cdrom" , "update" , "file" ) ; } }
Source:
private void clearDomainCache ( final org.ovirt.engine.core.common.businessentities.VDS vds ) { ( ( org.ovirt.engine.core.common.eventqueue.EventQueue ) ( org.ovirt.engine.core.utils.ejb.EjbUtils.findBean ( BeanType.EVENTQUEUE_MANAGER , BeanProxyType.LOCAL ) ) ) . submitEventSync ( new org.ovirt.engine.core.common.eventqueue.Event ( vds.getStoragePoolId ( ) , null , vds.getId ( ) , org.ovirt.engine.core.common.eventqueue.EventType.VDSCLEARCACHE , "" ) , new java.util.concurrent.Callable < org.ovirt.engine.core.common.eventqueue.EventResult > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.clearVdsFromCache ( vds.getStoragePoolId ( ) , vds.getId ( ) , vds.getName ( ) ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( true , org.ovirt.engine.core.common.eventqueue.EventType.VDSCLEARCACHE ) ; } } ) ; }

Target:
private void clearDomainCache ( final org.ovirt.engine.core.common.businessentities.VDS vds ) { eventQueue.submitEventSync ( new org.ovirt.engine.core.common.eventqueue.Event ( vds.getStoragePoolId ( ) , null , vds.getId ( ) , org.ovirt.engine.core.common.eventqueue.EventType.VDSCLEARCACHE , "" ) , new java.util.concurrent.Callable < org.ovirt.engine.core.common.eventqueue.EventResult > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.clearVdsFromCache ( vds.getStoragePoolId ( ) , vds.getId ( ) , vds.getName ( ) ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( true , org.ovirt.engine.core.common.eventqueue.EventType.VDSCLEARCACHE ) ; } } ) ; }