auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public MessageProperties toMessageProperties(AMQP.BasicProperties source, Envelope envelope, String charset) { final MessageProperties messageProperties = super.toMessageProperties(source, envelope, charset); <START> final String header = String.valueOf(messageProperties.getHeaders().get(TraceeConstants.HTTP_HEADER_NAME)); <END> if (header != null && !header.isEmpty()) { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (filterConfiguration.shouldProcessContext(IncomingResponse)) { final Map<String, String> parsedContext = transportSerialization.parse(Arrays.asList(header)); backend.putAll(filterConfiguration.filterDeniedParams(parsedContext, IncomingResponse)); } } return messageProperties; }</code><technical_language>if TraceeHeader is present in message String.valueOf(null) is called null throw a NPE</technical_language>

Target:
public MessageProperties toMessageProperties(AMQP.BasicProperties source, Envelope envelope, String charset) { final MessageProperties messageProperties = super.toMessageProperties(source, envelope, charset); final Object headerObject = messageProperties.getHeaders().get(TraceeConstants.JMS_HEADER_NAME); if (headerObject != null) { final String headerString = String.valueOf(headerObject); if (!headerString.isEmpty()) { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (filterConfiguration.shouldProcessContext(TraceeFilterConfiguration.Channel.AsyncProcess)) { final Map<String, String> parsedContext = transportSerialization.parse(Arrays.asList(headerString)); backend.putAll(filterConfiguration.filterDeniedParams(parsedContext, TraceeFilterConfiguration.Channel.AsyncProcess)); } } } return messageProperties; }
Source:
<code>protected String getPath(String query) throws URISyntaxException { URIBuilder uri; uri = new URIBuilder(query); <START> log.debug("Retrieving path from query"); <END> return uri.getPath(); }</code><technical_language>Remove log statement. consolidate logging (more complete log statements)</technical_language>

Target:
protected String getPath(String query) throws URISyntaxException { URIBuilder uri; uri = new URIBuilder(query); return uri.getPath(); }
Source:
<code>public boolean doAction(View view, ViewActionTrigger actionDetail, ViewDetail viewDetail) { FragmentManager fragmentManager = oldFragment.getActivity().getSupportFragmentManager(); <START> fragmentManager.beginTransaction().replace(fragmentContainer, fragment).addToBackStack(null).commit(); <END> return false; }</code><technical_language>This is fine, if need kinds of cases (one add stack change this class a boolean parameter</technical_language>

Target:
public boolean doAction(View view, ViewActionTrigger actionDetail, ViewDetail viewDetail) { FragmentManager fragmentManager = oldFragment.getActivity().getSupportFragmentManager(); if(addToBackStack){ fragmentManager.beginTransaction().replace(fragmentContainer, fragment).addToBackStack(null).commit(); } else{ fragmentManager.beginTransaction().replace(fragmentContainer, fragment).commit(); } return false; }
Source:
<code><START> public PasswordTextInput(Context context, AttributeSet attrs, int defStyle) { <END> super(context, attrs, defStyle); inflate(context, R.layout.password_edit_text, this); editText = (EditText) findViewById(R.id.password_edit_text_input); passwordShowButton = findViewById(R.id.password_edit_text_show); passwordShowButton.setOnClickListener(this); updateButtonOpacity(); }</code><technical_language>Consider overriding param constructor</technical_language>

Target:
public PasswordTextInput(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); }
Source:
<code>protected void setWorldSpawn(CommandSender sender) { if (sender instanceof Player) { Player p = (Player) sender; Location l = p.getLocation(); World w = p.getWorld(); setWorldSpawn(sender, w, l); } else { <START> sender.sendMessage("You cannot use this command from the console."); <END> } }</code><technical_language>add support for setting console work 4/6 arg version</technical_language>

Target:
protected void setWorldSpawn(CommandSender sender) { if (sender instanceof Player) { Player p = (Player) sender; Location l = p.getLocation(); World w = p.getWorld(); setWorldSpawn(sender, w, l); } else { sender.sendMessage("You need to give coordinates to use this command from the console!"); } }
Source:
<code>public void testErrornousHandlerWithStrategyRethrow() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("handler/BPMN2-UserTaskWithBooleanOutput.bpmn2", "handler/BPMN2-ScriptTask.bpmn2"); KieSession ksession = createKnowledgeSession(kbase); ErrornousWorkItemHandler workItemHandler = new ErrornousWorkItemHandler("ScriptTask", HandlingStrategy.RETHROW); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); try { Map<String, Object> params = new HashMap<>(); params.put("isChecked", false); ProcessInstance processInstance = ksession.startProcess("com.sample.boolean", params); assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState()); <START> assertProcessVarValue(processInstance, "isChecked", "false"); <END> } catch (WorkflowRuntimeException e) { assertEquals("On purpose", e.getCause().getMessage()); } }</code><technical_language>I guess 2 lines changed for fail() a message exception thrown</technical_language>

Target:
public void testErrornousHandlerWithStrategyRethrow() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("handler/BPMN2-UserTaskWithBooleanOutput.bpmn2", "handler/BPMN2-ScriptTask.bpmn2"); KieSession ksession = createKnowledgeSession(kbase); ErrornousWorkItemHandler workItemHandler = new ErrornousWorkItemHandler("ScriptTask", HandlingStrategy.RETHROW); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); try { Map<String, Object> params = new HashMap<>(); params.put("isChecked", false); ksession.startProcess("com.sample.boolean", params); fail("Should fail since strategy is rethrow"); } catch (WorkflowRuntimeException e) { assertEquals("On purpose", e.getCause().getMessage()); } }
Source:
<code>protected A param(String key, String val) { <START> if(params.get(key) == null) { <END> params.put(key, new ArrayList<String>()); } params.get(key).add(val); @SuppressWarnings("unchecked") A result = (A) this; return result; }</code><technical_language>nit: missing space if (</technical_language>

Target:
protected A param(String key, String val) { params.put(key, new ArrayList<String>()); return paramAddToList(key, val); }
Source:
<code>private JSONObject getConfiguration() throws JSONException { JSONObject configuration = new JSONObject(); configuration.put("port", config.getPort()); configuration.put("register", true); if (config.getProxy() != null) { configuration.put("proxy", config.getProxy()); } else { configuration.put("proxy", "org.openqa.grid.selenium.proxy.DefaultRemoteProxy"); } configuration.put("role", "node"); <START> configuration.put("registerCycle", config.getRegisterCycle()); <END> configuration.put("maxSession", config.getMaxSession()); URL registrationUrl; try { registrationUrl = new URL(config.getRegistrationUrl()); } catch (MalformedURLException e) { log.log(Level.SEVERE, "Grid hub url cannot be parsed", e); throw new SelendroidException("Grid hub url cannot be parsed: " + e.getMessage()); } configuration.put("hubHost", registrationUrl.getHost()); configuration.put("hubPort", registrationUrl.getPort()); configuration.put("seleniumProtocol", "WebDriver"); configuration.put("host", config.getServerHost()); configuration.put("remoteHost", "http://" + config.getServerHost() + ":" + config.getPort()); return configuration; }</code><technical_language>this mean? named startup parameter same, changed 5s 60s.</technical_language>

Target:
private JSONObject getConfiguration() throws JSONException { JSONObject configuration = new JSONObject(); configuration.put("port", config.getPort()); configuration.put("register", true); if (config.getProxy() != null) { configuration.put("proxy", config.getProxy()); } else { configuration.put("proxy", "org.openqa.grid.selenium.proxy.DefaultRemoteProxy"); } configuration.put("role", "node"); configuration.put("registerCycle", config.getRegisterCycle()); configuration.put("maxSession", config.getMaxSession()); configuration.put("hubHost", hub.getHost()); configuration.put("hubPort", hub.getPort()); configuration.put("seleniumProtocol", "WebDriver"); configuration.put("host", config.getServerHost()); configuration.put("remoteHost", "http://" + config.getServerHost() + ":" + config.getPort()); return configuration; }
Source:
<code>protected void initializeScopingHint() { String working_sets = settings.get(STORE_WORKING_SETS); <START> if (working_sets == null || working_sets.isEmpty()) { <END> participantScope.setSelection(true); updateParticipantScope(); } else { StringTokenizer st = new StringTokenizer(working_sets, " ,"); ArrayList<IWorkingSet> ws = new ArrayList<>(); while (st.hasMoreTokens()) { String workingSetName = st.nextToken(); if (workingSetName != null && workingSetName.isEmpty() == false) { IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); IWorkingSet workingSet = workingSetManager.getWorkingSet(workingSetName); if (workingSet != null) { ws.add(workingSet); } } } if(! ws.isEmpty()) { this.workingSets = ws.toArray(new IWorkingSet[ws.size()]); updateWorkingSetScope(); updateWorkingSetLabel(); participantScope.setSelection(false); selectedResourcesScope.setSelection(false); workingSetScope.setSelection(true); } } }</code><technical_language>Trailing whitespace</technical_language>

Target:
protected void initializeScopingHint() { String working_sets = settings.get(STORE_WORKING_SETS); if (working_sets == null || working_sets.isEmpty()) { participantScope.setSelection(true); updateParticipantScope(); } else { StringTokenizer st = new StringTokenizer(working_sets, " ,"); ArrayList<IWorkingSet> ws = new ArrayList<>(); while (st.hasMoreTokens()) { String workingSetName = st.nextToken(); if (workingSetName != null && !workingSetName.isEmpty()) { IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); IWorkingSet workingSet = workingSetManager.getWorkingSet(workingSetName); if (workingSet != null) { ws.add(workingSet); } } } if(! ws.isEmpty()) { this.workingSets = ws.toArray(new IWorkingSet[ws.size()]); updateWorkingSetScope(); updateWorkingSetLabel(); participantScope.setSelection(false); selectedResourcesScope.setSelection(false); workingSetScope.setSelection(true); } } }
Source:
<code>public final FieldData clone() { FieldData clone = new FieldData(); try { clone.cachedExtension = cachedExtension; if (unknownFieldData == null) { clone.unknownFieldData = null; } else { clone.unknownFieldData.addAll(unknownFieldData); } <START> if (value instanceof MessageNano) { <END> clone.value = ((MessageNano) value).clone(); } else if (value instanceof byte[]) { clone.value = ((byte[]) value).clone(); } else if (value instanceof byte[][]) { clone.value = ((byte[][]) value).clone(); } else if (value instanceof boolean[]) { clone.value = ((boolean[]) value).clone(); } else if (value instanceof int[]) { clone.value = ((int[]) value).clone(); } else if (value instanceof long[]) { clone.value = ((long[]) value).clone(); } else if (value instanceof float[]) { clone.value = ((float[]) value).clone(); } else if (value instanceof double[]) { clone.value = ((double[]) value).clone(); } else if (value instanceof MessageNano[]) { MessageNano[] valueArray = (MessageNano[]) value; MessageNano[] cloneArray = new MessageNano[valueArray.length]; clone.value = cloneArray; for (int i = 0; i < valueArray.length; i++) { cloneArray[i] = valueArray[i].clone(); } } return clone; } catch (CloneNotSupportedException e) { throw new AssertionError(e); } }</code><technical_language>add empty block this line for == null need instanceof checks? if (value == null) { // cloning needed } else ..</technical_language>

Target:
public final FieldData clone() { FieldData clone = new FieldData(); try { clone.cachedExtension = cachedExtension; if (unknownFieldData == null) { clone.unknownFieldData = null; } else { clone.unknownFieldData.addAll(unknownFieldData); } if (value == null) { } else if (value instanceof MessageNano) { clone.value = ((MessageNano) value).clone(); } else if (value instanceof byte[]) { clone.value = ((byte[]) value).clone(); } else if (value instanceof byte[][]) { byte[][] valueArray = (byte[][]) value; byte[][] cloneArray = new byte[valueArray.length][]; clone.value = cloneArray; for (int i = 0; i < valueArray.length; i++) { cloneArray[i] = valueArray[i].clone(); } } else if (value instanceof boolean[]) { clone.value = ((boolean[]) value).clone(); } else if (value instanceof int[]) { clone.value = ((int[]) value).clone(); } else if (value instanceof long[]) { clone.value = ((long[]) value).clone(); } else if (value instanceof float[]) { clone.value = ((float[]) value).clone(); } else if (value instanceof double[]) { clone.value = ((double[]) value).clone(); } else if (value instanceof MessageNano[]) { MessageNano[] valueArray = (MessageNano[]) value; MessageNano[] cloneArray = new MessageNano[valueArray.length]; clone.value = cloneArray; for (int i = 0; i < valueArray.length; i++) { cloneArray[i] = valueArray[i].clone(); } } return clone; } catch (CloneNotSupportedException e) { throw new AssertionError(e); } }
Source:
<code>public Configuration getConfiguration(GraphContext context) { AbstractIterationOperation<FileModel> commitPeriodically = new AbstractIterationOperation<FileModel>() { private int uncommittedIterations = 0; @Override public void perform(GraphRewrite event, EvaluationContext context, FileModel payload) { uncommittedIterations++; if (uncommittedIterations > 10) { event.getGraphContext().getGraph().getBaseGraph().commit(); uncommittedIterations = 0; } } @Override public String toString() { return "CommitPeriodically"; <START> } <END> }; return ConfigurationBuilder.begin() .addRule() .when(Query.find(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.class") ) .perform(new AddClassFileMetadata().and(commitPeriodically).and(MonitorIterationProgress.monitor("Indexed class file: ", 1000))); }</code><technical_language>making CommitPeriodically a standalone action rules expect iterate large sets? a bit hacky, current :)</technical_language>

Target:
public Configuration getConfiguration(GraphContext context) { AbstractIterationOperation<FileModel> commitPeriodically = new AbstractIterationOperation<FileModel>() { private int uncommittedIterations = 0; @Override public void perform(GraphRewrite event, EvaluationContext context, FileModel payload) { uncommittedIterations++; if (uncommittedIterations > 10) { event.getGraphContext().getGraph().getBaseGraph().commit(); uncommittedIterations = 0; } } @Override public String toString() { return "CommitPeriodically"; } }; return ConfigurationBuilder.begin() .addRule() .when(Query.find(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.class") ) .perform(new AddClassFileMetadata().and(commitPeriodically).and(IterationProgress.monitoring("Indexed class file: ", 1000))); }
Source:
<code>void genCode() throws IOException { if (!outputDirectory.exists()) { if (!outputDirectory.mkdirs()) { throw new IOException("unable to create output directory " + outputDirectory); } } FileWriter c = null, h = null; try { c = new FileWriter(new File(outputDirectory, mName + ".c")); h = new FileWriter(new File(outputDirectory, mName + ".h")); h.write(" \n"); h.write("\n"); c.write(" \n"); c.write("\n"); h.write("#ifndef __" + mName.toUpperCase().replace('.', '_') + "__\n"); h.write("#define __" + mName.toUpperCase().replace('.', '_') + "__\n"); h.write("#include \"recordio.h\"\n"); for (Iterator<JFile> i = mInclFiles.iterator(); i.hasNext(); ) { JFile f = i.next(); h.write("#include \"" + f.getName() + ".h\"\n"); } h.write("\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n"); c.write("#include <stdlib.h>\n"); c.write("#include \"" + mName + ".h\"\n\n"); for (Iterator<JRecord> i = mRecList.iterator(); i.hasNext(); ) { JRecord jr = i.next(); jr.genCCode(h, c); } h.write("\n#ifdef __cplusplus\n}\n#endif\n\n"); h.write("#endif } catch (IOException e) { throw e; } finally { if (h != null) { try { h.close(); } catch (IOException ex) { throw ex; } finally { if (c != null) { c.close(); } } } <START> if (c != null) { <END> c.close(); } } }</code><technical_language>i try resources clean this up. java7 right</technical_language>

Target:
void genCode() throws IOException { if (!outputDirectory.exists()) { if (!outputDirectory.mkdirs()) { throw new IOException("unable to create output directory " + outputDirectory); } } try (FileWriter c = new FileWriter(new File(outputDirectory, mName + ".c")); FileWriter h = new FileWriter(new File(outputDirectory, mName + ".h")); ) { h.write(" \n"); h.write("\n"); c.write(" \n"); c.write("\n"); h.write("#ifndef __" + mName.toUpperCase().replace('.', '_') + "__\n"); h.write("#define __" + mName.toUpperCase().replace('.', '_') + "__\n"); h.write("#include \"recordio.h\"\n"); for (Iterator<JFile> i = mInclFiles.iterator(); i.hasNext(); ) { JFile f = i.next(); h.write("#include \"" + f.getName() + ".h\"\n"); } h.write("\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n"); c.write("#include <stdlib.h>\n"); c.write("#include \"" + mName + ".h\"\n\n"); for (Iterator<JRecord> i = mRecList.iterator(); i.hasNext(); ) { JRecord jr = i.next(); jr.genCCode(h, c); } h.write("\n#ifdef __cplusplus\n}\n#endif\n\n"); h.write("#endif } }
Source:
<code>public boolean isSamePost(ReaderPost post) { return post != null && post.blogId == this.blogId && post.postId == this.postId && post.feedId == this.feedId && post.feedItemId == this.feedItemId && post.numLikes == this.numLikes && post.numReplies == this.numReplies && post.isFollowedByCurrentUser == this.isFollowedByCurrentUser && post.isLikedByCurrentUser == this.isLikedByCurrentUser && post.isCommentsOpen == this.isCommentsOpen && post.useExcerpt == this.useExcerpt <START> && post.isBookmarked == this.isBookmarked <END> && post.getTitle().equals(this.getTitle()) && post.getExcerpt().equals(this.getExcerpt()) && post.getText().equals(this.getText()); }</code><technical_language>Do want check isBookmarked field if is_bookmarked attribute is supported server? effect be, posts server (which saved for later) considered new/changed? it, I want sure, I remember, I added this line well, I decided remove later</technical_language>

Target:
public boolean isSamePost(ReaderPost post) { return post != null && post.blogId == this.blogId && post.postId == this.postId && post.feedId == this.feedId && post.feedItemId == this.feedItemId && post.numLikes == this.numLikes && post.numReplies == this.numReplies && post.isFollowedByCurrentUser == this.isFollowedByCurrentUser && post.isLikedByCurrentUser == this.isLikedByCurrentUser && post.isCommentsOpen == this.isCommentsOpen && post.useExcerpt == this.useExcerpt && post.getTitle().equals(this.getTitle()) && post.getExcerpt().equals(this.getExcerpt()) && post.getText().equals(this.getText()); }
Source:
<code>protected void testAccessControl_instructorAccessOwnResponse_accessible() { ______TS("Instructor intends to access own response, should be accessible"); loginAsInstructor(instructor1OfCourse1.getGoogleId()); assertEquals(instructor1OfCourse1.getEmail(), typicalResponse3.getGiver()); FeedbackResponseUpdateRequest updateRequest = new FeedbackResponseUpdateRequest(); updateRequest.setQuestionType(FeedbackQuestionType.MCQ); updateRequest.setRecipientIdentifier(typicalResponse3.getRecipient()); FeedbackMcqResponseDetails newDetails = new FeedbackMcqResponseDetails(); newDetails.setAnswer("TEAM_NOT_EXIST"); <START> updateRequest.setResponseDetails(newDetails); <END> String[] instructorAccessOwnPersonParams = new String[] { Const.ParamsNames.INTENT, Intent.INSTRUCTOR_SUBMISSION.toString(), Const.ParamsNames.FEEDBACK_RESPONSE_ID, typicalResponse3.getId(), }; UpdateFeedbackResponseAction a = getAction(updateRequest, instructorAccessOwnPersonParams); a.checkSpecificAccessControl(); }</code><technical_language>I good enwrap this code a helper method, a lot. add recipient identifier parameters reuse method instead of copy pasting this</technical_language>

Target:
protected void testAccessControl_instructorAccessOwnResponse_accessible() { ______TS("Instructor intends to access own response, should be accessible"); loginAsInstructor(instructor1OfCourse1.getGoogleId()); assertEquals(instructor1OfCourse1.getEmail(), instructor1ResponseToAll.getGiver()); FeedbackResponseUpdateRequest updateRequest = getUpdateRequest(instructor1ResponseToAll.getRecipient()); String[] instructorAccessOwnPersonParams = new String[] { Const.ParamsNames.INTENT, Intent.INSTRUCTOR_SUBMISSION.toString(), Const.ParamsNames.FEEDBACK_RESPONSE_ID, instructor1ResponseToAll.getId(), }; verifyCanAccess(updateRequest, instructorAccessOwnPersonParams); }
Source:
<code><START> private int findLastPosition(final DetailNode detailNode) { <END> if (detailNode.getChildren().length == 0) { return lines2position.get(detailNode.getLineNumber()) + detailNode.getColumnNumber() + detailNode.getText().length(); } else { return findLastPosition(detailNode.getChildren()[detailNode.getChildren().length - 1]); } }</code><technical_language>please single return method</technical_language>

Target:
private int findLastPosition(final DetailNode detailNode) { final int lastPosition; if (detailNode.getChildren().length == 0) { lastPosition = lines2position.get(detailNode.getLineNumber()) + detailNode.getColumnNumber() + detailNode.getText().length(); } else { final DetailNode lastChild = detailNode.getChildren()[detailNode.getChildren().length - 1]; lastPosition = findLastPosition(lastChild); } return lastPosition; }
Source:
<code>public List<String> validationErrors() { List<String> errors = new ArrayList<>(); Base64Value base64Value; try { String safeValue = this.value.replace('-', '+').replace('_', '/'); base64Value = new Base64Value(safeValue); if ((this.value.contains("-") || this.value.contains("_")) && (this.value.contains("+") || this.value.contains("/"))) { errors.add( <START> "Invalid base64-value (characters from both Base and \"URL and Filename safe\" alphabets). Check RFC 4648 for details."); <END> } } catch (IllegalArgumentException e) { errors.add(e.getMessage()); return errors; } if (base64Value.size() < 16) { errors.add("CSP specification recommends nonce-value to be at least 128 bits long (before encoding)."); } return errors; }</code><technical_language>I this message. > Invalid base64-value. RFC4648 "base64" characters (including + /) RFC4648 "base64url" characters (including - _), both</technical_language>

Target:
public List<String> validationErrors() { List<String> errors = new ArrayList<>(); Base64Value base64Value; try { String safeValue = this.value.replace('-', '+').replace('_', '/'); base64Value = new Base64Value(safeValue); if ((this.value.contains("-") || this.value.contains("_")) && (this.value.contains("+") || this.value.contains("/"))) { errors.add( "Invalid base64-value. Must use either RFC4648 \"base64\" characters (including + and /) or RFC4648 \"base64url\" characters (including - and _), but not both."); } } catch (IllegalArgumentException e) { errors.add(e.getMessage()); return errors; } if (base64Value.size() < 16) { errors.add("CSP specification recommends nonce-value to be at least 128 bits long (before encoding)."); } return errors; }
Source:
<code>private void stopAffinityWorkerCache(){ try{ affinityWorkerCache.close(); <START> } catch (IOException e) { <END> } catch (NullPointerException e){ } finally{ affinityWorkerCache = null; } }</code><technical_language>log exceptions</technical_language>

Target:
private void stopAffinityWorkerCache(){ try{ affinityWorkerCache.close(); } catch (IOException e) { log.warn("Affinity worker cache cannot be closed", e); } catch (NullPointerException e){ log.warn("Affinity worker cache in null", e); } finally{ affinityWorkerCache = null; } }
Source:
<code>public void setupRoutes() { path(controllerBasePath(), () -> { before("", this::setContentType); before("/*", this::setContentType); before("", mimeType, apiAuthenticationHelper::checkAdminUserAnd401); <START> before("/*", mimeType, apiAuthenticationHelper::checkAdminUserAnd401); <END> get("", this::index); get(Routes.ArtifactStoreConfig.NAME, this::show); post("", this::create); put(Routes.ArtifactStoreConfig.NAME, this::update); delete(Routes.ArtifactStoreConfig.NAME, this::destroy); exception(RecordNotFoundException.class, this::notFound); }); }</code><technical_language>I check for admin group admin. storeId is a user needs in pipeline config</technical_language>

Target:
public void setupRoutes() { path(controllerBasePath(), () -> { before("", this::setContentType); before("/*", this::setContentType); before("", mimeType, apiAuthenticationHelper::checkAdminUserAnd401); before("/*", mimeType, apiAuthenticationHelper::checkAdminUserAnd401); get("", this::index); get(Routes.ArtifactStoreConfig.ID, this::show); post("", this::create); put(Routes.ArtifactStoreConfig.ID, this::update); delete(Routes.ArtifactStoreConfig.ID, this::destroy); exception(RecordNotFoundException.class, this::notFound); }); }
Source:
<code>private void handleStart(ITmfEvent event, ITmfStateSystemBuilder ss) { String traceId = event.getContent().getFieldValue(String.class, "trace_id_low"); traceId = Long.toHexString(Long.decode(traceId)); int traceQuark = ss.getQuarkAbsoluteAndAdd(traceId); int ustSpansQuark = ss.getQuarkRelativeAndAdd(traceQuark, UST_QUARK); String <START> spanId = <END> event.getContent().getFieldValue(String.class, "span_id"); int spanQuark = ss.getQuarkRelativeAndAdd(ustSpansQuark, spanId); long timestamp = event.getTimestamp().toNanos(); String name = event.getContent().getFieldValue(String.class, "op_name"); ss.modifyAttribute(timestamp, name, spanQuark); }</code><technical_language>store spanId in hexa in ss, work safer for other classes get matching open tracing span</technical_language>

Target:
private void handleStart(ITmfEvent event, ITmfStateSystemBuilder ss) { String traceId = event.getContent().getFieldValue(String.class, "trace_id_low"); traceId = Long.toHexString(Long.decode(traceId)); int traceQuark = ss.getQuarkAbsoluteAndAdd(traceId); int ustSpansQuark = ss.getQuarkRelativeAndAdd(traceQuark, UST_QUARK); String spanId = event.getContent().getFieldValue(String.class, "span_id"); spanId = Long.toHexString(Long.decode(spanId)); int spanQuark = ss.getQuarkRelativeAndAdd(ustSpansQuark, spanId); long timestamp = event.getTimestamp().toNanos(); String name = event.getContent().getFieldValue(String.class, "op_name"); ss.modifyAttribute(timestamp, name, spanQuark); }
Source:
<code>public CarrierWaitingToneHelper(Context context) { mContext = context; ConfigCarrier <START> == context.getResources().getBoolean(R.bool.config_carrier_waitting_tone); <END> }</code><technical_language>"==" "="</technical_language>

Target:
public CarrierWaitingToneHelper(Context context) { mContext = context; mCarrierWaitingToneSupport = context.getResources().getBoolean(R.bool.config_carrier_waiting_tone); }
Source:
<code>public AssertionError failure(AssertionInfo info, ErrorMessageFactory messageFactory) { AssertionError error = failureIfErrorMessageIsOverridden(info); if (error != null) return error; <START> AssertionError assertionError = new AssertionFailedError(messageFactory.create(info.description(), info.representation())); <END> removeAssertJRelatedElementsFromStackTraceIfNeeded(assertionError); printThreadDumpIfNeeded(); return assertionError; }</code><technical_language>do work for JUnit 4 users, instead AssertionErrorCreator handles creating AssertionFailedError explicit dependency opentest4j (it works if fallback JUnit 4 simple AssertionError otherwise). Failures.failure(AssertionInfo info, ErrorMessageFactory messageFactory, Object actual, Object expected) calls AssertionFailedError</technical_language>

Target:
public AssertionError failure(AssertionInfo info, ErrorMessageFactory messageFactory) { AssertionError error = failureIfErrorMessageIsOverridden(info); if (error != null) return error; String assertionErrorMessage = assertionErrorMessage(info, messageFactory); AssertionError assertionError = assertionErrorCreator.assertionError(assertionErrorMessage); removeAssertJRelatedElementsFromStackTraceIfNeeded(assertionError); printThreadDumpIfNeeded(); return assertionError; }
Source:
<code>public static void beforeClass() throws Exception { KieModuleModel module = services.newKieModuleModel(); KieBaseModel base = module.newKieBaseModel(KIE_BASE_NAME); base.setEventProcessingMode(EventProcessingOption.STREAM); KieFileSystem fs = services.newKieFileSystem(); fs.generateAndWritePomXML(releaseId); fs.write(services.getResources() .newClassPathResource(DRL_FILE_NAME, DroolsGcCausesNPETest.class)); fs.writeKModuleXML(module.toXML()); KieBuilder builder = services.newKieBuilder(fs); List<Message> errors = builder.buildAll().getResults() .getMessages(Message.Level.ERROR); <START> if (errors.size() > 0) { <END> Assertions.fail("unexpected errors building drl: " + errors); } services.getRepository().addKieModule(builder.getKieModule()); }</code><technical_language>assertThat(...).isNotEmpty(), optionally adding failure message</technical_language>

Target:
public static void beforeClass() throws Exception { final KieModuleModel module = SERVICES.newKieModuleModel(); final KieBaseModel base = module.newKieBaseModel(KIE_BASE_NAME); base.setEventProcessingMode(EventProcessingOption.STREAM); final KieFileSystem fs = SERVICES.newKieFileSystem(); fs.generateAndWritePomXML(RELEASE_ID); fs.write(SERVICES.getResources() .newClassPathResource(DRL_FILE_NAME, DroolsGcCausesNPETest.class)); fs.writeKModuleXML(module.toXML()); final KieBuilder builder = SERVICES.newKieBuilder(fs); final List<Message> errors = builder.buildAll().getResults() .getMessages(Message.Level.ERROR); Assertions.assertThat(errors).as("Unexpected errors building drl: " + errors).isEmpty(); SERVICES.getRepository().addKieModule(builder.getKieModule()); }
Source:
<code>private String createMessage(String invalidAttribute, Set<String> sourceIds) { return String.format( <START> "The field \"%s\" is not supported by the %s Content Store(s)", <END> invalidAttribute, prettyPrintSources(sourceIds)); }</code><technical_language>i18n support get configured term for 'sources': <LINK_0> add a new key properties file for this message</technical_language>

Target:
private String createMessage(String invalidAttribute, Set<String> sourceIds) { String messageFormat = messageFormatSupplier.get(); return messageFormat .replace("{attribute}", invalidAttribute) .replace("{sources}", prettyPrintSources(sourceIds)); }
Source:
<code>protected Address getAddress() { if (isLocalOnly) { return cache.getCacheManager().getAddress(); } <START> else { <END> return cache.getRpcManager().getAddress(); } }</code><technical_language>style</technical_language>

Target:
protected Address getAddress() { return clusteringDependentLogic.getAddress(); }
Source:
<code>protected Set<Object> extractFromAttribute(Object attributeValue) { <START> final String value = attributeValue != null ? attributeValue.toString() : null; <END> if (value == null) { return new HashSet<>(); } else { final String[] valueSplit = value.split(separator); return Stream.of(valueSplit) .map(StringUtils::trim) .filter(StringUtils::isNotEmpty) .collect(Collectors.toSet()); } }</code><technical_language>soft suggestion: this check for nullity is unnecessary handled if-else statement next line</technical_language>

Target:
protected Set<Object> extractFromAttribute(Object attributeValue) { if (attributeValue == null) { return Collections.emptySet(); } else { final String[] valueSplit = attributeValue.toString().split(separator); return Stream.of(valueSplit) .map(StringUtils::trim) .filter(StringUtils::isNotEmpty) .collect(Collectors.toSet()); } }
Source:
<code>private static Config loadNeo4jConfig( Path homeDir, Path configDir, String databaseName ) { <START> return Config.fromFile( configDir.resolve( "neo4j.conf" ) ) <END> .withHome( homeDir ) .withSetting( DatabaseManagementSystemSettings.active_database, databaseName ) .withConnectorsDisabled().build(); }</code><technical_language>default config file name is defined in Config class a constant</technical_language>

Target:
private static Config loadNeo4jConfig( Path homeDir, Path configDir, String databaseName ) { return Config.fromFile( configDir.resolve( Config.DEFAULT_CONFIG_FILE_NAME ) ) .withHome( homeDir ) .withSetting( DatabaseManagementSystemSettings.active_database, databaseName ) .withConnectorsDisabled().build(); }
Source:
<code>void peekFromSequenceNumberMessage(MessagingEntityType entityType, boolean isSessionEnabled) { setSenderAndReceiver(entityType, isSessionEnabled); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); sendMessage(message); final IterableStream<ServiceBusReceivedMessage> messageIte = receiver.receive(1, TIMEOUT); Assertions.assertNotNull(messageIte); final List<ServiceBusReceivedMessage> asList = messageIte.stream().collect(Collectors.toList()); ServiceBusReceivedMessage receivedMessage = asList.get(0); assertNotNull(receivedMessage); <START> ServiceBusReceivedMessage receivedPeekMessage = receiver.peekAt(receivedMessage.getSequenceNumber()); <END> assertMessageEquals(receivedPeekMessage, messageId, isSessionEnabled); }</code><technical_language>This Act. line Assert</technical_language>

Target:
void peekFromSequenceNumberMessage(MessagingEntityType entityType, boolean isSessionEnabled) { setSenderAndReceiver(entityType, isSessionEnabled); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, isSessionEnabled); final int maxMessages = 1; sendMessage(message); final IterableStream<ServiceBusReceivedMessage> messages = receiver.receive(maxMessages, TIMEOUT); Assertions.assertNotNull(messages); final List<ServiceBusReceivedMessage> asList = messages.stream().collect(Collectors.toList()); assertEquals(maxMessages, asList.size()); final ServiceBusReceivedMessage receivedMessage = asList.get(0); assertNotNull(receivedMessage); ServiceBusReceivedMessage receivedPeekMessage = receiver.peekAt(receivedMessage.getSequenceNumber()); assertEquals(receivedMessage.getSequenceNumber(), receivedPeekMessage.getSequenceNumber()); assertMessageEquals(receivedPeekMessage, messageId, isSessionEnabled); }
Source:
<code>public void createTwiceDifferentMetadata() { Map<String, String> metadata = new HashMap<>(); metadata.put("metadata1", "value1"); metadata.put("metadata2", "value2"); TestHelpers.assertResponseStatusCode(client.create(), 201); try { client.create(metadata); fail("Creating a queue twice with different metadata values should throw an exception."); } catch (Exception exception) { <START> TestHelpers.assertExceptionStatusCode(exception, 409); <END> } }</code><technical_language>a thought (not a review) - I values achieve testing server side behavior this. Do want build break if server side changes this behavior, say, day allow updating metadata</technical_language>

Target:
public void createTwiceDifferentMetadata() { Map<String, String> metadata = new HashMap<>(); metadata.put("metadata1", "value1"); metadata.put("metadata2", "value2"); helper.assertResponseStatusCode(client.create(), 201); try { client.create(metadata); fail("Creating a queue twice with different metadata values should throw an exception."); } catch (Exception exception) { helper.assertExceptionStatusCode(exception, 409); } }
Source:
<code>public void test() { final Object[][] parameters = (Object[][]) data().toArray(); try { startKillStartScheduler(); long recovered = numberOfJobsRecovered(); final long timeSpent = timeSpentToRecoverJobs(); LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTest", jobsNumber, timeLimit, recovered, timeSpent, ((timeSpent < timeLimit) ? SUCCESS : "FAILURE"))); <START> <END> final Integer numberOfJobsOfLastTestCase = (Integer) parameters[parameters.length - 1][0]; if (jobsNumber == numberOfJobsOfLastTestCase) { LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTestWithNodes", jobsNumber, timeLimit, jobsNumber, timeSpentToRecoverNodesAndJobs(), SUCCESS)); } assertEquals(jobsNumber, recovered); assertThat("Jobs recovery time for " + jobsNumber + " jobs", (int) timeSpent, lessThan(timeLimit)); } catch (Exception e) { e.printStackTrace(); LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTest", jobsNumber, timeLimit, -1, -1, "ERROR")); } }</code><technical_language>FAILURE variable</technical_language>

Target:
public void test() { final Object[][] parameters = (Object[][]) data().toArray(); try { startKillStartScheduler(); long recovered = numberOfJobsRecovered(); final long timeSpent = timeSpentToRecoverJobs(); LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTest", jobsNumber, timeLimit, recovered, timeSpent, ((timeSpent < timeLimit) ? SUCCESS : FAILURE))); final Integer numberOfJobsOfLastTestCase = (Integer) parameters[parameters.length - 1][0]; if (jobsNumber == numberOfJobsOfLastTestCase) { LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTestWithNodes", jobsNumber, timeLimit, jobsNumber, timeSpentToRecoverNodesAndJobs(), SUCCESS)); } assertEquals(jobsNumber, recovered); assertThat("Jobs recovery time for " + jobsNumber + " jobs", (int) timeSpent, lessThan(timeLimit)); } catch (Exception e) { e.printStackTrace(); LOGGER.info(BaseRecoveryTest.makeCSVString("JobRecoveryTest", jobsNumber, timeLimit, -1, -1, ERROR)); } }
Source:
<code>private Stream<String> getAllBundleIds(final List<Status> statusList, final String userId, final boolean isAdmin) throws IOException { return this.getBundleIds( (Integer limit, Integer offset) -> { try { return isAdmin? this.publishAuditAPI.getBundleIdByStatus(statusList, limit, offset) : this.publishAuditAPI.getBundleIdByStatusFilterByOwner(statusList, limit, offset, userId); } catch (DotDataException e) { <START> <END> throw new DotRuntimeException(e); } }, (String bundleId) -> bundleId ); }</code><technical_language>Please log debugging data here</technical_language>

Target:
private Stream<String> getAllBundleIds(final List<Status> statusList, final String userId, final boolean isAdmin) throws IOException { return this.getBundleIds( (Integer limit, Integer offset) -> { try { return isAdmin? this.publishAuditAPI.getBundleIdByStatus(statusList, limit, offset) : this.publishAuditAPI.getBundleIdByStatusFilterByOwner(statusList, limit, offset, userId); } catch (DotDataException e) { Logger.error(this, "Error getting all bundles with statuses: " + statusList.toString() + "by the user: " + userId,e); throw new DotRuntimeException(e); } }, (String bundleId) -> bundleId ); }
Source:
<code>public Response listJournalEntryComments(@PathParam("WORKSPACEID") Long workspaceEntityId, @PathParam("JOURNALENTRYID") Long journalEntryId) { WorkspaceEntity workspaceEntity = workspaceController.findWorkspaceEntityById(workspaceEntityId); if (workspaceEntity == null) { return Response.status(Status.NOT_FOUND).build(); } WorkspaceJournalEntry journalEntry = workspaceJournalController.findJournalEntry(journalEntryId); if (journalEntry == null) { return Response.status(Status.NOT_FOUND).build(); } <START> if (!sessionController.hasWorkspacePermission(MuikkuPermissions.ACCESS_WORKSPACE_JOURNAL, workspaceEntity)) { <END> return Response.status(Status.FORBIDDEN).build(); } List<WorkspaceJournalComment> comments = orderCommentTree(workspaceJournalController.listCommentsByJournalEntry(journalEntry)); List<WorkspaceJournalCommentRESTModel> result = new ArrayList<>(); for (WorkspaceJournalComment comment : comments) { result.add(toRestModel(workspaceEntity, comment)); } return Response.ok(result).build(); }</code><technical_language>Is this sufficient? staffmember student owns journal entry. ACCESS_WORKSPACE_JOURNAL give permissions</technical_language>

Target:
public Response listJournalEntryComments(@PathParam("WORKSPACEID") Long workspaceEntityId, @PathParam("JOURNALENTRYID") Long journalEntryId) { WorkspaceEntity workspaceEntity = workspaceController.findWorkspaceEntityById(workspaceEntityId); if (workspaceEntity == null) { return Response.status(Status.NOT_FOUND).build(); } WorkspaceJournalEntry journalEntry = workspaceJournalController.findJournalEntry(journalEntryId); if (journalEntry == null) { return Response.status(Status.NOT_FOUND).build(); } if (!sessionController.hasWorkspacePermission(MuikkuPermissions.LIST_WORKSPACE_JOURNAL_COMMENTS, workspaceEntity)) { if (!journalEntry.getUserEntityId().equals(sessionController.getLoggedUserEntity().getId())) { return Response.status(Status.FORBIDDEN).build(); } } List<WorkspaceJournalComment> comments = orderCommentTree(workspaceJournalController.listCommentsByJournalEntry(journalEntry)); List<WorkspaceJournalCommentRESTModel> result = new ArrayList<>(); for (WorkspaceJournalComment comment : comments) { result.add(toRestModel(workspaceEntity, comment)); } return Response.ok(result).build(); }
Source:
<code>private static void execute(File f) { if (!f.exists()) { fail("Config file " + f.getPath() + " doesn't exist"); } final String jbossDist = TestSuiteEnvironment.getSystemProperty("jboss.dist"); if (jbossDist == null) { fail("jboss.dist system property is not set"); } final CliCommandBuilder commandBuilder = CliCommandBuilder.of(jbossDist); commandBuilder.addJavaOptions("-Djboss.cli.config=" + f.toPath()); commandBuilder.addCliArgument("--command=help"); Process cliProc = null; try { cliProc = Launcher.of(commandBuilder) .setRedirectErrorStream(true) .launch(); <START> cliProc.waitFor(2000, TimeUnit.MILLISECONDS); <END> } catch (InterruptedException | IOException e) { fail("Failed to start CLI process: " + e.getLocalizedMessage()); } if (cliProc.exitValue() != 0) { fail("Cli process failed with exit code " + cliProc.exitValue()); } }</code><technical_language>a util run testuite timeouts easier longer in odd environments. a code standard this be: cliProc.waitFor(TimeoutUtil.adjust(2000), TimeUnit.MILLISECONDS); org.jboss.as.test.shared.TimeoutUtil Also, is 2000ms here? I test failure reported CI run is due amount insufficient. If goal of test check for happening quickly, a real long timeout (like 30 secs). If test fails takes a long time do so, ok; a rare situation. OTOH intermittent CI failures due short timeouts exceeded a real pain</technical_language>

Target:
private static void execute(File f) { if (!f.exists()) { fail("Config file " + f.getPath() + " doesn't exist"); } final String jbossDist = TestSuiteEnvironment.getSystemProperty("jboss.dist"); if (jbossDist == null) { fail("jboss.dist system property is not set"); } final CliCommandBuilder commandBuilder = CliCommandBuilder.of(jbossDist); commandBuilder.addJavaOptions("-Djboss.cli.config=" + f.toPath()); commandBuilder.addCliArgument("--command=help"); Process cliProc = null; try { cliProc = Launcher.of(commandBuilder) .setRedirectErrorStream(true) .launch(); flushInStream(cliProc.getInputStream()); cliProc.waitFor(TimeoutUtil.adjust(10000), TimeUnit.MILLISECONDS); } catch (InterruptedException | IOException e) { fail("Failed to start CLI process: " + e.getLocalizedMessage()); } if (cliProc.exitValue() != 0) { fail("Cli process failed with exit code " + cliProc.exitValue()); } }
Source:
<code>public void unzipFile(String archivePath, String targetPath) { try { File archiveFile = new File(archivePath); File targetFile = new File(targetPath); ZipFile zipFile = new ZipFile(archiveFile); Enumeration<?> e = zipFile.getEntries(); while (e.hasMoreElements()) { ZipArchiveEntry zipEntry = (ZipArchiveEntry) e.nextElement(); File file = new File(targetFile, zipEntry.getName()); if (zipEntry.isDirectory()) { FileUtils.forceMkdir(file); } else { InputStream is = zipFile.getInputStream(zipEntry); FileOutputStream os = FileUtils.openOutputStream(file); try { IOUtils.copy(is, os); } finally { os.close(); is.close(); } } } } catch (ZipException e) { log.error(e); } catch (IOException e) { log.error(e); <START> } <END> }</code><technical_language>connector setup fail exception occurs. throw a proper type of unchecked Exception</technical_language>

Target:
public void unzipFile(String archivePath, String targetPath) throws Exception { try { File archiveFile = new File(archivePath); File targetFile = new File(targetPath); ZipFile zipFile = new ZipFile(archiveFile); Enumeration<?> e = zipFile.getEntries(); while (e.hasMoreElements()) { ZipArchiveEntry zipEntry = (ZipArchiveEntry) e.nextElement(); File file = new File(targetFile, zipEntry.getName()); if (zipEntry.isDirectory()) { FileUtils.forceMkdir(file); } else { InputStream is = zipFile.getInputStream(zipEntry); FileOutputStream os = FileUtils.openOutputStream(file); try { IOUtils.copy(is, os); } finally { os.close(); is.close(); } } } } catch (ZipException e) { throw new Exception("Unzipping failed"); } catch (IOException e) { throw new Exception(); } }
Source:
<code>public void setFile(File file) { this.file = file; try { getConfiguration().setDirectory(file.getCanonicalPath()); } catch (IOException e) { LOGGER.warn( <START> "Unable to canonicalize processingMechanism{}. Verify location is accessible.", <END> file.toString()); } }</code><technical_language>Do want a space brackets</technical_language>

Target:
public void setFile(File file) { this.file = file; try { getConfiguration().setDirectory(file.getCanonicalPath()); } catch (IOException e) { LOGGER.warn("Unable to canonicalize {}. Verify location is accessible.", file.toString()); } }
Source:
<code>public void getMbusEncryptionKeyStatusByChannel(final DeviceMessageMetadata deviceMessageMetadata, final GetMbusEncryptionKeyStatusByChannelRequestData getMbusEncryptionKeyStatusByChannelRequestData) throws FunctionalException { LOGGER.info( "getMbusEncryptionKeyStatusByChannel for organisationIdentification: for deviceIdentification: {}", deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification()); final SmartMeter gatewayDevice = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); if (gatewayDevice == null) { <START> throw new FunctionalException(FunctionalExceptionType.GATEWAY_DEVICE_NOT_SET_FOR_MBUS_DEVICE, <END> ComponentType.DOMAIN_SMART_METERING, new GatewayDeviceNotSetForMbusDeviceException()); } this.osgpCoreRequestMessageSender.send( new RequestMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), gatewayDevice.getDeviceIdentification(), gatewayDevice.getIpAddress(), new GetMbusEncryptionKeyStatusByChannelRequestDataDto( getMbusEncryptionKeyStatusByChannelRequestData.getChannel())), deviceMessageMetadata.getMessageType(), deviceMessageMetadata.getMessagePriority(), deviceMessageMetadata.getScheduleTime()); }</code><technical_language>This a strange exception in this request gateway device channel. is M-Bus device involved for gateway device is set. UNKNOWN_DEVICE exception appears more logical. In fact, if device exist in database request arrived web service endpoint for configuration, unknown device exception returned</technical_language>

Target:
public void getMbusEncryptionKeyStatusByChannel(final DeviceMessageMetadata deviceMessageMetadata, final GetMbusEncryptionKeyStatusByChannelRequestData getMbusEncryptionKeyStatusByChannelRequestData) throws FunctionalException { LOGGER.info( "getMbusEncryptionKeyStatusByChannel for organisationIdentification: for deviceIdentification: {}", deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification()); final SmartMeter gatewayDevice = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); this.osgpCoreRequestMessageSender.send( new RequestMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), gatewayDevice.getDeviceIdentification(), gatewayDevice.getIpAddress(), new GetMbusEncryptionKeyStatusByChannelRequestDataDto( getMbusEncryptionKeyStatusByChannelRequestData.getChannel())), deviceMessageMetadata.getMessageType(), deviceMessageMetadata.getMessagePriority(), deviceMessageMetadata.getScheduleTime()); }