auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass , waitForResult ) ; } }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass , waitForResult , null ) ; } }
Source:
private void mockPassDiscardSupport ( org.ovirt.engine.core.bll.ValidationResult validationResult ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( runVmValidator ) . getVmDisks ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyMap ( ) ) . when ( runVmValidator ) . getVmDiskVmElementMap ( ) ; org.ovirt.engine.core.bll.validator.storage.MultipleDiskVmElementValidator multipleDiskVmElementValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.storage.MultipleDiskVmElementValidator.class ) ; org.mockito.Mockito.doReturn ( multipleDiskVmElementValidator ) . when ( runVmValidator ) . createMultipleDiskVmElementValidator ( org.mockito.ArgumentMatchers.anyMap ( ) ) ; org.mockito.Mockito.when ( multipleDiskVmElementValidator.isPassDiscardSupportedForDestSds ( org.mockito.ArgumentMatchers.anyMap ( ) ) ) . thenReturn ( validationResult ) ; }

Target:
private void mockPassDiscardSupport ( org.ovirt.engine.core.bll.ValidationResult validationResult ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( runVmValidator ) . getVmDisks ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyMap ( ) ) . when ( runVmValidator ) . getVmDiskVmElementMap ( ) ; org.ovirt.engine.core.bll.validator.storage.MultipleDiskVmElementValidator multipleDiskVmElementValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.storage.MultipleDiskVmElementValidator.class ) ; org.mockito.Mockito.doReturn ( multipleDiskVmElementValidator ) . when ( runVmValidator ) . createMultipleDiskVmElementValidator ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.when ( multipleDiskVmElementValidator.isPassDiscardSupportedForDestSds ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( validationResult ) ; }
Source:
public void commandFailsSlaveNotOvirtMonitored ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.SetupGlusterGeoRepMountBrokerInternalCommand ( new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) , null , null ) ) ) ; org.mockito.Mockito.doReturn ( vds ) . when ( command ) . getUpServer ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . getSlaveVolume ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; }

Target:
public void commandFailsSlaveNotOvirtMonitored ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.SetupGlusterGeoRepMountBrokerInternalCommand ( new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashSet ( java.util.Collections.singletonList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) , null , null ) ) ) ; org.mockito.Mockito.doReturn ( vds ) . when ( command ) . getUpServer ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . getSlaveVolume ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; }
Source:
public void testFilter ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.List < java.lang.String > result = proxy.filter ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == 2 ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) ; }

Target:
public void testFilter ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.List < java.lang.String > result = proxy.filter ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY.length ) ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) ; }
Source:
public final java.util.Date getDateTimeValue ( java.lang.String name , java.lang.String defaultValue ) { java.util.Date dt = new java.util.Date ( 0 ) ; java.lang.String dateString = GetValue ( DataType.String , name , defaultValue ) . toString ( ) ; try { dt = new java.text.SimpleDateFormat ( "k:m:s" ) . parse ( dateString ) ; } catch ( java.lang.Exception e ) { } return dt ; }

Target:
public final java.util.Date getDateTimeValue ( java.lang.String name , java.lang.String defaultValue ) { java.util.Date dt = new java.util.Date ( 0 ) ; java.lang.String dateString = getValue ( DataType.String , name , defaultValue ) . toString ( ) ; try { dt = new java.text.SimpleDateFormat ( "k:m:s" ) . parse ( dateString ) ; } catch ( java.lang.Exception e ) { } return dt ; }
Source:
public void testGetVmTemplatesIdsForOvfUpdateOneTemplate ( ) { vmAndTemplatesGenerationsDAO.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_TEMPLATE_RHEL5 ) , java.util.Collections.singletonList ( new java.lang.Long ( 0 ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDAO.getVmTemplatesIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one template should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong template returned as in need for ovf update" , guids.get ( 0 ) , FixturesTool.VM_TEMPLATE_RHEL5 ) ; }

Target:
public void testGetVmTemplatesIdsForOvfUpdateOneTemplate ( ) { vmAndTemplatesGenerationsDAO.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_TEMPLATE_RHEL5 ) , java.util.Collections.singletonList ( java.lang.Long.valueOf ( 0 ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDAO.getVmTemplatesIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one template should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong template returned as in need for ovf update" , guids.get ( 0 ) , FixturesTool.VM_TEMPLATE_RHEL5 ) ; }
Source:
public void getVdsNullAll ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = null ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }

Target:
public void getVdsNullAll ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = null ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }
Source:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
public void validateFails ( ) { org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters params = new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( ) ; params.setActionType ( "InvalidActionType" ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( params ) ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; params.setClusterId ( null ) ; params.setServerId ( null ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFails ( ) { org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters params = new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( ) ; params.setActionType ( "InvalidActionType" ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( params , null ) ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; params.setClusterId ( null ) ; params.setServerId ( null ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { UpdateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { UpdateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }
Source:
private static java.util.LinkedHashMap < java.lang.String , java.lang.String > getPeriods ( org.ovirt.engine.sdk.entities.DetailedLink link ) { java.lang.String url = link.getHref ( ) ; java.util.List < java.lang.String > sUrl = new java.util.ArrayList < > ( java.util.Arrays.asList ( url.split ( "/" ) ) ) ; sUrl.remove ( 0 ) ; return org.ovirt.engine.sdk.generator.utils.UrlUtils.listToDict ( sUrl ) ; }

Target:
private static java.util.LinkedHashMap < java.lang.String , java.lang.String > getPeriods ( org.ovirt.engine.sdk.entities.DetailedLink link ) { java.lang.String url = link.getHref ( ) ; java.util.List < java.lang.String > sUrl = java.util.Arrays.asList ( url.split ( "/" ) ) ; return org.ovirt.engine.sdk.generator.utils.UrlUtils.listToDict ( sUrl ) ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }

Target:
public void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.HashMap < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < > ( ) ; java.util.HashMap < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties ( convertProperties ( predefinedPropertiesMap ) , convertProperties ( userDefinedPropertiesMap ) ) ; }

Target:
public org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.Map < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties ( convertProperties ( predefinedPropertiesMap ) , convertProperties ( userDefinedPropertiesMap ) ) ; }
Source:
protected void removeOvfForTemplatesAndVmsOfStoragePool ( org.ovirt.engine.core.common.businessentities.StoragePool pool ) { org.ovirt.engine.core.compat.Guid poolId = pool.getId ( ) ; removedOvfIdsInfo = org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getVmAndTemplatesGenerationsDao ( ) . getIdsForOvfDeletion ( poolId ) ; if ( ! ( ovfOnAnyDomainSupported ( pool ) ) ) { for ( org.ovirt.engine.core.compat.Guid id : removedOvfIdsInfo ) { getOvfUpdateProcessHelper ( ) . executeRemoveVmInSpm ( poolId , id , Guid.Empty ) ; } } markDomainsWithOvfsForOvfUpdate ( removedOvfIdsInfo ) ; org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getVmAndTemplatesGenerationsDao ( ) . deleteOvfGenerations ( removedOvfIdsInfo ) ; }

Target:
protected void removeOvfForTemplatesAndVmsOfStoragePool ( org.ovirt.engine.core.common.businessentities.StoragePool pool ) { org.ovirt.engine.core.compat.Guid poolId = pool.getId ( ) ; removedOvfIdsInfo = org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getVmAndTemplatesGenerationsDao ( ) . getIdsForOvfDeletion ( poolId ) ; markDomainsWithOvfsForOvfUpdate ( removedOvfIdsInfo ) ; org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getVmAndTemplatesGenerationsDao ( ) . deleteOvfGenerations ( removedOvfIdsInfo ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLuns ( boolean withDummyLun ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid GUID : org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUN_id ( GUID.toString ( ) ) ; luns.add ( lun ) ; } if ( withDummyLun ) { org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUN_id ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.DUMMY_LUN_ID ) ; luns.add ( dummyLun ) ; } return luns ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLuns ( boolean withDummyLun ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = new java.util.ArrayList < > ( ) ; for ( java.lang.String GUID : org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUN_id ( GUID ) ; luns.add ( lun ) ; } if ( withDummyLun ) { org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUN_id ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.DUMMY_LUN_ID ) ; luns.add ( dummyLun ) ; } return luns ; }
Source:
public void init ( java.lang.String dialogToken , java.lang.String title , java.lang.String width , java.lang.String height , boolean resizeEnabled , boolean closeIconVisible , boolean closeOnEscKey ) { this . dialogToken = dialogToken ; this . closeOnEscKey = closeOnEscKey ; getView ( ) . init ( title , width , height , resizeEnabled , closeIconVisible ) ; }

Target:
public void init ( java.lang.String dialogToken , java.lang.String title , java.lang.String width , java.lang.String height , boolean closeIconVisible , boolean closeOnEscKey ) { this . dialogToken = dialogToken ; this . closeOnEscKey = closeOnEscKey ; getView ( ) . init ( title , width , height , closeIconVisible ) ; }
Source:
public static org.ovirt.engine.core.compat.Guid generateGuidUsingMd5 ( java.lang.String ... args ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.String arg : args ) { builder.append ( arg ) ; } byte [ ] hash ; try { hash = java.security.MessageDigest.getInstance ( org.ovirt.engine.api.restapi.utils.GuidUtils.MD5_SECURITY_ALGORITHM ) . digest ( builder.toString ( ) . getBytes ( ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.lang.IllegalStateException ( e ) ; } return new org.ovirt.engine.core.compat.Guid ( hash , true ) ; }

Target:
public static org.ovirt.engine.core.compat.Guid generateGuidUsingMd5 ( java.lang.String ... args ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.String arg : args ) { builder.append ( arg ) ; } byte [ ] hash ; try { hash = java.security.MessageDigest.getInstance ( org.ovirt.engine.api.restapi.utils.GuidUtils.MD5_SECURITY_ALGORITHM ) . digest ( builder.toString ( ) . getBytes ( ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.lang.IllegalStateException ( e ) ; } return new org.ovirt.engine.core.compat.Guid ( hash ) ; }
Source:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = diskModel.getDisk ( ) ; boolean isScsiPassthrough = disk.isScsiPassthrough ( ) ; boolean ideLimitation = ( disk.getDiskInterface ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskInterface.IDE ) ; return ( ! isScsiPassthrough ) && ( ! ideLimitation ) ; }

Target:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = diskModel.getDisk ( ) ; boolean isScsiPassthrough = disk.isScsiPassthrough ( ) ; boolean ideLimitation = ( diskModel.getDiskInterface ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskInterface.IDE ) ; return ( ! isScsiPassthrough ) && ( ! ideLimitation ) ; }
Source:
private void setUpMocksForRemove ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( hookFound , hook ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServers ( status ) ) ; }

Target:
private void setUpMocksForRemove ( boolean hookFound , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { setupMocks ( hookFound , hook ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getServers ( status ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.NetworkView paramT1 , org.ovirt.engine.core.common.businessentities.NetworkView paramT2 ) { int compareValue = paramT1.getStoragePoolName ( ) . compareTo ( paramT2.getStoragePoolName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getNetwork ( ) . getName ( ) . compareTo ( paramT2.getNetwork ( ) . getName ( ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.NetworkView paramT1 , org.ovirt.engine.core.common.businessentities.NetworkView paramT2 ) { int compareValue = paramT1.getStoragePoolName ( ) . compareTo ( paramT2.getStoragePoolName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getName ( ) . compareTo ( paramT2.getName ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getInverse ( org.ovirt.engine.core.common.businessentities.VdsStatic to ) { org.ovirt.engine.core.common.businessentities.VDS inverse = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setVdsName ( to.getVdsName ( ) ) ; inverse.setHostName ( to.getHostName ( ) ) ; inverse.setVdsGroupId ( to.getVdsGroupId ( ) ) ; inverse.setPort ( to.getPort ( ) ) ; inverse.setVdsSpmPriority ( to.getVdsSpmPriority ( ) ) ; inverse.setConsoleAddress ( to.getConsoleAddress ( ) ) ; return inverse ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDS getInverse ( org.ovirt.engine.core.common.businessentities.VdsStatic to ) { org.ovirt.engine.core.common.businessentities.VDS inverse = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setVdsName ( to.getName ( ) ) ; inverse.setHostName ( to.getHostName ( ) ) ; inverse.setVdsGroupId ( to.getVdsGroupId ( ) ) ; inverse.setPort ( to.getPort ( ) ) ; inverse.setVdsSpmPriority ( to.getVdsSpmPriority ( ) ) ; inverse.setConsoleAddress ( to.getConsoleAddress ( ) ) ; return inverse ; }
Source:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel model ) { org.ovirt.engine.ui.common.widget.uicommon.template.TemplateGeneralModelForm.Driver.driver.edit ( model ) ; monitorCount.setText ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; isHighlyAvailable.setText ( java.lang.Boolean.toString ( getModel ( ) . getIsHighlyAvailable ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getModel ( ) . getIsStateless ( ) ) ) ; }

Target:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel model ) { org.ovirt.engine.ui.common.widget.uicommon.template.TemplateGeneralModelForm.Driver.driver.edit ( model ) ; monitorCount.setText ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getModel ( ) . getIsStateless ( ) ) ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }
Source:
public void dataCenterWithClusterSelectedItemChanged ( ) { super . dataCenterWithClusterSelectedItemChanged ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) . getHash ( ) ) ; }

Target:
public void dataCenterWithClusterSelectedItemChanged ( ) { super . dataCenterWithClusterSelectedItemChanged ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageDomain incoming , org.ovirt.engine.core.common.businessentities.storage_domains entity ) { org.ovirt.engine.api.model.StorageDomainType existingType = ( ( entity.getStorageStaticData ( ) ) == null ) ? null : entity.getStorageStaticData ( ) . getstorage_domain_type ( ) ; org.ovirt.engine.core.common.businessentities.storage_domain_static updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.storage_domain_static.class ) . map ( incoming , entity.getStorageStaticData ( ) ) ; updated.setstorage_domain_type ( existingType ) ; return new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( updated ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageDomain incoming , org.ovirt.engine.core.common.businessentities.storage_domains entity ) { org.ovirt.engine.core.common.businessentities.storage_domain_static updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.storage_domain_static.class ) . map ( incoming , entity.getStorageStaticData ( ) ) ; return new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( updated ) ; }
Source:
private void initEditors ( ) { volumeTypeEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelLabelEditor < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType > ( ) , new com.google.gwt.text.shared.Parser < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType parse ( java.lang.CharSequence text ) throws java.text.ParseException { return null ; } } ) ; forceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; serverEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.VDS > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return vds.getHostName ( ) ; } } ) ; }

Target:
private void initEditors ( ) { volumeTypeEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelLabelEditor < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType > ( ) ) ; forceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; serverEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.VDS > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return vds.getHostName ( ) ; } } ) ; }
Source:
private void updateActionAvailability ( ) { java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( ( selectedItems.size ( ) ) == 1 ) && ( ( selectedItems.iterator ( ) . next ( ) . getSecond ( ) . getClusterCompatibilityVersion ( ) . compareTo ( Version.v3_1 ) ) >= 0 ) ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) == 1 ) ) ; }
Source:
protected org.ovirt.engine.api.model.Disk getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setvolumeFormat ( VolumeFormat.RAW ) ; entity.setDiskInterface ( DiskInterface.VirtIO ) ; entity.setImageStatus ( ImageStatus.OK ) ; entity.setVolumeType ( VolumeType.Sparse ) ; entity.setBoot ( false ) ; entity.setShareable ( false ) ; entity.setPropagateErrors ( PropagateErrors.On ) ; return org.ovirt.engine.api.restapi.resource.BackendExportDomainDisksResourceTest.setUpStatisticalEntityExpectations ( entity ) ; }

Target:
protected org.ovirt.engine.api.model.Disk getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setvolumeFormat ( VolumeFormat.RAW ) ; entity.setImageStatus ( ImageStatus.OK ) ; entity.setVolumeType ( VolumeType.Sparse ) ; entity.setShareable ( false ) ; entity.setPropagateErrors ( PropagateErrors.On ) ; return org.ovirt.engine.api.restapi.resource.BackendExportDomainDisksResourceTest.setUpStatisticalEntityExpectations ( entity ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Progress" . equals ( pcArgs.PropertyName ) ) { if ( ( modelProvider.getModel ( ) . getProgress ( ) ) != null ) { if ( ( getView ( ) . getTable ( ) ) != null ) { getView ( ) . getTable ( ) . setLoadingState ( LoadingState.LOADING ) ; } } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Progress" . equals ( pcArgs.PropertyName ) ) { if ( ( modelProvider.getModel ( ) . getProgress ( ) ) != null ) { if ( ( getTable ( ) ) != null ) { getTable ( ) . setLoadingState ( LoadingState.LOADING ) ; } } } }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( null ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > paramT1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > paramT2 ) { int compareValue = paramT1.getSecond ( ) . getVdsGroupName ( ) . compareTo ( paramT2.getSecond ( ) . getVdsGroupName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getSecond ( ) . getVmName ( ) . compareTo ( paramT2.getSecond ( ) . getVmName ( ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > paramT1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > paramT2 ) { int compareValue = paramT1.getSecond ( ) . getVdsGroupName ( ) . compareTo ( paramT2.getSecond ( ) . getVdsGroupName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getSecond ( ) . getName ( ) . compareTo ( paramT2.getSecond ( ) . getName ( ) ) ; }
Source:
public static void logError ( org.slf4j.Logger log , java.lang.String id , java.lang.Object obj , java.lang.Throwable t ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( obj ) ; if ( ( logged != null ) && ( org.ovirt.engine.core.utils.log.LoggedUtils.isLogLevelOn ( log , logged.errorLevel ( ) ) ) ) { org.ovirt.engine.core.utils.log.LoggedUtils.log ( log , logged.errorLevel ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.ERROR_LOG , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , logged , obj ) , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( t ) , id ) ; log.error ( "Exception" , t ) ; } }

Target:
public static void logError ( org.slf4j.Logger log , java.lang.String id , java.lang.Object obj , java.lang.Throwable t ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( obj ) ; if ( ( logged != null ) && ( org.ovirt.engine.core.utils.log.LoggedUtils.isLogLevelOn ( log , logged.errorLevel ( ) ) ) ) { org.ovirt.engine.core.utils.log.LoggedUtils.log ( log , logged.errorLevel ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.ERROR_LOG , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , logged , obj ) , t.getMessage ( ) , id ) ; log.error ( "Exception" , t ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String documentationPathFileContent = ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.DocumentationPathTranslator.init ( documentationPathFileContent ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( args.getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String documentationPathFileContent = args.getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.DocumentationPathTranslator.init ( documentationPathFileContent ) ; } }
Source:
public void testGetAllMultiDiskImageSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Disks" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( diskImageResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }

Target:
public void testGetAllMultiDiskImageSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Disks" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( diskImageResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public void testAdd ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetConsoleExpectations ( new int [ ] { 0 , 0 , 0 } ) ; setUpGetSoundcardExpectations ( new int [ ] { 0 } ) ; setUpGetBallooningExpectations ( new java.lang.Integer [ ] { 0 , 0 } ) ; setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; super . testAdd ( ) ; }

Target:
public void testAdd ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetConsoleExpectations ( 0 , 0 , 0 ) ; setUpGetSoundcardExpectations ( 0 ) ; setUpGetBallooningExpectations ( 0 , 0 ) ; setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; super . testAdd ( ) ; }
Source:
private void loadFile ( java.io.File file ) throws org.ovirt.engine.core.authentication.ConfigurationException { org.ovirt.engine.core.authentication.Configuration config = null ; try { config = org.ovirt.engine.core.authentication.Configuration.loadFile ( file ) ; } catch ( java.io.IOException exception ) { throw new org.ovirt.engine.core.authentication.ConfigurationException ( ( ( "Can\'t load object configuration file \"" + ( file.getAbsolutePath ( ) ) ) + "\"." ) , exception ) ; } java.lang.Boolean enabled = config.getBoolean ( org.ovirt.engine.core.authentication.Manager.ENABLED_PARAMETER ) ; if ( ( enabled != null ) && ( ! ( enabled.booleanValue ( ) ) ) ) { return ; } parseObject ( config ) ; }

Target:
private void loadFile ( java.io.File file ) throws org.ovirt.engine.core.authentication.ConfigurationException { org.ovirt.engine.core.authentication.Configuration config = null ; try { config = org.ovirt.engine.core.authentication.Configuration.loadFile ( file ) ; } catch ( java.io.IOException exception ) { throw new org.ovirt.engine.core.authentication.ConfigurationException ( ( ( "Can\'t load object configuration file \"" + ( file.getAbsolutePath ( ) ) ) + "\"." ) , exception ) ; } java.lang.Boolean enabled = config.getBoolean ( org.ovirt.engine.core.authentication.Manager.ENABLED_PARAMETER , false ) ; if ( ! ( enabled.booleanValue ( ) ) ) { return ; } parseObject ( config ) ; }
Source:
public void setup ( ) { storagePool = new org.ovirt.engine.core.common.businessentities.storage_pool ( "test" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "test" , StorageType.UNKNOWN.getValue ( ) , StoragePoolStatus.Up.getValue ( ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.StoragePoolValidator ( storagePool , new java.util.ArrayList < java.lang.String > ( ) ) ) ; mockPosixStorageEnabledConfigValue ( ) ; mockLocalStorageEnabledConfigValue ( ) ; }

Target:
public void setup ( ) { storagePool = new org.ovirt.engine.core.common.businessentities.storage_pool ( "test" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "test" , StorageType.UNKNOWN.getValue ( ) , StoragePoolStatus.Up.getValue ( ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.StoragePoolValidator ( storagePool , new java.util.ArrayList < java.lang.String > ( ) ) ) ; mockPosixStorageEnabledConfigValue ( ) ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { 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.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtml data , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( data != null ) { sb.appendHtmlConstant ( "<button type=\"button\" style=\"height:24px;\" tabindex=\"-1\">" ) ; if ( data != null ) { sb.append ( data ) ; } sb.appendHtmlConstant ( "</button>" ) ; } }

Target:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtml data , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( data != null ) { sb.appendHtmlConstant ( "<button type=\"button\" style=\"height:24px;\" tabindex=\"-1\">" ) ; sb.append ( data ) ; sb.appendHtmlConstant ( "</button>" ) ; } }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DbUser user : lookupUsers ( ) ) { users.put ( user.getuser_id ( ) , user ) ; } return users ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DbUser user : lookupUsers ( ) ) { users.put ( user.getId ( ) , user ) ; } return users ; }