auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void invalidateVisualState() { <START> super.invalidateVisualState(); <END> ObservableList<XYChart.Series<Double, Double>> lineChartData = FXCollections.observableArrayList(); double step = 0.01; double min = x.getLowerBound(); double max = x.getUpperBound(); Expr expr = new Apply( new Ident("putStrLn"), new Apply( new Ident("unwords"), new Apply( new Apply( new Ident("map"), new Ident("show") ), new Apply( new Apply( new Ident("map"), getExpr() ), new Ident(String.format(Locale.US,"[%f,%f..%f]", min, min+step, max)) ) ) ) ); try { String results = getPane().getGhciSession().get().pull(expr); LineChart.Series<Double, Double> series = new LineChart.Series<>(); ObservableList<XYChart.Data<Double, Double>> data = series.getData(); Iterator<String> v = Splitter.on(' ').split(results).iterator(); for (double i = min; i < max; i += step) { data.add(new XYChart.Data<>(i, Double.valueOf(v.next()))); } lineChartData.add(series); } catch (HaskellException | NoSuchElementException | NumberFormatException ignored) { assert Boolean.TRUE; } chart.setData(lineChartData); }</code><technical_language>Super call do much</technical_language>

Target:
public void invalidateVisualState() { super.invalidateVisualState(); ObservableList<XYChart.Series<Double, Double>> lineChartData = FXCollections.observableArrayList(); double step = 0.01; double min = x.getLowerBound(); double max = x.getUpperBound(); Expr expr = new Apply( new Ident("putStrLn"), new Apply( new Ident("unwords"), new Apply( new Apply( new Ident("map"), new Ident("show") ), new Apply( new Apply( new Ident("map"), getExpr() ), new Ident(String.format(Locale.US, "[%f,%f..%f]", min, min+step, max)) ) ) ) ); try { String results = getPane().getGhciSession().get().pull(expr); LineChart.Series<Double, Double> series = new LineChart.Series<>(); ObservableList<XYChart.Data<Double, Double>> data = series.getData(); Iterator<String> v = Splitter.on(' ').split(results).iterator(); for (double i = min; i < max; i += step) { data.add(new XYChart.Data<>(i, Double.valueOf(v.next()))); } lineChartData.add(series); } catch (HaskellException | NoSuchElementException | NumberFormatException ignored) { } chart.setData(lineChartData); }
Source:
<code>public <START> java.lang.Class<? <END> extends Rule> getType(Topology.Rule proto) { switch (proto.getType()) { case JUMP_RULE: return JumpRule.class; case LITERAL_RULE: return LiteralRule.class; case TRACE_RULE: return TraceRule.class; case NAT_RULE: if (proto.getMatchForwardFlow()) return ForwardNatRule.class; else if (proto.getMatchReturnFlow()) return ReverseNatRule.class; else throw new ZoomConvert.ConvertException("Rule: " + proto.getId() + " is neither a forward nor a " + "reverse NAT rule"); default: throw new ZoomConvert.ConvertException("Unknown rule " + "type: " + proto.getType()); } }</code><technical_language>needed</technical_language>

Target:
public Class<? extends Rule> getType(Topology.Rule proto) { switch (proto.getType()) { case JUMP_RULE: return JumpRule.class; case LITERAL_RULE: return LiteralRule.class; case TRACE_RULE: return TraceRule.class; case NAT_RULE: if (proto.getMatchForwardFlow()) return ForwardNatRule.class; else if (proto.getMatchReturnFlow()) return ReverseNatRule.class; else throw new ZoomConvert.ConvertException("Rule: " + proto.getId() + " is neither a forward nor a " + "reverse NAT rule"); default: throw new ZoomConvert.ConvertException("Unknown rule " + "type: " + proto.getType()); } }
Source:
<code>private void processEntries(String registerName, String[] entries) { final List<byte[]> entriesAsBytes = Arrays.stream(entries) .map(e -> { try { final JsonNode jsonNode = canonicalJsonMapper.readFromBytes(e.getBytes(StandardCharsets.UTF_8)); entryValidator.validateEntry(registerName, jsonNode); return canonicalJsonMapper.writeToBytes(hashedEntry(jsonNode)); } catch (Throwable throwable) { <START> throw new RuntimeException(throwable); <END> } }) .collect(Collectors.toList()); entriesUpdateDAO.add(entriesAsBytes); }</code><technical_language>this changed? want wrap Throwables in another RuntimeException</technical_language>

Target:
private void processEntries(String registerName, String[] entries) { final List<byte[]> entriesAsBytes = Arrays.stream(entries) .map(e -> { try { final JsonNode jsonNode = canonicalJsonMapper.readFromBytes(e.getBytes(StandardCharsets.UTF_8)); entryValidator.validateEntry(registerName, jsonNode); return canonicalJsonMapper.writeToBytes(hashedEntry(jsonNode)); } catch (Exception ex) { throw Throwables.propagate(ex); } }) .collect(Collectors.toList()); entriesUpdateDAO.add(entriesAsBytes); }
Source:
<code>private XDesktop simpleBootstrap(List<URL> jarUrls) throws IllegalAccessException, InvocationTargetException, BootstrapException, CreationException, IOException, ClassNotFoundException { URL[] urls = jarUrls.toArray(new URL[3]); <START> Class<Bootstrap> clazz = (Class<Bootstrap>) Class.forName("com.sun.star.comp.helper.Bootstrap", true, new ChildFirstClassLoader(urls, null)); <END> Bootstrap boot = null; try { boot = clazz.getDeclaredConstructor().newInstance(); } catch (InstantiationException | java.lang.IllegalArgumentException | NoSuchMethodException | SecurityException e1) { e1.printStackTrace(); } XComponentContext xContext = boot.bootstrap(); XMultiComponentFactory xServiceManager = xContext.getServiceManager(); Object desktop; try { desktop = xServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", xContext); } catch (Exception e) { throw new CreationException(e.getMessage()); } XDesktop resultDesktop = UnoRuntime.queryInterface(XDesktop.class, desktop); UnoRuntime.queryInterface(XComponentLoader.class, desktop); return resultDesktop; }</code><technical_language>I understand problem, <LINK_0> work</technical_language>

Target:
private XDesktop simpleBootstrap(List<URL> jarUrls) throws CreationException, BootstrapException { URL[] urls = jarUrls.toArray(new URL[1]); URLClassLoader loader = new URLClassLoader(urls, null); XComponentContext xContext = org.jabref.gui.openoffice.Bootstrap.bootstrap(loader); XMultiComponentFactory xServiceManager = xContext.getServiceManager(); Object desktop; try { desktop = xServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", xContext); } catch (Exception e) { throw new CreationException(e.getMessage()); } XDesktop resultDesktop = UnoRuntime.queryInterface(XDesktop.class, desktop); UnoRuntime.queryInterface(XComponentLoader.class, desktop); return resultDesktop; }
Source:
<code>public DataSeriesReader(final DataSeriesType valueType, final EncodingParams params, final BitInputStream bitInputStream, final Map<Integer, InputStream> inputMap) { final EncodingFactory f = new EncodingFactory(); final Encoding<T> encoding = f.createEncoding(valueType, params.id); if (encoding == null) <START> throw new RuntimeException("Encoding not found: value type=" <END> + valueType.name() + ", encoding id=" + params.id.name()); encoding.fromByteArray(params.params); this.codec = encoding.buildCodec(inputMap, null); this.bitInputStream = bitInputStream; }</code><technical_language>IllegalArgumentException instead</technical_language>

Target:
public DataSeriesReader(final DataSeriesType valueType, final EncodingParams params, final BitInputStream bitInputStream, final Map<Integer, InputStream> inputMap) { final EncodingFactory f = new EncodingFactory(); final Encoding<T> encoding = f.createEncoding(valueType, params.id); if (encoding == null) { throw new IllegalArgumentException("Encoding not found: value type=" + valueType.name() + ", encoding id=" + params.id.name()); } encoding.fromByteArray(params.params); this.codec = encoding.buildCodec(inputMap, null); this.bitInputStream = bitInputStream; }
Source:
<code><START> public void validateExcept(String... prefixesToSkip) { <END> validateFactoryOptions(tableFactory, allOptions); final Set<String> remainingOptionKeys = new HashSet<>(allOptions.keySet()); remainingOptionKeys.removeAll(consumedOptionKeys); for (String prefix : prefixesToSkip) { remainingOptionKeys.removeIf(key -> key.startsWith(prefix)); } if (remainingOptionKeys.size() > 0) { throw new ValidationException( String.format( "Unsupported options found for connector '%s'.\n\n" + "Unsupported options:\n\n" + "%s\n\n" + "Supported options:\n\n" + "%s", tableFactory.factoryIdentifier(), remainingOptionKeys.stream() .sorted() .collect(Collectors.joining("\n")), consumedOptionKeys.stream() .sorted() .collect(Collectors.joining("\n")))); } }</code><technical_language>call validateExceptPrefix(String prefix)? I varargs prefix, otherwise, users write validateExcept is confusing. logic in validate(), add options prefix prefix consumedOptionKeys call validate() in this method</technical_language>

Target:
public void validateExcept(String... prefixesToSkip) { Preconditions.checkArgument(prefixesToSkip.length > 0, "Prefixes to skip can not be empty."); final List<String> prefixesList = Arrays.asList(prefixesToSkip); consumedOptionKeys.addAll(allOptions.keySet().stream() .filter(key -> prefixesList.stream().anyMatch(key::startsWith)) .collect(Collectors.toSet())); validate(); }
Source:
<code>protected Tuple parseStringToTuple(String line) { try { JSONObject jsonObj = (JSONObject) jsonParser.parse(line); if (jsonObj != null) { return tupleFactory.newTuple(walkJson(jsonObj)); } else { LOG.warn("Could not json-decode string: " + line); incrCounter(JsonLoaderCounters.LinesParseError, 1L); return null; } } catch (ParseException e) { LOG.warn("Could not json-decode string: " + line, e); incrCounter(JsonLoaderCounters.LinesParseError, 1L); <START> if (isInvalidRecordEnabled) { <END> retMap.put("error_line", line); retMap.put("error_string", "LinesParseError"); return tupleFactory.newTuple(retMap); } else { return null; } } catch (NumberFormatException e) { LOG.warn("Very big number exceeds the scale of long: " + line, e); incrCounter(JsonLoaderCounters.LinesParseErrorBadNumber, 1L); if (isInvalidRecordEnabled) { retMap.put("error_line", line); retMap.put("error_string", "LinesParseError"); return tupleFactory.newTuple(retMap); } else { return null; } } catch (ClassCastException e) { LOG.warn("Could not convert to Json Object: " + line, e); incrCounter(JsonLoaderCounters.LinesParseError, 1L); if (isInvalidRecordEnabled) { retMap.put("error_line", line); retMap.put("error_string", "LinesParseError"); return tupleFactory.newTuple(retMap); } else { return null; } } }</code><technical_language>organize this a bit avoid code duplication</technical_language>

Target:
protected Tuple parseStringToTuple(String line) { try { JSONObject jsonObj = (JSONObject) jsonParser.parse(line); if (jsonObj != null) { return tupleFactory.newTuple(walkJson(jsonObj)); } else { LOG.warn("Could not json-decode string: " + line); incrCounter(JsonLoaderCounters.LinesParseError, 1L); return null; } } catch (ParseException e) { LOG.warn("Could not json-decode string: " + line, e); incrCounter(JsonLoaderCounters.LinesParseError, 1L); return emitErrorTuple(line,"LinesParseError"); } catch (NumberFormatException e) { LOG.warn("Very big number exceeds the scale of long: " + line, e); incrCounter(JsonLoaderCounters.LinesParseErrorBadNumber, 1L); return emitErrorTuple(line,"LinesParseError"); } catch (ClassCastException e) { LOG.warn("Could not convert to Json Object: " + line, e); incrCounter(JsonLoaderCounters.LinesParseError, 1L); return emitErrorTuple(line,"LinesParseError"); } }
Source:
<code>public void incrementWriteOps() { <START> statistics.incrementWriteOps(1); <END> }</code><technical_language>1. skip if statistics == null 2. private</technical_language>

Target:
private void incrementWriteOps() { if (statistics != null) { statistics.incrementWriteOps(1); } }
Source:
<code><START> final public Ref <END> exactRef(String name) throws IOException { return getRefDatabase().exactRef(name); }</code><technical_language>public final</technical_language>

Target:
public final Ref exactRef(String name) throws IOException { return getRefDatabase().exactRef(name); }
Source:
<code>public void generateReportTimesPanelContentForSuiteWithoutStartedTests() { <START> XmlSuite xmlSuite = new XmlSuite(); <END> xmlSuite.setName("GITHUB_1931"); XmlTest xmlTest = new XmlTest(xmlSuite); List<XmlClass> xmlClasses = new ArrayList<>(); xmlClasses.add(new XmlClass(Object.class)); xmlTest.setXmlClasses(xmlClasses); ISuite iSuite = new FakeSuite(xmlTest); List<ISuite> suites = new ArrayList<>(); Model model = new Model(suites); XMLStringBuffer buffer = new XMLStringBuffer(); TimesPanel panel = new TimesPanel(model); panel.getContent(iSuite, buffer); assertThat(panel.getContent(iSuite, buffer), containsString("Total running time: 0 ms")); }</code><technical_language>If extends SimpleBaseTest, find some util methods for xml objects creation</technical_language>

Target:
public void generateReportTimesPanelContentForSuiteWithoutStartedTests() { XmlTest xmlTest = createXmlTest("GITHUB_1931", "NPE", Object.class); ISuite iSuite = new FakeSuite(xmlTest); List<ISuite> suites = new ArrayList<>(); suites.add(iSuite); Model model = new Model(suites); TimesPanel panel = new TimesPanel(model); XMLStringBuffer buffer = new XMLStringBuffer(); panel.getContent(iSuite, buffer); assertTrue("TimesPanel contains total running time", panel.getContent(iSuite, buffer).contains("Total running time: 0 ms")); }
Source:
<code>static ExitMode valueOf(int ordinal) { <START> return ExitMode.values()[ordinal]; <END> }</code><technical_language>cache result of values(), creates a new array invocation. I find source code, bytecode: GETSTATIC org/infinispan/commons/util/MarshallUtilTest$TestEnum.$VALUES : [Lorg/infinispan/commons/util/MarshallUtilTest$TestEnum; INVOKEVIRTUAL [Lorg/infinispan/commons/util/MarshallUtilTest$TestEnum;.clone ()Ljava/lang/Object;</technical_language>

Target:
static ExitMode valueOf(int ordinal) { return CACHED_VALUES[ordinal]; }
Source:
<code>public void perform(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload) { ProjectModel project; if (payload instanceof ProjectModel) { project = (ProjectModel) payload; } else if (payload instanceof FileModel) { project = ((FileModel) payload).getProjectModel(); } else if (payload instanceof FileLocationModel) { project = ((FileLocationModel)payload).getFile().getProjectModel(); } else { return; } TechnologyUsageStatisticsService service = new TechnologyUsageStatisticsService(event.getGraphContext()); <START> TechnologyUsageStatisticsModel model = service.get(project, this.technologyName); <END> model.setOccurrenceCount(model.getOccurrenceCount() + this.count); TagSetModel tagModel = model.getTagModel(); if (tagModel == null) { tagModel = new TagSetService(event.getGraphContext()).getOrCreate(event, this.tags); model.setTagModel(tagModel); } if (!tagModel.getTags().equals(this.tags)) { Set<String> newSet = new HashSet<>(tagModel.getTags()); newSet.addAll(this.tags); tagModel = new TagSetService(event.getGraphContext()).getOrCreate(event, this.tags); model.setTagModel(tagModel); } }</code><technical_language>rename get method getOrCreate (as other methods below), creates new TechnologyUsageStatisticsModel if exist</technical_language>

Target:
public void perform(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload) { ProjectModel project; if (payload instanceof ProjectModel) { project = (ProjectModel) payload; } else if (payload instanceof FileModel) { project = ((FileModel) payload).getProjectModel(); } else if (payload instanceof FileLocationModel) { project = ((FileLocationModel)payload).getFile().getProjectModel(); } else { return; } TechnologyUsageStatisticsService service = new TechnologyUsageStatisticsService(event.getGraphContext()); TechnologyUsageStatisticsModel model = service.getOrCreate(project, this.technologyName); model.setOccurrenceCount(model.getOccurrenceCount() + this.count); TagSetModel tagModel = model.getTagModel(); if (tagModel == null) { tagModel = new TagSetService(event.getGraphContext()).getOrCreate(event, this.tags); model.setTagModel(tagModel); } if (!tagModel.getTags().equals(this.tags)) { Set<String> newSet = new HashSet<>(tagModel.getTags()); newSet.addAll(this.tags); tagModel = new TagSetService(event.getGraphContext()).getOrCreate(event, this.tags); model.setTagModel(tagModel); } }
Source:
<code>public void deleteExperimentsByIds(final List<Integer> experimentIdList) throws MiddlewareQueryException { final String experimentIds = StringUtils.join(experimentIdList, ","); try { this.getSession().flush(); <START> final SQLQuery statement = <END> this.getSession().createSQLQuery("delete e, ep, es, pheno, eprop " + "from nd_experiment e " + "left join nd_experiment_stock es on e.nd_experiment_id = es.nd_experiment_id " + "left join phenotype pheno on pheno.nd_experiment_id = e.nd_experiment_id " + "left join nd_experimentprop eprop on eprop.nd_experiment_id = e.nd_experiment_id " + "where e.nd_experiment_id in (" + experimentIds + ") "); statement.executeUpdate(); } catch (final HibernateException e) { this.logAndThrowException("Error in deleteExperimentsByLocation=" + experimentIds + " in DataSetDao: " + e.getMessage(), e); } }</code><technical_language>@vmaletta I ep there. a merge issue, please check</technical_language>

Target:
public void deleteExperimentsByIds(final List<Integer> experimentIdList) throws MiddlewareQueryException { final String experimentIds = StringUtils.join(experimentIdList, ","); try { this.getSession().flush(); final SQLQuery statement = this.getSession().createSQLQuery("delete e, es, pheno, eprop " + "from nd_experiment e " + "left join nd_experiment_stock es on e.nd_experiment_id = es.nd_experiment_id " + "left join phenotype pheno on pheno.nd_experiment_id = e.nd_experiment_id " + "left join nd_experimentprop eprop on eprop.nd_experiment_id = e.nd_experiment_id " + "where e.nd_experiment_id in (" + experimentIds + ") "); statement.executeUpdate(); } catch (final HibernateException e) { this.logAndThrowException("Error in deleteExperimentsByLocation=" + experimentIds + " in DataSetDao: " + e.getMessage(), e); } }
Source:
<code>public void turtleWriterTest() throws IOException { <START> InputStream rdfInput = TurtleRecordWriter.class.getClassLoader().getResourceAsStream(RDF_INPUT_TEST); <END> Model modelResult = ModelFactory.createDefaultModel().read(rdfInput, "", "RDF/XML"); OutputStream outputStream = new ByteArrayOutputStream(); TurtleRecordWriter writer= new TurtleRecordWriter(outputStream); writer.write(modelResult); Assert.assertNotNull(outputStream); outputStream.close(); }</code><technical_language>closed</technical_language>

Target:
public void turtleWriterTest() throws IOException { InputStream rdfInput = TurtleRecordWriter.class.getClassLoader().getResourceAsStream(RDF_INPUT_TEST); Model modelResult = ModelFactory.createDefaultModel().read(rdfInput, "", "RDF/XML"); OutputStream outputStream = new ByteArrayOutputStream(); TurtleRecordWriter writer= new TurtleRecordWriter(outputStream); writer.write(modelResult); Assert.assertNotNull(outputStream); outputStream.close(); rdfInput.close(); }
Source:
<code><START> public static Transformer<ByteBuf, ByteBuf> all() { <END> return INSTANCE; }</code><technical_language>Thinking this more, I cap all() Integer.MAX_VALUE. This sane limits (2GB) buffer reuse code for methods, WDYT</technical_language>

Target:
public static CollectBytes all() { return upTo(Integer.MAX_VALUE); }
Source:
<code>private void setInitialState(PlexBindingConfig config) { if (connector != null) { PlexSession session = connector.getSessionByMachineId(config.getMachineIdentifier()); if (session == null) <START> session = new PlexSession(); <END> updateConfigFromSession(config, session); } }</code><technical_language>please curly braces this is a Oneliner</technical_language>

Target:
private void setInitialState(PlexBindingConfig config) { if (connector != null) { PlexSession session = connector.getSessionByMachineId(config.getMachineIdentifier()); if (session == null) { session = new PlexSession(); } updateConfigFromSession(config, session); } }
Source:
<code>public void run(ITextSelection selection) { IEditorInput input= fEditor.getEditorInput(); IDocumentProvider docProvider= fEditor.getDocumentProvider(); if (docProvider == null || input == null) return; IDocument document= docProvider.getDocument(input); if (document == null) return; IDocumentExtension3 docExtension= null; if (document instanceof IDocumentExtension3) docExtension= (IDocumentExtension3) document; else return; String indentStr= IndentAction.EMPTY_STR; IJavaProject javaProject= getProject(); if (javaProject == null) { return; } try { indentStr= IndentAction.getIndentationAsPerTextBlockSettings(document, selection.getOffset(), javaProject); } catch (BadLocationException e) { return; } try { int selectionOffset= selection.getOffset(); boolean setCaratPosition= selection.getLength() > 0 ? false : true; ITypedRegion partition= docExtension.getPartition(IJavaPartitions.JAVA_PARTITIONING, selectionOffset, false); if (!canAddTextBlock(partition, javaProject, selection)) { return; } DocumentCommand command= getDocumentCommand(document, javaProject, selection, indentStr); addTextBlock(document, command, setCaratPosition); } catch (BadLocationException e) { <START> e.printStackTrace(); <END> } catch (BadPartitioningException e) { } }</code><technical_language>Remove this</technical_language>

Target:
public void run(ITextSelection selection) { IEditorInput input= fEditor.getEditorInput(); IDocumentProvider docProvider= fEditor.getDocumentProvider(); if (docProvider == null || input == null) return; IDocument document= docProvider.getDocument(input); if (document == null) return; IDocumentExtension3 docExtension= null; if (document instanceof IDocumentExtension3) docExtension= (IDocumentExtension3) document; else return; String indentStr= IndentAction.EMPTY_STR; IJavaProject javaProject= getProject(); if (javaProject == null) { return; } try { indentStr= IndentAction.getIndentationAsPerTextBlockSettings(document, selection.getOffset(), javaProject); } catch (BadLocationException e) { return; } try { int selectionOffset= selection.getOffset(); boolean setCaratPosition= selection.getLength() > 0 ? false : true; ITypedRegion partition= docExtension.getPartition(IJavaPartitions.JAVA_PARTITIONING, selectionOffset, false); if (!canAddTextBlock(partition, javaProject, selection)) { return; } DocumentCommand command= getDocumentCommand(document, javaProject, selection, indentStr); addTextBlock(document, command, setCaratPosition); } catch (BadLocationException e) { } catch (BadPartitioningException e) { } }
Source:
<code>private void prepareObservations() throws ParseException { Observation tempObservation = new Observation(); tempObservation.setObsDatetime(format.parse(date)); tempObservation.setConcept(concept); <START> tempObservation.setValue(new Observation.ObservationValue("True")); <END> tempObservation.setPerson(patient.getPerson()); String observationUuid = obsAdapter.createObservation(DEFAULT_CONFIG_NAME, tempObservation).getUuid(); observation = obsAdapter.getObservationByUuid(DEFAULT_CONFIG_NAME, observationUuid); }</code><technical_language>is reason change</technical_language>

Target:
private void prepareObservations() throws ParseException { Observation tempObservation = new Observation(); tempObservation.setObsDatetime(format.parse(date)); tempObservation.setConcept(concept); tempObservation.setValue(new Observation.ObservationValue("true")); tempObservation.setPerson(patient.getPerson()); String observationUuid = obsAdapter.createObservation(DEFAULT_CONFIG_NAME, tempObservation).getUuid(); observation = obsAdapter.getObservationByUuid(DEFAULT_CONFIG_NAME, observationUuid); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { Timber.d("onCreate()"); super.onCreate(savedInstanceState); setContentView(R.layout.card_template_editor_activity); if (savedInstanceState == null) { mModelId = getIntent().getLongExtra("modelId", -1L); <START> mEditedModel = null; <END> mEditedModelFileName = null; mTemplateChanges = null; if (mModelId == -1) { Timber.e("CardTemplateEditor :: no model ID was provided"); finishWithoutAnimation(); return; } mNoteId = getIntent().getLongExtra("noteId", -1L); mOrdId = getIntent().getIntExtra("ordId", -1); } else { mModelId = savedInstanceState.getLong("modelId"); mNoteId = savedInstanceState.getLong("noteId"); mOrdId = savedInstanceState.getInt("ordId"); mEditedModelFileName = savedInstanceState.getString(INTENT_MODEL_FILENAME); if (mEditedModelFileName != null) { Timber.d("onCreate() loading saved model file %s", mEditedModelFileName); mEditedModel = getTempModel(mEditedModelFileName); } mTemplateChanges = (ArrayList<Object[]>)savedInstanceState.getSerializable("mTemplateChanges"); } Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar != null) { setSupportActionBar(toolbar); } startLoadingCollection(); }</code><technical_language>do need set null again</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { Timber.d("onCreate()"); super.onCreate(savedInstanceState); setContentView(R.layout.card_template_editor_activity); if (savedInstanceState == null) { mModelId = getIntent().getLongExtra("modelId", -1L); if (mModelId == -1) { Timber.e("CardTemplateEditor :: no model ID was provided"); finishWithoutAnimation(); return; } mNoteId = getIntent().getLongExtra("noteId", -1L); mStartingOrdId = getIntent().getIntExtra("ordId", -1); } else { mModelId = savedInstanceState.getLong("modelId"); mNoteId = savedInstanceState.getLong("noteId"); mStartingOrdId = savedInstanceState.getInt("ordId"); mTempModel = TemporaryModel.fromBundle(savedInstanceState); } enableToolbar(); startLoadingCollection(); }
Source:
<code>public void start(ComponentContext context) { super.start(context); plugins.clear(); List<PluginDescriptor> descriptors = getDescriptors(XP_PLUGINS); for (PluginDescriptor descriptor : descriptors) { <START> try { <END> Class<?> clazz = Class.forName(descriptor.getKlass()); Constructor<?> constructor = clazz.getConstructor(PluginDescriptor.class); Plugin<?> plugin = (Plugin<?>) constructor.newInstance(descriptor); plugins.put(descriptor.getId(), plugin); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { log.error(e, e); } } }</code><technical_language>ReflectiveOperationException</technical_language>

Target:
public void start(ComponentContext context) { super.start(context); plugins.clear(); List<PluginDescriptor> descriptors = getDescriptors(XP_PLUGINS); for (PluginDescriptor descriptor : descriptors) { try { Class<?> clazz = Class.forName(descriptor.getKlass()); Constructor<?> constructor = clazz.getConstructor(PluginDescriptor.class); Plugin<?> plugin = (Plugin<?>) constructor.newInstance(descriptor); plugins.put(descriptor.getId(), plugin); } catch (ReflectiveOperationException e) { String msg = String.format( "Failed to register plugin with id '%s' on '%s': error initializing class '%s' (%s).", descriptor.getId(), name, descriptor.getKlass(), e.toString()); log.error(msg, e); Framework.getRuntime().getMessageHandler().addError(msg); } } }
Source:
<code>private static Map<String, RemoteServiceConfiguration> createRemoteServiceConfigurations( ServerListConfig serverListConfig, UserAgent versionedAgent, AuxiliaryRemotingParameters parameters) { return KeyedStream.of(serverListConfig.servers()) .map(server -> ImmutableServerListConfig.builder() .from(serverListConfig) .servers(ImmutableList.of(server)) .build()) .flatMapEntries((uri, singleServerConfig) -> { <START> RemoteServiceConfiguration nonRetrying = ImmutableRemoteServiceConfiguration.builder() <END> .remotingParameters(ImmutableAuxiliaryRemotingParameters.builder() .from(parameters) .userAgent(versionedAgent) .shouldRetry(false) .build()) .serverList(singleServerConfig) .build(); RemoteServiceConfiguration retrying = ImmutableRemoteServiceConfiguration.builder() .remotingParameters(ImmutableAuxiliaryRemotingParameters.builder() .from(parameters) .userAgent(versionedAgent) .shouldRetry(true) .build()) .serverList(singleServerConfig) .build(); return Stream.of( Maps.immutableEntry(getServiceNameForTimeLock(uri, false), nonRetrying), Maps.immutableEntry(getServiceNameForTimeLock(uri, true), retrying)); }) .collectToMap(); }</code><technical_language>nit: extract method</technical_language>

Target:
private static Map<String, RemoteServiceConfiguration> createRemoteServiceConfigurations( ServerListConfig serverListConfig, UserAgent versionedAgent, AuxiliaryRemotingParameters parameters) { return KeyedStream.of(serverListConfig.servers()) .map(server -> ImmutableServerListConfig.builder() .from(serverListConfig) .servers(ImmutableList.of(server)) .build()) .flatMapEntries((uri, singleServerConfig) -> Stream.of(false, true) .map(retry -> createSingleServiceConfigurationMapping( uri, singleServerConfig, parameters, versionedAgent, retry))) .collectToMap(); }
Source:
<code>public JvmMonitor getJvmMonitor( <START> DataSourceTaskIdHolder dataSourceTaskIdHolder <END> ) { return new JvmMonitor(MonitorsConfig.mapOfDimensionAndTaskID( dataSourceTaskIdHolder.getDataSource(), dataSourceTaskIdHolder.getTaskId() )); }</code><technical_language>for nodes bind DataSourceTaskIdHolder? is this throwing NPEs</technical_language>

Target:
public JvmMonitor getJvmMonitor( DataSourceTaskIdHolder dataSourceTaskIdHolder ) { return new JvmMonitor(MonitorsConfig.mapOfDatasourceAndTaskID( dataSourceTaskIdHolder.getDataSource(), dataSourceTaskIdHolder.getTaskId() )); }
Source:
<code>private void sendFailureResponse(final MessageMetadata metadata, final ProtocolInfo protocolInfo, final OsgpException exception) { <START> final DeviceMessageMetadata deviceMessageMetadata = new DeviceMessageMetadata( <END> metadata.getDeviceIdentification(), metadata.getOrganisationIdentification(), metadata.getCorrelationUid(), metadata.getMessageType(), metadata.getMessagePriority(), metadata.getScheduleTime()); final ProtocolResponseMessage responseMessage = new ProtocolResponseMessage.Builder() .deviceMessageMetadata(deviceMessageMetadata).domain(metadata.getDomain()) .domainVersion(metadata.getDomainVersion()).result(ResponseMessageResultType.NOT_OK) .osgpException(exception).dataObject(null).retryCount(metadata.getRetryCount()) .scheduled(metadata.isScheduled()).build(); this.protocolResponseMessageSender.send(responseMessage, DeviceFunction.GET_FIRMWARE_FILE.name(), protocolInfo, metadata); }</code><technical_language>call constructor called (new DeviceMessageMetadata(metadata))</technical_language>

Target:
private void sendFailureResponse(final MessageMetadata metadata, final ProtocolInfo protocolInfo, final OsgpException exception) { final ProtocolResponseMessage responseMessage = new ProtocolResponseMessage.Builder() .deviceMessageMetadata(new DeviceMessageMetadata(metadata)).domain(metadata.getDomain()) .domainVersion(metadata.getDomainVersion()).result(ResponseMessageResultType.NOT_OK) .osgpException(exception).dataObject(null).retryCount(metadata.getRetryCount()) .scheduled(metadata.isScheduled()).build(); this.protocolResponseMessageSender.send(responseMessage, DeviceFunction.GET_FIRMWARE_FILE.name(), protocolInfo, metadata); }
Source:
<code>BlobAsyncClient(AzureBlobStorageBuilder azureBlobStorageBuilder, String snapshot) { this.blobAsyncRawClient = new BlobAsyncRawClient(azureBlobStorageBuilder.build()); <START> this.snapshot = snapshot; <END> }</code><technical_language>missing snapshot id used. I tell, BlobClientBuilder (and in AppendBlobClientBuilder; I checked others) strips out passes constructor. I a policy put url send a request, put this a request. A bigger question is separating it? is technically a query param is conceptually a part of blob's path. reason resource path is rules for blob naming produce ambiguity if were</technical_language>

Target:
BlobAsyncClient(AzureBlobStorageBuilder azureBlobStorageBuilder, String snapshot) { this.blobAsyncRawClient = new BlobAsyncRawClient(azureBlobStorageBuilder.build(), snapshot); }
Source:
<code>private void addRow(LineTcpMeasurementEvent event) { if (error) { return; } long timestamp = event.getTimestamp(); Row row = writer.newRow(timestamp); try { for (int i = 0; i < nMeasurementValues; i++) { int columnType = colTypes.getQuick(i); int columnIndex = colIndexMappings.getQuick(i); CairoLineProtoParserSupport.writers.getQuick(columnType).write(row, columnIndex, event.getValue(i)); } row.append(); } catch (BadCastException ignore) { row.cancel(); } <START> writer.commit(); <END> }</code><technical_language>commit() rate configurable avoid committing row. Commit done X rows reached queue empty</technical_language>

Target:
private void addRow(LineTcpMeasurementEvent event) { if (error) { return; } Row row = null; try { long timestamp = event.getTimestamp(); row = writer.newRow(timestamp); for (int i = 0; i < nMeasurementValues; i++) { int columnType = colTypes.getQuick(i); int columnIndex = colIndexMappings.getQuick(i); CairoLineProtoParserSupport.writers.getQuick(columnType).write(row, columnIndex, event.getValue(i)); } row.append(); } catch (NumericException | CairoException | BadCastException ignore) { if (null != row) { row.cancel(); } return; } nUncommitted++; if (nUncommitted > maxUncommittedRows) { commit(); } }
Source:
<code>private List<ProgramState> copyConstraintFromTo(SymbolicValue from, SymbolicValue to, ProgramState programState, BooleanConstraint booleanConstraint) { List<ProgramState> states = new ArrayList<>(); states.add(programState); PMap<Class<? extends Constraint>, Constraint> leftConstraints = programState.getConstraints(from); if (leftConstraints != null) { <START> leftConstraints.forEach((d, c) -> { <END> List<ProgramState> newStates = new ArrayList<>(); for (ProgramState state : states) { if(ObjectConstraint.class.equals(d)) { if(((ObjectConstraint) c).isNull()) { newStates.addAll(to.setConstraint(state, shouldNotInverse().equals(booleanConstraint) ? c : c.inverse())); } else if(shouldNotInverse().equals(booleanConstraint)) { newStates.addAll(to.setConstraint(state, c)); } else { newStates.add(state); } continue; } else if(BooleanConstraint.class.equals(d)) { newStates.addAll(to.setConstraint(state, shouldNotInverse().equals(booleanConstraint) ? c : c.inverse())); continue; } Constraint constraint = shouldNotInverse().equals(booleanConstraint) ? c : c.inverse(); if (constraint == null) { PMap<Class<? extends Constraint>, Constraint> constraints = state.getConstraints(to); if (constraints != null) { newStates.add(state.addConstraints(to, constraints.remove(c.getClass()))); } else { newStates.add(state); } } else { newStates.addAll(to.setConstraint(state, constraint)); } } states.clear(); states.addAll(newStates); }); } return states; }</code><technical_language>![MAJOR](<LINK_1> 'Severity: MAJOR') Reduce this lambda expression number of lines 22 20. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
private List<ProgramState> copyConstraintFromTo(SymbolicValue from, SymbolicValue to, ProgramState programState, BooleanConstraint booleanConstraint) { List<ProgramState> states = new ArrayList<>(); states.add(programState); PMap<Class<? extends Constraint>, Constraint> leftConstraints = programState.getConstraints(from); if (leftConstraints != null) { leftConstraints.forEach((d, c) -> { List<ProgramState> newStates = new ArrayList<>(); Constraint constraint = shouldNotInverse().equals(booleanConstraint) ? c : c.inverse(); states.forEach(state -> { if (constraint == null) { PMap<Class<? extends Constraint>, Constraint> constraints = state.getConstraints(to); if (constraints != null) { newStates.add(state.removeConstraintsOnDomain(to, c.getClass())); } else { newStates.add(state); } } else { if (ObjectConstraint.NULL == constraint && c != constraint) { newStates.add(state); } else { newStates.addAll(to.setConstraint(state, constraint)); } } }); states.clear(); states.addAll(newStates); }); } return states; }
Source:
<code>public static void main(String[] args) { setExceptionHandler(() -> System.exit(1)); Integer containerId = Integer.valueOf(System.getenv(ShellCommandConfig.ENV_CONTAINER_ID())); log.info(String.format("Got container ID: %d", containerId)); String coordinatorUrl = System.getenv(ShellCommandConfig.ENV_COORDINATOR_URL()); log.info(String.format("Got coordinator URL: %s", coordinatorUrl)); int delay = new Random().nextInt(SamzaContainer.DEFAULT_READ_JOBMODEL_DELAY_MS()) + 1; JobModel jobModel = SamzaContainer.readJobModel(coordinatorUrl, delay); Config config = jobModel.getConfig(); JobConfig jobConfig = new JobConfig(config); if (jobConfig.getName().isEmpty()) { throw new SamzaException("can not find the job name"); } String jobName = jobConfig.getName().get(); String jobId = jobConfig.getJobId().getOrElse(ScalaToJavaUtils.defaultValue("1")); MDC.put("containerName", "samza-container-" + containerId); MDC.put("jobName", jobName); MDC.put("jobId", jobId); <START> new LocalContainerRunner(jobModel, containerId).run(null); <END> }</code><technical_language>weird a null parameter here. runFromConfig(config)? simply run()</technical_language>

Target:
public static void main(String[] args) throws Exception { setExceptionHandler(() -> { log.info("Exiting process now."); System.exit(1); }); Integer containerId = Integer.valueOf(System.getenv(ShellCommandConfig.ENV_CONTAINER_ID())); log.info(String.format("Got container ID: %d", containerId)); String coordinatorUrl = System.getenv(ShellCommandConfig.ENV_COORDINATOR_URL()); log.info(String.format("Got coordinator URL: %s", coordinatorUrl)); int delay = new Random().nextInt(SamzaContainer.DEFAULT_READ_JOBMODEL_DELAY_MS()) + 1; JobModel jobModel = SamzaContainer.readJobModel(coordinatorUrl, delay); Config config = jobModel.getConfig(); JobConfig jobConfig = new JobConfig(config); if (jobConfig.getName().isEmpty()) { throw new SamzaException("can not find the job name"); } String jobName = jobConfig.getName().get(); String jobId = jobConfig.getJobId().getOrElse(ScalaToJavaUtils.defaultValue("1")); MDC.put("containerName", "samza-container-" + containerId); MDC.put("jobName", jobName); MDC.put("jobId", jobId); StreamApplication streamApp = TaskFactoryUtil.createStreamApplication(config); new LocalContainerRunner(jobModel, containerId).run(streamApp); }
Source:
<code>private boolean coversTheWholeDiff(ChangePatternInstance instancePattern, Diff diff) { <START> for(Operation diffOperation : diff.getAllOperations()){ <END> boolean foundOp = false; for(Operation instanceOperation : instancePattern.getActions()){ if(diffOperation.toString().equals(instanceOperation.toString())){ foundOp = true; break; } } if(!foundOp) return false; } return true; }</code><technical_language>discussion Github today in person, change this getRootOperations</technical_language>

Target:
private boolean coversTheWholeDiff(ChangePatternInstance instancePattern, Diff diff) { for(Operation diffOperation : diff.getRootOperations()){ boolean foundOp = false; for(Operation instanceOperation : instancePattern.getActions()){ if(diffOperation.equals(instanceOperation)){ foundOp = true; break; } } if(!foundOp) return false; } return true; }
Source:
<code>public String getStackRepositoryJson(Long stackId) { AmbariClient ambariClient = getAmbariClient(stackId); Stack stack = stackService.getById(stackId); Cluster cluster = stack.getCluster(); if (cluster == null) { throw new BadRequestException(String.format("There is no cluster installed on stack '%s'.", stack.getName())); } StackRepoDetails repoDetails = clusterComponentConfigProvider.getStackRepoDetails(cluster.getId()); String stackRepoId = repoDetails.getStack().get(REPO_ID_TAG); String osType = ambariRepositoryVersionService.getOsTypeForStackRepoDetails(repoDetails); if (osType != null && osType.isEmpty()) { LOGGER.info(String.format("The stored HDP repo details (%s) do not contain OS information for stack '%s'.", repoDetails, stack.getName())); return null; } try { String stackRepositoryJson = ambariClient.getLatestStackRepositoryAsJson(cluster.getName(), osType, stackRepoId); if (stackRepositoryJson == null) { throw new BadRequestException(String.format("Stack Repository response coming from Ambari server was null " + "for cluster '%s' and repo url '%s'.", cluster.getName(), stackRepoId)); } return stackRepositoryJson; } catch (Exception e) { if (e instanceof HttpResponseException) { HttpResponseException cast = HttpResponseException.class.cast(e); if (cast.getResponse().getStatus() == HttpStatus.SC_NOT_FOUND) { throw new BadRequestException("The specified osType is wrong. " + cast.getMessage()); <START> } <END> } throw e; } }</code><technical_language>pls. add osType logline,</technical_language>

Target:
public String getStackRepositoryJson(Long stackId) { AmbariClient ambariClient = getAmbariClient(stackId); Stack stack = stackService.getById(stackId); Cluster cluster = stack.getCluster(); if (cluster == null) { throw new BadRequestException(String.format("There is no cluster installed on stack '%s'.", stack.getName())); } StackRepoDetails repoDetails = clusterComponentConfigProvider.getStackRepoDetails(cluster.getId()); String stackRepoId = repoDetails.getStack().get(REPO_ID_TAG); String osType = ambariRepositoryVersionService.getOsTypeForStackRepoDetails(repoDetails); if (osType != null && osType.isEmpty()) { LOGGER.info(String.format("The stored HDP repo details (%s) do not contain OS information for stack '%s'.", repoDetails, stack.getName())); return null; } try { String stackRepositoryJson = ambariClient.getLatestStackRepositoryAsJson(cluster.getName(), osType, stackRepoId); if (stackRepositoryJson == null) { throw new BadRequestException(String.format("Stack Repository response coming from Ambari server was null " + "for cluster '%s' and repo url '%s'.", cluster.getName(), stackRepoId)); } return stackRepositoryJson; } catch (Exception e) { LOGGER.error("Failed to get latest stack repository. osType: '{}'.", osType, e); if (e instanceof HttpResponseException) { HttpResponseException cast = HttpResponseException.class.cast(e); if (cast.getResponse().getStatus() == HttpStatus.SC_NOT_FOUND) { throw new BadRequestException("The specified osType is wrong. " + cast.getMessage()); } } throw e; } }
Source:
<code>void allocate(File destinationFile, long sizeInBytes) throws IOException { long startTime = System.currentTimeMillis(); try { if (enablePooling && poolState != PoolState.INITIALIZED) { logger.info("Allocating segment of size to before pool is fully initialized", sizeInBytes, destinationFile.getAbsolutePath()); metrics.diskSpaceAllocatorAllocBeforeInitCount.inc(); } else { logger.debug("Allocating segment of size to {}", sizeInBytes, destinationFile.getAbsolutePath()); } if (destinationFile.exists()) { throw new IOException("Destination file already exists: " + destinationFile.getAbsolutePath()); } File reserveFile = null; if (poolState != PoolState.NOT_INVENTORIED) { reserveFile = reserveFiles.remove(sizeInBytes); } if (reserveFile == null) { if (enablePooling) { logger.info( "Segment of size not found in pool; attempting to create a new preallocated file; poolState: {}", sizeInBytes, poolState); metrics.diskSpaceAllocatorSegmentNotFoundCount.inc(); } Utils.preAllocateFileIfNeeded(destinationFile, sizeInBytes); } else { try { Files.move(reserveFile.toPath(), destinationFile.toPath()); } catch (Exception e) { reserveFiles.add(sizeInBytes, reserveFile); throw e; } } } finally { long elapsedTime = System.currentTimeMillis() - startTime; logger.debug("allocate took ms", elapsedTime); <START> metrics.diskSpaceAllocatorAllocTimeMs.update(elapsedTime - startTime); <END> } }</code><technical_language>elapsedTime is diff</technical_language>

Target:
void allocate(File destinationFile, long sizeInBytes) throws IOException { long startTime = System.currentTimeMillis(); try { if (enablePooling && poolState != PoolState.INITIALIZED) { logger.info("Allocating segment of size to before pool is fully initialized", sizeInBytes, destinationFile.getAbsolutePath()); metrics.diskSpaceAllocatorAllocBeforeInitCount.inc(); } else { logger.debug("Allocating segment of size to {}", sizeInBytes, destinationFile.getAbsolutePath()); } if (destinationFile.exists()) { throw new IOException("Destination file already exists: " + destinationFile.getAbsolutePath()); } File reserveFile = null; if (poolState != PoolState.NOT_INVENTORIED) { reserveFile = reserveFiles.remove(sizeInBytes); } if (reserveFile == null) { if (enablePooling) { logger.info( "Segment of size not found in pool; attempting to create a new preallocated file; poolState: {}", sizeInBytes, poolState); metrics.diskSpaceAllocatorSegmentNotFoundCount.inc(); } Utils.preAllocateFileIfNeeded(destinationFile, sizeInBytes); } else { try { Files.move(reserveFile.toPath(), destinationFile.toPath()); } catch (Exception e) { reserveFiles.add(sizeInBytes, reserveFile); throw e; } } } finally { long elapsedTime = System.currentTimeMillis() - startTime; logger.debug("allocate took ms", elapsedTime); metrics.diskSpaceAllocatorAllocTimeMs.update(elapsedTime); } }
Source:
<code>public void process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager/Processor: process trace=" + trace + " node=" + node + " direction=" + direction + " headers=" + headers + " values=" + values); if (values != null) { for (int i = 0; i < values.length; i++) { log.finest(" [value " + i + "] = " + values[i]); } } } if (processor.getNodeType() == node.getType() && processor.getDirection() == direction) { if (uriFilter != null && !uriFilter.test(node.getUri())) { return; } if (processor.getOperation() != null && !processor.getOperation().trim().isEmpty() && !processor.getOperation().equals(node.getOperation())) { return; } Set<Property> faults = node.getProperties(Constants.PROP_FAULT); if (faultFilter == null && !faults.isEmpty()) { return; } if (faultFilter != null && faults.stream().filter(f -> faultFilter.test(f.getValue())).count() == 0) { return; } if (issues != null) { <START> node.getProperties().add(new Property(Constants.PROP_FAULT, issues)); <END> } if (predicateHandler != null) { try { if (!predicateHandler.test(trace, node, direction, headers, values)) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager/Processor: process - predicate returned false"); } return; } } catch (Throwable t) { ProcessorIssue pi = new ProcessorIssue(); pi.setProcessor(processor.getDescription()); pi.setSeverity(Severity.Error); pi.setDescription(t.getMessage()); node.getProperties().add(new Property(Constants.PROP_FAULT, pi)); return; } } for (int i = 0; i < actions.size(); i++) { actions.get(i).process(trace, node, direction, headers, values); } } }</code><technical_language>removed - reported a property. For add local logging</technical_language>

Target:
public void process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager/Processor: process trace=" + trace + " node=" + node + " direction=" + direction + " headers=" + headers + " values=" + values); if (values != null) { for (int i = 0; i < values.length; i++) { log.finest(" [value " + i + "] = " + values[i]); } } } if (processor.getNodeType() == node.getType() && processor.getDirection() == direction) { if (uriFilter != null && !uriFilter.test(node.getUri())) { return; } if (processor.getOperation() != null && !processor.getOperation().trim().isEmpty() && !processor.getOperation().equals(node.getOperation())) { return; } Set<Property> faults = node.getProperties(Constants.PROP_FAULT); if (faultFilter == null && !faults.isEmpty()) { return; } if (faultFilter != null && faults.stream().filter(f -> faultFilter.test(f.getValue())).count() == 0) { return; } if (predicateHandler != null) { try { if (!predicateHandler.test(trace, node, direction, headers, values)) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager/Processor: process - predicate returned false"); } return; } } catch (Throwable t) { log.severe(processor.getDescription(), t); return; } } for (int i = 0; i < actions.size(); i++) { actions.get(i).process(trace, node, direction, headers, values); } } }