auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private List<MachineDescriptor> processWorkerParameters(final List<EvaluatorParameters> evalParamsList) { final List<MachineDescriptor> machineDescriptors = new ArrayList<>(evalParamsList.size()); for (final EvaluatorParameters evalParams : evalParamsList) { final WorkerEvaluatorParameters workerEvalParams = (WorkerEvaluatorParameters) evalParams; final String id = workerEvalParams.getId(); final int numDataBlocks = workerEvalParams.getDataInfo().getNumBlocks(); final String hostname = workerEvalParams.getMetrics().getHostname().toString(); final double bandwidth = hostToBandwidth.getOrDefault(hostname, defNetworkBandwidth) / 8D; final double cWProc = workerEvalParams.getMetrics().getTotalCompTime(); cWProcInfo.put(hostname, cWProc); machineDescriptors.add( new MachineDescriptor(id, bandwidth, numDataBlocks, cWProc, NUM_EMPTY_BLOCK, hostname)); } return machineDescriptors; }

Target:
private List<MachineDescriptor> processWorkerParameters(final List<EvaluatorParameters> evalParamsList) { final List<MachineDescriptor> machineDescriptors = new ArrayList<>(evalParamsList.size()); for (final EvaluatorParameters evalParams : evalParamsList) { final WorkerEvaluatorParameters workerEvalParams = (WorkerEvaluatorParameters) evalParams; final String id = workerEvalParams.getId(); final int numDataBlocks = workerEvalParams.getDataInfo().getNumBlocks(); final String hostname = workerEvalParams.getMetrics().getHostname().toString(); final double bandwidth = hostToBandwidth.getOrDefault(hostname, defNetworkBandwidth) / 8D; final double presentCWProc = workerEvalParams.getMetrics().getTotalCompTime(); final double cWProc = hostToCWProc.containsKey(hostname) ? presentCWProc * EMA_ALPHA + hostToCWProc.get(hostname) * (1.0 - EMA_ALPHA) : presentCWProc; hostToCWProc.put(hostname, cWProc); machineDescriptors.add( new MachineDescriptor(id, bandwidth, numDataBlocks, cWProc, NUM_EMPTY_BLOCK, hostname)); } return machineDescriptors; }
Source:
public void testErrorResponseParsing() throws IOException { UrbanAirshipClient client = UrbanAirshipClient.newBuilder() .setKey("ISex_TTJRuarzs9-o_Gkhg") .setSecret("nDq-bQ3CT92PqCIXNtQyCQ") .build(); PartialPushPayload partialPushPayload = PartialPushPayload.newBuilder() .setNotification(Notification.newBuilder() .setAlert("Hello {{FIRST_NAME}} {{LAST_NAME}}, this is a test!") .build() ) .build(); TemplateRequest request = TemplateRequest.newRequest("template-id-123") .setPush(partialPushPayload); try { Response<TemplateResponse> response = client.execute(request); } catch (RuntimeException e) { ClientException ex = (ClientException) e.getCause().getCause(); Assert.assertEquals(400, ex.getStatusCode()); Assert.assertEquals("\"id\" must be a valid GUID", ex.getError().get().getError()); } }

Target:
public void testErrorResponseParsing() throws IOException { UrbanAirshipClient client = UrbanAirshipClient.newBuilder() .setKey("ISex_TTJRuarzs9-o_Gkhg") .setSecret("nDq-bQ3CT92PqCIXNtQyCQ") .build(); PartialPushPayload partialPushPayload = PartialPushPayload.newBuilder() .setNotification(Notification.newBuilder() .setAlert("Hello {{FIRST_NAME}} {{LAST_NAME}}, this is a test!") .build() ) .build(); TemplateRequest request = TemplateRequest.newRequest("template-id-123") .setPush(partialPushPayload); try { Response<TemplateResponse> response = client.execute(request); } catch (RuntimeException e) { ClientException ex = (ClientException) e.getCause().getCause(); Assert.assertEquals(400, ex.getStatusCode()); Assert.assertEquals("\"id\" must be a valid GUID", ex.getError().get().getError()); throw e; } }
Source:
public OutputStream decorateLogger(AbstractBuild build, OutputStream logger) throws IOException, InterruptedException, RunnerAbortedException { if(showBindings) return super.decorateLogger(build, logger); Map<String,String> overrides = new HashMap<String,String>(); List<MultiBinding.Unbinder> unbinders = new ArrayList<MultiBinding.Unbinder>(); for (MultiBinding<?> binding : bindings) { MultiBinding.MultiEnvironment environment = binding.bind(build, build.getWorkspace(), null, null); unbinders.add(environment.getUnbinder()); overrides.putAll(environment.getValues()); } return new BindingStep.Filter(overrides.values()).decorateLogger(build, logger); }

Target:
public OutputStream decorateLogger(AbstractBuild build, OutputStream logger) throws IOException, InterruptedException, RunnerAbortedException { if(showBindings) return super.decorateLogger(build, logger); Map<String,String> overrides = new HashMap<String,String>(); for (MultiBinding<?> binding : bindings) { MultiBinding.MultiEnvironment environment = binding.bind(build, null, null, null); for (String envKey : environment.getValues().keySet()) { if (!environment.getValues().get(envKey).isEmpty()) { overrides.put(envKey, environment.getValues().get(envKey)); } } } if (!overrides.isEmpty()) { return new BindingStep.Filter(overrides.values()).decorateLogger(build, logger); } else { return logger; } }
Source:
public void testNoPartitionRetentionForReplTarget() throws TException, InterruptedException { String dbName = "db_repl2"; String tableName = "tbl_repl2"; Map<String, Column> colMap = buildAllColumns(); List<String> partKeys = Lists.newArrayList("state", "dt"); List<String> partKeyTypes = Lists.newArrayList("string", "date"); List<List<String>> partVals = Lists.newArrayList( Lists.newArrayList("__HIVE_DEFAULT_PARTITION__", "1990-01-01"), Lists.newArrayList("CA", "1986-04-28"), Lists.newArrayList("MN", "2018-11-31")); long partitionRetentionPeriodMs = 20000; long waitingPeriodForTest = partitionRetentionPeriodMs + 10 * 1000; createMetadata(DEFAULT_CATALOG_NAME, dbName, tableName, partKeys, partKeyTypes, partVals, colMap, false); Table table = client.getTable(dbName, tableName); List<Partition> partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); table.getParameters().put(PartitionManagementTask.DISCOVER_PARTITIONS_TBLPROPERTY, "true"); table.getParameters().put(PartitionManagementTask.PARTITION_RETENTION_PERIOD_TBLPROPERTY, partitionRetentionPeriodMs + "ms"); table.getParameters().put(ReplConst.REPL_TARGET_PROPERTY, "1"); client.alter_table(dbName, tableName, table); runPartitionManagementTask(conf); partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); Thread.sleep(waitingPeriodForTest); runPartitionManagementTask(conf); partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); }

Target:
public void testNoPartitionRetentionForReplTarget() throws TException, InterruptedException { String dbName = "db_repl2"; String tableName = "tbl_repl2"; Map<String, Column> colMap = buildAllColumns(); List<String> partKeys = Lists.newArrayList("state", "dt"); List<String> partKeyTypes = Lists.newArrayList("string", "date"); List<List<String>> partVals = Lists.newArrayList( Lists.newArrayList("__HIVE_DEFAULT_PARTITION__", "1990-01-01"), Lists.newArrayList("CA", "1986-04-28"), Lists.newArrayList("MN", "2018-11-31")); long partitionRetentionPeriodMs = 20000; long waitingPeriodForTest = partitionRetentionPeriodMs + 10 * 1000; createMetadata(DEFAULT_CATALOG_NAME, dbName, tableName, partKeys, partKeyTypes, partVals, colMap, false); Table table = client.getTable(dbName, tableName); List<Partition> partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); table.getParameters().put(PartitionManagementTask.DISCOVER_PARTITIONS_TBLPROPERTY, "true"); table.getParameters().put(PartitionManagementTask.PARTITION_RETENTION_PERIOD_TBLPROPERTY, partitionRetentionPeriodMs + "ms"); table.getParameters().put(ReplConst.REPL_TARGET_TABLE_PROPERTY, "1"); client.alter_table(dbName, tableName, table); runPartitionManagementTask(conf); partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); Thread.sleep(waitingPeriodForTest); runPartitionManagementTask(conf); partitions = client.listPartitions(dbName, tableName, (short) -1); assertEquals(3, partitions.size()); }
Source:
public void saveSettings() { super.saveSettings(); final Map<String, String> params = serializeDotComParams(); if (params == null || params.isEmpty()) return; WordPress.getRestClientUtils().setGeneralSiteSettings( String.valueOf(mBlog.getRemoteBlogId()), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Site Settings saved remotely"); notifySavedOnUiThread(null); mRemoteSettings.copyFrom(mSettings); if (response != null) { JSONObject updated = response.optJSONObject("updated"); if (updated == null) return; HashMap<String, Object> properties = new HashMap<>(); Iterator<String> keys = updated.keys(); while (keys.hasNext()) { String currentKey = keys.next(); Object currentValue = updated.opt(currentKey); if (currentValue != null) { properties.put("item_saved_" + currentKey, currentValue); } } AnalyticsUtils.trackWithCurrentBlogDetails( AnalyticsTracker.Stat.SITE_SETTINGS_SAVED_REMOTELY, properties); } } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error POSTing site settings changes: " + error); notifySavedOnUiThread(error); } }, params); }

Target:
public void saveSettings() { super.saveSettings(); final Map<String, String> params = serializeDotComParams(); if (params == null || params.isEmpty()) return; WordPress.getRestClientUtils().setGeneralSiteSettings( String.valueOf(mBlog.getRemoteBlogId()), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.d(AppLog.T.API, "Site Settings saved remotely"); notifySavedOnUiThread(null); mRemoteSettings.copyFrom(mSettings); if (response != null) { JSONObject updated = response.optJSONObject(UPDATED_KEY); if (updated == null) return; HashMap<String, Object> properties = new HashMap<>(); Iterator<String> keys = updated.keys(); while (keys.hasNext()) { String currentKey = keys.next(); Object currentValue = updated.opt(currentKey); if (currentValue != null) { properties.put(SAVED_ITEM_PREFIX + currentKey, currentValue); } } AnalyticsUtils.trackWithCurrentBlogDetails( AnalyticsTracker.Stat.SITE_SETTINGS_SAVED_REMOTELY, properties); } } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error POSTing site settings changes: " + error); notifySavedOnUiThread(error); } }, params); }
Source:
private static Map<String, String> getCompressionOptions(Optional<TableMetadata> tableMetadata) { Map<String, String> compressionOptions = Maps.newHashMap(); compressionOptions.put( CassandraConstants.CFDEF_COMPRESSION_TYPE_KEY, CassandraConstants.DEFAULT_COMPRESSION_TYPE); int explicitCompressionBlockSizeKb = tableMetadata.map(TableMetadata::getExplicitCompressionBlockSizeKB) .orElse(0); int actualCompressionBlockSizeKb = explicitCompressionBlockSizeKb == 0 ? AtlasDbConstants.MINIMUM_COMPRESSION_BLOCK_SIZE_KB : explicitCompressionBlockSizeKb; compressionOptions.put(CassandraConstants.CFDEF_COMPRESSION_CHUNK_LENGTH_KEY, Integer.toString(actualCompressionBlockSizeKb)); return compressionOptions; }

Target:
private static Map<String, String> getCompressionOptions(Optional<TableMetadata> tableMetadata) { int explicitCompressionBlockSizeKb = tableMetadata.map(TableMetadata::getExplicitCompressionBlockSizeKB) .orElse(0); int actualCompressionBlockSizeKb = explicitCompressionBlockSizeKb == 0 ? AtlasDbConstants.MINIMUM_COMPRESSION_BLOCK_SIZE_KB : explicitCompressionBlockSizeKb; return ImmutableMap.<String, String>builder() .put(CassandraConstants.CFDEF_COMPRESSION_TYPE_KEY, CassandraConstants.DEFAULT_COMPRESSION_TYPE) .put(CassandraConstants.CFDEF_COMPRESSION_CHUNK_LENGTH_KEY, Integer.toString(actualCompressionBlockSizeKb)) .build(); }
Source:
public IRemoteDiceServer newDiceServer() { return PropertiesDiceRoller.builder() .diceRollerUri(ClientSetting.diceRollerUri.getValueOrThrow()) .gameId(gameId.getText()) .toAddress(toAddress.getText()) .ccAddress(ccAddress.getText()) .build(); }

Target:
public IRemoteDiceServer newDiceServer() { return MartiDiceRoller.builder() .diceRollerUri(ClientSetting.diceRollerUri.getValueOrThrow()) .gameId(gameId.getText()) .toAddress(toAddress.getText()) .ccAddress(ccAddress.getText()) .build(); }
Source:
public Optional<Encoder<RowData>> createEncoder(WriterContext context) { TableSchema nonPartKeySchema = new TableSchema.Builder() .fields(context.getFieldNamesWithoutPartKeys(), context.getFieldTypesWithoutPartKeys()) .build(); LogicalType[] logicalTypes = Arrays.asList(nonPartKeySchema.getFieldDataTypes()) .stream().map(DataType::getLogicalType).toArray(LogicalType[]::new); RowType nonPartRowType = RowType.of(logicalTypes, nonPartKeySchema.getFieldNames()); return Optional.of(new JsonRowDataEncoder(new JsonRowDataSerializationSchema(nonPartRowType))); }

Target:
public Optional<Encoder<RowData>> createEncoder(WriterContext context) { return Optional.of(new JsonRowDataEncoder(new JsonRowDataSerializationSchema(context.getFormatRowType()))); }
Source:
public void enqueueTask(NotificationContext changeContext) throws Exception { if (_periodicTriggerExecutor != null) { _lastInvokeTime = System.currentTimeMillis(); } if (_batchModeEnabled && changeContext.getType() == NotificationContext.Type.CALLBACK) { logger.debug("Enqueuing callback"); if (!isReady()) { logger.info("CallbackHandler is not ready, ignore change callback from path: {}, for " + "listener: {}", _path, _listener); } else { synchronized (this) { if (_batchCallbackProcessor != null) { _batchCallbackProcessor.queueEvent(changeContext.getType(), changeContext); } else { throw new HelixException( "Failed to process callback in batch mode. Batch Callback Processor does not exist."); } } } } else { invoke(changeContext); } if (_monitor != null) { _monitor.increaseCallbackUnbatchedCounters(); } }

Target:
public void enqueueTask(NotificationContext changeContext) throws Exception { if (_periodicTriggerEnabled) { _lastInvokeTime = System.currentTimeMillis(); } if (_batchModeEnabled && changeContext.getType() == NotificationContext.Type.CALLBACK) { logger.debug("Enqueuing callback"); if (!isReady()) { logger.info("CallbackHandler is not ready, ignore change callback from path: {}, for " + "listener: {}", _path, _listener); } else { synchronized (this) { if (_batchCallbackProcessor != null) { _batchCallbackProcessor.queueEvent(changeContext.getType(), changeContext); } else { throw new HelixException( "Failed to process callback in batch mode. Batch Callback Processor does not exist."); } } } } else { invoke(changeContext); } if (_monitor != null) { _monitor.increaseCallbackUnbatchedCounters(); } }
Source:
public static void startServer() throws Exception { XmlConfiguration configuration = new XmlConfiguration( new File("../raox/ru.bmstu.rk9.rao.thinclient/jetty/jetty.xml").toURI().toURL()); configuration.configure(server); ResourceHandler resourceHandler = new ResourceHandler(); resourceHandler.setDirectoriesListed(true); resourceHandler.setWelcomeFiles(new String[] { "index.html" }); resourceHandler.setResourceBase("../raox/ru.bmstu.rk9.rao.thinclient/jetty/."); ContextHandler currentTimeContext = createHandler(new CurrentTime(), "/currentTime"); ContextHandler pingContext = createHandler(new Ping(), "/ping"); ContextHandler modelsContext = createHandler(new Models(), "/models"); HandlerList handlers = new HandlerList(); handlers.setHandlers(new Handler[] { currentTimeContext, pingContext, modelsContext, resourceHandler }); server.setHandler(handlers); server.start(); }

Target:
public static void startServer() throws Exception { XmlConfiguration configuration = new XmlConfiguration( new File("../raox/ru.bmstu.rk9.rao.thinclient/jetty/jetty.xml").toURI().toURL()); configuration.configure(server); ResourceHandler resourceHandler = new ResourceHandler(); resourceHandler.setDirectoriesListed(true); resourceHandler.setWelcomeFiles(new String[] { "index.html" }); resourceHandler.setResourceBase("../raox/ru.bmstu.rk9.rao.thinclient/jetty/."); ContextHandler currentTimeContext = createHandler(new CurrentTime(), "/currentTime"); ContextHandler pingContext = createHandler(new Ping(), "/ping"); ContextHandler modelsContext = createHandler(new Models(), "/models"); ContextHandler modelResultsContext = createHandler(new ModelResults(), "/modelResults"); HandlerList handlers = new HandlerList(); handlers.setHandlers( new Handler[] { currentTimeContext, pingContext, modelsContext, modelResultsContext, resourceHandler }); server.setHandler(handlers); server.start(); }
Source:
public CheServiceBuildContextImpl(CheServiceBuildContextImpl buildContext) { this.context = buildContext.getContext(); this.dockerfilePath = buildContext.getDockerfilePath(); this.dockerfileContent = buildContext.getDockerfileContent(); this.args = buildContext.getArgs(); }

Target:
public CheServiceBuildContextImpl(CheServiceBuildContextImpl buildContext) { this(buildContext.getContext(), buildContext.getDockerfilePath(), buildContext.getDockerfileContent(), buildContext.getArgs()); }
Source:
public Image getImage(Object element) { if (element instanceof IFile) { if (((IFile) element).exists()) { return PlatformUI.getWorkbench().getSharedImages() .getImage(ISharedImages.IMG_OBJ_FILE); } return removedImage; } else if (element instanceof ResourceNode) { IResource resource = ((ResourceNode) element).getResource(); if (resource.getType() == IResource.PROJECT) { return PlatformUI.getWorkbench().getSharedImages() .getImage(IDE.SharedImages.IMG_OBJ_PROJECT); } return PlatformUI.getWorkbench().getSharedImages() .getImage(ISharedImages.IMG_OBJ_FOLDER); } else if (element instanceof Repository) { return repositoryImage; } else if (element instanceof StagedNode) { return stagedImage; } else if (element instanceof ModifiedNode) { return modifiedImage; } else if (element instanceof UntrackedNode) { return untrackedImage; } return null; }

Target:
public Image getImage(Object element) { if (element instanceof IFile) { if (((IFile) element).exists()) return PlatformUI.getWorkbench().getSharedImages() .getImage(ISharedImages.IMG_OBJ_FILE); return removedImage; } else if (element instanceof ResourceNode) { IResource resource = ((ResourceNode) element).getResource(); if (resource.getType() == IResource.PROJECT) return PlatformUI.getWorkbench().getSharedImages() .getImage(IDE.SharedImages.IMG_OBJ_PROJECT); return PlatformUI.getWorkbench().getSharedImages() .getImage(ISharedImages.IMG_OBJ_FOLDER); } else if (element instanceof Repository) return repositoryImage; else if (element instanceof StagedNode) return stagedImage; else if (element instanceof ModifiedNode) return modifiedImage; else if (element instanceof UntrackedNode) return untrackedImage; return null; }
Source:
private TransitRegionStateProcedure forceCreateUnssignProcedure(RegionStateNode regionNode) { regionNode.lock(); try { if (!regionStates.include(regionNode, false) || regionStates.isRegionOffline(regionNode.getRegionInfo())) { return null; } if (regionNode.getProcedure() != null) { regionNode.unsetProcedure(regionNode.getProcedure()); } TransitRegionStateProcedure proc = TransitRegionStateProcedure .unassign(getProcedureEnvironment(), regionNode.getRegionInfo()); regionNode.setProcedure(proc); return proc; } finally { regionNode.unlock(); } }

Target:
private TransitRegionStateProcedure forceCreateUnssignProcedure(RegionStateNode regionNode) { regionNode.lock(); try { if (!regionStates.include(regionNode, false) || regionStates.isRegionOffline(regionNode.getRegionInfo())) { return null; } if (regionNode.getProcedure() != null) { regionNode.unsetProcedure(regionNode.getProcedure()); } return regionNode.setProcedure(TransitRegionStateProcedure.unassign(getProcedureEnvironment(), regionNode.getRegionInfo())); } finally { regionNode.unlock(); } }
Source:
public ConditionalUniqueColumnCombination(ColumnCombination columnCombination, List<ColumnCondition> columnConditions) { this(); this.columnCombination = columnCombination; for (ColumnCondition columnCondition : columnConditions) { this.conditionList.add(columnCondition); } }

Target:
public ConditionalUniqueColumnCombination(ColumnCombination columnCombination, List<ColumnCondition> columnConditions) { this(columnCombination, columnConditions.toArray(new ColumnCondition[columnConditions.size()])); }
Source:
public boolean isValid() { boolean result = conf.size() == ConfigurationKey.values().length; if (!result) { logger.error("Invalid Compiler configuration"); } return result; }

Target:
public boolean isValid() { boolean result = conf.keySet().containsAll(EnumSet.allOf(ConfigurationKey.class)); if (!result) { logger.error("Invalid Compiler configuration"); } return result; }
Source:
private ActionResult handleRequestWithEmailAndCourse() throws EntityDoesNotExistException { String email; String courseId; try { email = getStudentEmailFromRequest(); courseId = getCourseIdFromRequest(); } catch (InvalidParametersException e) { throw new EntityDoesNotExistException(e.getMessage()); } log.info("email: " + email + ", course: " + courseId); StudentAttributes student = getStudentForGivenParameters(courseId, email); gateKeeper.verifyAccessibleForCurrentUserAsInstructorOrTeamMember(account, courseId, student.section, email); return createImageResult(getPictureKeyForStudent(student)); }

Target:
private ActionResult handleRequestWithEmailAndCourse() throws EntityDoesNotExistException { String email; String courseId; try { email = getStudentEmailFromRequest(); courseId = getCourseIdFromRequest(); } catch (InvalidParametersException e) { log.warning("Attempting to decrypt malformed ciphertext when retrieving email or course id from request."); throw new EntityDoesNotExistException(e); } log.info("email: " + email + ", course: " + courseId); StudentAttributes student = getStudentForGivenParameters(courseId, email); gateKeeper.verifyAccessibleForCurrentUserAsInstructorOrTeamMember(account, courseId, student.section, email); return createImageResult(getPictureKeyForStudent(student)); }
Source:
private AmbariConfig ambariConfigFromHostgroups() { AmbariConfig config = new AmbariConfig(); for (Entity entity : getChildren()) { if (entity instanceof AmbariHostGroup) { Collection<Entity> children = entity.getAttribute(AmbariHostGroup.AMBARI_AGENTS).getChildren(); config.add( entity.getDisplayName(), getHostFQDNs(children), entity.getConfig(AmbariHostGroup.HADOOP_COMPONENTS) ); } } return config; }

Target:
private AmbariConfig ambariConfigFromHostgroups() { AmbariConfig config = new AmbariConfig(); for (AmbariHostGroup hostGroup : getHostGroups()) { config.add( hostGroup.getDisplayName(), hostGroup.getHostFQDNs(), hostGroup.getConfig(AmbariHostGroup.HADOOP_COMPONENTS) ); } return config; }
Source:
public byte[] getCacheKey() { try { final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); outputStream.write(HavingSpecUtil.CACHE_TYPE_ID_GREATER_THAN); if (!Strings.isNullOrEmpty(aggregationName)) { outputStream.write(StringUtils.toUtf8(aggregationName)); } outputStream.write(HavingSpecUtil.STRING_SEPARATOR); outputStream.write(StringUtils.toUtf8(String.valueOf(value))); if (aggregators == null) { return outputStream.toByteArray(); } for (Map.Entry<String, AggregatorFactory> entry : aggregators.entrySet()) { final String key = entry.getKey(); final AggregatorFactory val = entry.getValue(); if (!Strings.isNullOrEmpty(key)) { outputStream.write(StringUtils.toUtf8(key)); } outputStream.write(HavingSpecUtil.STRING_SEPARATOR); byte[] aggregatorBytes = val.getCacheKey(); outputStream.write(aggregatorBytes); } return outputStream.toByteArray(); } catch (IOException ex) { throw new RuntimeException(ex); } }

Target:
public byte[] getCacheKey() { return new CacheKeyBuilder(HavingSpecUtil.CACHE_TYPE_ID_GREATER_THAN) .appendString(aggregationName) .appendByteArray(StringUtils.toUtf8(String.valueOf(value))) .build(); }
Source:
public void testUnderscoreBucket() throws Exception { Configuration config = new Configuration(); config.setBoolean(S3_PATH_STYLE_ACCESS, true); try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) { MockAmazonS3 s3 = new MockAmazonS3(); fs.initialize(new URI("s3n://test-bucket_underscore/"), config); fs.setS3Client(s3); ObjectMetadata objectMetadata = fs.getS3ObjectMetadata(new Path("/test/path")); assertEquals(null, objectMetadata); } }

Target:
public void testUnderscoreBucket() throws Exception { Configuration config = new Configuration(); config.setBoolean(S3_PATH_STYLE_ACCESS, true); try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) { MockAmazonS3 s3 = new MockAmazonS3(); String expectedBucketName = "test-bucket_underscore"; fs.initialize(new URI("s3n://" + expectedBucketName + "/"), config); fs.setS3Client(s3); fs.getS3ObjectMetadata(new Path("/test/path")); assertEquals(expectedBucketName, s3.getGetObjectMetadataRequest().getBucketName()); } }
Source:
void testGetterTypedAggregateIdentifier() { assertThrows( AxonConfigurationException.class, () -> AnnotatedAggregateMetaModelFactory.inspectAggregate(TypedIdentifierAggregate.class)); }

Target:
void testGetterTypedAggregateIdentifier() { assertThrows( AxonConfigurationException.class, () -> AnnotatedAggregateMetaModelFactory.inspectAggregate(GetterTypedIdentifierAggregate.class) ); }
Source:
public void onSplashPotion(PotionSplashEvent event) { for(PotionEffect effect : event.getPotion().getEffects()) { if (effect.getType() == INVISIBILITY) { Entity e = event.getEntity(); if (e instanceof Player) { Player player = (Player) e; playerMsg(player, "You are not permitted to use splash invisibility potions!", ChatColor.RED); event.setCancelled(true); } } if (effect.getType() == HEAL) { Entity e = event.getEntity(); if (e instanceof Player) { Player player = (Player) e; playerMsg(player, "You are not permitted to use Instant Death potions!", ChatColor.RED); event.setCancelled(true); } } if (effect.getType() == HEALTH_BOOST) { Entity e = event.getEntity(); if (e instanceof Player) { Player player = (Player) e; playerMsg(player, "You are not permitted to use Death potions!", ChatColor.RED); event.setCancelled(true); } } } }

Target:
public void onSplashPotion(PotionSplashEvent event) { for(PotionEffect effect : event.getPotion().getEffects()) { if (effect.getType() == INVISIBILITY) { Entity i = event.getEntity(); if (i instanceof Player) { Player player = (Player) i; playerMsg(player, "You are not permitted to use splash invisibility potions!", ChatColor.RED); event.setCancelled(true); } } if (effect.getType() == HEAL) { Entity d = event.getEntity(); if (d instanceof Player) { Player player = (Player) d; playerMsg(player, "You are not permitted to use Instant Death potions!", ChatColor.RED); event.setCancelled(true); } } if (effect.getType() == HEALTH_BOOST) { Entity d = event.getEntity(); if (d instanceof Player) { Player player = (Player) d; playerMsg(player, "You are not permitted to use Death potions!", ChatColor.RED); event.setCancelled(true); } } } }
Source:
protected String explainPlanForNode(String indent) { if (m_highVolume) { assert(m_parents.size() == 0); return "WRITE RESULTS TO DISK"; } else { if (m_parents.size() == 0) return "RETURN RESULTS TO STORED PROCEDURE"; else return "SEND PARTITION RESULTS TO COORDINATOR"; } }

Target:
protected String explainPlanForNode(String indent) { String explanation = ""; if (m_highVolume) { assert(m_parents.size() == 0); explanation = "WRITE RESULTS TO DISK"; } else { if (m_parents.size() == 0) { explanation = "RETURN RESULTS TO STORED PROCEDURE"; } else { explanation = "SEND PARTITION RESULTS TO COORDINATOR"; } } return explanation; }
Source:
public Boolean dataStreamExists(PID pid, String dsID) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(this.getFedoraContextUrl()); builder.pathSegment("objects"); builder.pathSegment(pid.getPid()); builder.pathSegment("datastreams"); builder.pathSegment(dsID); HttpHead method = new HttpHead(builder.build().encode().toUriString()); try (CloseableHttpResponse httpResp = httpClient.execute(method)) { int statusCode = httpResp.getStatusLine().getStatusCode(); if (statusCode == 200) { return true; } return false; } catch (Exception e) { return false; } }

Target:
public Boolean dataStreamExists(PID pid, String dsID) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(this.getFedoraContextUrl()); builder.pathSegment("objects"); builder.pathSegment(pid.getPid()); builder.pathSegment("datastreams"); builder.pathSegment(dsID); builder.pathSegment("content"); HttpHead method = new HttpHead(builder.build().encode().toUriString()); try (CloseableHttpResponse httpResp = httpClient.execute(method)) { int statusCode = httpResp.getStatusLine().getStatusCode(); if (statusCode == 200) { return true; } return false; } catch (Exception e) { log.debug("HEAD request could not be completed", e); return false; } }
Source:
public void setDataNodeId(ClusterMap clusterMap, String hostname, int port, boolean enableVerboseLogging) { if (partitionId == null) { throw new IllegalStateException("Partition must be defined before setting data node id"); } dataNodeId = clusterMap.getDataNodeId(hostname, port); if (dataNodeId == null) { throw new IllegalArgumentException("Node at " + hostname + ":" + port + " not found"); } boolean inPartition = false; for (ReplicaId replicaId : partitionId.getReplicaIds()) { if (replicaId.getDataNodeId().equals(dataNodeId)) { inPartition = true; break; } } if (!inPartition) { throw new IllegalArgumentException("Node at " + hostname + ":" + port + " not in partition"); } if (enableVerboseLogging) { System.out.println("Chosen node " + dataNodeId); } }

Target:
private void setDataNodeId(ClusterMap clusterMap, String hostname, int port, boolean enableVerboseLogging) { dataNodeId = clusterMap.getDataNodeId(hostname, port); if (dataNodeId == null) { throw new IllegalArgumentException("Node at " + hostname + ":" + port + " not found"); } boolean inPartition = false; for (ReplicaId replicaId : partitionId.getReplicaIds()) { if (replicaId.getDataNodeId().equals(dataNodeId)) { inPartition = true; break; } } if (!inPartition) { throw new IllegalArgumentException("Node at " + hostname + ":" + port + " not in partition " + partitionId); } if (enableVerboseLogging) { System.out.println("Chosen node " + dataNodeId); } }
Source:
private void removeUnusedImages() { Set<Guid> imageIdsUsedByActiveSnapshot = new HashSet<>(); for (DiskImage diskImage : getImagesList()) { imageIdsUsedByActiveSnapshot.add(diskImage.getId()); } List<DiskImage> imagesToRemove = new ArrayList<>(); for (Guid snapshotToRemove : snapshotsToRemove) { List<DiskImage> snapshotDiskImages = getDiskImageDao().getAllSnapshotsForVmSnapshot(snapshotToRemove); imagesToRemove.addAll(snapshotDiskImages); } Set<Guid> removeInProcessImageIds = new HashSet<>(); for (DiskImage diskImage : imagesToRemove) { if (imageIdsUsedByActiveSnapshot.contains(diskImage.getId()) || removeInProcessImageIds.contains(diskImage.getId())) { continue; } VdcReturnValueBase retValue = runAsyncTask(VdcActionType.RemoveImage, new RemoveImageParameters(diskImage.getImageId())); if (retValue.getSucceeded()) { removeInProcessImageIds.add(diskImage.getImageId()); } else { log.error("Failed to remove image <{}>", diskImage.getImageId()); } } }

Target:
private void removeUnusedImages() { Set<Guid> imageIdsUsedByActiveSnapshot = new HashSet<>(); for (DiskImage diskImage : getImagesList()) { imageIdsUsedByActiveSnapshot.add(diskImage.getId()); } List<DiskImage> imagesToRemove = new ArrayList<>(); for (Guid snapshotToRemove : snapshotsToRemove) { List<DiskImage> snapshotDiskImages = getDiskImageDao().getAllSnapshotsForVmSnapshot(snapshotToRemove); imagesToRemove.addAll(snapshotDiskImages); } Set<Guid> removeInProcessImageIds = new HashSet<>(); for (DiskImage diskImage : imagesToRemove) { if (imageIdsUsedByActiveSnapshot.contains(diskImage.getId()) || removeInProcessImageIds.contains(diskImage.getId())) { continue; } VdcReturnValueBase retValue = runAsyncTask(VdcActionType.RemoveImage, new RemoveImageParameters(diskImage.getImageId())); if (retValue.getSucceeded()) { removeInProcessImageIds.add(diskImage.getImageId()); } else { log.error("Failed to remove image '{}'", diskImage.getImageId()); } } }
Source:
T tupleConvertFilter(List<String> input, Set<String> fields, T result) { if (input == null) { return result; } for (int i = 1; i < input.size(); i += 2) { if (fields == null || fields.contains(input.get(i))) { result.put(input.get(i), new StringByteIterator(input.get(i + 1))); } } return result; }

Target:
void tupleConvertFilter(List<String> input, Set<String> fields, T result) { if (input == null) { return; } for (int i = 1; i < input.size(); i += 2) { if (fields == null || fields.contains(input.get(i))) { result.put(input.get(i), new StringByteIterator(input.get(i + 1))); } } }
Source:
public void open(TestWorkspace testWorkspace) throws Exception { URL workspaceUrl = testWorkspaceUrlResolver.resolve(testWorkspace); seleniumWebDriver.get(workspaceUrl.toString()); entrance.login(testWorkspace.getOwner()); try { projectExplorer.waitProjectExplorer(60); } catch (TimeoutException ex) { browserLogsUtil.appendBrowserLogs(); fail("Known issue <LINK_0>", ex); } }

Target:
public void open(TestWorkspace testWorkspace) throws Exception { URL workspaceUrl = testWorkspaceUrlResolver.resolve(testWorkspace); seleniumWebDriver.get(workspaceUrl.toString()); entrance.login(testWorkspace.getOwner()); }
Source:
protected void executeQueryCommand() { VM srcVm = getParameters().getOriginal(); VM dstVm = getParameters().getUpdated(); VmStatic srcStatic = srcVm.getStaticData(); VmStatic dstStatic = dstVm.getStaticData(); dstStatic.setCreationDate(srcStatic.getCreationDate()); if (VmCommonUtils.isCpusToBeHotplugged(srcVm, dstVm)) { dstStatic.setNumOfSockets(srcStatic.getNumOfSockets()); } if (VmCommonUtils.isMemoryToBeHotplugged(srcVm, dstVm)) { dstStatic.setMemSizeMb(srcStatic.getMemSizeMb()); dstStatic.setMinAllocatedMem(srcStatic.getMinAllocatedMem()); } if (VmCommonUtils.isVmLeaseToBeHotplugged(srcVm, dstVm)) { dstStatic.setLeaseStorageDomainId(srcStatic.getLeaseStorageDomainId()); } VmPropertiesUtils vmPropertiesUtils = SimpleDependencyInjector.getInstance().get(VmPropertiesUtils.class); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( srcVm.getCompatibilityVersion(), srcStatic); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( dstVm.getCompatibilityVersion(), dstStatic); Set<String> result = new HashSet<>(vmHandler.getChangedFieldsForStatus(srcStatic, dstStatic, VMStatus.Up)); for (VmDeviceUpdate device : vmHandler.getVmDevicesFieldsToUpdateOnNextRun(srcVm.getId(), VMStatus.Up, getParameters().getUpdateVmParameters())) { if (!device.getName().isEmpty()) { result.add(device.getName()); } else { switch (device.getType()) { case UNKNOWN: case VIRTIO: result.add(device.getGeneralType().name()); break; default: result.add(device.getType().getName()); break; } } } setReturnValue(new ArrayList<>(result)); }

Target:
protected void executeQueryCommand() { VM srcVm = getParameters().getOriginal(); VM dstVm = getParameters().getUpdated(); VmStatic srcStatic = srcVm.getStaticData(); VmStatic dstStatic = dstVm.getStaticData(); dstStatic.setCreationDate(srcStatic.getCreationDate()); if (VmCommonUtils.isCpusToBeHotpluggedOrUnplugged(srcVm, dstVm)) { dstStatic.setNumOfSockets(srcStatic.getNumOfSockets()); } if (VmCommonUtils.isMemoryToBeHotplugged(srcVm, dstVm)) { dstStatic.setMemSizeMb(srcStatic.getMemSizeMb()); dstStatic.setMinAllocatedMem(srcStatic.getMinAllocatedMem()); } if (VmCommonUtils.isVmLeaseToBeHotPluggedOrUnplugged(srcVm, dstVm)) { dstStatic.setLeaseStorageDomainId(srcStatic.getLeaseStorageDomainId()); } VmPropertiesUtils vmPropertiesUtils = SimpleDependencyInjector.getInstance().get(VmPropertiesUtils.class); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( srcVm.getCompatibilityVersion(), srcStatic); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( dstVm.getCompatibilityVersion(), dstStatic); Set<String> result = new HashSet<>(vmHandler.getChangedFieldsForStatus(srcStatic, dstStatic, VMStatus.Up)); for (VmDeviceUpdate device : vmHandler.getVmDevicesFieldsToUpdateOnNextRun(srcVm.getId(), VMStatus.Up, getParameters().getUpdateVmParameters())) { if (!device.getName().isEmpty()) { result.add(device.getName()); } else { switch (device.getType()) { case UNKNOWN: case VIRTIO: result.add(device.getGeneralType().name()); break; default: result.add(device.getType().getName()); break; } } } setReturnValue(new ArrayList<>(result)); }
Source:
public Object perform(InvocationContext ctx) throws Throwable { Map<Object, Object> previousValues = new HashMap<>(); for (Entry<Object, Object> e : map.entrySet()) { Object key = e.getKey(); Object newValue = e.getValue(); MVCCEntry contextEntry = lookupMvccEntry(ctx, key); if (contextEntry != null) { Object previousValue = contextEntry.getValue(); previousValues.put(key, previousValue); Metadata previousMetadata = contextEntry.getMetadata(); if (contextEntry.isCreated()) { notifier.notifyCacheEntryCreated(key, newValue, metadata, true, ctx, this); } notifier.notifyCacheEntryModified(key, newValue, metadata, previousValue, previousMetadata, true, ctx, this); contextEntry.setValue(newValue); updateMetadata(contextEntry, metadata); contextEntry.setChanged(true); } } return previousValues; }

Target:
public Object perform(InvocationContext ctx) throws Throwable { Map<Object, Object> previousValues = new HashMap<>(); for (Entry<Object, Object> e : map.entrySet()) { Object key = e.getKey(); MVCCEntry contextEntry = lookupMvccEntry(ctx, key); if (contextEntry != null) { Object newValue = e.getValue(); Object previousValue = contextEntry.getValue(); Metadata previousMetadata = contextEntry.getMetadata(); previousValues.put(key, previousValue); if (contextEntry.isCreated()) { notifier.notifyCacheEntryCreated(key, newValue, metadata, true, ctx, this); } notifier.notifyCacheEntryModified(key, newValue, metadata, previousValue, previousMetadata, true, ctx, this); contextEntry.setValue(newValue); Metadatas.updateMetadata(contextEntry, metadata); contextEntry.setChanged(true); } } return previousValues; }
Source:
public WorldBorder build() throws IllegalStateException { checkNotNull(this.centre, "A centre needs to be specified"); net.minecraft.world.border.WorldBorder border = new net.minecraft.world.border.WorldBorder(); border.setCenter(this.centre.getX(), this.centre.getZ()); border.setDamageAmount(this.damageAmount); border.setDamageBuffer(this.damageThreshold); border.setTransition(this.diameter); border.setWarningDistance(this.warningDistance); border.setWarningTime(this.warningTime); return (WorldBorder) border; }

Target:
public WorldBorder build() throws IllegalStateException { net.minecraft.world.border.WorldBorder border = new net.minecraft.world.border.WorldBorder(); border.setCenter(this.center.getX(), this.center.getZ()); border.setDamageAmount(this.damageAmount); border.setDamageBuffer(this.damageThreshold); border.setTransition(this.diameter); border.setWarningDistance(this.warningDistance); border.setWarningTime(this.warningTime); return (WorldBorder) border; }
Source:
public GdbConsoleTerminateLaunchAction(ILaunch launch) { fLaunch = launch; setText(ConsoleMessages.ConsoleTerminateLaunchAction_name); setToolTipText(ConsoleMessages.ConsoleTerminateLaunchAction_description); setImageDescriptor(GdbUIPlugin.getImageDescriptor(IConsoleImagesConst.IMG_CONSOLE_TERMINATE_ACTIVE_COLOR)); setDisabledImageDescriptor(GdbUIPlugin.getImageDescriptor(IConsoleImagesConst.IMG_CONSOLE_TERMINATE_DISABLED_COLOR)); DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); }

Target:
public GdbConsoleTerminateLaunchAction(ILaunch launch) { fLaunch = launch; setText(ConsoleMessages.ConsoleTerminateLaunchAction_name); setToolTipText(ConsoleMessages.ConsoleTerminateLaunchAction_description); setImageDescriptor(GdbUIPlugin.getImageDescriptor(IConsoleImagesConst.IMG_CONSOLE_TERMINATE_ACTIVE_COLOR)); setDisabledImageDescriptor(GdbUIPlugin.getImageDescriptor(IConsoleImagesConst.IMG_CONSOLE_TERMINATE_DISABLED_COLOR)); if (fLaunch.isTerminated()) { setEnabled(false); } else { DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); } }
Source:
public void initialize(ServerConfiguration conf, LedgerManager ledgerManager, LedgerDirsManager ledgerDirsManager, LedgerDirsManager indexDirsManager, StateManager stateManager, CheckpointSource checkpointSource, Checkpointer checkpointer, StatsLogger statsLogger) throws IOException { super.initialize( conf, ledgerManager, ledgerDirsManager, indexDirsManager, stateManager, checkpointSource, checkpointer, statsLogger); this.memTable = new EntryMemTable(conf, checkpointSource, statsLogger); this.scheduler = Executors.newSingleThreadScheduledExecutor( new ThreadFactoryBuilder() .setNameFormat("SortedLedgerStorage-%d") .setPriority((Thread.NORM_PRIORITY + Thread.MAX_PRIORITY) / 2).build()); this.stateManager = stateManager; this.isTransactionalCompactionEnabled = conf.getUseTransactionalCompaction(); }

Target:
public void initialize(ServerConfiguration conf, LedgerManager ledgerManager, LedgerDirsManager ledgerDirsManager, LedgerDirsManager indexDirsManager, StateManager stateManager, CheckpointSource checkpointSource, Checkpointer checkpointer, StatsLogger statsLogger) throws IOException { super.initialize( conf, ledgerManager, ledgerDirsManager, indexDirsManager, stateManager, checkpointSource, checkpointer, statsLogger); this.memTable = new EntryMemTable(conf, checkpointSource, statsLogger); this.scheduler = Executors.newSingleThreadScheduledExecutor( new ThreadFactoryBuilder() .setNameFormat("SortedLedgerStorage-%d") .setPriority((Thread.NORM_PRIORITY + Thread.MAX_PRIORITY) / 2).build()); this.stateManager = stateManager; }
Source:
public List<TaskRequest> lockSharedAgentTasks(int count, String agentId, int lockSeconds, long maxSleepMillis) { for (int siteId : autoCommit((handle, dao) -> dao.getActiveSiteIdList())) { List<Long> taskLockIds = tryLockSharedAgentTasks(siteId, count, agentId, lockSeconds); if (!taskLockIds.isEmpty()) { ImmutableList.Builder<TaskRequest> builder = ImmutableList.builder(); for (long taskLockId : taskLockIds) { byte[] data = autoCommit((handle, dao) -> dao.getTaskData(taskLockId)); if (data == null) { } else { String lockId = formatSharedTaskLockId(taskLockId); builder.add(decodeLockedTaskObject(data, lockId)); } } return builder.build(); } } if (maxSleepMillis >= 0) { sleepForEnqueue(maxSleepMillis); } return ImmutableList.of(); }

Target:
public List<TaskQueueLock> lockSharedAgentTasks(int count, String agentId, int lockSeconds, long maxSleepMillis) { for (int siteId : autoCommit((handle, dao) -> dao.getActiveSiteIdList())) { List<Long> taskLockIds = tryLockSharedAgentTasks(siteId, count, agentId, lockSeconds); if (!taskLockIds.isEmpty()) { ImmutableList.Builder<TaskQueueLock> builder = ImmutableList.builder(); for (long taskLockId : taskLockIds) { ImmutableTaskQueueLock data = autoCommit((handle, dao) -> dao.getTaskData(taskLockId)); if (data == null) { } else { String lockId = formatSharedTaskLockId(taskLockId); builder.add(data.withLockId(lockId)); } } return builder.build(); } } if (maxSleepMillis >= 0) { sleepForEnqueue(maxSleepMillis); } return ImmutableList.of(); }
Source:
private void answer(HttpServletRequest request, Job job, List<String> jobId, Object question) throws ResourceReferenceHandlerException { try { this.beans.populate(question, extractParameters(request, question)); } catch (PropertyException e) { throw new ResourceReferenceHandlerException("Failed to populate question object for job with id " + jobId); } if (job.getStatus() instanceof CancelableJobStatus && Boolean.parseBoolean((String) request.getParameter(CANCEL))) { ((CancelableJobStatus) job.getStatus()).cancel(); } job.getStatus().answered(); }

Target:
private void answer(HttpServletRequest request, Job job, List<String> jobId, Object question) throws ResourceReferenceHandlerException { try { this.beans.populate(question, extractParameters(request, question)); } catch (PropertyException e) { throw new ResourceReferenceHandlerException( String.format("Failed to populate question object for job with id [%s]", jobId), e); } if (job.getStatus() instanceof CancelableJobStatus && Boolean.parseBoolean((String) request.getParameter(CANCEL))) { ((CancelableJobStatus) job.getStatus()).cancel(); } job.getStatus().answered(); }
Source:
public <R> R execute(PartitionContext partitionContext, RetryPolicy retry, ServiceCallback<S, R> callback) { Stopwatch sw = new Stopwatch(_ticker).start(); int numAttempts = 0; Exception lastException; do { ServiceEndPoint endPoint = chooseEndPoint(getValidEndPoints(), partitionContext); try { R result = executeOnEndPoint(endPoint, callback); _numExecuteSuccesses.mark(); return result; } catch (Exception e) { _numExecuteAttemptFailures.mark(); if (!isRetriableException(e)) { throw Throwables.propagate(e); } LOG.info("Retriable exception from end point id: {}, Exception: {}", endPoint.getId(), e.getMessage()); LOG.debug("Exception", e); lastException = e; } } while (retry.allowRetry(++numAttempts, sw.elapsedMillis())); throw new MaxRetriesException(lastException); }

Target:
public <R> R execute(PartitionContext partitionContext, RetryPolicy retry, ServiceCallback<S, R> callback) { Stopwatch sw = new Stopwatch(_ticker).start(); int numAttempts = 0; Exception lastException; do { ServiceEndPoint endPoint = chooseEndPoint(getValidEndPoints(), partitionContext); try { R result = executeOnEndPoint(endPoint, callback); _numExecuteSuccesses.mark(); return result; } catch (Exception e) { _numExecuteAttemptFailures.mark(); if (!isRetriableException(e)) { throw Throwables.propagate(e); } LOG.info("Retriable exception from end point id: {}, {}", endPoint.getId(), e.toString()); LOG.debug("Exception", e); lastException = e; } } while (retry.allowRetry(++numAttempts, sw.elapsedMillis())); throw new MaxRetriesException(lastException); }
Source:
public Breakpoints(final Debugger debugger, final WebDebugger webDebugger) { this.truffleBreakpoints = new HashMap<>(); this.receiverBreakpoints = new HashMap<>(); this.promiseResolverBreakpoints = new HashMap<>(); this.promiseResolutionBreakpoints = new HashMap<>(); this.channelOppositeBreakpoint = new HashMap<>(); this.debuggerSession = debugger.startSession(webDebugger); this.stepping = null; }

Target:
public Breakpoints(final Debugger debugger, final WebDebugger webDebugger) { this.truffleBreakpoints = new HashMap<>(); this.receiverBreakpoints = new HashMap<>(); this.promiseResolverBreakpoints = new HashMap<>(); this.promiseResolutionBreakpoints = new HashMap<>(); this.channelOppositeBreakpoints = new HashMap<>(); this.onExecutionBreakpoints = new HashMap<>(); this.beforeCommitBreakpoints = new HashMap<>(); this.debuggerSession = debugger.startSession(webDebugger); }
Source:
public String toString() { return "TestInputTopic{topic='" + topic + "'}"; }

Target:
public String toString() { return new StringJoiner(", ", TestInputTopic.class.getSimpleName() + "[", "]") .add("topic='" + topic + "'") .add("keySerializer=" + keySerializer.getClass().getSimpleName()) .add("valueSerializer=" + valueSerializer.getClass().getSimpleName()) .toString(); }
Source:
public List<String> getParameterNames() { if ( executableParameters == null ) { return null; } return validatorContextProperties.getParameterNameProvider().getParameterNames( executable ); }

Target:
public List<String> getParameterNames() { if ( !ValidationOperation.PARAMETER_VALIDATION.equals( validationOperation ) ) { return null; } return validatorScopedContext.getParameterNameProvider().getParameterNames( executable ); }