auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private List<DMNSimpleTimeZone> buildTimeZones() { final List<DMNSimpleTimeZone> timeZones = new ArrayList<>(); final String[] names = getNames(); for (String name : names) { final double offset = getOffset(name); <START> final String format = getOffsetString(name); <END> timeZones.add(new DMNSimpleTimeZone(name, offset, format)); } return timeZones; }</code><technical_language>Personal opinion, is confusing mix format offsetString, I parameter of DMNSimpleTimeZone feel free ignore if is fine</technical_language>

Target:
private List<DMNSimpleTimeZone> buildTimeZones() { final List<DMNSimpleTimeZone> timeZones = new ArrayList<>(); final String[] names = getNames(); for (String name : names) { final double offset = getOffset(name); final String offsetString = getOffsetString(name); timeZones.add(new DMNSimpleTimeZone(name, offset, offsetString)); } return timeZones; }
Source:
<code>public void overwriteValidation() { Document validator = Document.parse("{ jelly : { $ne : 'rhubarb' } }"); ValidationOptions options = new ValidationOptions() .validator(validator) .validationLevel(ValidationLevel.MODERATE) .validationAction(ValidationAction.ERROR); MongoDatabase database = getMongoClient().getDatabase(TEST_DB_NAME); database.getCollection("validation").drop(); database.createCollection("validation", new CreateCollectionOptions().validationOptions(options)); assertEquals(validator, getValidator(database)); Document rhubarb = new Document("jelly", "rhubarb").append("number", 20); database.getCollection("validation").insertOne(new Document("jelly", "grape")); try { database.getCollection("validation").insertOne(rhubarb); fail("Document should have failed validation"); } catch (MongoWriteException e) { assertTrue(e.getMessage().contains("Document failed validation")); } getMorphia().map(DocumentValidation.class); getDs().enableDocumentValidation(); assertEquals(Document.parse(DocumentValidation.class.getAnnotation(Validation.class).value()), getValidator(database)); try { database.getCollection("validation").insertOne(rhubarb); } catch (MongoWriteException e) { assertFalse(e.getMessage().contains("Document failed validation")); } try { getDs().save(new DocumentValidation("John", 1, new Date())); fail("Document should have failed validation"); } catch (WriteConcernException e) { assertTrue(e.getMessage().contains("Document failed validation")); } <START> getDs().enableDocumentValidation(); <END> }</code><technical_language>clear this line is testing</technical_language>

Target:
public void overwriteValidation() { Document validator = Document.parse("{ jelly : { $ne : 'rhubarb' } }"); ValidationOptions options = new ValidationOptions() .validator(validator) .validationLevel(ValidationLevel.MODERATE) .validationAction(ValidationAction.ERROR); MongoDatabase database = getMongoClient().getDatabase(TEST_DB_NAME); database.getCollection("validation").drop(); database.createCollection("validation", new CreateCollectionOptions().validationOptions(options)); assertEquals(validator, getValidator()); Document rhubarb = new Document("jelly", "rhubarb").append("number", 20); database.getCollection("validation").insertOne(new Document("jelly", "grape")); try { database.getCollection("validation").insertOne(rhubarb); fail("Document should have failed validation"); } catch (MongoWriteException e) { assertTrue(e.getMessage().contains("Document failed validation")); } getMorphia().map(DocumentValidation.class); getDs().enableDocumentValidation(); assertEquals(Document.parse(DocumentValidation.class.getAnnotation(Validation.class).value()), getValidator()); try { database.getCollection("validation").insertOne(rhubarb); } catch (MongoWriteException e) { assertFalse(e.getMessage().contains("Document failed validation")); } try { getDs().save(new DocumentValidation("John", 1, new Date())); fail("Document should have failed validation"); } catch (WriteConcernException e) { assertTrue(e.getMessage().contains("Document failed validation")); } }
Source:
<code>public void init(final IEditorSite site, final IEditorInput input) throws PartInitException { super.init(site, input); fSite = site; fResourceManager = new LocalResourceManager(JFaceResources.getResources()); try { final InputStream content = getInputContent(); fTestSuiteModel = UnitTestHelper.loadTestSuite(content); content.close(); fTestSuiteModel.setResource(getFile()); <START> fTestSuiteModel.eAdapters().add(getSynchronizationAdapter()); <END> syncViewModelAndModel(); } catch (final IOException e) { final Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e); throw new PartInitException(status); } catch (final CoreException e) { final Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e); throw new PartInitException(status); } setPartName(getEditorInput().getName()); firePropertyChange(PROP_TITLE); ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); }</code><technical_language>understanding model change anymore, need adapter</technical_language>

Target:
public void init(final IEditorSite site, final IEditorInput input) throws PartInitException { super.init(site, input); fSite = site; fResourceManager = new LocalResourceManager(JFaceResources.getResources()); try { final InputStream content = getInputContent(); fTestSuiteModel = UnitTestHelper.loadTestSuite(content); content.close(); fTestSuiteModel.setResource(getFile()); fSynchronizationAdapter = (EContentAdapter) getSynchronizationAdapter(); updateViewModelFromFileModel(); } catch (final IOException e) { final Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e); throw new PartInitException(status); } catch (final CoreException e) { final Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e); throw new PartInitException(status); } setPartName(getEditorInput().getName()); firePropertyChange(PROP_TITLE); ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); }
Source:
<code>private boolean isCandidate(Container container, String criteria) { try { return expressionParser.parseExpression(criteria).getValue(evaluationContext, container.getAttributes(), Boolean.class); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { <START> LOG.debug("candidate not contain an attribute referenced in the criteria {}", criteria); <END> } return false; } catch (EvaluationException e) { LOG.debug("candidate not a match due to evaluation exception", e); return false; } }</code><technical_language>typo: -></technical_language>

Target:
private boolean isCandidate(Container container, String criteria) { try { return expressionParser.parseExpression(criteria).getValue(evaluationContext, container.getAttributes(), Boolean.class); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { LOG.debug("candidate does not contain an attribute referenced in the criteria {}", criteria); } return false; } catch (EvaluationException e) { LOG.debug("candidate not a match due to evaluation exception", e); return false; } }
Source:
<code>static void normalizeAndLogReadCounts(final ReadCountCollection readCounts, final Logger logger) { final RealMatrix counts = readCounts.counts(); final int columnCount = counts.getColumnDimension(); final Median medianCalculator = new Median(); for (int i = 0; i < columnCount; i++) { final double[] colCounts = counts.getColumn(i); final double median = medianCalculator.evaluate(colCounts); <START> final double invMedian = 1.0 / median; <END> for (int j = 0; j < colCounts.length; j++) { colCounts[j] = Math.log(Math.max(EPSILON, colCounts[j] * invMedian)) * INV_LN_2; } counts.setColumn(i, colCounts); } logger.info("Counts normalized by the column median and changed into bits."); }</code><technical_language>Caching inverse in order replace division multiplication is premature optimization IMO. a million targets a thousand samples, this saves a seconds</technical_language>

Target:
static void normalizeAndLogReadCounts(final ReadCountCollection readCounts, final Logger logger) { final RealMatrix counts = readCounts.counts(); final Median medianCalculator = new Median(); final double[] medians = IntStream.range(0, counts.getColumnDimension()).mapToDouble(col -> medianCalculator.evaluate(counts.getColumn(col))).toArray(); counts.walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor() { @Override public double visit(final int row, final int column, final double value) { return Math.log(Math.max(EPSILON, value / medians[column])) * INV_LN_2; } }); logger.info("Counts normalized by the column median and log2'd."); }
Source:
<code>public void testWhenAnyResultFirstCancelled() { runTaskTest(new Callable<Task<?>>() { @Override <START> public Task<?> call() throws Exception { <END> final ArrayList<Task<Void>> tasks = new ArrayList<Task<Void>>(); final Task<Void> firstToCompleteCancelled = Task.callInBackground(new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(50); throw new CancellationException(); } }); tasks.addAll(launchTasksWithRandomCompletions(10)); tasks.add(firstToCompleteCancelled); return Task.whenAnyResult(tasks).continueWith(new Continuation<Task<Void>, Object>() { @Override public Object then(Task<Task<Void>> task) throws Exception { assertTrue(task.isCompleted()); assertFalse(task.isFaulted()); assertFalse(task.isCancelled()); assertEquals(task.getResult(), firstToCompleteCancelled); assertTrue(task.getResult().isCompleted()); assertTrue(task.getResult().isCancelled()); assertFalse(task.getResult().isFaulted()); return null; } }); } }); }</code><technical_language>a non-wildcard result whenAnyResult</technical_language>

Target:
public void testWhenAnyResultFirstCancelled() { runTaskTest(new Callable<Task<?>>() { @Override public Task<?> call() throws Exception { final ArrayList<Task<Integer>> tasks = new ArrayList<>(); final Task<Integer> firstToCompleteCancelled = Task.callInBackground(new Callable<Integer>() { @Override public Integer call() throws Exception { Thread.sleep(50); throw new CancellationException(); } }); tasks.addAll(launchTasksWithRandomCompletions(5)); tasks.add(firstToCompleteCancelled); tasks.addAll(launchTasksWithRandomCompletions(5)); return Task.whenAnyResult(tasks).continueWith(new Continuation<Task<Integer>, Object>() { @Override public Object then(Task<Task<Integer>> task) throws Exception { assertTrue(task.isCompleted()); assertFalse(task.isFaulted()); assertFalse(task.isCancelled()); assertEquals(firstToCompleteCancelled, task.getResult()); assertTrue(task.getResult().isCompleted()); assertTrue(task.getResult().isCancelled()); assertFalse(task.getResult().isFaulted()); return null; } }); } }); }
Source:
<code>public boolean servesCoverage(String coverageId) { <START> if (coverageId == null || coverageId.length() == 0) { <END> return false; } return contents.getCoverageSummary().stream() .anyMatch(c -> coverageId.equals(c.getCoverageId())); }</code><technical_language>String.isEmpty() is in other places of Oskari. biggie - a heads up</technical_language>

Target:
public boolean servesCoverage(String coverageId) { if (coverageId == null || coverageId.isEmpty()) { return false; } return contents.getCoverageSummary().stream() .anyMatch(c -> coverageId.equals(c.getCoverageId())); }
Source:
<code>public String getFileName() { if (title != null) { return title; <START> } <END> if (url != null) { return AndroidUtil.getFileNameFromPath(url); } return ""; }</code><technical_language>this is else, right</technical_language>

Target:
public String getFileName() { if (title != null) { return title; } else if (url != null) { return AndroidUtil.getFileNameFromPath(url); } return ""; }
Source:
<code>public static Set<ColumnStatisticType> getSupportedColumnStatistics(Type type) { if (type.equals(BOOLEAN)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_TRUE_VALUES); } if (isNumericType(type) || type.equals(DATE) || type.equals(TIMESTAMP)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, MIN, MAX, NUMBER_OF_DISTINCT_VALUES); } if (isVarcharType(type)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_DISTINCT_VALUES, MAX_VALUE_SIZE_IN_BYTES, AVERAGE_VALUE_SIZE_IN_BYTES); } if (isCharType(type)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_DISTINCT_VALUES); } <START> if (type.equals(VARBINARY)) { <END> return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, MAX_VALUE_SIZE_IN_BYTES, AVERAGE_VALUE_SIZE_IN_BYTES); } return ImmutableSet.of(); }</code><technical_language>Hive stores MIN,MAX -- this currently, in future. Also, other tools of this. Consider // TODO ..</technical_language>

Target:
public static Set<ColumnStatisticType> getSupportedColumnStatistics(Type type) { if (type.equals(BOOLEAN)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_TRUE_VALUES); } if (isNumericType(type) || type.equals(DATE) || type.equals(TIMESTAMP)) { return ImmutableSet.of(MIN_VALUE, MAX_VALUE, NUMBER_OF_DISTINCT_VALUES, NUMBER_OF_NON_NULL_VALUES); } if (isVarcharType(type)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_DISTINCT_VALUES); } if (isCharType(type)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES, NUMBER_OF_DISTINCT_VALUES); } if (type.equals(VARBINARY)) { return ImmutableSet.of(NUMBER_OF_NON_NULL_VALUES); } if (type instanceof ArrayType || type instanceof RowType || type instanceof MapType) { return ImmutableSet.of(); } throw new IllegalArgumentException("Unsupported type: " + type); }
Source:
<code>public synchronized void reportProcessingUpdate( final ReportProgressEvent event ) { final int activity = event.getActivity(); if ( firstPageMode && ReportProgressEvent.GENERATING_CONTENT == activity && page > 0 ) { this.status = AsyncExecutionStatus.CONTENT_AVAILABLE; } <START> this.activity = getActivityCode( activity ); <END> this.progress = (int) ReportProgressEvent.computePercentageComplete( event, true ); this.page = event.getPage(); this.row = event.getRow(); }</code><technical_language>4 lines identical in methods - refactor common method</technical_language>

Target:
public synchronized void reportProcessingUpdate( final ReportProgressEvent event ) { final int activity = event.getActivity(); if ( firstPageMode && ReportProgressEvent.GENERATING_CONTENT == activity && page > 0 ) { this.status = AsyncExecutionStatus.CONTENT_AVAILABLE; } updateState( event, activity ); }
Source:
<code>public Mask parseFromInput(String input, ParserContext context) throws InputParseException { <START> if (input.startsWith("##")) { <END> Extent extent = Request.request().getEditSession(); BlockCategory category = BlockCategories.get(input.substring(2).toLowerCase()); if (category == null) { throw new InputParseException("Unrecognised tag '" + input.substring(2) + '\''); } else { return new BlockCategoryMask(extent, category); } } return null; }</code><technical_language>!input.startsWith align parser above</technical_language>

Target:
public Mask parseFromInput(String input, ParserContext context) throws InputParseException { if (!input.startsWith("##")) { return null; } Extent extent = Request.request().getEditSession(); BlockCategory category = BlockCategories.get(input.substring(2).toLowerCase()); if (category == null) { throw new InputParseException("Unrecognised tag '" + input.substring(2) + '\''); } else { return new BlockCategoryMask(extent, category); } }
Source:
<code>public void completing(DelegateExecution execution, DelegateExecution subProcessInstance) throws Exception { <START> CommandContext commandContext = Context.getCommandContext(); <END> ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager(); ExecutionEntity executionEntity = (ExecutionEntity) execution; CallActivity callActivity = (CallActivity) executionEntity.getCurrentFlowElement(); for (IOParameter ioParameter : callActivity.getOutParameters()) { Object value = null; if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) { Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim()); value = expression.getValue(subProcessInstance); } else { value = subProcessInstance.getVariable(ioParameter.getSource()); } execution.setVariable(ioParameter.getTarget(), value); } Map<String, Object> outboundVariables = getOutBoundVariables(commandContext, execution,subProcessInstance.getVariables()); if (outboundVariables != null) { execution.getParent().setVariables(outboundVariables); } }</code><technical_language>This line necessary, commandContext is in methods passed a parameter</technical_language>

Target:
public void completing(DelegateExecution execution, DelegateExecution subProcessInstance) throws Exception { ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager(); ExecutionEntity executionEntity = (ExecutionEntity) execution; CallActivity callActivity = (CallActivity) executionEntity.getCurrentFlowElement(); for (IOParameter ioParameter : callActivity.getOutParameters()) { Object value = null; if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) { Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim()); value = expression.getValue(subProcessInstance); } else { value = subProcessInstance.getVariable(ioParameter.getSource()); } execution.setVariable(ioParameter.getTarget(), value); } Map<String, Object> outboundVariables = calculateOutBoundVariables(execution, subProcessInstance.getVariables()); if (outboundVariables != null) { execution.setVariables(outboundVariables); } }
Source:
<code>private void publishEvent(final TreeCacheEvent event) { <START> System.out.println(event); <END> if ( treeState.get() != TreeState.CLOSED ) { executorService.submit(new Runnable() { @Override public void run() { { try { callListeners(event); } catch ( Exception e ) { handleException(e); } } } }); } }</code><technical_language>Remove</technical_language>

Target:
private void publishEvent(final TreeCacheEvent event) { if ( treeState.get() != TreeState.CLOSED ) { executorService.submit(new Runnable() { @Override public void run() { { try { callListeners(event); } catch ( Exception e ) { handleException(e); } } } }); } }
Source:
<code>private static Iterable<ITmfEventAspect<?>> getExperimentAspects( final TmfExperiment experiment) { List<ITmfTrace> traces = experiment.getTraces(); ImmutableSet.Builder<ITmfEventAspect<?>> builder = new ImmutableSet.Builder<>(); builder.add(TmfBaseAspects.getTraceNameAspect()); String commonTraceType = getCommonTraceType(experiment); if (commonTraceType != null) { builder.addAll(traces.get(0).getEventAspects()); } else { for (ITmfTrace trace : traces) { Iterable<ITmfEventAspect<?>> traceAspects = trace.getEventAspects(); <START> builder.addAll(traceAspects); <END> } } return builder.build(); }</code><technical_language>inline</technical_language>

Target:
private static Iterable<ITmfEventAspect<?>> getExperimentAspects( final TmfExperiment experiment) { List<ITmfTrace> traces = experiment.getTraces(); ImmutableSet.Builder<ITmfEventAspect<?>> builder = new ImmutableSet.Builder<>(); builder.add(TmfBaseAspects.getTraceNameAspect()); String commonTraceType = getCommonTraceType(experiment); if (commonTraceType != null) { builder.addAll(traces.get(0).getEventAspects()); } else { for (ITmfTrace trace : traces) { builder.addAll(trace.getEventAspects()); } } return builder.build(); }
Source:
<code>protected Feature getFeature(JSONObject jsonObject) throws ActionParamsException, JSONException, FactoryException { Feature feature = new Feature(); OskariLayer layer = getLayer(jsonObject.optString("layerId")); String srsName = JSONHelper.getStringFromJSON(jsonObject, "srsName", "EPSG:3067"); CoordinateReferenceSystem crs = CRS.decode(srsName); WFSLayerConfiguration lc = getWFSConfiguration(layer.getId()); feature.setLayerName(layer.getName()); feature.setNamespace(lc.getFeatureNamespace()); feature.setNamespaceURI(lc.getFeatureNamespaceURI()); feature.setGMLGeometryProperty(lc.getGMLGeometryProperty()); feature.setId(jsonObject.getString("featureId")); if(jsonObject.has("featureFields")) { JSONArray jsonArray = jsonObject.getJSONArray("featureFields"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject property = jsonArray.getJSONObject(i); <START> if(property.getString("value").isEmpty()) { <END> continue; } feature.addProperty(property.getString("key"), property.getString("value")); } } if (jsonObject.has("geometries")) { JSONObject geometries = jsonObject.getJSONObject("geometries"); String geometryType = geometries.getString("type"); if(!isAllowedGeomType(geometryType)) { throw new ActionParamsException("Invalid geometry type: " + geometryType); } JSONArray data = geometries.getJSONArray("data"); feature.setGeometry(getGeometry(geometryType, data, getSrid(srsName, 3067))); } return feature; }</code><technical_language>Is a requirement able set property null/empty value</technical_language>

Target:
protected Feature getFeature(JSONObject jsonObject) throws ActionParamsException, JSONException, FactoryException { Feature feature = new Feature(); OskariLayer layer = getLayer(jsonObject.optString("layerId")); String srsName = JSONHelper.getStringFromJSON(jsonObject, "srsName", "EPSG:3067"); CoordinateReferenceSystem crs = CRS.decode(srsName); WFSLayerConfiguration lc = getWFSConfiguration(layer.getId()); feature.setLayerName(layer.getName()); feature.setNamespace(lc.getFeatureNamespace()); feature.setNamespaceURI(lc.getFeatureNamespaceURI()); feature.setGMLGeometryProperty(lc.getGMLGeometryProperty()); feature.setId(jsonObject.getString("featureId")); if(jsonObject.has("featureFields")) { JSONArray jsonArray = jsonObject.getJSONArray("featureFields"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject property = jsonArray.getJSONObject(i); feature.addProperty(property.getString("key"), property.getString("value")); } } if (jsonObject.has("geometries")) { JSONObject geometries = jsonObject.getJSONObject("geometries"); String geometryType = geometries.getString("type"); if(!isAllowedGeomType(geometryType)) { throw new ActionParamsException("Invalid geometry type: " + geometryType); } JSONArray data = geometries.getJSONArray("data"); Geometry geometry = getGeometry(geometryType, data, getSrid(srsName, 3067)); if(ProjectionHelper.isFirstAxisNorth(crs)) { ProjectionHelper.flipFeatureYX(geometry); } feature.setGeometry(geometry); } return feature; }
Source:
<code>public void testOrder() throws Exception { Map<String, String> env = new HashMap(); env.put("PGHOST", "fromenv"); env.put("PGUSER", "fromenv"); env.put("PGDATABASE", "fromenv"); Properties info = new Properties(); PGProperty.PG_DBNAME.set(info, "frominfo"); PGProperty.USER.set(info, "frominfo"); String url = "jdbc:postgresql:?user=fromurl"; Properties props = PropertyLoader.load(url, info, env); assertNotNull(props); System.out.println(props.get(PGProperty.PG_HOST.getName())); <START> System.out.println(props.getProperty(PGProperty.PG_HOST.getName())); <END> assertTrue(PGProperty.PG_HOST.isPresent(props)); assertEquals("fromenv", PGProperty.PG_HOST.get(props)); assertTrue(PGProperty.PG_PORT.isPresent(props)); assertEquals(5432, PGProperty.PG_PORT.getInt(props)); assertTrue(PGProperty.USER.isPresent(props)); assertEquals("fromurl", PGProperty.USER.get(props)); assertTrue(PGProperty.PG_DBNAME.isPresent(props)); assertEquals("frominfo", PGProperty.PG_DBNAME.get(props)); }</code><technical_language>Ya, this is problem this thing, multiple places variables set. url, properties, env. specific problem is in parseURL returns a new properties object line 46 if ((props = parseURL(url, props)) == null) { overrides of work done in previous lines..</technical_language>

Target:
public void testOrder() throws Exception { Map<String, String> env = new HashMap(); env.put("PGHOST", "fromenv"); env.put("PGPORT", "5433"); env.put("PGDATABASE", "fromenv"); Properties info = new Properties(); PGProperty.PG_DBNAME.set(info, "frominfo"); PGProperty.PG_PORT.set(info, "5434"); String url = "jdbc:postgresql:?PGPORT=5435"; Properties props = PropertyLoader.load(url, info, env); assertNotNull(props); assertTrue(PGProperty.PG_HOST.isPresent(props)); assertEquals("fromenv", PGProperty.PG_HOST.get(props)); assertTrue(PGProperty.PG_PORT.isPresent(props)); assertEquals(5435, PGProperty.PG_PORT.getInt(props)); assertTrue(PGProperty.USER.isPresent(props)); assertTrue(PGProperty.PG_DBNAME.isPresent(props)); assertEquals("frominfo", PGProperty.PG_DBNAME.get(props)); }
Source:
<code>public void addPrivateKey(String host, byte[] key) throws SshKeyStoreException { try { final String sshKeyAttributeName = sshKeyAttributeName(host, PRIVATE); final Map<String, String> keys = getSshKeys(); <START> if (keys.get(sshKeyAttributeName) != null) { <END> throw new SshKeyStoreException("Private key for host: '" + host + "' already exists."); } keys.put(sshKeyAttributeName, new String(key)); updateSshKeys(keys); } catch (ApiException | IOException | JsonParseException e) { throw new SshKeyStoreException("Failed to add private key for host '" + host + "'. ", e); } }</code><technical_language>contains @evoevodin suggested</technical_language>

Target:
public void addPrivateKey(String host, byte[] key) throws SshKeyStoreException { try { final String sshKeyAttributeName = sshKeyAttributeName(host, PRIVATE); final Map<String, String> keys = getSshKeys(); if (keys.containsKey(sshKeyAttributeName)) { throw new SshKeyStoreException("Private key for host: '" + host + "' already exists."); } keys.put(sshKeyAttributeName, new String(key)); updateSshKeys(keys); } catch (ApiException | IOException | JsonParseException e) { throw new SshKeyStoreException("Failed to add private key for host '" + host + "'. ", e); } }
Source:
<code>public void preInit(FMLPreInitializationEvent event) { if(!ENABLE)return; <START> FMLLog.info("{Artem226} Preinit test mod"); <END> BlockEvent.RandomTickEvent.RandomBlockTickEventRegistry.registerEventForBlock(BlockFire.class); MinecraftForge.EVENT_BUS.register(this); }</code><technical_language>put actual modid in if do name</technical_language>

Target:
public void preInit(FMLPreInitializationEvent event) { if(!ENABLE)return; FMLLog.info("[RandomBlockTickEventTest] Preinit test mod"); BlockEvent.RandomTickEvent.RandomBlockTickEventRegistry.registerBlockForEvent(BlockFire.class); MinecraftForge.EVENT_BUS.register(this); }
Source:
<code>public final Mono<KeyRecord> get(Policy policy, Key key) throws AerospikeException { <START> return Mono.create(sink -> aerospikeClient.get(eventLoops.next(), new RecordListener() { <END> @Override public void onSuccess(Key key, Record record) { sink.success(new KeyRecord(key, record)); } @Override public void onFailure(AerospikeException exception) { sink.error(exception); } }, policy, key)); }</code><technical_language>i is extract listeners separate classes. code more neat</technical_language>

Target:
public final Mono<KeyRecord> get(Policy policy, Key key) throws AerospikeException { return Mono.create(sink -> aerospikeClient.get( eventLoops.next(), new ReactorRecordListener(sink), policy, key)); }
Source:
<code>public void setBankState(State bankState) { <START> LOG.info("setBankState, setting bank state to: " + ToStringBuilder.reflectionToString(bankState)); <END> this.bankState = bankState; }</code><technical_language>logging statements set debug level instead of info level? Also, if switch lang3 ToStringBuilder, I version of allow null values for "reflectionToString"</technical_language>

Target:
public void setBankState(State bankState) { if (LOG.isDebugEnabled()) { LOG.debug("setBankState, setting bank state to: " + buildToStringBuilderString(bankState)); } this.bankState = bankState; }
Source:
<code>private void pull(final PullParams params, final ProgressMonitor progressMonitor, final URI dockerDaemonUri) throws IOException, InterruptedException { final String registry = params.getRegistry(); final AuthConfigs authConfigs = params.getAuthConfigs(); try (DockerConnection connection = connectionFactory.openConnection(dockerDaemonUri) .method("POST") .path("/images/create") <START> .query("fromImage", params.getImageFqn()) <END> .header("X-Registry-Auth", authManager.getXRegistryAuthHeaderValue( registry != null ? registry : DEFAULT_REGISTRY, authConfigs != null ? authConfigs.getConfigs() : null))) { addQueryParamIfNotNull(connection, "tag", params.getTag()); final DockerResponse response = connection.request(); if (OK.getStatusCode() != response.getStatus()) { throw getDockerException(response); } try (InputStream responseStream = response.getInputStream()) { JsonMessageReader<ProgressStatus> progressReader = new JsonMessageReader<>(responseStream, ProgressStatus.class); final ValueHolder<IOException> errorHolder = new ValueHolder<>(); final Runnable runnable = new Runnable() { @Override public void run() { try { ProgressStatus progressStatus; while ((progressStatus = progressReader.next()) != null) { progressMonitor.updateProgress(progressStatus); } } catch (IOException e) { errorHolder.set(e); } synchronized (this) { notify(); } } }; executor.execute(runnable); synchronized (runnable) { runnable.wait(); } final IOException ioe = errorHolder.get(); if (ioe != null) { throw ioe; } } } }</code><technical_language>a term docker image FQN</technical_language>

Target:
private void pull(final PullParams params, final ProgressMonitor progressMonitor, final URI dockerDaemonUri) throws IOException, InterruptedException { final String registry = params.getRegistry(); try (DockerConnection connection = connectionFactory.openConnection(dockerDaemonUri) .method("POST") .path("/images/create") .query("fromImage", params.getFullRepo()) .header("X-Registry-Auth", authManager.getXRegistryAuthHeaderValue( firstNonNull(registry, DEFAULT_REGISTRY_VALUE), params.getAuthConfigs()))) { addQueryParamIfNotNull(connection, "tag", params.getTag()); final DockerResponse response = connection.request(); if (OK.getStatusCode() != response.getStatus()) { throw getDockerException(response); } try (InputStream responseStream = response.getInputStream()) { JsonMessageReader<ProgressStatus> progressReader = new JsonMessageReader<>(responseStream, ProgressStatus.class); final ValueHolder<IOException> errorHolder = new ValueHolder<>(); final Runnable runnable = new Runnable() { @Override public void run() { try { ProgressStatus progressStatus; while ((progressStatus = progressReader.next()) != null) { progressMonitor.updateProgress(progressStatus); } } catch (IOException e) { errorHolder.set(e); } synchronized (this) { notify(); } } }; executor.execute(runnable); synchronized (runnable) { runnable.wait(); } final IOException ioe = errorHolder.get(); if (ioe != null) { throw ioe; } } } }
Source:
<code>public void visitVariable(VariableTree tree) { <START> if (insideTryStatement && !insideLambdaExpression && isResourceResolver(tree) <END> && !resourceResolversInTryWithResources .contains(getResourceResolver(tree))) { context.reportIssue(this, tree, RULE_MESSAGE); } super.visitVariable(tree); }</code><technical_language>Please extract this condition method</technical_language>

Target:
public void visitVariable(VariableTree tree) { if (isResourceResolverUsedProperly(tree)) { context.reportIssue(this, tree, RULE_MESSAGE); } super.visitVariable(tree); }
Source:
<code>private void addLastTakenPicture() { try { WPMediaUtils.scanMediaFile(this, mMediaCapturePath); File f = new File(mMediaCapturePath); Uri capturedImageUri = Uri.fromFile(f); if (addMedia(capturedImageUri, true)) { this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); } else { ToastUtils.showToast(this, R.string.gallery_error, Duration.SHORT); } <START> } catch (RuntimeException e) { <END> AppLog.e(T.EDITOR, e); } catch (OutOfMemoryError e) { AppLog.e(T.EDITOR, e); } }</code><technical_language>Minor nit, collapsed to: } catch (RuntimeException | OutOfMemoryError e) { AppLog.e(T.EDITOR, e); }</technical_language>

Target:
private void addLastTakenPicture() { try { WPMediaUtils.scanMediaFile(this, mMediaCapturePath); File f = new File(mMediaCapturePath); Uri capturedImageUri = Uri.fromFile(f); if (addMedia(capturedImageUri, true)) { this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); } else { ToastUtils.showToast(this, R.string.gallery_error, Duration.SHORT); } } catch (RuntimeException | OutOfMemoryError e) { AppLog.e(T.EDITOR, e); } }
Source:
<code><START> public Response handle(Request request) { <END> final CountDeviceTypeRequest req = (CountDeviceTypeRequest) request.getBody(); final long count = deviceTypeDao.count(req.getName(), req.getNamePattern(), req.getPrincipal()); final EntityCountResponse entityCountResponse = new EntityCountResponse(count); return Response.newBuilder() .withBody(new CountDeviceTypeResponse(entityCountResponse)) .buildSuccess(); }</code><technical_language>Add empty new line (make consistent other count handlers)</technical_language>

Target:
public Response handle(Request request) { final CountDeviceTypeRequest req = (CountDeviceTypeRequest) request.getBody(); final long count = deviceTypeDao.count(req.getName(), req.getNamePattern(), req.getPrincipal()); final CountResponse countResponse = new CountResponse(count); return Response.newBuilder() .withBody(countResponse) .buildSuccess(); }
Source:
<code>private void removeFromMap(View child) { <START> this.map.get(child).child = null;; <END> this.map.remove(child); }</code><technical_language>Multiple ';'</technical_language>

Target:
private void removeFromMap(View child) { this.map.get(child).child = null; this.map.remove(child); }
Source:
<code>private UpdateProgress processContent(Content content, Action action) { String contentCrid = idGenerator.generateContentCrid(content); log.debug("Processing Content {}", contentCrid); try { if (!Action.DELETE.equals(action)) { Payload p = payloadCreator.payloadFrom(contentCrid, content); if (shouldSave(HashType.CONTENT, contentCrid, p)) { taskStore.save(taskCreator.taskFor(idGenerator.generateContentCrid(content), content, p, action)); payloadHashStore.saveHash(HashType.CONTENT, contentCrid, p.hash()); } else { log.debug("Existing hash found for Content {}, not updating", contentCrid); } } return UpdateProgress.SUCCESS; } catch (Exception e) { <START> log.error("Failed to createDefault payload for content {}", content.getCanonicalUri(), e); <END> Task task = taskStore.save(taskCreator.taskFor(idGenerator.generateContentCrid(content), content, action, Status.FAILED)); taskStore.updateWithLastError(task.id(), exceptionToString(e)); return UpdateProgress.FAILURE; } }</code><technical_language>Ditto rename refactor</technical_language>

Target:
private UpdateProgress processContent(Content content, Action action) { String contentCrid = idGenerator.generateContentCrid(content); log.debug("Processing Content {}", contentCrid); try { if (!Action.DELETE.equals(action)) { Payload p = payloadCreator.payloadFrom(contentCrid, content); if (shouldSave(HashType.CONTENT, contentCrid, p)) { taskStore.save(taskCreator.taskFor(idGenerator.generateContentCrid(content), content, p, action)); payloadHashStore.saveHash(HashType.CONTENT, contentCrid, p.hash()); } else { log.debug("Existing hash found for Content {}, not updating", contentCrid); } } return UpdateProgress.SUCCESS; } catch (Exception e) { log.error("Failed to create payload for content {}", content.getCanonicalUri(), e); Task task = taskStore.save(taskCreator.taskFor(idGenerator.generateContentCrid(content), content, action, Status.FAILED)); taskStore.updateWithLastError(task.id(), exceptionToString(e)); return UpdateProgress.FAILURE; } }
Source:
<code>public void testCanonicalServiceName() throws Exception { AzureBlobStorageTestAccount testAccount = AzureBlobStorageTestAccount.createMock(); Configuration conf = testAccount.getFileSystem().getConf(); String authority = testAccount.getFileSystem().getUri().getAuthority(); URI defaultUri = new URI("wasbs", authority, null, null, null); conf.set(FS_DEFAULT_NAME_KEY, defaultUri.toString()); final FileSystem fs0 = FileSystem.get(conf); intercept(IllegalArgumentException.class, "java.net.UnknownHostException", ()-> { fs0.getCanonicalServiceName(); }); <START> FileSystem.closeAll(); <END> conf.setBoolean(RETURN_URI_AS_CANONICAL_SERVICE_NAME_PROPERTY_NAME, true); FileSystem fs1 = FileSystem.get(conf); Assert.assertEquals("getCanonicalServiceName() should return URI", fs1.getUri().toString(), fs1.getCanonicalServiceName()); }</code><technical_language>need do , call FileSystem.newInstance(defaultURI, conf), remembering close new FS</technical_language>

Target:
public void testCanonicalServiceName() throws Exception { AzureBlobStorageTestAccount testAccount = AzureBlobStorageTestAccount.createMock(); Configuration conf = testAccount.getFileSystem().getConf(); String authority = testAccount.getFileSystem().getUri().getAuthority(); URI defaultUri = new URI("wasbs", authority, null, null, null); conf.set(FS_DEFAULT_NAME_KEY, defaultUri.toString()); try { FileSystem fs0 = FileSystem.get(conf); intercept(IllegalArgumentException.class, "java.net.UnknownHostException", () -> { fs0.getCanonicalServiceName(); }); conf.setBoolean(RETURN_URI_AS_CANONICAL_SERVICE_NAME_PROPERTY_NAME, true); FileSystem fs1 = FileSystem.newInstance(defaultUri, conf); Assert.assertEquals("getCanonicalServiceName() should return URI", fs1.getUri().toString(), fs1.getCanonicalServiceName()); } finally { testAccount.cleanup(); FileSystem.closeAll(); } }
Source:
<code>private RecordingCommand getImportCommand() { return new RecordingCommand(this.modelSet.getTransactionalEditingDomain()) { @Override protected void doExecute() { PackageImport importPrimitivePack = rootElement.createPackageImport((org.eclipse.uml2.uml.Package) primitiveTypes); if (!rootElement.getPackageImports().contains(importPrimitivePack)) { rootElement.getPackageImports().add(importPrimitivePack); } if (umlMetamodel != null) { PackageImport importMetamodelPack = rootElement.createPackageImport((org.eclipse.uml2.uml.Package) umlMetamodel); if (!rootElement.getPackageImports().contains(importMetamodelPack)) { rootElement.getPackageImports().add(importMetamodelPack); } } try { <START> rootElement.eResource().save(Collections.EMPTY_MAP); <END> } catch (IOException e) { Activator.log.error(e); } } }; }</code><technical_language>I save() operation happen in templates (The wizard will/should save model end anyway)</technical_language>

Target:
private RecordingCommand getImportCommand() { return new RecordingCommand(this.modelSet.getTransactionalEditingDomain()) { @Override protected void doExecute() { if (!rootElement.getImportedPackages().contains(primitiveTypes)) { rootElement.createPackageImport((org.eclipse.uml2.uml.Package) primitiveTypes); } if (umlMetamodel != null) { if (!rootElement.getImportedPackages().contains(umlMetamodel)) { rootElement.createPackageImport((org.eclipse.uml2.uml.Package) umlMetamodel); } } } }; }
Source:
<code>private static void attachShutdownHook() { Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { LOGGER.info("JMXFetch is closing"); <START> LogManager.shutdown(); <END> } } ); }</code><technical_language>not! JMXFetch is a bit of code some cleanup, this is welcome</technical_language>

Target:
private static void attachShutdownHook() { Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { log.info("JMXFetch is closing"); LogManager.shutdown(); } } ); }
Source:
<code>ColumnDef(ColumnDefName columnDefName, String sqlTypeName, boolean isNull, Integer maxLength, Integer scale, boolean isPK) { this.columnDefName = columnDefName; this.dataType = PDataType.fromSqlTypeName(SchemaUtil.normalizeIdentifier(sqlTypeName)); this.isNull = isNull; if (this.dataType == PDataType.CHAR) { if (maxLength == null) { throw new IllegalArgumentException(sqlTypeName + " must declare a length"); } } else if (this.dataType == PDataType.DECIMAL) { maxLength = maxLength == null ? PDataType.MAX_PRECISION : maxLength; } else if (this.dataType != PDataType.VARCHAR) { maxLength = null; } this.maxLength = maxLength; <START> if (this.dataType == PDataType.DECIMAL) { <END> scale = scale == null || scale > maxLength ? maxLength : scale; this.scale = scale; } else { this.scale = null; } this.isPK = isPK; }</code><technical_language>if statements collapsed ones</technical_language>

Target:
ColumnDef(ColumnDefName columnDefName, String sqlTypeName, boolean isNull, Integer maxLength, Integer scale, boolean isPK) { this.columnDefName = columnDefName; this.dataType = PDataType.fromSqlTypeName(SchemaUtil.normalizeIdentifier(sqlTypeName)); this.isNull = isNull; if (this.dataType == PDataType.CHAR) { if (maxLength == null) { throw new IllegalArgumentException(sqlTypeName + " must declare a length"); } scale = null; } else if (this.dataType == PDataType.DECIMAL) { maxLength = maxLength == null ? PDataType.MAX_PRECISION : maxLength; scale = scale == null ? PDataType.DEFAULT_SCALE : scale > maxLength ? maxLength : scale; } else if (this.dataType != PDataType.VARCHAR) { maxLength = null; scale = null; } else { scale = null; } this.maxLength = maxLength; this.scale = scale; this.isPK = isPK; }
Source:
<code>public SchedulePage setStartTimeDate(String startTime) { String from = getTimeElement(startTime, "hours"); from = from + ":"+ getTimeElement(startTime, "minutes"); String fromMeridian = getTimeElement(startTime, "meridian"); if(BROWSER.equalsIgnoreCase("ie")) { startTimeTxtBox.clear(); startTimeTxtBox.sendKeys(startTime); } else if (BROWSER.equalsIgnoreCase("firefox")) { startTimeTxtBox.clear(); startTimeTxtBox.sendKeys(startTime); } else { setStartTime(startTime, fromMeridian); <START> setStartTime(startTime, fromMeridian); <END> } return this; }</code><technical_language>code repedated</technical_language>

Target:
public SchedulePage setStartTimeDate(String startTime) { String from = getTimeElement(startTime, "hours"); from = from + ":"+ getTimeElement(startTime, "minutes"); String fromMeridian = getTimeElement(startTime, "meridian"); if(BROWSER.equalsIgnoreCase("ie")) { startTimeTxtBox.clear(); startTimeTxtBox.sendKeys(startTime); } else if (BROWSER.equalsIgnoreCase("firefox")) { startTimeTxtBox.clear(); startTimeTxtBox.sendKeys(startTime); } else { setStartTime(startTime, fromMeridian); } return this; }
Source:
<code>public CompletionStage<Boolean> reload() { <START> if (supportsReloading()) { <END> CompletableFuture<Boolean> result = new CompletableFuture<>(); RunOrSchedule.on(singleThreaded.adminExecutor, () -> singleThreaded.reload(result)); return result; } else { return CompletableFutures.failedFuture( new UnsupportedOperationException( "This instance of DefaultDriverConfigLoader does not support reloading")); } }</code><technical_language>I get it. This class is internal, designed for subclassing: intended reuse is construct a custom supplier, immediately clear more subclassing allow. this a concrete case</technical_language>

Target:
public final CompletionStage<Boolean> reload() { if (supportsReloading) { CompletableFuture<Boolean> result = new CompletableFuture<>(); RunOrSchedule.on(singleThreaded.adminExecutor, () -> singleThreaded.reload(result)); return result; } else { return CompletableFutures.failedFuture( new UnsupportedOperationException( "This instance of DefaultDriverConfigLoader does not support reloading")); } }
Source:
<code>ReviewHarness(String testIdent, PrivilegeLevel privilegeLevel) throws Exception { this.testIdent = testIdent; gerritHarness = GerritFixture.current().harness(); git = gerritHarness.project().getGitProject(privilegeLevel); connector = new GerritConnector(); repository = GerritFixture.current().singleRepository(); <START> UserCredentials credentials = GerritFixture.current().getCredentials(privilegeLevel); <END> repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), true); client = gerritHarness.client(privilegeLevel); provider = new GerritRemoteFactoryProvider(client); provider.setService(new JobRemoteService()); provider.setDataLocator(new TestDataLocator()); }</code><technical_language>I need this creds set</technical_language>

Target:
ReviewHarness(String testIdent, PrivilegeLevel privilegeLevel) throws Exception { this.testIdent = testIdent; gerritHarness = GerritFixture.current().harness(); git = gerritHarness.project().getGitProject(privilegeLevel); connector = new GerritConnector(); repository = GerritFixture.current().singleRepository(); client = gerritHarness.client(privilegeLevel); provider = new GerritRemoteFactoryProvider(client); provider.setService(new JobRemoteService()); provider.setDataLocator(new TestDataLocator()); }
Source:
<code>public String getPort() { <START> String port = System.getProperty(this.port); <END> if (port == null) { port = getPort(getProtocol()); } return port; }</code><technical_language>do return System.getProperty(this.port, getPort(getProtocol()); here</technical_language>

Target:
public String getPort() { return System.getProperty(this.port, getPort(getProtocol())); }
Source:
<code>public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { if (stateIn.has(BlockStateProperties.WATERLOGGED) && stateIn.get(BlockStateProperties.WATERLOGGED)) { worldIn.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn)); <START> } <END> return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); }</code><technical_language>Same, this time wrong placement. I assume this call is based vanilla code</technical_language>

Target:
public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { if(stateIn.has(BlockStateProperties.WATERLOGGED)&&stateIn.get(BlockStateProperties.WATERLOGGED)) worldIn.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn)); return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); }
Source:
<code>public Set<Execution> getAllExecutions() { List<Execution> allExecutions = null; LinkedHashSet<Execution> allOrderedExecutions = null; if (useCache) { if (allExecutionsCache != null) { allExecutions = Lists.newArrayList(allExecutionsCache); } allOrderedExecutions = allOrderedExecutionsCache; } if (allOrderedExecutions == null) { if (allExecutions == null) { allExecutions = Lists.newArrayList(); for (Node node : Iterables.filter(Iterables.filter(AllContents.of(getNotationDiagram()), Node.class), Execution.notationPredicate())) { Option<Execution> exec = ISequenceElementAccessor.getExecution(node); assert exec.some() : INTERNAL_ERROR; allExecutions.add(exec.get()); } if (useCache) { allExecutionsCache = <START> Lists.newArrayList(allExecutions); } <END> } Collections.sort(allExecutions, RangeHelper.lowerBoundOrdering().onResultOf(ISequenceEvent.VERTICAL_RANGE)); allOrderedExecutions = Sets.newLinkedHashSet(allExecutions); if (useCache) { allOrderedExecutionsCache = allOrderedExecutions; } } return allOrderedExecutions; }</code><technical_language>getAllLifelines remarks</technical_language>

Target:
public Set<Execution> getAllExecutions() { List<Execution> allExecutions = null; LinkedHashSet<Execution> allOrderedExecutions = null; if (useCache) { if (allExecutionsCache != null) { allExecutions = Lists.newArrayList(allExecutionsCache); } allOrderedExecutions = allOrderedExecutionsCache; } if (allOrderedExecutions == null) { if (allExecutions == null) { allExecutions = Lists.newArrayList(); for (Node node : Iterables.filter(Iterables.filter(AllContents.of(getNotationDiagram()), Node.class), Execution.notationPredicate())) { Option<Execution> exec = ISequenceElementAccessor.getExecution(node); assert exec.some() : INTERNAL_ERROR; allExecutions.add(exec.get()); } if (useCache) { allExecutionsCache = allExecutions; } } Collections.sort(allExecutions, RangeHelper.lowerBoundOrdering().onResultOf(ISequenceEvent.VERTICAL_RANGE)); allOrderedExecutions = Sets.newLinkedHashSet(allExecutions); if (useCache) { allOrderedExecutionsCache = allOrderedExecutions; } } return allOrderedExecutions; }