auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetScannerNoQualifiers() throws IOException { HTableInterface table = connection.getTable(TABLE_NAME); byte[] rowKey = dataHelper.randomData("testrow-"); int numValues = 3; byte[][] quals = dataHelper.randomData("qual-", numValues); byte[][] values = dataHelper.randomData("value-", numValues); Put put = new Put(rowKey); for (int i = 0; i < numValues; ++i) { put.add(COLUMN_FAMILY, quals[i], values[i]); } table.put(put); Scan scan = new Scan(); scan.setStartRow(rowKey); scan.setStopRow(rowFollowing(rowKey)); scan.addFamily(COLUMN_FAMILY); ResultScanner resultScanner = table.getScanner(scan); Result result = resultScanner.next(); resultScanner.close(); Assert.assertEquals(numValues, result.size()); for (int i = 0; i < numValues; ++i) { Assert.assertTrue(result.containsColumn(COLUMN_FAMILY, quals[i])); Assert.assertArrayEquals(values[i], CellUtil.cloneValue(result.getColumnLatestCell(COLUMN_FAMILY, quals[i]))); } Delete delete = new Delete(rowKey); table.delete(delete); table.close(); }

Target:
public void testGetScannerNoQualifiers() throws IOException { HTableInterface table = connection.getTable(TABLE_NAME); byte[] rowKey = dataHelper.randomData("testrow-"); int numValues = 3; byte[][] quals = dataHelper.randomData("qual-", numValues); byte[][] values = dataHelper.randomData("value-", numValues); Put put = new Put(rowKey); for (int i = 0; i < numValues; ++i) { put.add(COLUMN_FAMILY, quals[i], values[i]); } table.put(put); Scan scan = new Scan(); scan.setStartRow(rowKey) .setStopRow(rowFollowing(rowKey)) .addFamily(COLUMN_FAMILY); ResultScanner resultScanner = table.getScanner(scan); Result result = resultScanner.next(); resultScanner.close(); Assert.assertEquals(numValues, result.size()); for (int i = 0; i < numValues; ++i) { Assert.assertTrue(result.containsColumn(COLUMN_FAMILY, quals[i])); Assert.assertArrayEquals(values[i], CellUtil.cloneValue(result.getColumnLatestCell(COLUMN_FAMILY, quals[i]))); } Delete delete = new Delete(rowKey); table.delete(delete); table.close(); }
Source:
public void activate(final BundleContext bundleContext, final Map<String, Object> configuration) { logger.debug("FritzBox TR064 Binding activated!"); String refreshIntervalString = Objects.toString(configuration.get("refresh"), null); if (StringUtils.isNotBlank(refreshIntervalString)) { refreshInterval = Long.parseLong(refreshIntervalString); logger.debug("Custom refresh interval set to {}", refreshInterval); } String fboxurl = Objects.toString(configuration.get("url"), null); String fboxuser = Objects.toString(configuration.get("user"), null); String fboxpw = Objects.toString(configuration.get("pass"), null); String fboxphonebookid = Objects.toString(configuration.get("phonebookid"), null); if (fboxurl == null) { logger.warn("Fritzbox URL was not provided in config. Shutting down binding."); setProperlyConfigured(false); return; } if (fboxuser == null) { logger.warn("Fritzbox User was not provided in config. Using default username."); } if (fboxpw == null) { logger.warn("Fritzbox Password was not provided in config. Shutting down binding."); setProperlyConfigured(false); return; } if (fboxphonebookid == null) { logger.debug("No Phonebookid provided. Use default: 0"); fboxphonebookid = "0"; } this._pw = fboxpw; this._user = fboxuser; this._url = fboxurl; this._pbid = Integer.valueOf(fboxphonebookid); if (_fboxComm == null) { _fboxComm = new Tr064Comm(_url, _user, _pw); } setProperlyConfigured(true); }

Target:
public void activate(final BundleContext bundleContext, final Map<String, Object> configuration) { logger.debug("FritzBox TR064 Binding activated!"); String refreshIntervalString = Objects.toString(configuration.get("refresh"), null); if (StringUtils.isNotBlank(refreshIntervalString)) { refreshInterval = Long.parseLong(refreshIntervalString); logger.debug("Custom refresh interval set to {}", refreshInterval); } String fboxurl = Objects.toString(configuration.get("url"), null); String fboxuser = Objects.toString(configuration.get("user"), null); String fboxpw = Objects.toString(configuration.get("pass"), null); String fboxphonebookid = Objects.toString(configuration.get("phonebookid"), null); if (fboxurl == null) { logger.warn("Fritzbox URL was not provided in config. Shutting down binding."); setProperlyConfigured(false); return; } if (fboxuser == null) { logger.warn("Fritzbox User was not provided in config. Using default username."); } if (fboxpw == null) { logger.warn("Fritzbox Password was not provided in config. Shutting down binding."); setProperlyConfigured(false); return; } if (fboxphonebookid == null) { logger.debug("No Phonebookid provided. Use default: 0"); fboxphonebookid = "0"; } this._pw = fboxpw; this._user = fboxuser; this._url = fboxurl; try { this._pbid = Integer.valueOf(fboxphonebookid); } catch(NumberFormatException ex) { this._pbid = 0; } if (_fboxComm == null) { _fboxComm = new Tr064Comm(_url, _user, _pw); } setProperlyConfigured(true); }
Source:
@Override public Response addFromVmSnapshot(Template template) { validateIconParameters(template); validateSnapshotExistence(template.getVm()); String snapshotId = getSnapshotId(template.getVm().getSnapshots()); org.ovirt.engine.core.common.businessentities.VM vmConfiguration = getVmConfiguration(snapshotId); Guid clusterId = null; if (namedCluster(template)) { clusterId = getClusterId(template); } if (template.getVersion() != null) { validateParameters(template.getVersion(), "baseTemplate"); } VmStatic originalVm = vmConfiguration.getStaticData(); VmStatic staticVm = getMapper(Template.class, VmStatic.class).map(template, originalVm); if (namedCluster(template)) { staticVm.setClusterId(clusterId); } AddVmTemplateFromSnapshotParameters params = new AddVmTemplateFromSnapshotParameters( staticVm, template.getName(), template.getDescription(), Guid.createGuidFromString(snapshotId)); return addTemplate(template, originalVm, vmConfiguration.getDiskMap().keySet(), params, ActionType.AddVmTemplateFromSnapshot); }

Target:
@Override public Response addFromVmSnapshot(Template template) { validateIconParameters(template); validateSnapshotExistence(template.getVm()); Guid snapshotId = getSnapshotId(template.getVm().getSnapshots()); org.ovirt.engine.core.common.businessentities.VM vmConfiguration = getVmConfiguration(snapshotId); Guid clusterId = null; if (namedCluster(template)) { clusterId = getClusterId(template); } if (template.getVersion() != null) { validateParameters(template.getVersion(), "baseTemplate"); } VmStatic originalVm = vmConfiguration.getStaticData(); VmStatic staticVm = getMapper(Template.class, VmStatic.class).map(template, originalVm); if (namedCluster(template)) { staticVm.setClusterId(clusterId); } AddVmTemplateFromSnapshotParameters params = new AddVmTemplateFromSnapshotParameters( staticVm, template.getName(), template.getDescription(), snapshotId); return addTemplate(template, originalVm, vmConfiguration.getDiskMap().keySet(), params, ActionType.AddVmTemplateFromSnapshot); }
Source:
public int hashCode() { return Objects.hashCode(mSize, mLocation, mForceLocation, mEvictionAllowed); }

Target:
public int hashCode() { return Objects.hashCode(mSize, mLocation, mForceLocation, mEvictionAllowed, mUseReservedSpace); }
Source:
TxBuilder create(@Nonnull final String tableName, @Nonnull final K key, @Nonnull final V value, @Nullable final M metadata) { Table<K, V, M> table = getTable(tableName); validateNamespace(table); operations.add(() -> { CorfuRecord<V, M> previous = table.get(key); if (previous != null) { throw new RuntimeException("Cannot create a record on existing key."); } M newMetadata = null; if (table.getMetadataOptions().isMetadataEnabled()) { M metadataDefaultInstance = (M) table.getMetadataOptions().getDefaultMetadataInstance(); newMetadata = getNewMetadata(metadataDefaultInstance, metadata); } table.create(key, value, newMetadata); }); return this; }

Target:
TxBuilder create(@Nonnull final String tableName, @Nonnull final K key, @Nonnull final V value, @Nullable final M metadata) { Table<K, V, M> table = getTable(tableName); operations.add(() -> { table.create(key, value, metadata); }); return this; }
Source:
public void setupRoutes() { path(controllerBasePath(), () -> { before("", mimeType, this::setContentType); before("/*", mimeType, this::setContentType); before("", this.mimeType, this.apiAuthenticationHelper::checkAdminUserAnd403); before(Routes.PluginInfoAPI.ID, this.mimeType, this.apiAuthenticationHelper::checkAdminUserAnd403); get(Routes.PluginInfoAPI.ID, mimeType, this::show); get("", mimeType, this::index); exception(HttpException.class, this::httpException); }); }

Target:
public void setupRoutes() { path(controllerBasePath(), () -> { before("", mimeType, this::setContentType); before("/*", mimeType, this::setContentType); before("", this.mimeType, this.apiAuthenticationHelper::checkUserAnd403); before(Routes.PluginInfoAPI.ID, this.mimeType, this.apiAuthenticationHelper::checkUserAnd403); get("", mimeType, this::index); get(Routes.PluginInfoAPI.ID, mimeType, this::show); exception(HttpException.class, this::httpException); }); }
Source:
public static Job createJob(VdcActionType actionType, CommandBase<?> command) { Job job = new Job(); job.setId(Guid.NewGuid()); job.setActionType(actionType); job.setCommandId(command.getCommandId()); job.setJobSubjectEntities(command.getPermissionCheckSubjects()); job.setCommandId(command.getCommandId()); job.setOwnerId(command.getUserId()); job.setStatus(ExecutionStatus.STARTED); job.setStartTime(new Date()); job.setJobRepository(JobRepositoryFactory.getJobRepository()); job.setCorrelationId(Guid.NewGuid().toString()); return job; }

Target:
public static Job createJob(VdcActionType actionType, CommandBase<?> command) { Job job = new Job(); job.setId(Guid.NewGuid()); job.setActionType(actionType); job.setDescription(actionType.name()); job.setCommandId(command.getCommandId()); job.setJobSubjectEntities(command.getPermissionCheckSubjects()); job.setCommandId(command.getCommandId()); job.setOwnerId(command.getUserId()); job.setStatus(ExecutionStatus.STARTED); job.setStartTime(new Date()); job.setCorrelationId(Guid.NewGuid().toString()); return job; }
Source:
public AggregatedMemoryContext aggregateUserMemoryContext() { return new InternalAggregatedMemoryContext(operatorMemoryContext.aggregateUserMemoryContext(), memoryFuture); }

Target:
public AggregatedMemoryContext aggregateUserMemoryContext() { return new InternalAggregatedMemoryContext(operatorMemoryContext.aggregateUserMemoryContext(), memoryFuture, this::updatePeakMemoryReservations, false); }
Source:
public static boolean insertHook(IHopper hopper, EnumFacing facing) { TileEntity tileEntity = hopper.getWorld().getTileEntity( new BlockPos(hopper.getXPos() + facing.getFrontOffsetX(), hopper.getYPos() + facing.getFrontOffsetY(), hopper.getZPos() + facing.getFrontOffsetZ())); if (tileEntity == null) return false; if (!tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite())) return false; IItemHandler handler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite()); for (int i = 0; i < hopper.getSizeInventory(); i++) { ItemStack stackInSlot = hopper.getStackInSlot(i); if (stackInSlot != null) { ItemStack insert = stackInSlot.copy(); insert.stackSize = 1; ItemStack newStack = ItemHandlerHelper.insertItem(handler, insert, true); if (newStack == null || newStack.stackSize == 0) { ItemHandlerHelper.insertItem(handler, hopper.decrStackSize(i, 1), false); hopper.markDirty(); return true; } } } return true; }

Target:
public static boolean insertHook(IHopper hopper, EnumFacing facing) { TileEntity tileEntity = hopper.getWorld().getTileEntity( new BlockPos(hopper.getXPos(), hopper.getYPos(), hopper.getZPos()).offset(facing)); if (tileEntity == null) return false; if (!tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite())) return false; IItemHandler handler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite()); for (int i = 0; i < hopper.getSizeInventory(); i++) { ItemStack stackInSlot = hopper.getStackInSlot(i); if (stackInSlot != null) { ItemStack insert = stackInSlot.copy(); insert.stackSize = 1; ItemStack newStack = ItemHandlerHelper.insertItem(handler, insert, true); if (newStack == null || newStack.stackSize == 0) { ItemHandlerHelper.insertItem(handler, hopper.decrStackSize(i, 1), false); hopper.markDirty(); return true; } } } return true; }
Source:
public void add(Block block, int position) { long currentGroupId = getGroupId(); short insertedBlockIndex = (short) (values.size() - 1); int insertedPosition = currentBlockBuilder.getPositionCount(); if (totalPositions == capacity) { capacity *= 1.5; nextBlockIndex.ensureCapacity(capacity); nextPosition.ensureCapacity(capacity); } if (isEmpty()) { headBlockIndex.set(currentGroupId, insertedBlockIndex); headPosition.set(currentGroupId, insertedPosition); } else { long absoluteTailAddress = toAbsolutePosition(tailBlockIndex.get(currentGroupId), tailPosition.get(currentGroupId)); nextBlockIndex.set(absoluteTailAddress, insertedBlockIndex); nextPosition.set(absoluteTailAddress, insertedPosition); } tailBlockIndex.set(currentGroupId, insertedBlockIndex); tailPosition.set(currentGroupId, insertedPosition); type.appendTo(block, position, currentBlockBuilder); totalPositions++; if (pageBuilderStatus.getSizeInBytes() > MAX_BLOCK_SIZE) { valueBlocksRetainedSizeInBytes += currentBlockBuilder.getRetainedSizeInBytes(); sumPositions.add(totalPositions); pageBuilderStatus = new PageBuilderStatus(MAX_BLOCK_SIZE, MAX_BLOCK_SIZE); currentBlockBuilder = currentBlockBuilder.newBlockBuilderLike(pageBuilderStatus.createBlockBuilderStatus()); values.add(currentBlockBuilder); verify(values.size() <= MAX_NUM_BLOCKS); } }

Target:
public void add(Block block, int position) { long currentGroupId = getGroupId(); short insertedBlockIndex = (short) (values.size() - 1); int insertedPosition = currentBlockBuilder.getPositionCount(); if (totalPositions == capacity) { capacity *= 1.5; nextBlockIndex.ensureCapacity(capacity); nextPosition.ensureCapacity(capacity); } if (isEmpty()) { headBlockIndex.set(currentGroupId, insertedBlockIndex); headPosition.set(currentGroupId, insertedPosition); } else { long absoluteTailAddress = toAbsolutePosition(tailBlockIndex.get(currentGroupId), tailPosition.get(currentGroupId)); nextBlockIndex.set(absoluteTailAddress, insertedBlockIndex); nextPosition.set(absoluteTailAddress, insertedPosition); } tailBlockIndex.set(currentGroupId, insertedBlockIndex); tailPosition.set(currentGroupId, insertedPosition); type.appendTo(block, position, currentBlockBuilder); totalPositions++; if (pageBuilderStatus.isFull()) { valueBlocksRetainedSizeInBytes += currentBlockBuilder.getRetainedSizeInBytes(); sumPositions.add(totalPositions); pageBuilderStatus = new PageBuilderStatus(MAX_BLOCK_SIZE, MAX_BLOCK_SIZE); currentBlockBuilder = currentBlockBuilder.newBlockBuilderLike(pageBuilderStatus.createBlockBuilderStatus()); values.add(currentBlockBuilder); verify(values.size() <= MAX_NUM_BLOCKS); } }
Source:
public Split(ConnectorId connectorId, ConnectorTransactionHandle transactionHandle, ConnectorSplit connectorSplit) { this(connectorId, transactionHandle, connectorSplit, DriverLifeCycle.taskWide()); }

Target:
public Split(ConnectorId connectorId, ConnectorTransactionHandle transactionHandle, ConnectorSplit connectorSplit) { this(connectorId, transactionHandle, connectorSplit, Lifespan.taskWide()); }
Source:
public static int incrementSequenceNumber(int value, int delta) { if (Integer.MAX_VALUE - delta >= value) { return value + delta; } else { return delta - (Integer.MAX_VALUE - value); } }

Target:
public static int incrementSequenceNumber(int value, int delta) { if (Integer.MAX_VALUE - delta >= value) { return value + delta; } else { return delta - (Integer.MAX_VALUE - value) - 1; } }
Source:
public void processMessage(final ObjectMessage message) { LOGGER.info("Processing microgrids set data request message"); String correlationUid = null; String messageType = null; String organisationIdentification = null; String deviceIdentification = null; SetDataRequest setDataRequest = null; try { correlationUid = message.getJMSCorrelationID(); messageType = message.getJMSType(); organisationIdentification = message.getStringProperty(Constants.ORGANISATION_IDENTIFICATION); deviceIdentification = message.getStringProperty(Constants.DEVICE_IDENTIFICATION); if (message.getObject() != null && message.getObject() instanceof SetDataRequest) { setDataRequest = (SetDataRequest) message.getObject(); } } catch (final JMSException e) { LOGGER.error("UNRECOVERABLE ERROR, unable to read ObjectMessage instance, giving up.", e); LOGGER.debug("correlationUid: {}", correlationUid); LOGGER.debug("messageType: {}", messageType); LOGGER.debug("organisationIdentification: {}", organisationIdentification); LOGGER.debug("deviceIdentification: {}", deviceIdentification); return; } try { LOGGER.info("Calling application service function: {}", messageType); this.adHocManagementService.handleSetDataRequest(organisationIdentification, deviceIdentification, correlationUid, messageType, setDataRequest); } catch (final Exception e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, messageType); } }

Target:
public void processMessage(final ObjectMessage message) { LOGGER.info("Processing microgrids set data request message"); String correlationUid = null; String messageType = null; String organisationIdentification = null; String deviceIdentification = null; SetDataRequest setDataRequest = null; try { correlationUid = message.getJMSCorrelationID(); messageType = message.getJMSType(); organisationIdentification = message.getStringProperty(Constants.ORGANISATION_IDENTIFICATION); deviceIdentification = message.getStringProperty(Constants.DEVICE_IDENTIFICATION); if (message.getObject() instanceof SetDataRequest) { setDataRequest = (SetDataRequest) message.getObject(); } } catch (final JMSException e) { LOGGER.error("UNRECOVERABLE ERROR, unable to read ObjectMessage instance, giving up.", e); LOGGER.debug("correlationUid: {}", correlationUid); LOGGER.debug("messageType: {}", messageType); LOGGER.debug("organisationIdentification: {}", organisationIdentification); LOGGER.debug("deviceIdentification: {}", deviceIdentification); return; } try { LOGGER.info("Calling application service function: {}", messageType); this.adHocManagementService.handleSetDataRequest(organisationIdentification, deviceIdentification, correlationUid, messageType, setDataRequest); } catch (final Exception e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, messageType); } }
Source:
public static void preUpdateSchemaOwner(DDLMessage.DDLChange change, DataDictionary dd, DependencyManager dm) throws StandardException { if (LOG.isDebugEnabled()) SpliceLogUtils.debug(LOG,"preUpdateSchemaOwner with change=%s",change); dd.getDataDictionaryCache().schemaCacheRemove(change.getUpdateSchemaOwner().getSchemaName()); dd.getDataDictionaryCache().clearPermissionCache(); dd.getDataDictionaryCache().clearOidTdCache(); }

Target:
public static void preUpdateSchemaOwner(DDLMessage.DDLChange change, DataDictionary dd, DependencyManager dm) throws StandardException { if (LOG.isDebugEnabled()) SpliceLogUtils.debug(LOG,"preUpdateSchemaOwner with change=%s",change); dd.getDataDictionaryCache().schemaCacheRemove(change.getUpdateSchemaOwner().getSchemaName()); dd.getDataDictionaryCache().clearPermissionCache(); dd.getDataDictionaryCache().clearOidTdCache(); dd.getDataDictionaryCache().clearNameTdCache(); }
Source:
public Set<Attribute<GlobalCredentialsConfiguration,?>> describe() { HashSet<Attribute<GlobalCredentialsConfiguration, ?>> set = new HashSet<>(); Attribute<GlobalCredentialsConfiguration, SystemCredentialsProvider> system = new Attribute<GlobalCredentialsConfiguration, SystemCredentialsProvider>("system", SystemCredentialsProvider.class) .getter(t -> SystemCredentialsProvider.getInstance()) .setter(noop()); set.add(system); for(CredentialsProvider provider : CredentialsProvider.all()) { Symbol s = provider.getClass().getAnnotation(Symbol.class); String name; if (s != null) { name = s.value()[0]; } else { name = provider.getClass().getSimpleName(); } set.add(new Attribute<GlobalCredentialsConfiguration, CredentialsProvider>(name, provider.getClass()) .getter(t -> provider) .setter(noop())); } return set; }

Target:
public Set<Attribute<GlobalCredentialsConfiguration,?>> describe() { HashSet<Attribute<GlobalCredentialsConfiguration, ?>> set = new HashSet<>(); Attribute<GlobalCredentialsConfiguration, SystemCredentialsProvider> system = new Attribute<GlobalCredentialsConfiguration, SystemCredentialsProvider>("system", SystemCredentialsProvider.class) .getter(t -> SystemCredentialsProvider.getInstance()) .setter(noop()); set.add(system); for (CredentialsProvider provider : CredentialsProvider.all()) { String symbol = DescribableAttribute.getPreferredSymbol(provider.getDescriptor(), CredentialsProvider.class, provider.getClass()); set.add(new Attribute<GlobalCredentialsConfiguration, CredentialsProvider>(symbol, provider.getClass()) .getter(t -> provider) .setter(noop())); } return set; }
Source:
private void extractSamplingInfo(TupleBatch tb) throws Exception { Preconditions.checkArgument(tb != null); int workerID; Type col0Type = tb.getSchema().getColumnType(0); if (col0Type == Type.INT_TYPE) { workerID = tb.getInt(0, 0); } else if (col0Type == Type.LONG_TYPE) { workerID = (int) tb.getLong(0, 0); } else { throw new DbException("WorkerID column must be of type INT or LONG"); } Preconditions.checkState(workerID == getNodeID(), "Invalid WorkerID for this worker. Expected %s, but received %s", getNodeID(), workerID); Type col1Type = tb.getSchema().getColumnType(1); if (col1Type == Type.INT_TYPE) { streamSize = tb.getInt(1, 0); } else if (col1Type == Type.LONG_TYPE) { streamSize = (int) tb.getLong(1, 0); } else { throw new DbException("StreamSize column must be of type INT or LONG"); } Preconditions.checkState(streamSize >= 0, "streamSize cannot be negative"); Type col2Type = tb.getSchema().getColumnType(2); if (col2Type == Type.INT_TYPE) { sampleSize = tb.getInt(2, 0); } else if (col2Type == Type.LONG_TYPE) { sampleSize = (int) tb.getLong(2, 0); } else { throw new DbException("SampleSize column must be of type INT or LONG"); } Preconditions.checkState(sampleSize >= 0, "sampleSize cannot be negative"); Type col3Type = tb.getSchema().getColumnType(3); if (col3Type == Type.STRING_TYPE) { sampleType = tb.getString(3, 0); } else { throw new DbException("SampleType column must be of type STRING"); } }

Target:
private void extractSamplingInfo(TupleBatch tb) throws Exception { Preconditions.checkArgument(tb != null); int workerID; Type col0Type = tb.getSchema().getColumnType(0); if (col0Type == Type.INT_TYPE) { workerID = tb.getInt(0, 0); } else if (col0Type == Type.LONG_TYPE) { workerID = (int) tb.getLong(0, 0); } else { throw new DbException("WorkerID column must be of type INT or LONG"); } Preconditions.checkState(workerID == getNodeID(), "Invalid WorkerID for this worker. Expected %s, but received %s", getNodeID(), workerID); Type col1Type = tb.getSchema().getColumnType(1); if (col1Type == Type.INT_TYPE) { streamSize = tb.getInt(1, 0); } else if (col1Type == Type.LONG_TYPE) { streamSize = (int) tb.getLong(1, 0); } else { throw new DbException("StreamSize column must be of type INT or LONG"); } Preconditions.checkState(streamSize >= 0, "streamSize cannot be negative"); Type col2Type = tb.getSchema().getColumnType(2); if (col2Type == Type.INT_TYPE) { sampleSize = tb.getInt(2, 0); } else if (col2Type == Type.LONG_TYPE) { sampleSize = (int) tb.getLong(2, 0); } else { throw new DbException("SampleSize column must be of type INT or LONG"); } Preconditions.checkState(sampleSize >= 0, "sampleSize cannot be negative"); Type col3Type = tb.getSchema().getColumnType(3); if (col3Type == Type.STRING_TYPE) { String col3Val = tb.getString(3, 0); try { sampleType = SamplingType.valueOf(col3Val); } catch (IllegalArgumentException e) { throw new DbException("Invalid SampleType: " + col3Val); } } else { throw new DbException("SampleType column must be of type STRING"); } }
Source:
public void testExtension(){ stateStore.storeExtensionBean("test1", "test_location", ExtensionType.TRUSTED, "test_description", "falcon"); Assert.assertEquals(stateStore.getAllExtensions().size(), 1); ExtensionBean bean = stateStore.getDetail("test1"); Assert.assertEquals(bean.getLocation(), "test_location"); stateStore.deleteExtensionsOfType(ExtensionType.TRUSTED); Assert.assertEquals(stateStore.getAllExtensions().size(), 0); }

Target:
public void testExtension(){ stateStore.storeExtensionBean("test1", "test_location", ExtensionType.TRUSTED, "test_description", "falconUser"); Assert.assertEquals(stateStore.getAllExtensions().size(), 1); ExtensionBean bean = stateStore.getDetail("test1"); Assert.assertEquals(bean.getLocation(), "test_location"); stateStore.deleteExtensionsOfType(ExtensionType.TRUSTED); Assert.assertEquals(stateStore.getAllExtensions().size(), 0); }
Source:
public Map<String, String> getMapping(final JID jid) { final Map<String, String> result = new HashMap<>(); final String mapping = store.getString(RESOURCE_MAPPING_STORE_PREFIX + jid.getBase()); if (mapping.isEmpty()) return result; final String[] names = SPLIT_PATTERN.split(mapping); for (int i = 0; i < names.length; i += 2) { if (names[i].isEmpty() || names[i + 1].isEmpty()) continue; result.put(unescape(names[i]), unescape(names[i + 1])); } return result; }

Target:
public Map<String, String> getMapping(final JID jid) { final Map<String, String> result = new HashMap<>(); final String mapping = store.getString(RESOURCE_MAPPING_STORE_PREFIX + jid.getBase()); if (mapping.isEmpty()) return result; final String[] names = SPLIT_PATTERN.split(mapping); for (int i = 0; i < names.length - 1; i += 2) { if (names[i].isEmpty() || names[i + 1].isEmpty()) continue; result.put(unescape(names[i]), unescape(names[i + 1])); } return result; }
Source:
public static void main(String[] args) { MsbContext msbContext = new MsbContextBuilder(). enableShutdownHook(true). build(); MessageTemplate messageTemplate = new MessageTemplate().withTags("ping-static-tag"); RequestOptions requestOptions = new RequestOptions.Builder() .withAckTimeout(1000) .withResponseTimeout(2000) .withWaitForResponses(1) .withMessageTemplate(messageTemplate) .build(); ObjectFactory objectFactory = msbContext.getObjectFactory(); Requester<Payload> requester = objectFactory.createRequester("pingpong:namespace", requestOptions) .onResponse(payload -> LOG.info(String.format("Received response '%s'", payload.getBody()))) .onEnd(arg -> LOG.info("Received all expected responses")); Payload pingPayload = new Payload.Builder<Object, Object, Object, String>() .withBody("PING") .build(); requester.publish(pingPayload, "ping-dynamic-tag"); }

Target:
public static void main(String[] args) { MsbContext msbContext = new MsbContextBuilder(). enableShutdownHook(true). build(); MessageTemplate messageTemplate = new MessageTemplate().withTags("ping-service"); RequestOptions requestOptions = new RequestOptions.Builder() .withAckTimeout(1000) .withResponseTimeout(2000) .withWaitForResponses(1) .withMessageTemplate(messageTemplate) .build(); ObjectFactory objectFactory = msbContext.getObjectFactory(); Requester<Payload> requester = objectFactory.createRequester("pingpong:namespace", requestOptions) .onResponse(payload -> LOG.info(String.format("Received response '%s'", payload.getBody()))) .onEnd(arg -> LOG.info("Received all expected responses")); Payload pingPayload = new Payload.Builder<Object, Object, Object, String>() .withBody("PING") .build(); requester.publish(pingPayload, UUID.randomUUID().toString()); }
Source:
public V getAndRemove(K key) { boolean startedTx = startTxAndLock(key); super.remove(key); V prev = super.getAndRemove(key); stopTx(startedTx); return prev; }

Target:
public V getAndRemove(K key) { boolean startedTx = false; V prev = null; try { startedTx = startTxAndLock(key); prev = super.getAndRemove(key); } finally { stopTx(startedTx); } return prev; }
Source:
protected void execute() { logger.debug("Querying Ecobee API"); try { for (String userid : credentialsCache.keySet()) { OAuthCredentials oauthCredentials = getOAuthCredentials(userid); Selection selection = createSelection(oauthCredentials); if (selection == null) { logger.debug("Nothing to retrieve for '{}'; skipping thermostat retrieval.", oauthCredentials.userid); continue; } if (oauthCredentials.noAccessToken()) { if (!oauthCredentials.refreshTokens()) { logger.warn("Periodic poll skipped for '{}'.", oauthCredentials.userid); continue; } } readEcobee(oauthCredentials, selection); } } catch (Exception e) { logger.error("Error reading from Ecobee:", e); } }

Target:
protected void execute() { logger.trace("Querying Ecobee API"); try { for (String userid : credentialsCache.keySet()) { OAuthCredentials oauthCredentials = getOAuthCredentials(userid); Selection selection = createSelection(oauthCredentials); if (selection == null) { logger.debug("Nothing to retrieve for '{}'; skipping thermostat retrieval.", oauthCredentials.userid); continue; } if (oauthCredentials.noAccessToken()) { if (!oauthCredentials.refreshTokens()) { logger.warn("Periodic poll skipped for '{}'.", oauthCredentials.userid); continue; } } readEcobee(oauthCredentials, selection); } } catch (Exception e) { logger.error("Error reading from Ecobee:", e); } }
Source:
public void removeReferenceToFilter() throws IOException { page.switchToReferenceToFilterSubTab(); ResourceManager manager = page.getConfigFragment().getResourceManager(); manager.removeResource(REWRITE_FILTER_NAME).confirmAndDismissReloadRequiredMessage(); Assert.assertFalse("Filter reference " + REWRITE_FILTER_NAME + " is present in table!", manager.isResourcePresent(REWRITE_FILTER_NAME)); }

Target:
public void removeReferenceToFilter() throws Exception { page.switchToFilterReferencesSubTab(); ResourceManager manager = page.getConfigFragment().getResourceManager(); manager.removeResource(REWRITE_FILTER_ADDRESS.getLastPairValue()).confirmAndDismissReloadRequiredMessage(); Assert.assertFalse("Filter reference " + REWRITE_FILTER_ADDRESS.getLastPairValue() + " is present in table!", manager.isResourcePresent(REWRITE_FILTER_ADDRESS.getLastPairValue())); new ResourceVerifier(REWRITE_FILTER_REFERENCE_ADDRESS, client).verifyDoesNotExist(); }
Source:
private static Status fromStatusCode(final int code) { for (final Status status: Status.values()) { if (status.getStatusCode() == code) { return status; } } return null; }

Target:
private static Status fromStatusCode(final int code) throws UnknownStatusCodeException { for (final Status status: Status.values()) { if (status.getStatusCode() == code) { return status; } } throw new UnknownStatusCodeException("Unknown status code: " + code); }
Source:
static public Map<String, String> generate(Config jobConfig, List<TableDescriptor> tableDescriptors) { Map<String, String> tableConfig = new HashMap<>(); tableDescriptors.forEach(tableDescriptor -> tableConfig.putAll(tableDescriptor.toConfig(jobConfig))); return tableConfig; }

Target:
static public Map<String, String> generate(Config jobConfig, List<TableDescriptor> tableDescriptors) { Map<String, String> tableConfig = new HashMap<>(); tableDescriptors.forEach(tableDescriptor -> tableConfig.putAll(tableDescriptor.toConfig(jobConfig))); LOG.info("TableConfigGenerator has generated configs {}", tableConfig); return tableConfig; }
Source:
protected void executeCommand() { GetDiskAlignmentVDSCommandParameters parameters; acquireExclusiveDiskDbLocks(); Guid vmId = NGuid.Empty; if (getDiskType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) getDisk(); GetDiskImageAlignmentVDSCommandParameters imageParameters = new GetDiskImageAlignmentVDSCommandParameters(getVdsIdInPool(), vmId); imageParameters.setPoolId(getStoragePoolId()); imageParameters.setDomainId(diskImage.getStorageIds().get(0)); imageParameters.setImageGroupId(diskImage.getimage_group_id()); imageParameters.setImageId(diskImage.getImageId()); parameters = imageParameters; } else if (getDiskType() == DiskStorageType.LUN) { LunDisk lunDisk = (LunDisk) getDisk(); GetDiskLunAlignmentVDSCommandParameters lunParameters = new GetDiskLunAlignmentVDSCommandParameters(getVdsIdInPool(), vmId); lunParameters.setLunGuid(lunDisk.getLun().getLUN_id()); parameters = lunParameters; } else { throw new VdcBLLException(VdcBllErrors.ENGINE, "Unknown DiskStorageType: " + getDiskType().toString() + " Disk id: " + getDisk().getId().toString()); } Boolean isDiskAligned = (Boolean) runVdsCommand( VDSCommandType.GetDiskAlignment, parameters).getReturnValue(); getDisk().setAlignment(isDiskAligned ? DiskAlignment.Aligned : DiskAlignment.Misaligned); getDisk().setLastAlignmentScan(new Date()); getBaseDiskDao().update(getDisk()); setSucceeded(true); releaseExclusiveDiskDbLocks(); }

Target:
protected void executeCommand() { GetDiskAlignmentVDSCommandParameters parameters; acquireExclusiveDiskDbLocks(); Guid vmId = NGuid.Empty; if (getDiskType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) getDisk(); GetDiskImageAlignmentVDSCommandParameters imageParameters = new GetDiskImageAlignmentVDSCommandParameters(getVdsIdInPool(), vmId); imageParameters.setPoolId(getStoragePoolId()); imageParameters.setDomainId(diskImage.getStorageIds().get(0)); imageParameters.setImageGroupId(diskImage.getimage_group_id()); imageParameters.setImageId(diskImage.getImageId()); parameters = imageParameters; } else if (getDiskType() == DiskStorageType.LUN) { LunDisk lunDisk = (LunDisk) getDisk(); GetDiskLunAlignmentVDSCommandParameters lunParameters = new GetDiskLunAlignmentVDSCommandParameters(getVdsIdInPool(), vmId); lunParameters.setLunId(lunDisk.getLun().getLUN_id()); parameters = lunParameters; } else { throw new VdcBLLException(VdcBllErrors.ENGINE, "Unknown DiskStorageType: " + getDiskType().toString() + " Disk id: " + getDisk().getId().toString()); } Boolean isDiskAligned = (Boolean) runVdsCommand( VDSCommandType.GetDiskAlignment, parameters).getReturnValue(); getDisk().setAlignment(isDiskAligned ? DiskAlignment.Aligned : DiskAlignment.Misaligned); getDisk().setLastAlignmentScan(new Date()); getBaseDiskDao().update(getDisk()); setSucceeded(true); releaseExclusiveDiskDbLocks(); }
Source:
public void onPartitionsPolled(@NotNull ConsumerRecords<?, ?> consumerRecords) { Collection<TopicPartition> topicPartitions = consumerRecords.partitions(); topicPartitions.forEach(topicPartition -> { List<? extends ConsumerRecord<?, ?>> partitionRecords = consumerRecords.records(topicPartition); ConsumerRecord<?, ?> lastRecord = partitionRecords.get(partitionRecords.size() - 1); Map<Integer, Long> partitionOffsetMap = _consumerOffsets.putIfAbsent(topicPartition.topic(), new ConcurrentHashMap<>()); partitionOffsetMap.put(topicPartition.partition(), lastRecord.offset()); }); }

Target:
public void onPartitionsPolled(@NotNull ConsumerRecords<?, ?> consumerRecords) { Collection<TopicPartition> topicPartitions = consumerRecords.partitions(); topicPartitions.forEach(topicPartition -> { List<? extends ConsumerRecord<?, ?>> partitionRecords = consumerRecords.records(topicPartition); ConsumerRecord<?, ?> lastRecord = partitionRecords.get(partitionRecords.size() - 1); Map<Integer, Long> partitionOffsetMap = _consumerOffsets.computeIfAbsent(topicPartition.topic(), k -> new ConcurrentHashMap<>()); partitionOffsetMap.put(topicPartition.partition(), lastRecord.offset()); }); }
Source:
default <U> ClosableIterator<U> map(Function<T, U> mapper) { return ClosableIterators.wrap(Iterators.transform(this, (com.google.common.base.Function)mapper)); }

Target:
default <U> ClosableIterator<U> map(Function<T, U> mapper) { return ClosableIterators.wrap(Iterators.transform(this, mapper::apply)); }
Source:
private HttpResponse initResponse(HttpRequest request, int statusCode, HttpHeaders headers, String body) { return new HttpResponse(request) { @Override public int getStatusCode() { return statusCode; } @Override public String getHeaderValue(String name) { return headers.getValue(name); } @Override public HttpHeaders getHeaders() { return headers; } @Override public Flux<ByteBuffer> getBody() { return Flux.just(ByteBuffer.wrap(body.getBytes(StandardCharsets.UTF_8))); } @Override public Mono<byte[]> getBodyAsByteArray() { return Mono.just(body.getBytes(StandardCharsets.UTF_8)); } @Override public Mono<String> getBodyAsString() { return Mono.just(body); } @Override public Mono<String> getBodyAsString(Charset charset) { return Mono.just(body); } }; }

Target:
private HttpResponse initResponse(HttpRequest request, int statusCode, HttpHeaders headers, String body) { return new HttpResponse(request) { @Override public int getStatusCode() { return statusCode; } @Override public String getHeaderValue(String name) { return headers.getValue(name); } @Override public HttpHeaders getHeaders() { return headers; } @Override public Flux<ByteBuffer> getBody() { return Flux.just(ByteBuffer.wrap(body.getBytes(StandardCharsets.UTF_8))); } @Override public Mono<byte[]> getBodyAsByteArray() { return Mono.just(body.getBytes(StandardCharsets.UTF_8)); } @Override public Mono<String> getBodyAsString() { return Mono.just(body); } @Override public Mono<String> getBodyAsString(Charset charset) { return getBodyAsByteArray().map(body -> new String(body, charset)); } }; }
Source:
public ValidationResult check(Vertex vertex) { List<ValidationResult> validationResults = Lists.newArrayList(); String[] vertexTypes = getEntityTypesOrDefault(vertex); String id = vertex.value("tim_id"); vertex.edges(Direction.BOTH).forEachRemaining(edge -> { if (Objects.equals(edge.label(), "VERSION_OF")) { String[] edgeTypes = getEntityTypesOrDefault(edge); for (String edgeType : edgeTypes) { Optional<Collection> collection = vres.getCollectionForType(edgeType); String edgeId = edge.value("tim_id"); if (!collection.isPresent()) { validationResults.add( new ElementValidationResult(false, String.format("Edge with tim_id '%s' has contains unknown variant '%s'", edgeId, edgeType))); continue; } if (collection.get().getVre().getOwnType(vertexTypes) == null) { addInvalidVertex(validationResults, id, vertexTypes, edgeType, edgeId); } } } }); return new CompositeValidationResult(validationResults); }

Target:
public ValidationResult check(Vertex vertex) { List<ValidationResult> validationResults = Lists.newArrayList(); String[] vertexTypes = getEntityTypesOrDefault(vertex); String id = vertex.value("tim_id"); vertex.edges(Direction.BOTH).forEachRemaining(edge -> { if (!Objects.equals(edge.label(), "VERSION_OF")) { String[] edgeTypes = getEntityTypesOrDefault(edge); for (String edgeType : edgeTypes) { Optional<Collection> collection = vres.getCollectionForType(edgeType); String edgeId = edge.value("tim_id"); if (!collection.isPresent()) { validationResults.add( new ElementValidationResult(false, String.format("Edge with tim_id '%s' has contains unknown variant '%s'", edgeId, edgeType))); continue; } if (collection.get().getVre().getOwnType(vertexTypes) == null) { addInvalidVertex(validationResults, id, vertexTypes, edgeType, edgeId); } } } }); return new CompositeValidationResult(validationResults); }
Source:
private boolean conflictDetected(AbstractDiagramBorderNodeEditPart editPart, Point moveDelta) { BorderNodeCollapseManager borderNodeCollapseManager = new BorderNodeCollapseManager(); IBorderItemLocator locator = editPart.getBorderItemLocator(); IFigure figure = editPart.getFigure(); Rectangle bounds = figure.getBounds().getCopy(); bounds.translate(moveDelta); Rectangle newBounds = borderNodeCollapseManager.expandCollapsedNodeBounds(editPart, new PrecisionRectangle(bounds)); if (newBounds != null) { bounds.setBounds(newBounds); } Rectangle validLocation = locator.getValidLocation(bounds, figure); if (borderNodeCollapseManager.hasBeenExpanded()) { borderNodeCollapseManager.restoreCollapsedNode(editPart); } return !validLocation.equals(bounds); }

Target:
private boolean conflictDetected(AbstractDiagramBorderNodeEditPart editPart, Point moveDelta) { BorderNodeCollapseManager borderNodeCollapseManager = new BorderNodeCollapseManager(); IBorderItemLocator locator = editPart.getBorderItemLocator(); IFigure figure = editPart.getFigure(); Rectangle bounds = figure.getBounds().getCopy(); bounds.translate(moveDelta); Rectangle newBounds = borderNodeCollapseManager.expandCollapsedNodeBounds(editPart, new PrecisionRectangle(bounds)); if (newBounds != null) { bounds.setBounds(newBounds); } List<IFigure> figureToIgnore = Lists.newArrayList(); figureToIgnore.add(figure); for (ConnectionEditPart connectionEditPart : Iterables.filter(editPart.getViewer().getSelectedEditParts(), ConnectionEditPart.class)) { EditPart source = connectionEditPart.getSource(); EditPart target = connectionEditPart.getTarget(); if (source instanceof AbstractDiagramBorderNodeEditPart && source.getParent().equals(editPart.getParent())) { figureToIgnore.add(((AbstractDiagramBorderNodeEditPart) source).getFigure()); } if (target instanceof AbstractDiagramBorderNodeEditPart && target.getParent().equals(editPart.getParent())) { figureToIgnore.add(((AbstractDiagramBorderNodeEditPart) target).getFigure()); } } Rectangle validLocation = ((DBorderItemLocator) locator).getValidLocation(bounds, figure, figureToIgnore); if (borderNodeCollapseManager.hasBeenExpanded()) { borderNodeCollapseManager.restoreCollapsedNode(editPart); } return !validLocation.equals(bounds); }
Source:
protected boolean verifyByCallback(long timeout, List<ClusterVerifyTrigger> triggers) { _countdown = new CountDownLatch(1); for (ClusterVerifyTrigger trigger : triggers) { subscribeTrigger(trigger); } boolean success = false; try { success = verifyState(); if (!success) { success = _countdown.await(timeout, TimeUnit.MILLISECONDS); if (!success) { success = verifyState(); if (!success) { LOG.error("verifyByCallback failed due to timeout, with stack trace {}", Arrays.asList(Thread.currentThread().getStackTrace())); } } } } catch (Exception e) { LOG.error("Exception in verifier {}", e); } _zkClient.unsubscribeAll(); _verifyTaskThreadPool.shutdownNow(); return success; }

Target:
protected boolean verifyByCallback(long timeout, List<ClusterVerifyTrigger> triggers) { _countdown = new CountDownLatch(1); for (ClusterVerifyTrigger trigger : triggers) { subscribeTrigger(trigger); } boolean success = false; try { success = verifyState(); if (!success) { success = _countdown.await(timeout, TimeUnit.MILLISECONDS); if (!success) { success = verifyState(); if (!success) { LOG.error("verifyByCallback failed due to timeout {}", timeout); } } } } catch (Exception e) { LOG.error("Exception in verifier", e); } _zkClient.unsubscribeAll(); _verifyTaskThreadPool.shutdownNow(); return success; }
Source:
public static Properties loadAllKeys() { Properties keyProperties = new Properties(); try (InputStream fi = ComponentKeySource.class.getResourceAsStream(DEFAULT_KEY_FILE_NAME)) { keyProperties.load(fi); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } String keyPath = System.getProperty(ENCRYPTION_KEY_FILE_SYS_PROP); if (keyPath != null) { File keyFile = new File(keyPath); if (keyFile.exists()) { try (InputStream fi = new FileInputStream(keyFile)) { keyProperties.load(fi); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } } } System.getProperties().forEach((k, v) -> { String key = String.valueOf(v); if (key.startsWith(KEY_SYSTEM_PREFIX)) { keyProperties.put(key, v); } }); if (LOGGER.isLoggable(Level.FINER)) { keyProperties.stringPropertyNames().forEach((k) -> LOGGER.info(k)); } return keyProperties; }

Target:
public static Properties loadAllKeys() { Properties keyProperties = new Properties(); try (InputStream fi = ComponentKeySource.class.getResourceAsStream(DEFAULT_KEY_FILE_NAME)) { keyProperties.load(fi); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } String keyPath = System.getProperty(ENCRYPTION_KEY_FILE_SYS_PROP); if (keyPath != null) { File keyFile = new File(keyPath); if (keyFile.exists()) { Properties tempProperties = new Properties(); try (InputStream fi = new FileInputStream(keyFile)) { tempProperties.load(fi); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } tempProperties.forEach((k, v) -> { String key = String.valueOf(k); if (key.startsWith(KEY_SYSTEM_PREFIX)) { keyProperties.put(key, v); } }); } } System.getProperties().forEach((k, v) -> { String key = String.valueOf(k); if (key.startsWith(KEY_SYSTEM_PREFIX)) { keyProperties.put(key, v); } }); if (LOGGER.isLoggable(Level.FINER)) { keyProperties.stringPropertyNames().forEach((k) -> LOGGER.log(Level.FINER, k)); } return keyProperties; }
Source:
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, Date startDate, Date endDate, ScmBranch branch, String datePattern, ScmVersion startVersion, ScmVersion endVersion ) throws ScmException { Git git = null; boolean isARangeChangeLog = startVersion != null || endVersion != null; try { git = JGitUtils.openRepo( fileSet.getBasedir() ); String startRev = startVersion != null ? startVersion.getName() : ( isARangeChangeLog ? "HEAD" : null); String endRev = endVersion != null ? endVersion.getName() : ( isARangeChangeLog ? "HEAD" : null); List<ChangeEntry> gitChanges = this.whatchanged( git.getRepository(), null, startRev, endRev, startDate, endDate, -1 ); List<ChangeSet> modifications = new ArrayList<ChangeSet>( gitChanges.size() ); for ( ChangeEntry change : gitChanges ) { ChangeSet scmChange = new ChangeSet(); scmChange.setAuthor( change.getAuthorName() ); scmChange.setComment( change.getBody() ); scmChange.setDate( change.getAuthorDate() ); scmChange.setRevision( change.getCommitHash() ); modifications.add( scmChange ); } ChangeLogSet changeLogSet = new ChangeLogSet( modifications, startDate, endDate ); changeLogSet.setStartVersion( startVersion ); changeLogSet.setEndVersion( endVersion ); return new ChangeLogScmResult( "JGit changelog", changeLogSet ); } catch ( Exception e ) { throw new ScmException( "JGit changelog failure!", e ); } finally { JGitUtils.closeRepo( git ); } }

Target:
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, Date startDate, Date endDate, ScmBranch branch, String datePattern, ScmVersion startVersion, ScmVersion endVersion ) throws ScmException { return executeChangeLogCommand( repo, fileSet, startDate, endDate, branch, datePattern, startVersion, endVersion, null ); }