auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void run() { try { LOG.debug(String.format("[consumer tag: %s] Starting message processing: %s", consumerTag, body)); msgHandler.onMessage(body, ackHandler); LOG.debug(String.format("[consumer tag: %s] Message has been processed: %s", consumerTag, body)); <START> ackHandler.autoConfirm(); <END> } catch (Exception e) { LOG.error(String.format("[consumer tag: %s] Failed to process message %s", consumerTag, body), e); ackHandler.autoReject(); } }</code><technical_language>I add logging invocation of autoConfirm autoReject evidence in logs calls completed succesfully</technical_language>

Target:
public void run() { try { LOG.debug(String.format("[consumer tag: %s] Starting message processing: %s", consumerTag, body)); msgHandler.onMessage(body, ackHandler); LOG.debug(String.format("[consumer tag: %s] Message has been processed: %s", consumerTag, body)); ackHandler.autoConfirm(); } catch (Exception e) { LOG.error(String.format("[consumer tag: %s] Failed to process message %s", consumerTag, body), e); ackHandler.autoRetry(); } }
Source:
<code>public JSONArray mergeJsonArrays(JSONArray currentArray, JSONArray arrayToAdd) { String currentJsonString = currentArray.toString(); String toAddJsonString = arrayToAdd.toString(); StringBuilder sb = new StringBuilder(); if (!currentJsonString.equals("[]")) { <START> sb.append(currentJsonString.trim()); <END> sb.replace(currentJsonString.length() - 1, currentJsonString.length(), ","); sb.append(toAddJsonString.replaceFirst("\\[", "")); } else { sb.append(toAddJsonString); } JSONArray toReturn; try { toReturn = new JSONArray(sb.toString()); } catch (JSONException ex) { toReturn = currentArray; throw new OseeCoreException(ex); } return toReturn; }</code><technical_language>this is right if currentJsonString.trim() is currentJsonString. lengths screwed up. I need change currentJsonString.length() currentJsonString.trim().length() stroe trimmed string that</technical_language>

Target:
public JSONArray mergeJsonArrays(JSONArray currentArray, JSONArray arrayToAdd) { String currentJsonString = currentArray.toString().trim(); String toAddJsonString = arrayToAdd.toString(); StringBuilder sb = new StringBuilder(); if (!currentJsonString.equals("[]")) { sb.append(currentJsonString); sb.replace(currentJsonString.length() - 1, currentJsonString.length(), ","); sb.append(toAddJsonString.replaceFirst("\\[", "")); } else { sb.append(toAddJsonString); } JSONArray toReturn; try { toReturn = new JSONArray(sb.toString()); } catch (JSONException ex) { toReturn = currentArray; throw new OseeCoreException(ex); } return toReturn; }
Source:
<code>public static Iterable<String> readLocalFile(final String fileName) throws IOException { <START> return Files.readAllLines(Paths.get(DOWNLOAD_BASE_NAME + fileName), Charset.defaultCharset()); <END> }</code><technical_language>defaultcharset, force UTF-8</technical_language>

Target:
public static Iterable<String> readLocalFile(final String fileName) throws IOException { return Files.readAllLines(Paths.get(DOWNLOAD_BASE_NAME + fileName), Charset.forName("utf-8")); }
Source:
<code>public void testGetIsDirtySupplierWhenItIsDirty() { final GuidedDecisionTableView.Presenter presenter = mock(GuidedDecisionTableView.Presenter.class); final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); final Set<GuidedDecisionTableView.Presenter> availableDecisionTables = asSet(presenter); final int currentHash = 456; final int originalHash = 123; doReturn(currentHash).when(this.presenter).originalHashCode(presenter); <START> doReturn(originalHash).when(this.presenter).currentHashCode(presenter); <END> doReturn(model).when(presenter).getModel(); doReturn(availableDecisionTables).when(this.presenter).getAvailableDecisionTables(); final boolean isDirty = this.presenter.getIsDirtySupplier().get(); assertTrue(isDirty); }</code><technical_language>I lines below. java doReturn(currentHash).when(this.presenter).currentHashCode(presenter); doReturn(originalHash).when(this.presenter).originalHashCode(presenter);</technical_language>

Target:
public void testGetIsDirtySupplierWhenItIsDirty() { final GuidedDecisionTableView.Presenter presenter = mock(GuidedDecisionTableView.Presenter.class); final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); final int currentHash = 456; final int originalHash = 123; doReturn(currentHash).when(this.presenter).currentHashCode(presenter); doReturn(originalHash).when(this.presenter).originalHashCode(presenter); doReturn(model).when(presenter).getModel(); doReturn(presenter).when(this.presenter).getActiveDocument(); final boolean isDirty = this.presenter.getIsDirtySupplier().get(); assertTrue(isDirty); }
Source:
<code>public String getReplicationId() { HashMap<String, String> dict = new HashMap<String, String>(); dict.put("source", this.sourceDb.getIdentifier()); dict.put("target", this.targetDb.getDbCore().getPublicIdentifier()); if(filter != null) { dict.put("filter", this.filter.toQueryString()); } <START> return new String(new Hex().encode(Misc.getSha1(new ByteArrayInputStream(JSONUtils.serializeAsBytes(dict))))); <END> }</code><technical_language>nice if this a intermediary variables</technical_language>

Target:
public String getReplicationId() { HashMap<String, String> dict = new HashMap<String, String>(); dict.put("source", this.sourceDb.getIdentifier()); dict.put("target", this.targetDb.getIdentifier()); if(filter != null) { dict.put("filter", this.filter.toQueryString()); } byte[] sha1Bytes = Misc.getSha1(new ByteArrayInputStream(JSONUtils.serializeAsBytes(dict))); byte[] sha1Hex = new Hex().encode(sha1Bytes); return new String(sha1Hex); }
Source:
<code><START> public static <END> Set<String> mergeIgnored(Set<String> oldIgnoredPaths, Collection<String> changedPaths, Set<String> newIgnoredPaths) { Set<String> merged = new HashSet<String>(); for (String oldIgnoredPath : oldIgnoredPaths) { boolean changed = isAnyPrefixOf(oldIgnoredPath, changedPaths); if (!changed) { merged.add(oldIgnoredPath); } } merged.addAll(newIgnoredPaths); return merged; }</code><technical_language>unnecessary declare this method public, if package visible test in package</technical_language>

Target:
protected static Set<String> mergeIgnored(Set<String> oldIgnoredPaths, Collection<String> changedPaths, Set<String> newIgnoredPaths) { Set<String> merged = new HashSet<String>(); for (String oldIgnoredPath : oldIgnoredPaths) { boolean changed = isAnyPrefixOf(oldIgnoredPath, changedPaths); if (!changed) { merged.add(oldIgnoredPath); } } merged.addAll(newIgnoredPaths); return merged; }
Source:
<code>protected void onResume() { super.onResume(); if (AppLockManager.getInstance().getAppLock().isPasswordLocked()) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); } else { getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE); <START> } <END> }</code><technical_language>This if/else snippet is repeated times code. do creating a method in DisplayUtils code in a single place</technical_language>

Target:
protected void onResume() { super.onResume(); disableScreenshotsIfLocked(this); }
Source:
<code>protected void drawableStateChanged() { super.drawableStateChanged(); int alpha = isEnabled() ? 0xFF : (int) (0xFF * mDisabledAlpha); LayerDrawable ld = (LayerDrawable) <START> getProgressDrawable().mutate(); <END> Drawable progressDrawable = ld.findDrawableByLayerId(android.R.id.progress); Drawable backgroundDrawable = ld.findDrawableByLayerId(android.R.id.background); setDrawableColor(mThumb, mProgressAndThumbColor, alpha); setDrawableColor(progressDrawable, mProgressAndThumbColor, alpha); setDrawableColor(backgroundDrawable, mBackgroundColor, alpha); }</code><technical_language>mutate is needed</technical_language>

Target:
protected void drawableStateChanged() { super.drawableStateChanged(); int alpha = isEnabled() ? 0xFF : (int) (0xFF * mDisabledAlpha); mThumb.setColorFilter(mProgressAndThumbColor, PorterDuff.Mode.SRC_IN); mThumb.setAlpha(alpha); LayerDrawable ld = (LayerDrawable) getProgressDrawable(); Drawable progressDrawable = ld.findDrawableByLayerId(android.R.id.progress); Drawable backgroundDrawable = ld.findDrawableByLayerId(android.R.id.background); progressDrawable.setColorFilter(mProgressAndThumbColor, PorterDuff.Mode.SRC_IN); backgroundDrawable.setColorFilter(mBackgroundColor, PorterDuff.Mode.SRC_IN); ld.setAlpha(alpha); }
Source:
<code>public void upgrade() throws IOException, SQLException { <START> upgrade("liquibase-update-to-latest.xml"); <END> }</code><technical_language>upgrade method run changesets liquibase-master.xml..</technical_language>

Target:
public void upgrade() throws IOException, SQLException { upgrade("liquibase-master.xml"); }
Source:
<code>protected <R> R readValue(@Nullable Object source, ElasticsearchPersistentProperty property, TypeInformation<R> targetType) { if (source == null) { return null; } Class<?> rawType = targetType.getType(); if (conversions.hasCustomReadTarget(source.getClass(), rawType)) { return (R) conversionService.convert(source, rawType); } else if (source instanceof List) { <START> return readCollectionValue((List) source, property, targetType); <END> } else if (source instanceof Map) { return readMapValue((Map<String, Object>) source, property, targetType); } else if (Enum.class.isAssignableFrom(rawType)) { return (R) Enum.valueOf((Class<Enum>) rawType, source.toString()); } return (R) readSimpleValue(source, targetType); }</code><technical_language>code is source-specific target-type specific. Do want move this readSimpleValue( )</technical_language>

Target:
protected <R> R readValue(@Nullable Object source, ElasticsearchPersistentProperty property, TypeInformation<R> targetType) { if (source == null) { return null; } Class<R> rawType = targetType.getType(); if (conversions.hasCustomReadTarget(source.getClass(), rawType)) { return rawType.cast(conversionService.convert(source, rawType)); } else if (source instanceof List) { return readCollectionValue((List) source, property, targetType); } else if (source instanceof Map) { return readMapValue((Map<String, Object>) source, property, targetType); } return (R) readSimpleValue(source, targetType); }
Source:
<code>private ConfigKey(List<String> names) { <START> Preconditions.checkArgument(names.size() >= 1, "Number of names must be larger than 1"); <END> for (String key : names) { Preconditions.checkArgument(VALID_NAME.matcher(key).matches(), "Invalid name in keys"); } this.names = ImmutableList.copyOf(names); }</code><technical_language>Is this supposed check if names is empty if more 1 element</technical_language>

Target:
private ConfigKey(List<String> names) { Preconditions.checkArgument(!names.isEmpty(), "Names must not be empty"); for (String key : names) { Preconditions.checkArgument(VALID_NAME.matcher(key).matches(), "Invalid name"); } this.names = ImmutableList.copyOf(names); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.puzzle); setTitle(R.string.puzzle_view_name); <START> User user = ; <END> String ingredient = user.getIngredient(); ParseQuery<Puzzle> query = Puzzle.getQuery(); query.whereEqualTo("ingredient", ingredient); final Puzzle puzzle; query.findInBackground(new FindCallback<Puzzle>(){ @Override public void done(List<Puzzle> potentialPuzzles, ParseException e) { if (e == null && potentialPuzzles.size() > 0) { Random randomizer = new Random(); Puzzle puzzle = potentialPuzzles.get(randomizer.nextInt(potentialPuzzles.size())); } else { } } }); TextView question = (TextView) findViewById(R.id.question); question.setText(puzzle.getString("riddle")); correctAnswer = puzzle.getString("answer"); chk1 = (CheckBox) findViewById(R.id.chkanswer_1); chk2 = (CheckBox) findViewById(R.id.chkanswer_2); chk3 = (CheckBox) findViewById(R.id.chkanswer_3); chk4 = (CheckBox) findViewById(R.id.chkanswer_4); ArrayList<String> options = puzzle.getOptions(); options.add(correctAnswer); List<CheckBox> checkBoxes = new ArrayList<CheckBox>(Arrays.asList(chk1, chk2, chk3, chk4)); List<Integer> ordering = generateRandomOrder(); for (int i = 0; i < totalNumMultChoice; i++){ checkBoxes.get(i).setText(options.get(ordering.get(i))); } addListenerOnMainMenuButton(); addListenerOnChkAnswer_1(); addListenerOnChkAnswer_2(); addListenerOnChkAnswer_3(); addListenerOnChkAnswer_4(); }</code><technical_language>Syntax error</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.puzzle); setTitle(R.string.puzzle_view_name); String ingredient = ((User) User.getCurrentUser()).getIngredient(); ParseQuery<Puzzle> query = Puzzle.getQuery(); query.whereEqualTo("ingredient", ingredient); query.findInBackground(new FindCallback<Puzzle>(){ @Override public void done(List<Puzzle> potentialPuzzles, ParseException e) { if (e == null && potentialPuzzles.size() > 0) { Random randomizer = new Random(); Puzzle puzzle = potentialPuzzles.get(randomizer.nextInt(potentialPuzzles.size())); TextView question = (TextView) findViewById(R.id.question); question.setText(puzzle.getString("riddle")); correctAnswer = puzzle.getString("answer"); chk1 = (CheckBox) findViewById(R.id.chkanswer_1); chk2 = (CheckBox) findViewById(R.id.chkanswer_2); chk3 = (CheckBox) findViewById(R.id.chkanswer_3); chk4 = (CheckBox) findViewById(R.id.chkanswer_4); ArrayList<String> options = puzzle.getOptions(); options.add(correctAnswer); List<CheckBox> checkBoxes = new ArrayList<CheckBox>(Arrays.asList(chk1, chk2, chk3, chk4)); List<Integer> ordering = generateRandomOrder(); for (int i = 0; i < totalNumMultChoice; i++){ checkBoxes.get(i).setText(options.get(ordering.get(i))); } addListenerOnMainMenuButton(); addListenerOnChkAnswer_1(); addListenerOnChkAnswer_2(); addListenerOnChkAnswer_3(); addListenerOnChkAnswer_4(); } else { } } }); }
Source:
<code>public int countObjects(@Nonnull String query) { try (Stream<Path> stream = Files.list(file.toPath())) { return Math.toIntExact(stream.map(Path::toFile) .filter(currentFile -> currentFile.getName().contains(query) && currentFile.isFile() && !currentFile.getName().startsWith("__")) .count()); } catch (IOException e) { <START> throw Exceptions.createHandled().error(e).handle(); <END> } }</code><technical_language>this handled logged</technical_language>

Target:
public int countObjects(@Nonnull String query) { try (Stream<Path> stream = Files.list(file.toPath())) { return Math.toIntExact(stream.map(Path::toFile) .filter(currentFile -> currentFile.getName().contains(query) && currentFile.isFile() && !currentFile.getName().startsWith("__")) .count()); } catch (IOException e) { throw Exceptions.handle(e); } }
Source:
<code>public String toString() { return "ServerConfig{" + "instanceName='" + instanceName + '\'' + ", hostName='" + hostName + '\'' + ", port=" + port + ", datacenterName='" + datacenterName + '\'' + ", sslPort=" + sslPort + ", http2Port=" + http2Port + ", rackId='" + rackId + '\'' + ", xid=" + xid + ", sealedReplicas=" + sealedReplicas + ", stoppedReplicas=" <START> + stoppedReplicas + ", diskConfigs=" + diskConfigs + '}'; <END> }</code><technical_language>minor: add disabledReplicas well</technical_language>

Target:
public String toString() { return "DataNodeConfig{" + "instanceName='" + instanceName + '\'' + ", hostName='" + hostName + '\'' + ", port=" + port + ", datacenterName='" + datacenterName + '\'' + ", sslPort=" + sslPort + ", http2Port=" + http2Port + ", rackId='" + rackId + '\'' + ", xid=" + xid + ", sealedReplicas=" + sealedReplicas + ", stoppedReplicas=" + stoppedReplicas + ", disabledReplicas=" + disabledReplicas + ", diskConfigs=" + diskConfigs + '}'; }
Source:
<code>public void testDiagnosticRedrawingCalls() throws CoreException { IFile file = TestUtils.createUniqueTestFile(project, "Diagnostic Other Text\nDiagnostic Other Text"); final Range range1 = new Range(new Position(0, 0), new Position(0, 10)); final Range range2 = new Range(new Position(1, 0), new Position(1, 10)); final Diagnostic pos1Info1 = createDiagnostic("1", "message1", range1, DiagnosticSeverity.Error, "source1"); final Diagnostic pos1Info2 = createDiagnostic("2", "message2", range1, DiagnosticSeverity.Error, "source2"); final Diagnostic pos2Info2 = createDiagnostic("2", "message2", range2, DiagnosticSeverity.Error, "source2"); <START> confirmResourceChanges(file, pos1Info1, 2); <END> confirmResourceChanges(file, pos1Info2, 1); confirmResourceChanges(file, pos2Info2, 1); confirmResourceChanges(file, pos1Info1, 1); confirmResourceChanges(file, pos1Info1, 0); }</code><technical_language>2 changes here</technical_language>

Target:
public void testDiagnosticRedrawingCalls() throws CoreException { IFile file = TestUtils.createUniqueTestFile(project, "Diagnostic Other Text\nDiagnostic Other Text"); final Range range1 = new Range(new Position(0, 0), new Position(0, 10)); final Range range2 = new Range(new Position(1, 0), new Position(1, 10)); final Diagnostic pos1Info1 = createDiagnostic("1", "message1", range1, DiagnosticSeverity.Error, "source1"); final Diagnostic pos1Info2 = createDiagnostic("2", "message2", range1, DiagnosticSeverity.Error, "source2"); final Diagnostic pos2Info2 = createDiagnostic("2", "message2", range2, DiagnosticSeverity.Error, "source2"); confirmResourceChanges(file, pos1Info1, 1); confirmResourceChanges(file, pos1Info2, 1); confirmResourceChanges(file, pos2Info2, 1); confirmResourceChanges(file, pos1Info1, 1); confirmResourceChanges(file, pos1Info1, 0); }
Source:
<code>public double accumulate() { <START> return result.setScale(Matrices.ROUND_FACTOR, RoundingMode.CEILING).doubleValue(); <END> }</code><technical_language>Vectors.ROUND_FACTOR instead. This is same, for vectors vector-specific data. For example, decide provide a separete for Vectors.ROUND_FACTOR in future</technical_language>

Target:
public double accumulate() { return result.setScale(Vectors.ROUND_FACTOR, RoundingMode.CEILING).doubleValue(); }
Source:
<code>private void initNamesList(ILayer layer) { DataSource ds = layer.getDataSource(); Type geomType = null; try { geomType = ds.getMetadata().getFieldType(ds.getSpatialFieldIndex()); } catch (DriverException e) { <START> e.printStackTrace(); END> } int simpleGeomType = SimpleGeometryType.getSimpleType(geomType); ArrayList<String> typeNames = new ArrayList<String>(); final int lineOrPolygon = SimpleGeometryType.LINE | SimpleGeometryType.POLYGON; if ((simpleGeomType & SimpleGeometryType.ALL) != 0) { typeNames.add(UniqueSymbolPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(UniqueSymbolLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(UniqueSymbolArea.NAME); } typeNames.add(RecodedPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(RecodedLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(RecodedArea.NAME); } typeNames.add(ProportionalPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(ProportionalLine.NAME); } typeNames.add(CategorizedPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(CategorizedLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(CategorizedArea.NAME); } } names = typeNames.toArray(new String[typeNames.size()]); }</code><technical_language>need a logger a printStackTrace(). Note if try block fails for reason, getSimpleType throw IllegalArgumentException. is unchecked exception, caught too..</technical_language>

Target:
private void initNamesList(ILayer layer) { DataSource ds = layer.getDataSource(); Type geomType = null; try { geomType = ds.getMetadata().getFieldType(ds.getSpatialFieldIndex()); } catch (DriverException e) { LOGGER.warn("Could not determine the specific geometry type for " + "this layer."); } int simpleGeomType = (geomType == null) ? SimpleGeometryType.ALL : SimpleGeometryType.getSimpleType(geomType); ArrayList<String> typeNames = new ArrayList<String>(); final int lineOrPolygon = SimpleGeometryType.LINE| SimpleGeometryType.POLYGON; if ((simpleGeomType & SimpleGeometryType.ALL) != 0) { typeNames.add(UniqueSymbolPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(UniqueSymbolLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(UniqueSymbolArea.NAME); } typeNames.add(RecodedPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(RecodedLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(RecodedArea.NAME); } typeNames.add(ProportionalPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(ProportionalLine.NAME); } typeNames.add(CategorizedPoint.NAME); if ((simpleGeomType & lineOrPolygon) != 0) { typeNames.add(CategorizedLine.NAME); } if ((simpleGeomType & SimpleGeometryType.POLYGON) != 0) { typeNames.add(CategorizedArea.NAME); } } names = typeNames.toArray(new String[typeNames.size()]); }
Source:
<code>public ImportCertificateOptions(String name, byte[] certificate) { <START> Objects.requireNonNull(certificate, "The certificate value parameter cannot be null."); <END> this.name = name; this.certificate = CoreUtils.clone(certificate); }</code><technical_language>certificate ~~value~~ parameter null</technical_language>

Target:
public ImportCertificateOptions(String name, byte[] certificate) { Objects.requireNonNull(certificate, "The certificate parameter cannot be null."); this.name = name; this.certificate = CoreUtils.clone(certificate); }
Source:
<code>public void process() { PerformanceMonitor.startActivity("Render World (Reflection)"); sceneReflected.bind(); <START> OpenGLUtils.setViewportToSizeOf(sceneReflected); <END> glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GL11.glCullFace(GL11.GL_FRONT); playerCamera.setReflected(true); playerCamera.lookThroughNormalized(); backdropRenderer.render(playerCamera); playerCamera.lookThrough(); if (renderingConfig.isReflectiveWater()) { chunkShader.activateFeature(ShaderProgramFeature.FEATURE_USE_FORWARD_LIGHTING); worldRenderer.renderChunks(renderQueues.chunksOpaqueReflection, ChunkMesh.RenderPhase.OPAQUE, playerCamera, WorldRendererImpl.ChunkRenderMode.REFLECTION); chunkShader.deactivateFeature(ShaderProgramFeature.FEATURE_USE_FORWARD_LIGHTING); } playerCamera.setReflected(false); GL11.glCullFace(GL11.GL_BACK); bindDisplay(); OpenGLUtils.setViewportToSizeOf(sceneOpaque); PerformanceMonitor.endActivity(); }</code><technical_language>remove "OpenGLUtils."</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("Render World (Reflection)"); FBO sceneReflected = frameBuffersManager.getFBO("sceneReflected"); FBO sceneOpaque = frameBuffersManager.getFBO("sceneOpaque"); sceneReflected.bind(); setViewportToSizeOf(sceneReflected); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GL11.glCullFace(GL11.GL_FRONT); playerCamera.setReflected(true); playerCamera.lookThroughNormalized(); backdropRenderer.render(playerCamera); playerCamera.lookThrough(); if (renderingConfig.isReflectiveWater()) { chunkShader.activateFeature(ShaderProgramFeature.FEATURE_USE_FORWARD_LIGHTING); worldRenderer.renderChunks(renderQueues.chunksOpaqueReflection, ChunkMesh.RenderPhase.OPAQUE, playerCamera, WorldRendererImpl.ChunkRenderMode.REFLECTION); chunkShader.deactivateFeature(ShaderProgramFeature.FEATURE_USE_FORWARD_LIGHTING); } playerCamera.setReflected(false); GL11.glCullFace(GL11.GL_BACK); bindDisplay(); setViewportToSizeOf(sceneOpaque); PerformanceMonitor.endActivity(); }
Source:
<code>public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateEscalationEvent emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_INCOME_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, HAS_OUTGOING_EDGE); assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); <START> assertEscalationEventExecutionSet(emptyEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, ""); <END> assertDataIOSet(emptyEvent.getDataIOSet(), EMPTY_VALUE); }</code><technical_language>suggestion assertEscalationEventExecutionSet(emptyEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, EMPTY_VALUE);</technical_language>

Target:
public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateEscalationEvent emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_INCOME_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, HAS_OUTGOING_EDGE); assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertEscalationEventExecutionSet(emptyEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, EMPTY_VALUE); assertDataIOSet(emptyEvent.getDataIOSet(), EMPTY_VALUE); }
Source:
<code><START> public GetMainSearchRequest(StructField reqArrayField) { <END> StructType reqType = (StructType)((ArrayType)reqArrayField.dataType()).elementType(); indicesIdx = reqType.fieldIndex("indices"); queryTypeIdx = reqType.fieldIndex("querytype"); UDF2<String, Row[], Row> udfMethod = this::getMainSearchReq; this.userDefinedFunction = udf(udfMethod, reqType); }</code><technical_language>avoid inspecting schema? able provide a statically usable UDF? Reading doc access indicesData String type = row.getAs("querytype") row.getList(row.fieldIndex("indices"))? for return I checked return Row UDF kind of struct return</technical_language>

Target:
public GetMainSearchRequest(StructField reqArrayField) { reqType = (StructType)((ArrayType)reqArrayField.dataType()).elementType(); indicesIdx = reqType.fieldIndex("indices"); queryTypeIdx = reqType.fieldIndex("querytype"); }
Source:
<code>public Map<String, ResourceAssignment> getBaselineAssignment() { <START> return _baselineAssignment; <END> }</code><technical_language>Safer ensure return empty map if _baselineAssignment is null. I is current code. safe</technical_language>

Target:
public Map<String, ResourceAssignment> getBaselineAssignment() { return _baselineAssignment == null || _baselineAssignment.isEmpty() ? Collections.emptyMap() : _baselineAssignment; }
Source:
<code>protected String formatValue(Object value) { if ( value instanceof Timestamp ) { <START> Time time = new java.sql.Time(((Timestamp) value).getTime()); <END> String timeAsStr = String.valueOf(time); return objectWithPrecisionToString(timeAsStr, (Timestamp) value, this.columnLength); } else { return String.valueOf((Time) value); } }</code><technical_language>need new java.sql.Time -- new Time work imported</technical_language>

Target:
protected String formatValue(Object value) { if ( value instanceof Timestamp ) { Time time = new Time(((Timestamp) value).getTime()); String timeAsStr = String.valueOf(time); return objectWithPrecisionToString(timeAsStr, (Timestamp) value, this.columnLength); } else { return String.valueOf((Time) value); } }
Source:
<code>public VertexQuery queryVertex(Graph graph, Vertex vertex, String queryString, Authorizations authorizations) { return new ElasticSearchSearchVertexQuery( getClient(), getConfig().getIndicesToQuery(), graph, vertex, queryString, getAllPropertyDefinitions(), getConfig().getScoringStrategy(), <START> getConfig().getNameSubstitutionStrategy(), <END> authorizations); }</code><technical_language>this a field create time</technical_language>

Target:
public VertexQuery queryVertex(Graph graph, Vertex vertex, String queryString, Authorizations authorizations) { return new ElasticSearchSearchVertexQuery( getClient(), getConfig().getIndicesToQuery(), graph, vertex, queryString, getAllPropertyDefinitions(), getConfig().getScoringStrategy(), this.nameSubstitutionStrategy, authorizations); }
Source:
<code><START> SecurityDomain(final Map<String, SecurityRealm> realmMap, final String defaultRealmName, final NameRewriter[] preRealmRewriters, final RealmMapper realmMapper, final NameRewriter[] postRealmRewriters, RoleMapper roleMapper, Map<String, RoleMapper> realmRoleMappers) { <END> assert realmMap.containsKey(defaultRealmName); this.realmMap = realmMap; this.defaultRealmName = defaultRealmName; this.preRealmRewriters = preRealmRewriters; this.realmMapper = realmMapper; this.postRealmRewriters = postRealmRewriters; this.roleMapper = roleMapper == null ? RoleMapper.DEFAULT_ROLE_MAPPER : roleMapper; this.realmRoleMappers = realmRoleMappers; anonymousAllowed = false; }</code><technical_language>discussed, pass builder in constructor</technical_language>

Target:
SecurityDomain(final Map<String, SecurityRealm> realmMap, final String defaultRealmName, final NameRewriter[] preRealmRewriters, final RealmMapper realmMapper, final NameRewriter[] postRealmRewriters, RoleMapper roleMapper, Map<String, RoleMapper> realmRoleMappers) { assert realmMap.containsKey(defaultRealmName); this.realmMap = realmMap; this.defaultRealmName = defaultRealmName; this.preRealmRewriters = preRealmRewriters; this.realmMapper = realmMapper; this.postRealmRewriters = postRealmRewriters; this.roleMapper = roleMapper == null ? RoleMapper.IDENTITY_ROLE_MAPPER : roleMapper; this.realmRoleMappers = realmRoleMappers; anonymousAllowed = false; }
Source:
<code>public ChunkMeshBatch(World world, int baseX, int baseY, int baseZ) { super(new Point(world, baseX, baseY, baseZ), SIZE); modelMat = MathHelper.translate(new Vector3(baseX * SIZE_X, baseY * SIZE_Y, baseZ * SIZE_Z)); int id = 0; for (int i = baseX; i < baseX + SIZE_X; i++) { for (int j = baseY; j < baseY + SIZE_Y; j++) { for (int k = baseZ; k < baseZ + SIZE_Z; k++) { SpoutSnapshotLock lock = (SpoutSnapshotLock) Spout.getEngine().getScheduler().getSnapshotLock(); lock.coreReadLock("Generate mesh"); Chunk chunk = world.getChunk(i, j, k); meshes[id] = new ChunkMesh(chunk); <START> lock.coreReadUnlock("Generate mesh"); <END> id++; } } } }</code><technical_language>Also, is a snapshot system built SpoutChunk for renderer</technical_language>

Target:
public ChunkMeshBatch(World world, int baseX, int baseY, int baseZ) { super(new Point(world, baseX, baseY, baseZ), SIZE); modelMat = MathHelper.translate(new Vector3(baseX * SIZE_X, baseY * SIZE_Y, baseZ * SIZE_Z)); int id = 0; for (int i = baseX; i < baseX + SIZE_X; i++) { for (int j = baseY; j < baseY + SIZE_Y; j++) { for (int k = baseZ; k < baseZ + SIZE_Z; k++) { Chunk chunk = world.getChunk(i, j, k); meshes[id++] = new ChunkMesh(chunk,this); } } } }
Source:
<code>public void testMaxSizePassed() throws ArrayIndexOutOfBoundsException { <START> try{SizeLimitedVector slv = new SizeLimitedVector(1); slv.add(13); slv.add(14); } catch (ArrayIndexOutOfBoundsException e) { fail("array capacity is passed, capacity was 1, but 2 elements got added"); } <END> }</code><technical_language>point of SizeLimitedVector is append stores X amount</technical_language>

Target:
public void testMaxSizePassed() throws ArrayIndexOutOfBoundsException { SizeLimitedVector slv = new SizeLimitedVector(1); slv.add(13); slv.add(14); assertEquals(slv.get(0), 14); }
Source:
<code>public SpellResult perform(CastContext context) { Entity target = context.getTargetEntity(); if (target == null) { return SpellResult.NO_TARGET; } MageController controller = context.getController(); Mage mage = controller.getRegisteredMage(target); if (mage == null) { return SpellResult.NO_TARGET; } Player player = mage.getPlayer(); if (player == null) { return SpellResult.PLAYER_REQUIRED; } Wand wand = mage.getActiveWand(); MageClass activeClass = mage.getActiveClass(); CasterProperties caster = (wand != null && wand.getManaMax() > 0) ? wand : activeClass; if (caster == null) { caster = mage.getProperties(); } if (caster.getEffectiveManaMax() <= 0) { return SpellResult.NO_TARGET; } double currentMana = caster.getMana(); if (mana < 0 && currentMana <= 0) { return SpellResult.NO_TARGET; } int manaMax = caster.getEffectiveManaMax(); if (!bypassManaMax) { <START> if (mana > 0 && currentMana >= manaMax) { <END> return SpellResult.NO_TARGET; } } if (fillMana) { currentMana = manaMax; } else { currentMana = Math.min(Math.max(0, currentMana + mana), manaMax); } caster.setMana((float)currentMana); if (bypassManaMax && currentMana > manaMax) { caster.setManaMax((int)currentMana); } mage.updateMana(); return SpellResult.CAST; }</code><technical_language>merge if-statements</technical_language>

Target:
public SpellResult perform(CastContext context) { Entity target = context.getTargetEntity(); if (target == null) { return SpellResult.NO_TARGET; } MageController controller = context.getController(); Mage mage = controller.getRegisteredMage(target); if (mage == null) { return SpellResult.NO_TARGET; } Player player = mage.getPlayer(); if (player == null) { return SpellResult.PLAYER_REQUIRED; } Wand wand = mage.getActiveWand(); MageClass activeClass = mage.getActiveClass(); CasterProperties caster = (wand != null && wand.getManaMax() > 0) ? wand : activeClass; if (caster == null) { caster = mage.getProperties(); } if (caster.getEffectiveManaMax() <= 0) { return SpellResult.NO_TARGET; } double currentMana = caster.getMana(); if (mana < 0 && currentMana <= 0) { return SpellResult.NO_TARGET; } int manaMax = caster.getEffectiveManaMax(); if (!bypassManaMax && mana > 0 && currentMana >= manaMax) { return SpellResult.NO_TARGET; } if (fillMana) { currentMana = manaMax; } else { currentMana = Math.min(Math.max(0, currentMana + mana), manaMax); } caster.setMana((float)currentMana); if (bypassManaMax && currentMana > manaMax) { caster.setManaMax((int)currentMana); } mage.updateMana(); return SpellResult.CAST; }
Source:
<code>public FieldValueGeneratorRuntime build() { if(field == null) { <START> throw new IllegalArgumentException("field should always be set."); <END> } if(value == null && script == null) { throw new IllegalArgumentException("Either value or script must exist."); } FieldValueGeneratorRuntime fieldValueGeneratorRuntime = new FieldValueGeneratorRuntime(field); if(value != null) { fieldValueGeneratorRuntime.value = value; } else if(script != null) { fieldValueGeneratorRuntime.groovyScript = new GroovyScript<>(script, new GroovyScriptEngine()); } return fieldValueGeneratorRuntime; }</code><technical_language>please change message to: "field is required"</technical_language>

Target:
public FieldValueGeneratorRuntime build() { if(field == null) { throw new IllegalArgumentException("field is required"); } if(value == null && script == null) { throw new IllegalArgumentException("Either value or script must exist."); } FieldValueGeneratorRuntime fieldValueGeneratorRuntime = new FieldValueGeneratorRuntime(field); if(value != null) { fieldValueGeneratorRuntime.value = value; } else if(script != null) { fieldValueGeneratorRuntime.groovyScript = new GroovyScript<>(script, new GroovyScriptEngine()); } return fieldValueGeneratorRuntime; }
Source:
<code>public void concurrentDeleteTestOnSameBlob() throws Exception { MockId idToDelete = null; for (MockId id : liveKeys) { idToDelete = id; break; <START> } <END> assertNotNull(idToDelete); long logEndOffsetBeforeDelete = store.getLogEndOffsetInBytes(); long indexEndOffsetBeforeDelete = store.getSizeInBytes(); int count = 2; ExecutorService executorService = Executors.newFixedThreadPool(count); try { final MockId id = idToDelete; List<Future<Void>> futures = new ArrayList<>(); for (int i = 0; i < count; i++) { futures.add(executorService.submit(new Callable<Void>() { @Override public Void call() throws Exception { delete(id); return null; } })); } int failedCount = 0; int succeededCount = 0; for (Future<Void> future : futures) { try { future.get(); succeededCount++; } catch (ExecutionException e) { failedCount++; assertTrue(e.getCause() instanceof StoreException); assertEquals(StoreErrorCodes.ID_Deleted, ((StoreException) e.getCause()).getErrorCode()); } } assertEquals(1, succeededCount); assertEquals(count - succeededCount, failedCount); long logEndOffsetAfterDelete = store.getLogEndOffsetInBytes(); long indexEndOffsetAfterDelete = store.getSizeInBytes(); assertEquals((long) DELETE_RECORD_SIZE, logEndOffsetAfterDelete - logEndOffsetBeforeDelete); assertEquals((long) DELETE_RECORD_SIZE, indexEndOffsetAfterDelete - indexEndOffsetBeforeDelete); } finally { executorService.shutdownNow(); } }</code><technical_language>idToDelete = liveKeys.iterator().next();</technical_language>

Target:
public void concurrentDeleteTestOnSameBlob() throws Exception { final MockId idToDelete = put(1, PUT_RECORD_SIZE, Utils.Infinite_Time).get(0); assertNotNull(idToDelete); int count = 2; CountDownLatch latch = new CountDownLatch(count); ((MockBlobStore) store).setOperationBeforeSynchronizationFunc(() -> { latch.countDown(); try { latch.await(); } catch (Exception e) { } }); long logEndOffsetBeforeDelete = store.getLogEndOffsetInBytes(); long indexEndOffsetBeforeDelete = store.getSizeInBytes(); ExecutorService executorService = Executors.newFixedThreadPool(count); try { List<Future<Void>> futures = new ArrayList<>(); for (int i = 0; i < count; i++) { futures.add(executorService.submit(new Callable<Void>() { @Override public Void call() throws Exception { delete(idToDelete); return null; } })); } int failedCount = 0; int succeededCount = 0; for (Future<Void> future : futures) { try { future.get(); succeededCount++; } catch (ExecutionException e) { failedCount++; assertTrue(e.getCause() instanceof StoreException); assertEquals(StoreErrorCodes.ID_Deleted, ((StoreException) e.getCause()).getErrorCode()); } } assertEquals(1, succeededCount); assertEquals(count - 1, failedCount); long logEndOffsetAfterDelete = store.getLogEndOffsetInBytes(); long indexEndOffsetAfterDelete = store.getSizeInBytes(); assertEquals((long) DELETE_RECORD_SIZE, logEndOffsetAfterDelete - logEndOffsetBeforeDelete); assertEquals((long) DELETE_RECORD_SIZE, indexEndOffsetAfterDelete - indexEndOffsetBeforeDelete); } finally { ((MockBlobStore) store).setOperationBeforeSynchronizationFunc(null); executorService.shutdownNow(); } }
Source:
<code>public Alert(int pluginId, int risk, int confidence, String name) { this(pluginId); setRiskConfidence(risk, confidence); <START> setAlert(name); <END> }</code><technical_language>call setName</technical_language>

Target:
public Alert(int pluginId, int risk, int confidence, String name) { this(pluginId); setRiskConfidence(risk, confidence); setName(name); }
Source:
<code>public void testRepeatableConstraint() { <START> <END> Validator validator = TestUtil.getValidatorUnderTest(); Set<ConstraintDescriptor<?>> descriptors = validator.getConstraintsForClass( Movie.class ) .getConstraintsForProperty( "title" ) .getConstraintDescriptors(); assertEquals( descriptors.size(), 2, "There should be two constraints on the title property." ); for ( ConstraintDescriptor<?> descriptor : descriptors ) { assertEquals( descriptor.getAnnotation().annotationType().getName(), Size.class.getName(), "Wrong annotation type." ); } Set<ConstraintViolation<Movie>> constraintViolations = validator.validate( new Movie( "A" ) ); assertCorrectNumberOfViolations( constraintViolations, 1 ); constraintViolations = validator.validate( new Movie( "Title" ) ); assertCorrectNumberOfViolations( constraintViolations, 0 ); constraintViolations = validator.validate( new Movie( "A movie title far too long which does not respect the constraint" ) ); assertCorrectNumberOfViolations( constraintViolations, 1 ); }</code><technical_language>empty line here</technical_language>

Target:
public void testRepeatableConstraint() { Validator validator = TestUtil.getValidatorUnderTest(); Set<ConstraintDescriptor<?>> descriptors = validator.getConstraintsForClass( Movie.class ) .getConstraintsForProperty( "title" ) .getConstraintDescriptors(); assertEquals( descriptors.size(), 2, "There should be two constraints on the title property." ); for ( ConstraintDescriptor<?> descriptor : descriptors ) { assertEquals( descriptor.getAnnotation().annotationType().getName(), Size.class.getName(), "Wrong annotation type." ); } Set<ConstraintViolation<Movie>> constraintViolations = validator.validate( new Movie( "Title" ) ); assertCorrectNumberOfViolations( constraintViolations, 0 ); constraintViolations = validator.validate( new Movie( "A" ) ); assertCorrectNumberOfViolations( constraintViolations, 1 ); constraintViolations = validator.validate( new Movie( "A movie title far too long which does not respect the constraint" ) ); assertCorrectNumberOfViolations( constraintViolations, 1 ); }
Source:
<code>public boolean isCustomRole() { <START> return role.equals(Const.InstructorPermissionRoleNames.INSTRUCTOR_PERMISSION_ROLE_CUSTOM); <END> }</code><technical_language>role null? Reversing more safe. Calling equals() a null role a NPE, reversing return false</technical_language>

Target:
public boolean isCustomRole() { return Const.InstructorPermissionRoleNames.INSTRUCTOR_PERMISSION_ROLE_CUSTOM.equals(role); }
Source:
<code>private PluginFQN parsePluginFQN(String plugin) throws InfrastructureException { String registry; String id; URI registryURI = null; Matcher matcher = PLUGIN_PATTERN.matcher(plugin); if (matcher.matches()) { registry = matcher.group("registry"); id = matcher.group("id"); } else { throw new InfrastructureException(format(INCORRECT_PLUGIN_FORMAT_TEMPLATE, plugin)); } if (!isNullOrEmpty(registry)) { try { registryURI = new URI(registry); } catch (URISyntaxException e) { throw new InfrastructureException( format( <START> "Plugin registry URL '%s' is incorrect. Problematic plugin entry: '%s'", <END> registry, plugin)); } } return new PluginFQN(registryURI, id); }</code><technical_language>invalid instead of incorrect here, suggests issue contacting registry</technical_language>

Target:
public ExtendedPluginFQN parsePluginFQN(String plugin) throws InfrastructureException { String registry; String id; String publisher; String name; String version; URI registryURI = null; Matcher matcher = PLUGIN_PATTERN.matcher(plugin); if (matcher.matches()) { registry = matcher.group("registry"); id = matcher.group("id"); publisher = matcher.group("publisher"); name = matcher.group("name"); version = matcher.group("version"); } else { throw new InfrastructureException(format(INCORRECT_PLUGIN_FORMAT_TEMPLATE, plugin)); } if (!isNullOrEmpty(registry)) { try { registryURI = new URI(registry); } catch (URISyntaxException e) { throw new InfrastructureException( format( "Plugin registry URL '%s' is invalid. Problematic plugin entry: '%s'", registry, plugin)); } } return new ExtendedPluginFQN(registryURI, id, publisher, name, version); }
Source:
<code>public Object evaluate(Object feature) { Object arg0 = getExpression(0).evaluate(feature); Object arg1 = getExpression(1).evaluate(feature); if (arg0 == null || arg1 == null) { return null; } Hints hints0 = new Hints(); <START> arg0 = <END> Converters.convert( arg0, Double.class, hints0); arg1 = Converters.convert(arg1, Double.class, hints0); if (arg0 == null) { throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #0 - expected type double"); } if (arg1 == null) { throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #1 - expected type double"); } return (Math.IEEEremainder((Double) arg0, (Double) arg1)); }</code><technical_language>need pass hints a argument, argument method instead</technical_language>

Target:
public Object evaluate(Object feature) { Object arg0 = getExpression(0).evaluate(feature); Object arg1 = getExpression(1).evaluate(feature); if (arg0 == null || arg1 == null) { return null; } arg0 = Converters.convert( arg0, Double.class, new Hints()); arg1 = Converters.convert(arg1, Double.class, new Hints()); if (arg0 == null) { throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #0 - expected type double"); } if (arg1 == null) { throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #1 - expected type double"); } return (Math.IEEEremainder((Double) arg0, (Double) arg1)); }
Source:
<code>private void commonAddScesimDataGroup(ScenarioSimulationModel.Type type, int scenarioIndex, String scenarioDescription, String expectedLabel) { <START> ; Scenario scenario = new Scenario(); <END> scenario.setDescription(scenarioDescription); ScenarioWithIndex scenarioWithIndex = new ScenarioWithIndex(scenarioIndex, scenario); Map<String, Integer> resultCounter = new HashMap<>(); coverageScenarioListPresenterSpy.addScesimDataGroup(scenarioWithIndex, resultCounter, type); verify(viewsProviderMock, times(1)).getCoverageScenarioListView(); verify(coverageScenarioListViewMock, times(1)).setPresenter(eq(coverageScenarioListPresenterSpy)); verify(coverageScenarioListViewMock, times(1)).setVisible(eq(false)); verify(coverageScenarioListViewMock, times(1)).getScenarioElement(); verify(coverageScenarioListViewMock, times(1)).setItemLabel(eq(expectedLabel)); verify(scenarioElementMock, times(1)).appendChild(isA(HTMLUListElement.class)); }</code><technical_language>Please remove leading ;</technical_language>

Target:
private void commonAddScesimDataGroup(ScenarioSimulationModel.Type type, int scenarioIndex, String scenarioDescription, String expectedLabel) { Scenario scenario = new Scenario(); scenario.setDescription(scenarioDescription); ScenarioWithIndex scenarioWithIndex = new ScenarioWithIndex(scenarioIndex, scenario); Map<String, Integer> resultCounter = new HashMap<>(); coverageScenarioListPresenterSpy.addScesimDataGroup(scenarioWithIndex, resultCounter, type); verify(viewsProviderMock, times(1)).getCoverageScenarioListView(); verify(coverageScenarioListViewMock, times(1)).setPresenter(eq(coverageScenarioListPresenterSpy)); verify(coverageScenarioListViewMock, times(1)).setVisible(eq(false)); verify(coverageScenarioListViewMock, times(1)).getScenarioElement(); verify(coverageScenarioListViewMock, times(1)).setItemLabel(eq(expectedLabel)); verify(scenarioElementMock, times(1)).appendChild(isA(HTMLUListElement.class)); }