auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static org.ovirt.engine.api.model.DataCenterStatus map ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus storagePoolStatus , org.ovirt.engine.api.model.DataCenterStatus dataCenterStatus ) { switch ( storagePoolStatus ) { case Contend : return org.ovirt.engine.api.model.DataCenterStatus.CONTEND ; case Maintenance : return org.ovirt.engine.api.model.DataCenterStatus.MAINTENANCE ; case NotOperational : return org.ovirt.engine.api.model.DataCenterStatus.NOT_OPERATIONAL ; case NonResponsive : return org.ovirt.engine.api.model.DataCenterStatus.PROBLEMATIC ; case Uninitialized : return org.ovirt.engine.api.model.DataCenterStatus.UNINITIALIZED ; case Up : return org.ovirt.engine.api.model.DataCenterStatus.UP ; default : throw new java.lang.IllegalStateException ( "Enum mapping failed" ) ; } }

Target:
private static org.ovirt.engine.api.model.DataCenterStatus mapDataCenterStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status ) { switch ( status ) { case Contend : return org.ovirt.engine.api.model.DataCenterStatus.CONTEND ; case Maintenance : return org.ovirt.engine.api.model.DataCenterStatus.MAINTENANCE ; case NotOperational : return org.ovirt.engine.api.model.DataCenterStatus.NOT_OPERATIONAL ; case NonResponsive : return org.ovirt.engine.api.model.DataCenterStatus.PROBLEMATIC ; case Uninitialized : return org.ovirt.engine.api.model.DataCenterStatus.UNINITIALIZED ; case Up : return org.ovirt.engine.api.model.DataCenterStatus.UP ; default : throw new java.lang.IllegalArgumentException ( ( ( "Unknown data center status \"" + status ) + "\"" ) ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setSshPort ( 22 ) ; newVdsData.setSshUsername ( "root" ) ; newVdsData.setSshKeyFingerprint ( "1234" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { ssoContext = org.ovirt.engine.core.sso.utils.SSOUtils.getSsoContext ( config.getServletContext ( ) ) ; for ( org.ovirt.engine.core.sso.search.DirectorySearch query : org.ovirt.engine.core.sso.search.DirectorySearch.values ( ) ) { if ( query.isPublicQuery ( ) ) { directoryPublicQueries.put ( query.getName ( ) , query ) ; } else { directoryQueries.put ( query.getName ( ) , query ) ; } } }

Target:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { ssoContext = org.ovirt.engine.core.sso.utils.SsoUtils.getSsoContext ( config.getServletContext ( ) ) ; for ( org.ovirt.engine.core.sso.search.DirectorySearch query : org.ovirt.engine.core.sso.search.DirectorySearch.values ( ) ) { if ( query.isPublicQuery ( ) ) { directoryPublicQueries.put ( query.getName ( ) , query ) ; } else { directoryQueries.put ( query.getName ( ) , query ) ; } } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; if ( source != null ) { java.lang.Iterable listEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator listIterator = listEnumerable.iterator ( ) ; while ( listIterator.hasNext ( ) ) { list.add ( ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( listIterator.next ( ) ) ) ) ; } } return list ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; if ( source != null ) { java.lang.Iterable listEnumerable = ( ( java.lang.Iterable ) ( source ) ) ; java.util.Iterator listIterator = listEnumerable.iterator ( ) ; while ( listIterator.hasNext ( ) ) { list.add ( ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( listIterator.next ( ) ) ) ) ; } } return list ; }
Source:
public void testGetEntityNameByIdAndTypeForHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vds = vdsStaticDao.get ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertNotNull ( vds ) ; java.lang.String name = vds.getName ( ) ; org.junit.Assert.assertEquals ( name , dao.getEntityNameByIdAndType ( FixturesTool.VDS_RHEL6_NFS_SPM , VdcObjectType.VDS ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vds = vdsStaticDao.get ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.jupiter.api.Assertions.assertNotNull ( vds ) ; java.lang.String name = vds.getName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( name , dao.getEntityNameByIdAndType ( FixturesTool.VDS_RHEL6_NFS_SPM , VdcObjectType.VDS ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult checkStoragePoolNotInStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus ... statuses ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolStatus > statusList = java.util.Arrays.asList ( statuses ) ; if ( ! ( statusList.contains ( storagePool.getStatus ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult checkStoragePoolNotInStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus ... statuses ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolStatus > statusList = java.util.Arrays.asList ( statuses ) ; if ( ! ( statusList.contains ( storagePool.getStatus ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void connect ( ) { boolean sslTarget = ( ( securePort ) == ( - 1 ) ) ? false : true ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , config , getHost ( ) , java.lang.String.valueOf ( ( sslTarget ? securePort : port ) ) , getPassword ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }

Target:
public void invokeClient ( ) { boolean sslTarget = ( consoleOptions.getSecurePort ( ) ) != ( - 1 ) ; int port = ( sslTarget ) ? consoleOptions.getSecurePort ( ) : consoleOptions.getPort ( ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , getConfig ( ) , getOptions ( ) . getHost ( ) , port , getOptions ( ) . getTicket ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }
Source:
private void alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType , auditLogDirector ) ; }

Target:
protected void alertPowerManagementStatusFailed ( java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; auditLogDirector.log ( alert , AuditLogType.VDS_ALERT_FENCE_TEST_FAILED ) ; }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getTemplateNicList ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void render ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.appendHtmlConstant ( ( ( "<div title=\"" + ( com.google.gwt.safehtml.shared.SafeHtmlUtils.htmlEscape ( provider.getTooltip ( value ) ) ) ) + "\" >" ) ) ; render ( context , value , sb , hasCell ) ; sb.appendHtmlConstant ( "</div>" ) ; }

Target:
public void render ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.appendHtmlConstant ( ( ( ( ( "<div id=\"" + ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , columnId , context ) ) ) + "\" title=\"" ) + ( com.google.gwt.safehtml.shared.SafeHtmlUtils.htmlEscape ( provider.getTooltip ( value ) ) ) ) + "\">" ) ) ; super . render ( context , value , sb , hasCell ) ; sb.appendHtmlConstant ( "</div>" ) ; }
Source:
public boolean handlesEvent ( com.google.gwt.view.client.CellPreviewEvent < org.ovirt.engine.ui.uicommonweb.models.EntityModel > event ) { com.google.gwt.dom.client.NativeEvent nativeEvent = event.getNativeEvent ( ) ; if ( ! ( "click" . equals ( nativeEvent.getType ( ) . toLowerCase ( ) ) ) ) { return false ; } com.google.gwt.dom.client.Element target = nativeEvent.getEventTarget ( ) . cast ( ) ; java.lang.String tagName = target.getTagName ( ) . toLowerCase ( ) ; return ( "select" . equals ( tagName ) ) || ( "option" . equals ( tagName ) ) ; }

Target:
public boolean handlesEvent ( com.google.gwt.view.client.CellPreviewEvent < org.ovirt.engine.ui.uicommonweb.models.EntityModel > event ) { com.google.gwt.dom.client.NativeEvent nativeEvent = event.getNativeEvent ( ) ; if ( ! ( BrowserEvents.CLICK.equals ( nativeEvent.getType ( ) ) ) ) { return false ; } com.google.gwt.dom.client.Element target = nativeEvent.getEventTarget ( ) . cast ( ) ; java.lang.String tagName = target.getTagName ( ) . toLowerCase ( ) ; return ( "select" . equals ( tagName ) ) || ( "option" . equals ( tagName ) ) ; }
Source:
public void updateDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { getSelectedItemDefinedMemory ( ) . setEntity ( sizeParser ( vm.getVmMemSizeMb ( ) ) ) ; getSelectedItemNumOfCpuCores ( ) . setEntity ( ( ( ( ( ( ( ( vm.getNumOfCpus ( ) ) + " " ) + "(" ) + ( vm.getNumOfSockets ( ) ) ) + " Socket(s), " ) + ( vm.getCpuPerSocket ( ) ) ) + " Core(s) per Socket)" ) ) ; }

Target:
public void updateDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { getSelectedItemDefinedMemory ( ) . setEntity ( sizeParser ( vm.getVmMemSizeMb ( ) ) ) ; getSelectedItemNumOfCpuCores ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . cpuInfoMessage ( vm.getNumOfCpus ( ) , vm.getNumOfSockets ( ) , vm.getCpuPerSocket ( ) ) ) ; }
Source:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.InstanceType lookupInstanceType ( org.ovirt.engine.core.compat.Guid id ) { return getEntity ( org.ovirt.engine.core.common.businessentities.InstanceType.class , VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( id ) , "GetVmTemplate" ) ; }

Target:
private void updateIdForSingleHost ( org.ovirt.engine.api.model.Host host , java.util.Set < org.ovirt.engine.core.compat.Guid > guidsSet ) { if ( ( host.isSetName ( ) ) && ( ! ( host.isSetId ( ) ) ) ) { org.ovirt.engine.core.compat.Guid hostGuid = getHostId ( host ) ; if ( hostGuid != null ) { guidsSet.add ( hostGuid ) ; host.setId ( hostGuid.toString ( ) ) ; } } else if ( host.isSetId ( ) ) { guidsSet.add ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( host.getId ( ) ) ) ; } }
Source:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
private void addStyles ( ) { keyField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; valueField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; valuesField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; hideLabels ( ) ; }

Target:
private void addStyles ( ) { keyField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; valueField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; valuesField.addContentWidgetStyleName ( style.fieldWidth ( ) ) ; if ( ( rowWidth ) != null ) { panel.setWidth ( rowWidth ) ; } hideLabels ( ) ; }
Source:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostNIC nic ) { validateParameters ( nic , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; validateEnums ( org.ovirt.engine.api.model.HostNIC.class , nic ) ; return performCreation ( VdcActionType.AddBond , new org.ovirt.engine.core.common.action.AddBondParameters ( asGuid ( hostId ) , nic.getName ( ) , lookupNetwork ( nic.getNetwork ( ) ) , lookupSlaves ( nic ) ) { { setBondingOptions ( map ( nic , null ) . getBondOptions ( ) ) ; } } , new org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.HostNicResolver ( nic.getName ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostNIC nic ) { validateParameters ( nic , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; validateEnums ( org.ovirt.engine.api.model.HostNIC.class , nic ) ; return performCreate ( VdcActionType.AddBond , new org.ovirt.engine.core.common.action.AddBondParameters ( asGuid ( hostId ) , nic.getName ( ) , lookupNetwork ( nic.getNetwork ( ) ) , lookupSlaves ( nic ) ) { { setBondingOptions ( map ( nic , null ) . getBondOptions ( ) ) ; } } , new org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.HostNicResolver ( nic.getName ( ) ) ) ; }
Source:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getSharedLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) . toString ( ) , LockingGroup.VM.name ( ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) . toString ( ) , LockMessagesMatchUtil.VM ) ; } return null ; }
Source:
public static java.util.List < java.lang.String > runAndAssertCanDoActionFailure ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.errors.VdcBllMessages message ) { boolean canDoAction = command.canDoAction ( ) ; java.util.List < java.lang.String > canDoActionMessages = command.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertFalse ( "Command's canDoAction expected to fail, but succeeded" , canDoAction ) ; org.junit.Assert.assertTrue ( java.text.MessageFormat.format ( "canDoAction messages doesn''t contain expected message: {0}, messages are: {1}" , message.name ( ) , canDoActionMessages ) , canDoActionMessages.contains ( message.name ( ) ) ) ; return canDoActionMessages ; }

Target:
public static java.util.List < java.lang.String > runAndAssertCanDoActionFailure ( java.lang.String assertionMessage , org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.errors.VdcBllMessages message ) { org.junit.Assert.assertFalse ( "Command's canDoAction expected to fail, but succeeded" , command.canDoAction ( ) ) ; return org.ovirt.engine.core.bll.CanDoActionTestUtils.assertCanDoActionMessages ( assertionMessage , command , message ) ; }
Source:
public void testAddIscsiLunDiskIncompleteParametersConnectionAddress ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setAddress ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddIscsiLunDiskIncompleteParametersConnectionAddress" , "address" ) ; } }

Target:
public void testAddIscsiLunDiskIncompleteParametersConnectionAddress ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setAddress ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddIscsiLunDiskIncompleteParametersConnectionAddress" , "address" ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { final java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; if ( needPermissionForConnectingToConsole ( ) ) { permissions.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.common.businessentities.ActionGroup.RECONNECT_TO_VM ) ) ; neededPermissions = true ; } return permissions ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; if ( needPermissionForConnectingToConsole ( ) ) { permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.common.businessentities.ActionGroup.RECONNECT_TO_VM , org.ovirt.engine.core.dal.VdcBllMessages.USER_CANNOT_FORCE_RECONNECT_TO_VM ) ) ; neededPermissions = true ; } return permissions ; }
Source:
public void setMessages ( java.util.List < com.google.gwt.safehtml.shared.SafeHtml > messages , java.lang.String ... styleNames ) { clearMessages ( ) ; for ( com.google.gwt.safehtml.shared.SafeHtml message : messages ) { com.google.gwt.user.client.ui.HTMLPanel messageLabel = new com.google.gwt.user.client.ui.HTMLPanel ( message ) ; for ( java.lang.String s : styleNames ) { messageLabel.addStyleName ( s ) ; } messagePanel.add ( messageLabel ) ; } }

Target:
public void setMessages ( java.util.List < com.google.gwt.safehtml.shared.SafeHtml > messages , java.lang.String ... styleNames ) { clearMessages ( ) ; for ( com.google.gwt.safehtml.shared.SafeHtml message : messages ) { com.google.gwt.user.client.ui.HTMLPanel messageLabel = createMessageLabel ( message ) ; for ( java.lang.String s : styleNames ) { messageLabel.addStyleName ( s ) ; } messagePanel.add ( messageLabel ) ; } }
Source:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult interfaceExists ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) . when ( ( ( iface ) == null ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult interfaceExists ( java.lang.String nicName ) { org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_HAVING_NAME_DOES_NOT_EXIST ; java.lang.String nicNameReplacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , nicName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( engineMessage , nicNameReplacement ) . when ( ( ( iface ) == null ) ) ; }
Source:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( CLUSTER_ID , null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void canDoActionSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > retval = org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getParameters ( ) . isFiltered ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : retval ) { org.ovirt.engine.core.bll.VmTemplateHandler.UpdateDisksFromDb ( template ) ; } org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getQueryReturnValue ( ) . setReturnValue ( retval ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > retval = org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getParameters ( ) . isFiltered ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : retval ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( template ) ; } org.ovirt.engine.core.bll.GetAllVmTemplatesQuery.getQueryReturnValue ( ) . setReturnValue ( retval ) ; }
Source:
protected void executeCommand ( ) { if ( getDiskImages ( ) . isEmpty ( ) ) { org.ovirt.engine.core.bll.SealVmTemplateCommand.setSucceeded ( true ) ; return ; } org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.SealDisks , buildSealDisksVDSCommandParameters ( ) , getDiskImages ( ) . get ( 0 ) . getStoragePoolId ( ) , this ) ; if ( ! ( vdsReturnValue.getSucceeded ( ) ) ) { setCommandStatus ( CommandStatus.FAILED ) ; } setSucceeded ( vdsReturnValue.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { if ( getDiskImages ( ) . isEmpty ( ) ) { org.ovirt.engine.core.bll.SealVmTemplateCommand.setSucceeded ( true ) ; return ; } org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = vdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.SealDisks , buildSealDisksVDSCommandParameters ( ) , getDiskImages ( ) . get ( 0 ) . getStoragePoolId ( ) , this ) ; if ( ! ( vdsReturnValue.getSucceeded ( ) ) ) { setCommandStatus ( CommandStatus.FAILED ) ; } setSucceeded ( vdsReturnValue.getSucceeded ( ) ) ; }
Source:
public static void GetDefaultSpmPriority ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.OnSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public static void GetLowUtilizationForPowerSave ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LowUtilizationForPowerSave ) , aQuery ) ; }
Source:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getStorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getId ( ) ) ; } return true ; }

Target:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = storageServerConnectionDao.get ( storageDomain.getStorage ( ) ) ; if ( connection != null ) { storageServerConnectionDao.remove ( connection.getId ( ) ) ; } return true ; }
Source:
public void stubPluginDefinitionsArray ( ) { org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; org.codehaus.jackson.node.ObjectNode mockPluginDef = mapper.createObjectNode ( ) ; mockPluginDef.put ( "foo" , "bar" ) ; mockPluginDefinitionsArray = mapper.createArrayNode ( ) ; mockPluginDefinitionsArray.add ( mockPluginDef ) ; }

Target:
public void setUpMockRequest ( ) { org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; org.codehaus.jackson.node.ObjectNode mockPluginDef = mapper.createObjectNode ( ) ; mockPluginDef.put ( "foo" , "bar" ) ; mockPluginDefinitionsArray = mapper.createArrayNode ( ) ; mockPluginDefinitionsArray.add ( mockPluginDef ) ; org.mockito.Mockito.when ( mockApplicationModeObject.toString ( ) ) . thenReturn ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServletTest.APPLICATION_MODE ) ; org.mockito.Mockito.when ( mockRequest.getAttribute ( WebAdminHostPageServlet.ATTR_APPLICATION_MODE ) ) . thenReturn ( mockApplicationModeObject ) ; org.mockito.Mockito.when ( mockRequest.getAttribute ( WebAdminHostPageServlet.ATTR_PLUGIN_DEFS ) ) . thenReturn ( mockPluginDefinitionsArray ) ; }
Source:
public void OnExport ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.core.compat.Guid storageDomainId = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( model.getStorage ( ) . getSelectedItem ( ) ) ) . getId ( ) ; if ( ! ( model.Validate ( ) ) ) { return ; } model.StartProgress ( null ) ; GetTemplatesNotPresentOnExportDomain ( ) ; }

Target:
public void onExport ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } model.startProgress ( null ) ; getTemplatesNotPresentOnExportDomain ( ) ; }
Source:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetClusterList ( 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.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getRedirectServletReportsPage ( 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 ) ) : "" ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , context.get ( ContextKeys.POSITIONAL ) ) ) ; } if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public final java.lang.String consoleClientResourcesUrl ( ) { java.lang.String url = getString ( org.ovirt.engine.ui.common.utils.DynamicMessages.DynamicMessageKey.CONSOLE_CLIENT_RESOURCES_URL ) ; boolean isAbsolute = ( com.google.gwt.safehtml.shared.UriUtils.extractScheme ( url ) ) != null ; return isAbsolute ? url : ( "/" + ( org.ovirt.engine.ui.frontend.utils.BaseContextPathData.getInstance ( ) . getRelativePath ( ) ) ) + url ; }

Target:
public final java.lang.String consoleClientResourcesUrl ( ) { java.lang.String url = getString ( org.ovirt.engine.ui.common.utils.BaseDynamicMessages.DynamicMessageKey.CONSOLE_CLIENT_RESOURCES_URL ) ; boolean isAbsolute = ( com.google.gwt.safehtml.shared.UriUtils.extractScheme ( url ) ) != null ; return isAbsolute ? url : ( "/" + ( org.ovirt.engine.ui.frontend.utils.BaseContextPathData.getInstance ( ) . getRelativePath ( ) ) ) + url ; }
Source:
public void testGetNowPlusYearHttpDate ( ) { java.util.Calendar calendar = org.mockito.Mockito.spy ( java.util.Calendar.getInstance ( java.util.TimeZone.getTimeZone ( org.ovirt.engine.ui.frontend.server.gwt.GwtCachingFilterTest.GMT ) , java.util.Locale.US ) ) ; calendar.clear ( ) ; calendar.set ( 2000 , 0 , 1 , 15 , 0 ) ; java.lang.String result = testFilter.getNowPlusYearHttpDate ( calendar ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.contains ( "01 Jan 2001 15:00:00" ) ) ; org.mockito.Mockito.verify ( calendar ) . add ( java.util.Calendar.YEAR , 1 ) ; }

Target:
public void testGetNowPlusYearHttpDate ( ) { java.util.Calendar calendar = org.mockito.Mockito.spy ( java.util.Calendar.getInstance ( java.util.TimeZone.getTimeZone ( org.ovirt.engine.ui.frontend.server.caching.CachingFilterTest.GMT ) , java.util.Locale.US ) ) ; calendar.clear ( ) ; calendar.set ( 2000 , 0 , 1 , 15 , 0 ) ; java.lang.String result = testFilter.getNowPlusYearHttpDate ( calendar ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.contains ( "01 Jan 2001 15:00:00" ) ) ; org.mockito.Mockito.verify ( calendar ) . add ( java.util.Calendar.YEAR , 1 ) ; }
Source:
public void onSuccess ( org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed logOff, determining result!" ) ; org.ovirt.engine.ui.frontend.Frontend.logger.finer ( ( ( "Result of logoff: succeeded? [" + ( result.getSucceeded ( ) ) ) + "]" ) ) ; callback.onSuccess ( result ) ; }

Target:
private static void failureEventHandler ( java.lang.String description , java.util.ArrayList < java.lang.String > errorMessages ) { java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > messages = new java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > ( ) ; for ( java.lang.String errorMessage : errorMessages ) { messages.add ( new org.ovirt.engine.ui.frontend.Message ( description , errorMessage ) ) ; } org.ovirt.engine.ui.frontend.Frontend.frontendFailureEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , new org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ( messages ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.Linq.Sort ( storageDomains , new org.ovirt.engine.ui.uicommonweb.Linq.StorageDomainByNameComparer ( ) ) ; vmGuideModel.attachedStorageDomains = storageDomains ; vmGuideModel.AddDiskPostData ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.AddDiskPostData ( ) ; }
Source:
private void setUpDAOMocks ( ) { snapshotDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.SnapshotDao.class ) ; org.mockito.Mockito.doReturn ( snapshotDaoMock ) . when ( getQuery ( ) ) . getSnapshotDao ( ) ; org.mockito.Mockito.when ( snapshotDaoMock.get ( existingSnapshotId , getUser ( ) . getId ( ) , getQueryParameters ( ) . isFiltered ( ) ) ) . thenReturn ( existingSnapshot ) ; }

Target:
private void setUpDaoMocks ( ) { snapshotDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.SnapshotDao.class ) ; org.mockito.Mockito.doReturn ( snapshotDaoMock ) . when ( getQuery ( ) ) . getSnapshotDao ( ) ; org.mockito.Mockito.when ( snapshotDaoMock.get ( existingSnapshotId , getUser ( ) . getId ( ) , getQueryParameters ( ) . isFiltered ( ) ) ) . thenReturn ( existingSnapshot ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.UsbControllerModel getOsUsbControllerModel ( int osId , org.ovirt.engine.core.compat.Version version ) { final java.lang.String osInfoName = getValueByVersion ( getUniqueOsNames ( ) . get ( osId ) , "devices.usb.controller" , version ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( osInfoName ) ) { return null ; } return org.ovirt.engine.core.common.businessentities.UsbControllerModel.fromLibvirtName ( osInfoName ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.UsbControllerModel getOsUsbControllerModel ( int osId , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.ChipsetType chipset ) { final java.lang.String osInfoName = parseChipsetPrefixedValue ( getValueByVersion ( getUniqueOsNames ( ) . get ( osId ) , "devices.usb.controller" , version ) , chipset ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( osInfoName ) ) { return null ; } return org.ovirt.engine.core.common.businessentities.UsbControllerModel.fromLibvirtName ( osInfoName ) ; }