auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static double queryRangeAverage(ITmfStateSystem ss, long t1, long t2, int quark) throws AttributeNotFoundException, TimeRangeException { double avg = 0.0; List<ITmfStateInterval> intervals = queryAttributeRange(ss, t1, t2, quark, AbstractTmfMipmapStateProvider.AVG_STRING); if (intervals.size() == 0) { return 0; } else if (t1 == t2) { ITmfStateValue value = intervals.get(0).getStateValue(); try { if (value.getType() == Type.DOUBLE) { return value.unboxDouble(); } return value.unboxLong(); <START> } catch (StateValueTypeException e) { <END> Activator.logError(unsupOperationMsg(value, "Average")); return -1; } } for (ITmfStateInterval si : intervals) { long startTime = Math.max(t1, si.getStartTime()); long endTime = Math.min(t2, si.getEndTime() + 1); long delta = endTime - startTime; if (delta > 0) { ITmfStateValue value = si.getStateValue(); try { if (value.getType() == Type.DOUBLE) { avg += si.getStateValue().unboxDouble() * ((double) delta / (double) (t2 - t1)); } else { avg += si.getStateValue().unboxLong() * ((double) delta / (double) (t2 - t1)); } } catch (StateValueTypeException e) { Activator.logError(unsupOperationMsg(value, "Average")); } } } return avg; }</code><technical_language>Instead of catching thrown method</technical_language>

Target:
public static double queryRangeAverage(ITmfStateSystem ss, long t1, long t2, int quark) throws AttributeNotFoundException, TimeRangeException, StateValueTypeException { double avg = 0.0; List<ITmfStateInterval> intervals = queryAttributeRange(ss, t1, t2, quark, AbstractTmfMipmapStateProvider.AVG_STRING); if (intervals.size() == 0) { return 0; } else if (t1 == t2) { ITmfStateValue value = intervals.get(0).getStateValue(); if (value.getType() == Type.DOUBLE) { return value.unboxDouble(); } return value.unboxLong(); } for (ITmfStateInterval si : intervals) { long startTime = Math.max(t1, si.getStartTime()); long endTime = Math.min(t2, si.getEndTime() + 1); long delta = endTime - startTime; if (delta > 0) { ITmfStateValue value = si.getStateValue(); if (value.getType() == Type.DOUBLE) { avg += si.getStateValue().unboxDouble() * ((double) delta / (double) (t2 - t1)); } else { avg += si.getStateValue().unboxLong() * ((double) delta / (double) (t2 - t1)); } } } return avg; }
Source:
<code>public boolean isInstructorAllowedToModify() { for (int i = 0; i < recoveryFsList.getRows().size(); i++) { RecoveryFeedbackSessionsTableRow feedbackSession = recoveryFsList.getRows().get(i); if (!instructorsForCourses.get(feedbackSession.getCourseId()) .isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION)) { return false; } } return true; <START> } <END></code><technical_language>Err is this anywhere</technical_language>

Target:
public boolean isInstructorAllowedToModify() { return getRecoveryFsList().getRows().stream() .allMatch(session -> instructorsForCourses.get(session.getCourseId()) .isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION)); }
Source:
<code>boolean removeDispatchedEventAfterSyncWithPrimary(EventID id) { boolean interrupted = Thread.interrupted(); try { if (logger.isDebugEnabled()) { <START> logger.debug("removing dispatched event after sync with primary on queue for {}", <END> regionName, id); } removeDispatchedEvents(id); } catch (RegionDestroyedException ignore) { logger.info( "Queue found destroyed while processing dispatched sequence ID after syn." + " The event ID is for HARegion with name={}", id, regionName); } catch (CancelException ignore) { return false; } catch (CacheException e) { logger.error(String.format( "Sync with primary got Exception when removing from the queue. The problem is with event ID, %s for HARegion with name=%s", regionName, id), e); } catch (InterruptedException ignore) { Thread.currentThread().interrupt(); return false; } catch (RejectedExecutionException ignore) { interrupted = true; } finally { if (interrupted) { Thread.currentThread().interrupt(); } } return true; }</code><technical_language>This worded "After sync primary for HARegionQueue {}, removing dispatched event ID {}"</technical_language>

Target:
boolean removeDispatchedEventAfterSyncWithPrimary(EventID id) { boolean interrupted = Thread.interrupted(); try { if (logger.isDebugEnabled()) { logger.debug( "After sync with primary for HARegionQueue {}, removing dispatched event with ID {}", regionName, id); } removeDispatchedEvents(id); } catch (RegionDestroyedException ignore) { logger.info( "HARegionQueue was found to be destroyed when attempting to remove dispatched event with ID after sync", regionName, id); } catch (CancelException ignore) { return false; } catch (CacheException e) { logger.error(String.format( "HARegionQueue %s encountered an exception when attempting to remove event with ID %s from the queue", regionName, id), e); } catch (InterruptedException ignore) { Thread.currentThread().interrupt(); return false; } catch (RejectedExecutionException ignore) { interrupted = true; } finally { if (interrupted) { Thread.currentThread().interrupt(); } } return true; }
Source:
<code>public void assertCanDelete(Project project) throws Exception { if (db.submoduleSubscriptions().bySuperProjectProject(project.getNameKey()) .iterator().hasNext()) { throw new Exception("Cannot delete project " + project.getName() + <START> ", it has subscribed submodules." ); <END> } }</code><technical_language>This exception updated in Schema73DatabaseDeleteHandler. Also, trailing w/s</technical_language>

Target:
public void assertCanDelete(Project project) throws Exception { if (db.submoduleSubscriptions().bySuperProjectProject(project.getNameKey()) .iterator().hasNext()) { throw new Exception("Project has subscribed submodules."); } }
Source:
<code>public void process(final Exchange exchange) throws Exception { final YqlConfiguration configuration = endpoint.getConfiguration(); final YqlResponse yqlResponse = yahooClient.get( configuration.getQuery(), configuration.getFormat(), configuration.isDiagnostics(), configuration.getCallback() ); exchange.getIn().setHeader(CAMEL_YQL_HTTP_STATUS, yqlResponse.getStatus()); exchange.getIn().setHeader(CAMEL_YQL_HTTP_REQUEST, yqlResponse.getHttpRequest()); <START> exchange.getIn().setBody(yqlResponse.getBody()); <END> }</code><technical_language>I if error, status code is 5xx, 4xx if throw exception instead default. allow turn this on|off - this is http components it. easier for Camel users if wrong</technical_language>

Target:
public void process(final Exchange exchange) throws Exception { final YqlConfiguration configuration = endpoint.getConfiguration(); final YqlResponse yqlResponse = yqlClient.get(configuration); if (configuration.isThrowExceptionOnFailure() && yqlResponse.getStatus() != HttpStatus.SC_OK) { throw YqlHttpException.failedWith(yqlResponse.getStatus(), yqlResponse.getBody(), yqlResponse.getHttpRequest()); } exchange.getIn().setHeader(CAMEL_YQL_HTTP_STATUS, yqlResponse.getStatus()); exchange.getIn().setHeader(CAMEL_YQL_HTTP_REQUEST, yqlResponse.getHttpRequest()); exchange.getIn().setBody(yqlResponse.getBody()); }
Source:
<code>private String getPostFromNotification( Notification notification ){ Optional<Post> post = postService.getPost(notification.postId()); String postContentPreview; if(post.isPresent()){ postContentPreview = post.get().getPostContent().getPreview(); } else { <START> postContentPreview = ""; <END> } return postContentPreview; }</code><technical_language>optional API write sexy code :joy: post.get().orElse("");</technical_language>

Target:
private String getPostFromNotification( Notification notification ){ Post post = postRepository.findOne(notification.postId()); String postContentPreview; if (post != null) { postContentPreview = post.getPostContent().getPreview(); } else { postContentPreview = ""; } return postContentPreview; }
Source:
<code>public Predicate<ChangeData> file(String file) throws QueryParseException { if (allowFileRegex) { if (file.startsWith("^")) { return new RegexFilePredicate(args.dbProvider, args.patchListCache, file); } else { throw new IllegalArgumentException(); } } else { if (file.startsWith("^")) { throw error("regular expression not permitted here: file:" + file); } if (args.indexManager == ChangeIndex.Manager.DISABLED) { <START> throw error("supplied query is using secondary index while it is disabled"); <END> } return new EqualsFilePredicate(args.dbProvider, args.patchListCache, file); } }</code><technical_language>I a simpler one: throw error("secondary index enabled for file:" + file);</technical_language>

Target:
public Predicate<ChangeData> file(String file) throws QueryParseException { if (allowFileRegex) { if (file.startsWith("^")) { return new RegexFilePredicate(args.dbProvider, args.patchListCache, file); } else { throw new IllegalArgumentException(); } } else { if (file.startsWith("^")) { throw error("regular expression not permitted here: file:" + file); } if (args.indexManager == ChangeIndex.Manager.DISABLED) { throw error("secondary index must be enabled for file:" + file); } return new EqualsFilePredicate(args.dbProvider, args.patchListCache, file); } }
Source:
<code>public void TestOverflowToDisk() throws Exception { RowMapBuffer buffer = new RowMapBuffer(2, 250); RowMap r; <START> buffer.add(new RowMap("insert", "foo", "bar", 1L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"), true)); <END> buffer.add(new RowMap("insert", "foo", "bar", 2L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"), true)); buffer.add(new RowMap("insert", "foo", "bar", 3L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"), true)); assertThat(buffer.size(), is(3L)); assertThat(buffer.inMemorySize(), is(2L)); assertThat(buffer.removeFirst().getTimestamp(), is(1L)); assertThat(buffer.removeFirst().getTimestamp(), is(2L)); assertThat(buffer.removeFirst().getTimestamp(), is(3L)); }</code><technical_language>suppose need a fixture change (expected result) for this pass</technical_language>

Target:
public void TestOverflowToDisk() throws Exception { RowMapBuffer buffer = new RowMapBuffer(2, 250); RowMap r; buffer.add(new RowMap("insert", "foo", "bar", 1L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"))); buffer.add(new RowMap("insert", "foo", "bar", 2L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"))); buffer.add(new RowMap("insert", "foo", "bar", 3L, new ArrayList<String>(), new BinlogPosition(3, "mysql.1"))); assertThat(buffer.size(), is(3L)); assertThat(buffer.inMemorySize(), is(2L)); assertThat(buffer.removeFirst().getTimestamp(), is(1L)); assertThat(buffer.removeFirst().getTimestamp(), is(2L)); assertThat(buffer.removeFirst().getTimestamp(), is(3L)); }
Source:
<code>Set getDefaultIgnoreTypeNames() { Set ignored = new HashSet(); String[] ignore = {"org.eclipse.core.runtime.Plugin", "java.lang.ClassLoader", "org.eclipse.team.internal.ccvs.core.CVSTeamProvider", "org.eclipse.core.internal.events.BuilderPersistentInfo", "org.eclipse.core.internal.resources.Workspace", "org.eclipse.core.internal.events.EventStats", "java.net.URL"}; <START> for (String element : ignore) { <END> ignored.add(element); } return ignored; }</code><technical_language>Please do whitespace changes in this commit</technical_language>

Target:
Set getDefaultIgnoreTypeNames() { Set ignored = new HashSet(); String[] ignore = {"org.eclipse.core.runtime.Plugin", "java.lang.ClassLoader", "org.eclipse.team.internal.ccvs.core.CVSTeamProvider", "org.eclipse.core.internal.events.BuilderPersistentInfo", "org.eclipse.core.internal.resources.Workspace", "org.eclipse.core.internal.events.EventStats", "java.net.URL"}; for (int i = 0; i < ignore.length; i++) { ignored.add(ignore[i]); } return ignored; }
Source:
<code>void doShutdown() { try { if (state == State.STARTED) connector.stop(); <START> WorkerConnector.this.state = State.STOPPED; <END> statusListener.onShutdown(connName); log.info("Completed shutdown for {}", this); } catch (Throwable t) { log.error("{} Error while shutting down connector", this, t); WorkerConnector.this.state = State.FAILED; statusListener.onFailure(connName, t); } finally { ctx.close(); shutdownLatch.countDown(); metrics.close(); } }</code><technical_language>nit: unnecessary? similar for State.FAILED below</technical_language>

Target:
void doShutdown() { try { TargetState preEmptedState = pendingTargetStateChange.getAndSet(null); Callback<TargetState> stateChangeCallback = pendingStateChangeCallback.getAndSet(null); if (stateChangeCallback != null) { stateChangeCallback.onCompletion( new ConnectException( "Could not begin changing connector state to " + preEmptedState.name() + " as the connector has been scheduled for shutdown"), null); } if (state == State.STARTED) connector.stop(); this.state = State.STOPPED; statusListener.onShutdown(connName); log.info("Completed shutdown for {}", this); } catch (Throwable t) { log.error("{} Error while shutting down connector", this, t); state = State.FAILED; statusListener.onFailure(connName, t); } finally { ctx.close(); metrics.close(); } }
Source:
<code>private static Maybe<Matcher> match(String pattern, String input) { Matcher m = Pattern.compile(pattern).matcher(input); <START> if (m.find() && m.start()==0 && m.end()==input.length()) <END> return Maybe.of(m); return Maybe.absent(); }</code><technical_language>prepend ^ append $ pattern achieve whole-string match</technical_language>

Target:
private static Maybe<Matcher> match(String pattern, String input) { Matcher m = Pattern.compile("^"+pattern+"$").matcher(input); if (m.find()) return Maybe.of(m); return Maybe.absent(); }
Source:
<code>private boolean shouldContinue(LocalDateTime lastRetrievalDate) { LocalDate today = LocalDate.now(); <START> return (lastRetrievalDate == null || <END> lastRetrievalDate.toLocalDate().plusDays(7).isEqual(today) || lastRetrievalDate.toLocalDate().plusDays(7).isBefore(today)); }</code><technical_language>This dense? if (lastRetrievalDate == null) { return true; } else { LocalDate comparisonDate = lastRetrievalDate.toLocalDate().plusDays(7); ///CHECKSTYLE:... return comparisonDate.isEqual(today) || comparisonDate.isBefore(today); }</technical_language>

Target:
private boolean shouldContinue(LocalDateTime lastRetrievalDate) { if (lastRetrievalDate == null) { return true; } else { LocalDate today = LocalDate.now(); LocalDate comparisonDate = lastRetrievalDate.toLocalDate().plusWeeks(1); return (comparisonDate.isEqual(today) || comparisonDate.isBefore(today)); } }
Source:
<code>private Set<Annotation> resolveQualifiers(AnnotatedElement... elements) { return resolvers.stream() .flatMap(resolver -> Arrays.stream(elements).map(resolver)) <START> .flatMap(Collection::stream) <END> .collect(toSet()); }</code><technical_language>This is standard procedure in existing registries. :+1:</technical_language>

Target:
private Set<Annotation> resolveQualifiers(AnnotatedElement... elements) { Set<AnnotatedElement> nonNullElements = Arrays.stream(elements) .filter(Objects::nonNull) .collect(toSet()); return resolvers.stream() .flatMap(resolver -> nonNullElements.stream().map(resolver)) .flatMap(Collection::stream) .collect(toSet()); }
Source:
<code>private void sendScoresToFrontier(ArrayList<RayMessage> msgs) { VKmer id = getVertexId(); RayValue vertex = getVertexValue(); int myOffset = msgs.get(0).getWalkOffsets().get(0); int walkLength = msgs.get(0).getWalkLength(); VKmer frontierNode = msgs.get(0).getSourceVertexId(); if (vertex.isOutOfRange(myOffset, walkLength, MAX_DISTANCE)) { if (id.equals(frontierNode)) { outgoingMsg.reset(); outgoingMsg.setMessageType(RayMessageType.AGGREGATE_SCORE); outgoingMsg.setWalkLength(walkLength); outgoingMsg.getWalkOffsets().add(myOffset); outgoingMsg.getWalkIds().append(id); sendMsg(frontierNode, outgoingMsg); } return; } int minLength = msgs.get(0).getWalkIds().getPosition(0).getKmerLetterLength(); for (int i = 1; i < msgs.size(); i++) { minLength = Math.min(minLength, msgs.get(i).getWalkIds().getPosition(0).getKmerLetterLength()); } minLength = minLength - Kmer.getKmerLength() + 1; RayScores singleEndScores = voteFromReads(true, vertex, msgs, myOffset, walkLength, minLength); <START> RayScores pairedEndScores = HAS_PAIRED_END_READS ? voteFromReads(false, vertex, msgs, myOffset, walkLength, <END> minLength) : null; outgoingMsg.reset(); outgoingMsg.setMessageType(RayMessageType.AGGREGATE_SCORE); outgoingMsg.setWalkLength(walkLength); outgoingMsg.getWalkOffsets().add(myOffset); outgoingMsg.getWalkIds().append(id); outgoingMsg.setSingleEndScores(singleEndScores); outgoingMsg.setPairedEndScores(pairedEndScores); sendMsg(frontierNode, outgoingMsg); }</code><technical_language>For pairedEnd, singleEndScores pairedEndScores used? pairedEndScores</technical_language>

Target:
private void sendScoresToFrontier(ArrayList<RayMessage> msgs) { VKmer id = getVertexId(); RayValue vertex = getVertexValue(); int myOffset = msgs.get(0).getWalkOffsets().get(0); int walkLength = msgs.get(0).getWalkLength(); VKmer frontierNode = msgs.get(0).getSourceVertexId(); if (vertex.isOutOfRange(myOffset, walkLength, MAX_DISTANCE)) { if (id.equals(frontierNode)) { outgoingMsg.reset(); outgoingMsg.setMessageType(RayMessageType.AGGREGATE_SCORE); outgoingMsg.setWalkLength(walkLength); outgoingMsg.getWalkOffsets().add(myOffset); outgoingMsg.getWalkIds().append(id); sendMsg(frontierNode, outgoingMsg); } return; } int minLength = msgs.get(0).getToScoreKmer().getKmerLetterLength(); for (int i = 1; i < msgs.size(); i++) { minLength = Math.min(minLength, msgs.get(i).getToScoreKmer().getKmerLetterLength()); } minLength = minLength - Kmer.getKmerLength() + 1; RayScores singleEndScores = voteFromReads(true, vertex, msgs, myOffset, walkLength, minLength); RayScores pairedEndScores = HAS_PAIRED_END_READS ? voteFromReads(false, vertex, msgs, myOffset, walkLength, minLength) : null; outgoingMsg.reset(); outgoingMsg.setMessageType(RayMessageType.AGGREGATE_SCORE); outgoingMsg.setWalkLength(walkLength); outgoingMsg.getWalkOffsets().add(myOffset); outgoingMsg.getWalkIds().append(id); outgoingMsg.setSingleEndScores(singleEndScores); outgoingMsg.setPairedEndScores(pairedEndScores); sendMsg(frontierNode, outgoingMsg); }
Source:
<code>ByteBuffer filterChunkToRange(BlobData blobData) { ByteBuffer buf = blobData.getStream().getByteBuffer(); if (!hasRange) { return buf; } GetBlobRange range = options.getRange(); long startOffset = range.getStartOffset(totalSize); long endOffset = range.getEndOffset(totalSize); long blobDataSize = blobData.getSize(); long chunkStart = (long) chunkSize * (chunkIndex + firstChunkOffset); long chunkEnd = chunkStart + blobDataSize; if (chunkStart < startOffset) { buf.position((int) (startOffset - chunkStart)); } if (endOffset + 1 < chunkEnd) { buf.limit((int) (endOffset + 1 - chunkStart)); } <START> return buf.slice(); <END> }</code><technical_language>I guess this create extra cop. Incase need return chunk, incur additional memory. wanted confirm doc "Creates a new byte buffer content is a shared subsequence of this buffer's content."</technical_language>

Target:
protected ByteBuffer filterChunkToRange(BlobData blobData) { ByteBuffer buf = blobData.getStream().getByteBuffer(); if (options == null || options.getRange() == null) { return buf; } if (resolvedByteRange.getRangeSize() == 0) { buf.position(0); buf.limit(0); } else { long startOffsetInThisChunk = chunkIndex == 0 ? resolvedByteRange.getStartOffset() % chunkSize : 0; long endOffsetInThisChunk = chunkIndex == (numChunksTotal - 1) ? (resolvedByteRange.getEndOffset() % chunkSize) + 1 : chunkSize; buf.position((int) startOffsetInThisChunk); buf.limit((int) endOffsetInThisChunk); } return buf.slice(); }
Source:
<code>public void read_findJudgment_OmmitingDownloadErrorJudgment() throws Exception { DateTime publicationDate = new DateTime(2013, 03, 03, 12, 30); readerOpen(publicationDate); SourceCcJudgmentTextData textData1 = createCcjTextData("abc1"); SourceCcJudgmentTextData textData2 = createCcjTextData("abc1a"); List<String> judgmentIds = Lists.newArrayList("35", "38", "40"); when(sourceCcjExternalRepository.findJudgmentIds(eq(0), eq(pageSize), eq(publicationDate))).thenReturn(judgmentIds); <START> when(sourceCcjExternalRepository.findJudgment(eq("35"))).thenReturn(textData1); <END> when(sourceCcjExternalRepository.findJudgment(eq("38"))).thenThrow(new SourceCcJudgmentDownloadErrorException("<error>something is wrong</error>")); when(sourceCcjExternalRepository.findJudgment(eq("40"))).thenReturn(textData2); SourceCcJudgmentTextData readTextData1 = ccjImportDownloadReader.read(); SourceCcJudgmentTextData readTextData2 = ccjImportDownloadReader.read(); SourceCcJudgmentTextData readTextData3 = ccjImportDownloadReader.read(); assertCcjTextData(textData1, readTextData1); assertCcjTextData(textData2, readTextData2); assertNull(readTextData3); }</code><technical_language>Is neccesary Mockito macher eq here</technical_language>

Target:
public void read_findJudgment_OmmitingDownloadErrorJudgment() throws Exception { DateTime publicationDate = new DateTime(2013, 03, 03, 12, 30); readerOpen(publicationDate); SourceCcJudgmentTextData textData1 = createCcjTextData("abc1"); SourceCcJudgmentTextData textData2 = createCcjTextData("abc1a"); List<String> judgmentIds = Lists.newArrayList("35", "38", "40"); when(sourceCcjExternalRepository.findJudgmentIds(0, pageSize, publicationDate)).thenReturn(judgmentIds); when(sourceCcjExternalRepository.findJudgment("35")).thenReturn(textData1); when(sourceCcjExternalRepository.findJudgment("38")).thenThrow(new SourceCcJudgmentDownloadErrorException("<error>something is wrong</error>")); when(sourceCcjExternalRepository.findJudgment("40")).thenReturn(textData2); SourceCcJudgmentTextData readTextData1 = ccjImportDownloadReader.read(); SourceCcJudgmentTextData readTextData2 = ccjImportDownloadReader.read(); SourceCcJudgmentTextData readTextData3 = ccjImportDownloadReader.read(); assertCcjTextData(textData1, readTextData1); assertCcjTextData(textData2, readTextData2); assertNull(readTextData3); }
Source:
<code>public void testSetScript() throws Exception { final SrlBankProblem problem = SrlBankProblem.newBuilder() .setId("4554") <START> .setScript("this is a script") <END> .build(); mongoInsertBankProblem(db, problem); DBCursor curse = db.getCollection(PROBLEM_BANK_COLLECTION).find(); System.out.println(curse); DBObject obj = curse.next(); String testString = obj.get(SCRIPT).toString(); Assert.assertEquals("this is a script", testString); }</code><technical_language>this a variable</technical_language>

Target:
public void testSetScript() throws Exception { School.SrlBankProblem.Builder bankProblem = School.SrlBankProblem.newBuilder(); bankProblem.setId(FAKE_ID); bankProblem.setScript(FAKE_SCRIPT); mongoInsertBankProblem(db, bankProblem.build()); DBCursor curse = db.getCollection(PROBLEM_BANK_COLLECTION).find(); System.out.println(curse); DBObject obj = curse.next(); String testString = obj.get(SCRIPT).toString(); Assert.assertEquals(FAKE_SCRIPT, testString); }
Source:
<code>public PermissionResource getPermissionResource(String id) { <START> return inject(new BackendPermissionResource(id, this, suggestedParentType)); <END> }</code><technical_language>is pass user/group id (the "targetId" field), "isUser" boolean flag</technical_language>

Target:
public PermissionResource getPermissionResource(String id) { return inject(new BackendPermissionResource(id, targetId, this, suggestedParentType)); }
Source:
<code>public void read(StatementRestrictions restrictions, QueryOptions options, ResultBuilder result) { Field[] fields = Config.class.getFields(); Config config = DatabaseDescriptor.getRawConfig(); for (Field f : fields) { if (!Modifier.isStatic(f.getModifiers())) { try { Object value = f.get(config); if (value != null && value.getClass().isArray()) { <START> String s = "["; <END> for (int i = 0; i < Array.getLength(value); i++) { s += "'" + Array.get(value, i) + "'"; if (i < Array.getLength(value) - 1) s += ", "; } value = s + "]"; } result.row(f.getName()) .column("value", value == null ? "--" : value.toString()) .column("writable", WRITABLES.get(f.getName()) != null) .endRow(); } catch (IllegalAccessException | IllegalArgumentException e) { logger.error("", e); } } } }</code><technical_language>Dude, StringBuilder!</technical_language>

Target:
public void read(StatementRestrictions restrictions, QueryOptions options, ResultBuilder result) { Config config = DatabaseDescriptor.getRawConfig(); for (Field f : FIELDS) { if (!Modifier.isStatic(f.getModifiers())) { try { Object value = f.get(config); if (value != null && value.getClass().isArray()) { StringBuilder s = new StringBuilder("["); for (int i = 0; i < Array.getLength(value); i++) { s.append("'"); s.append(Array.get(value, i)); s.append("'"); if (i < Array.getLength(value) - 1) s.append(", "); } value = s.append("]").toString(); } result.row(f.getName()) .column(VALUE, value == null ? "--" : value.toString()) .column(WRITABLE, WRITABLES.get(f.getName()) != null) .endRow(); } catch (IllegalAccessException | IllegalArgumentException e) { logger.error("", e); } } } }
Source:
<code>public final HashMap<K, V> toHashMap() { <START> HashMap<K, V> map = new HashMap<>(); <END> for (Pair<K, V> pair : this) { map.put(pair.left, pair.right); } return map; }</code><technical_language>this enforce hasher is equality hasher</technical_language>

Target:
public final HashMap<K, V> toHashMap() { if (!this.hasher.equals(HashTable.equalityHasher())) { throw new UnsupportedOperationException("HashTable::toHashMap requires an equality hasher."); } HashMap<K, V> map = new HashMap<>(); for (Pair<K, V> pair : this) { map.put(pair.left, pair.right); } return map; }
Source:
<code>private String readStringWithReusableBuffer(int numberOfBytes) throws IOException { int save_limit = NO_LIMIT; if (_local_remaining != NO_LIMIT) { save_limit = _local_remaining - numberOfBytes; } _local_remaining = numberOfBytes; readAll(utf8InputBuffer.array(), 0, numberOfBytes); _local_remaining = save_limit; utf8InputBuffer.position(0); utf8InputBuffer.limit(numberOfBytes); utf8DecodingBuffer.position(0); utf8DecodingBuffer.limit(utf8DecodingBuffer.capacity()); utf8CharsetDecoder.reset(); CoderResult coderResult = utf8CharsetDecoder.decode(utf8InputBuffer, utf8DecodingBuffer, true); if (coderResult.isError()) { <START> throw new IonException("Illegal value encountered while validating UTF-8 data in input stream."); <END> } utf8DecodingBuffer.flip(); return utf8DecodingBuffer.toString(); }</code><technical_language>add coderResult.toString() is done line 1259</technical_language>

Target:
private String readStringWithReusableBuffer(int numberOfBytes) throws IOException { int save_limit = NO_LIMIT; if (_local_remaining != NO_LIMIT) { save_limit = _local_remaining - numberOfBytes; } _local_remaining = numberOfBytes; readAll(utf8InputBuffer.array(), 0, numberOfBytes); _local_remaining = save_limit; utf8InputBuffer.position(0); utf8InputBuffer.limit(numberOfBytes); utf8DecodingBuffer.position(0); utf8DecodingBuffer.limit(utf8DecodingBuffer.capacity()); utf8CharsetDecoder.reset(); CoderResult coderResult = utf8CharsetDecoder.decode(utf8InputBuffer, utf8DecodingBuffer, true); if (coderResult.isError()) { throw new IonException("Illegal value encountered while validating UTF-8 data in input stream. " + coderResult.toString()); } utf8DecodingBuffer.flip(); return utf8DecodingBuffer.toString(); }
Source:
<code>public void satisfiesEqualsContract() throws IOException { final String body = "449 N Wolfe Rd, Sunnyvale, CA 94085"; final Request req = new RqMultipart.Fake( new RqFake(), new RqWithHeaders( new RqFake("", "", body), contentLengthHeader(body.getBytes().length), contentDispositionHeader( "form-data; name=\"t-1\"" ) ), new RqWithHeaders( new RqFake("", "", ""), contentLengthHeader(0), contentDispositionHeader( "form-data; name=\"data\"; filename=\"a.bin\"" ) ) ); final RqMultipart.Base reqbaseone = new RqMultipart.Base(req); final RqMultipart.Base reqbasetwo = new RqMultipart.Base(req); try { MatcherAssert.assertThat( reqbaseone, Matchers.equalTo(reqbasetwo) ); } finally { req.body().close(); reqbaseone.part("t-1") .iterator() <START> .next().body().close(); <END> reqbasetwo.part("t-1") .iterator() .next().body().close(); } }</code><technical_language>@raphaelln is wrong indentation here, please fill line</technical_language>

Target:
public void satisfiesEqualsContract() throws IOException { final String body = "449 N Wolfe Rd, Sunnyvale, CA 94085"; final String part = "t-1"; final Request req = new RqMultipart.Fake( new RqFake(), new RqWithHeaders( new RqFake("", "", body), contentLengthHeader(body.getBytes().length), contentDispositionHeader( String.format("form-data; name=\"%s\"", part) ) ), new RqWithHeaders( new RqFake("", "", ""), contentLengthHeader(0), contentDispositionHeader( "form-data; name=\"data\"; filename=\"a.bin\"" ) ) ); final RqMultipart.Base one = new RqMultipart.Base(req); final RqMultipart.Base two = new RqMultipart.Base(req); try { MatcherAssert.assertThat(one, Matchers.equalTo(two)); } finally { req.body().close(); one.part(part).iterator().next().body().close(); two.part(part).iterator().next().body().close(); } }
Source:
<code>public void testPersonsWithMultipleHistoricalVersionsCanBeDeleted() { createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); <START> <END> myEmpiProviderR4.clearEmpiLinks(null); assertNoPatientLinksExist(); }</code><technical_language>assert links delete</technical_language>

Target:
public void testPersonsWithMultipleHistoricalVersionsCanBeDeleted() { createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); Patient patientAndUpdateLinks = createPatientAndUpdateLinks(buildJanePatient()); Person person = getPersonFromTarget(patientAndUpdateLinks); assertThat(person, is(notNullValue())); myEmpiProviderR4.clearEmpiLinks(null); assertNoPatientLinksExist(); person = getPersonFromTarget(patientAndUpdateLinks); assertThat(person, is(nullValue())); }
Source:
<code>public void performFiltering() { CallFilter dummyStart = new CallFilter(); mDummyComplete = new CallFilter(); for (CallFilter filter : mFiltersList) { addEdge(dummyStart, filter); } for (CallFilter filter : mFiltersList) { addEdge(filter, mDummyComplete); } addEdge(dummyStart, mDummyComplete); scheduleFilter(dummyStart); mHandler.postDelayed(() -> { if (!mFinished) { Log.i(this, "Graph timed out when perform filtering."); <START> mListener.onCallFilteringComplete(mCall, mCurrentResult); <END> mFinished = true; } }, mTimeoutsAdapter.getCallScreeningTimeoutMillis(mContext.getContentResolver())); }</code><technical_language>this calls CallsManager, acquire TelecomSystem.SyncRoot lock calling this</technical_language>

Target:
public void performFiltering() { CallFilter dummyStart = new CallFilter(); mDummyComplete = new CallFilter(); for (CallFilter filter : mFiltersList) { addEdge(dummyStart, filter); } for (CallFilter filter : mFiltersList) { addEdge(filter, mDummyComplete); } addEdge(dummyStart, mDummyComplete); scheduleFilter(dummyStart); mHandler.postDelayed(() -> { synchronized(mLock) { if (!mFinished) { Log.i(this, "Graph timed out when perform filtering."); mListener.onCallFilteringComplete(mCall, mCurrentResult); mFinished = true; mHandlerThread.quit(); } } }, mTimeoutsAdapter.getCallScreeningTimeoutMillis(mContext.getContentResolver())); }
Source:
<code>public ProjectCreateTestCase execute() throws Exception { ProjectsRestClient projectsRestClient = getProjectsRestClient(); <START> ProjectApi api = projectsRestClient.create(mockProjectInput); <END> return this; }</code><technical_language>Variable api is unused</technical_language>

Target:
public ProjectCreateTestCase execute() throws Exception { ProjectsRestClient projectsRestClient = getProjectsRestClient(); projectsRestClient.create(name); return this; }
Source:
<code>private void visitNode(Tree tree, Tree reportTree, SymbolMetadata symbolMetadata) { if (!isExcluded(tree, symbolMetadata)) { Javadoc javadoc = new Javadoc(tree); if (javadoc.noMainDescription() && !isNonVoidMethodWithNoParameter(tree, javadoc)) { context.reportIssue(this, reportTree, "Document this public " + getType(tree) + " by adding an explicit description."); } else { Set<String> undocumentedParameters = javadoc.undocumentedParameters(); if (!undocumentedParameters.isEmpty()) { context.reportIssue(this, reportTree, "Document the parameter(s): " + undocumentedParameters.stream().collect(Collectors.joining(", "))); } if (hasNonVoidReturnType(tree) && javadoc.noReturnDescription()) { context.reportIssue(this, reportTree, "Document this method return value."); } <START> Set<String> undocumentedExceptions = javadoc.undocumentedThrownExceptions(); <END> if (!undocumentedExceptions.isEmpty()) { context.reportIssue(this, reportTree, "Document this method thrown exception(s): " + undocumentedExceptions.stream().collect(Collectors.joining(", "))); } } } }</code><technical_language>I remains a List, a Set. I feeling a set guarantee order of results, some impacts tests (flickering fail/pass depending of orders). I stay lists guarantee that</technical_language>

Target:
private void visitNode(Tree tree, Tree reportTree, SymbolMetadata symbolMetadata) { if (!isExcluded(tree, symbolMetadata)) { Javadoc javadoc = new Javadoc(tree); if (javadoc.noMainDescription() && !isNonVoidMethodWithNoParameter(tree, javadoc)) { context.reportIssue(this, reportTree, "Document this public " + getType(tree) + " by adding an explicit description."); } else { List<String> undocumentedParameters = javadoc.undocumentedParameters(); if (!undocumentedParameters.isEmpty()) { context.reportIssue(this, reportTree, "Document the parameter(s): " + undocumentedParameters.stream().collect(Collectors.joining(", "))); } if (hasNonVoidReturnType(tree) && javadoc.noReturnDescription()) { context.reportIssue(this, reportTree, "Document this method return value."); } List<String> undocumentedExceptions = javadoc.undocumentedThrownExceptions(); if (!undocumentedExceptions.isEmpty()) { context.reportIssue(this, reportTree, "Document this method thrown exception(s): " + undocumentedExceptions.stream().collect(Collectors.joining(", "))); } } } }
Source:
<code>public void deleteWorkflowRequest(String workflowExtRef) throws APIManagementException { Connection connection = null; PreparedStatement prepStmt = null; String query = SQLConstants.DELETE_WORKFLOW_REQUEST_SQL; try { connection = APIMgtDBUtil.getConnection(); connection.setAutoCommit(false); <START> <END> prepStmt = connection.prepareStatement(query); prepStmt.setString(1, workflowExtRef); prepStmt.executeUpdate(); connection.commit(); } catch (SQLException e) { handleException("Failed to delete the workflow request ", e); } }</code><technical_language>remove unnecessary white space</technical_language>

Target:
public void deleteWorkflowRequest(String workflowExtRef) throws APIManagementException { Connection connection = null; PreparedStatement prepStmt = null; String query = SQLConstants.DELETE_WORKFLOW_REQUEST_SQL; try { connection = APIMgtDBUtil.getConnection(); connection.setAutoCommit(false); prepStmt = connection.prepareStatement(query); prepStmt.setString(1, workflowExtRef); prepStmt.executeUpdate(); connection.commit(); } catch (SQLException e) { handleException("Failed to delete the workflow request. ", e); } finally { APIMgtDBUtil.closeAllConnections(prepStmt, connection, null); } }
Source:
<code>public Config() { <START> ch.qos.logback.classic.Logger jobExecutionLog = (ch.qos.logback.classic.Logger) LoggerFactory <END> .getLogger(JobExecution.class); jobExecutionLog.setLevel(Level.ALL); JobExecutionLogAppender appender = new JobExecutionLogAppender(); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); appender.setContext(lc); appender.start(); jobExecutionLog.addAppender(appender); }</code><technical_language>if(... instanceof ...) { throw new RuntimeException("Expected Logback SLF4J implementation") }</technical_language>

Target:
public Config() { Logger logger = LoggerFactory.getLogger(JobExecution.class); if (!(logger instanceof ch.qos.logback.classic.Logger)) { throw new RuntimeException("Expected logback als SLF4J implementation"); } ch.qos.logback.classic.Logger jobExecutionLog = (ch.qos.logback.classic.Logger) logger; jobExecutionLog.setLevel(Level.ALL); JobExecutionLogAppender appender = new JobExecutionLogAppender(); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); appender.setContext(lc); appender.start(); jobExecutionLog.addAppender(appender); }
Source:
<code>private boolean checkNotConfiguredRepositories( Map<Repository, Collection<String>> pathsByRepo) { boolean added = false; for (Map.Entry<Repository, Collection<String>> entry : pathsByRepo.entrySet()) { Repository repository = entry.getKey(); try { RepositoryTreeNode node = getRepositoryChildNode(repository, RepositoryTreeNodeType.WORKINGDIR); if (node == null) { boolean newOne = repositoryUtil .addConfiguredRepository(repository.getDirectory()); if <START> (newOne) { <END> added = true; } } } catch (IllegalArgumentException iae) { Activator.handleError(iae.getMessage(), iae, false); continue; } } return added; }</code><technical_language>Declaring newOne set another variable confusing style I inline newOne. do others a long if-expression is bad style</technical_language>

Target:
private boolean checkNotConfiguredRepositories( Map<Repository, Collection<String>> pathsByRepo) { boolean added = false; for (Repository repository : pathsByRepo.keySet()) { try { RepositoryTreeNode node = getRepositoryChildNode(repository, RepositoryTreeNodeType.WORKINGDIR); if (node == null) { added |= repositoryUtil .addConfiguredRepository(repository.getDirectory()); } } catch (IllegalArgumentException iae) { Activator.handleError(iae.getMessage(), iae, false); continue; } } return added; }
Source:
<code>public void shouldGetTimerCanceledEventByProcessDelete() throws Exception { securityUtil.logInAs("salaboy"); ProcessInstance process = processRuntime.start(ProcessPayloadBuilder.start() .withProcessDefinitionKey(PROCESS_TIMER_CANCELLED_EVENT) .build()); String jobId = managementService.createTimerJobQuery().singleResult().getId(); assertThat(jobId).isNotNull(); processRuntime.delete(ProcessPayloadBuilder.delete(process.getId())); List<BPMNTimerCancelledEvent> eventsCancelled = listenerCancelled.getEvents(); assertThat(eventsCancelled) .extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId(), event -> event.getEntity().getTimerPayload().getActivityId() ) .contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_CANCELLED, process.getProcessDefinitionId(), process.getProcessDefinitionId(), process.getId(), "timer", "timer" ) ); <START> <END> }</code><technical_language>double space</technical_language>

Target:
public void shouldGetTimerCanceledEventByProcessDelete() { securityUtil.logInAs("salaboy"); ProcessInstance process = processRuntime.start(ProcessPayloadBuilder.start() .withProcessDefinitionKey(PROCESS_TIMER_CANCELLED_EVENT) .build()); processRuntime.delete(ProcessPayloadBuilder.delete(process.getId())); List<BPMNTimerCancelledEvent> eventsCancelled = listenerCancelled.getEvents(); assertThat(eventsCancelled) .extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId() ) .contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_CANCELLED, process.getProcessDefinitionId(), process.getProcessDefinitionId(), process.getId(), "timer" ) ); }
Source:
<code>public void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, Exception ex) { Span spanFromHeader = getTracer().getCurrentSpan(); if (log.isDebugEnabled()) { log.debug("Continuing span " + spanFromHeader + " after message handled"); } if (spanFromHeader != null) { if (log.isDebugEnabled()) { log.debug("Marking span with server send"); } spanFromHeader.logEvent(Span.SERVER_SEND); addErrorTag(ex); } <START> if (getTracer().isTracing() && !(channel instanceof DirectChannel)) { <END> getTracer().detach(spanFromHeader); if (log.isDebugEnabled()) { log.debug("Detached " + spanFromHeader + " from current thread"); } } }</code><technical_language>missed this fix</technical_language>

Target:
public void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, Exception ex) { Span spanFromHeader = getTracer().getCurrentSpan(); if (log.isDebugEnabled()) { log.debug("Continuing span " + spanFromHeader + " after message handled"); } if (spanFromHeader != null) { if (log.isDebugEnabled()) { log.debug("Marking span with server send"); } spanFromHeader.logEvent(Span.SERVER_SEND); addErrorTag(ex); } if (getTracer().isTracing() && !(isDirectChannel(channel))) { getTracer().detach(spanFromHeader); if (log.isDebugEnabled()) { log.debug("Detached " + spanFromHeader + " from current thread"); } } }
Source:
<code>public String toString() { StringBuilder sBuilder = new StringBuilder(); sBuilder.append("\nFilePath: " + getFilePath()); sBuilder.append("\nFileName: " + getFileName()); sBuilder.append("\nNumber of blocks: " + getNumberOfBlocks()); sBuilder.append("\nFile lenght: " + getFileLength()); <START> sBuilder.append("\nblockIds: " + getBlockIds()); <END> sBuilder.append("\nisDirectory: " + isDirectory()); return sBuilder.toString(); }</code><technical_language>IDE generated toString()</technical_language>

Target:
public String toString() { return "ModuleFileMetaData [relativePath=" + relativePath + ", getNumberOfBlocks()=" + getNumberOfBlocks() + ", getFileName()=" + getFileName() + ", getFileLength()=" + getFileLength() + ", isDirectory()=" + isDirectory() + "]"; }
Source:
<code>public String toString() { <START> String replicasString = Optional.ofNullable(replicas).stream() .flatMap(Collection::stream) .map(CheckResult::toString) .collect(Collectors.joining(",")); String pluginStatString = Optional.ofNullable(pluginStat).stream() .flatMap(Collection::stream) .map(PluginStatusEntry::toString) .collect(Collectors.joining(",")); <END> return "ClusterCheckResult{" + "status='" + status + "\'," + "host='" + host + "\'," + "replicas={" + replicasString + "}," + "plugin_stat={" + pluginStatString + "}" + '}'; }</code><technical_language>for CheckResult</technical_language>

Target:
public String toString() { return "ClusterCheckResult{" + "status='" + status + "\'," + "host='" + host + "\'," + "replicas={" + StringUtils.join(replicas, ",") + "}," + "plugin_stat={" + StringUtils.join(pluginStat, ",") + "}" + '}'; }
Source:
<code><START> public Iterator<DataIdentifier> getAllIdentifiers() throws DataStoreException { <END> return null; }</code><technical_language>Need implement</technical_language>

Target:
public Iterator<DataIdentifier> getAllIdentifiers() throws DataStoreException { Iterator<DataIdentifier> result = Iterators.emptyIterator(); Iterator<DataStore> iter = delegateHandler.getAllDelegatesIterator(); DataStoreException aggregateException = null; while (iter.hasNext()) { try { result = Iterators.concat(result, iter.next().getAllIdentifiers()); } catch (DataStoreException e) { if (null == aggregateException) { aggregateException = new DataStoreException( "Aggregate data store exception created in getAllIdentifiers", e); } aggregateException.addSuppressed(e); } } if (null != aggregateException) { throw aggregateException; } return result; }
Source:
<code>public boolean performNextOperation(int completedChildCount) { if (getParameters().getCommandStep() == null) { getParameters().setCommandStep(RemoveSnapshotSingleDiskStep.EXTEND); <START> getParameters().setChildCommands(new HashMap<>()); <END> } syncChildCommandList(getParameters().getCommandStep(), getParameters().getChildCommands()); Guid currentChildId = getCurrentChildId(getParameters().getCommandStep(), getParameters().getChildCommands()); if (currentChildId != null) { getParameters().setCommandStep(getParameters().getNextCommandStep()); } log.info("Executing Cold Merge command step '{}'", getParameters().getCommandStep()); Pair<VdcActionType, ? extends VdcActionParametersBase> nextCommand = null; switch (getParameters().getCommandStep()) { case EXTEND: break; case MERGE: break; case MERGE_STATUS: break; case UNLINK_CHAIN: break; case DESTROY_IMAGE: break; case DESTROY_IMAGE_CHECK: break; case COMPLETE: getParameters().setDestroyImageCommandComplete(true); setCommandStatus(CommandStatus.SUCCEEDED); break; } persistCommand(getParameters().getParentCommand(), true); if (nextCommand != null) { runInternalActionWithTasksContext(nextCommand.getFirst(), nextCommand.getSecond()); return true; } else { return false; } }</code><technical_language>move this code execute() (then remove if clause)</technical_language>

Target:
public boolean performNextOperation(int completedChildCount) { syncChildCommandList(getParameters().getCommandStep(), getParameters().getChildCommands()); Guid currentChildId = getCurrentChildId(getParameters().getCommandStep(), getParameters().getChildCommands()); if (currentChildId != null) { getParameters().setCommandStep(getParameters().getNextCommandStep()); } log.info("Executing Cold Merge command step '{}'", getParameters().getCommandStep()); Pair<VdcActionType, ? extends VdcActionParametersBase> nextCommand = null; switch (getParameters().getCommandStep()) { case PREPARE_MERGE: break; case MERGE: break; case FINALIZE_MERGE: break; case DESTROY_IMAGE: break; case DESTROY_IMAGE_CHECK: break; case COMPLETE: getParameters().setDestroyImageCommandComplete(true); setCommandStatus(CommandStatus.SUCCEEDED); break; } persistCommand(getParameters().getParentCommand(), true); if (nextCommand != null) { runInternalActionWithTasksContext(nextCommand.getFirst(), nextCommand.getSecond()); return true; } else { return false; } }
Source:
<code>public int hashCode() { return Objects.hash( <START> super.hashCode(), <END> s3ConfigProperties ); }</code><technical_language>nit: this line</technical_language>

Target:
public int hashCode() { return Objects.hash(super.hashCode(), s3InputSourceConfig); }
Source:
<code>public Map<StoreKey, MessageInfo> findKeys(List<? extends StoreKey> storeKeys) { Map<StoreKey, MessageInfo> messageInfoMap = new HashMap<>(); for (StoreKey storeKey : storeKeys) { try { messageInfoMap.put(storeKey, findKey(storeKey)); } catch (StoreException stEx) { <START> logger.info("Key %s not found in findKey", storeKey.getID()); <END> } } return messageInfoMap; }</code><technical_language>exception means not_found findKey, please print out exception well. Also, error here</technical_language>

Target:
public Map<StoreKey, MessageInfo> findKeys(List<? extends StoreKey> storeKeys) throws StoreException { Map<StoreKey, MessageInfo> messageInfoMap = new HashMap<>(); for (StoreKey storeKey : storeKeys) { try { messageInfoMap.put(storeKey, findKey(storeKey)); } catch (StoreException e) { logger.error("findKey failed for key with reason {}", storeKey.getID(), e.getErrorCode().toString()); throw e; } } return messageInfoMap; }
Source:
<code>public int[][] getDrops(Item item) { if (item.getTier() >= ItemTool.TIER_WOODEN) { <START> return new int[][]{{Item.CAULDRON, 0, 1}}; <END> } return new int[0][0]; }</code><technical_language>Item dropped a hopper</technical_language>

Target:
public int[][] getDrops(Item item) { if (item.getTier() >= ItemTool.TIER_WOODEN) { return new int[][]{{Item.HOPPER, 0, 1}}; } return new int[0][0]; }