auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void postLoad(XMLResource resource, String loadedVersion) { super.postLoad(resource, loadedVersion); if (Version.parseVersion(loadedVersion).compareTo(MIGRATION_VERSION) < 0) { TreeIterator<EObject> iter = resource.getAllContents(); while (iter.hasNext()) { EObject obj = iter.next(); EStructuralFeature initialOperationFeature = null; for (EStructuralFeature feature : obj.eClass().getEAllStructuralFeatures()) { if (feature.getName().equals("initialOperation")) { initialOperationFeature = feature; break; } } if (initialOperationFeature != null && !obj.eIsSet(initialOperationFeature)) { InitialOperation initial = ToolFactory.eINSTANCE.createInitialOperation(); if (map.containsKey(obj)) { initial.getFirstModelOperations().add(map.get(obj)); } obj.eSet(initialOperationFeature, initial); } } } }

Target:
public void postLoad(XMLResource resource, String loadedVersion) { super.postLoad(resource, loadedVersion); if (Version.parseVersion(loadedVersion).compareTo(MIGRATION_VERSION) < 0) { TreeIterator<EObject> iter = resource.getAllContents(); while (iter.hasNext()) { EObject obj = iter.next(); EReference initialOperationFeature = null; for (EReference reference : obj.eClass().getEAllReferences()) { if (reference.getName().equals("initialOperation")) { initialOperationFeature = reference; break; } } if (initialOperationFeature != null && !obj.eIsSet(initialOperationFeature)) { InitialOperation initial = ToolFactory.eINSTANCE.createInitialOperation(); if (map.containsKey(obj)) { initial.getFirstModelOperations().add(map.get(obj)); } obj.eSet(initialOperationFeature, initial); } } } }
Source:
public int hashCode() { int result = name.hashCode(); result = 31 * result + fieldName.hashCode(); result = 31 * result + Integer.hashCode(k); result = 31 * result + Byte.hashCode(cacheTypeId); return result; }

Target:
public int hashCode() { return Objects.hash(name, fieldName, k); }
Source:
public final void init(Config config, TaskContext context) throws Exception { if (serializedGraph.getContextManager() != null) { this.contextManager = serializedGraph.getContextManager(); if (this.contextManager != null) { this.contextManager.init(config, context); } } this.operatorImplGraph = new OperatorImplGraph(serializedGraph, config, context, clock); }

Target:
public final void init(Config config, TaskContext context) throws Exception { if (this.contextManager != null) { this.contextManager.init(config, context); } this.operatorImplGraph = new OperatorImplGraph(specGraph, config, context, clock); }
Source:
public BlackFxOptionSurfaceVolatilities volatilities( ZonedDateTime valuationDateTime, DoubleArray parameters, ReferenceData refData) { ArgChecker.isTrue(parameters.size() == getParameterCount(), Messages.format("size of parameters must be {}, but found {}", getParameterCount(), parameters.size())); DoubleArray strikes = DoubleArray.ofUnsafe( nodes.stream().mapToDouble(n -> n.getStrike().getValue()).toArray()); DoubleArray expiries = DoubleArray.ofUnsafe( nodes.stream().mapToDouble(n -> n.timeToExpiry(valuationDateTime, dayCount, refData)).toArray()); SurfaceMetadata metadata = Surfaces.blackVolatilityByExpiryStrike(SurfaceName.of(name.getName()), dayCount) .withParameterMetadata(parameterMetadata(expiries)); SurfaceInterpolator interp = GridSurfaceInterpolator.of( timeInterpolator, timeExtrapolatorLeft, timeExtrapolatorRight, strikeInterpolator, strikeExtrapolatorLeft, strikeExtrapolatorRight); InterpolatedNodalSurface surface = InterpolatedNodalSurface.ofUnsorted(metadata, expiries, strikes, parameters, interp); return BlackFxOptionSurfaceVolatilities.of(name, currencyPair, valuationDateTime, surface); }

Target:
public BlackFxOptionSurfaceVolatilities volatilities( ZonedDateTime valuationDateTime, DoubleArray parameters, ReferenceData refData) { int nNodes = getParameterCount(); ArgChecker.isTrue(parameters.size() == nNodes, Messages.format("size of parameters must be {}, but found {}", nNodes, parameters.size())); DoubleArray strikes = DoubleArray.of(nNodes, i -> nodes.get(i).getStrike().getValue()); DoubleArray expiries = DoubleArray.of(nNodes, i -> nodes.get(i).timeToExpiry(valuationDateTime, dayCount, refData)); SurfaceMetadata metadata = Surfaces.blackVolatilityByExpiryStrike(SurfaceName.of(name.getName()), dayCount) .withParameterMetadata(parameterMetadata(expiries)); SurfaceInterpolator interp = GridSurfaceInterpolator.of( timeInterpolator, timeExtrapolatorLeft, timeExtrapolatorRight, strikeInterpolator, strikeExtrapolatorLeft, strikeExtrapolatorRight); InterpolatedNodalSurface surface = InterpolatedNodalSurface.ofUnsorted(metadata, expiries, strikes, parameters, interp); return BlackFxOptionSurfaceVolatilities.of(name, currencyPair, valuationDateTime, surface); }
Source:
public List<String> arguments() { List<String> args = asList( "bin/crate -p", "crate.pid", String.format("-Des.cluster.name=%s", configuration.clusterName), String.format("-Des.http.port=%d", configuration.httpPort), String.format("-Des.transport.tcp.port=%d", configuration.transportPort), String.format("-Des.node.name=%s", nodeNode), String.format("-Des.discovery.zen.ping.multicast.enabled=%s", "false"), String.format("-Des.discovery.zen.ping.unicast.hosts=%s", unicastHosts) ); if (configuration.dataPath != null) { args.add(String.format("-Des.path.data=%s", configuration.dataPath)); } if (configuration.blobPath != null) { args.add(String.format("-Des.path.blobs=%s", configuration.blobPath)); } for (Attribute attribute : attributes) { if (attribute.hasText()) { args.add(String.format("-Des.node.mesos_%s=%s", attribute.getName(), attribute.getText().getValue())); } } for (String crateArg : configuration.crateArgs()) { args.add(crateArg); } return args; }

Target:
public List<String> arguments() { List<String> args = new ArrayList<>(asList( "bin/crate", "-p", "crate.pid", String.format("-Des.cluster.name=%s", configuration.clusterName), String.format("-Des.http.port=%d", configuration.httpPort), String.format("-Des.transport.tcp.port=%d", configuration.transportPort), String.format("-Des.node.name=%s", nodeNode), String.format("-Des.discovery.zen.ping.multicast.enabled=%s", "false"), String.format("-Des.discovery.zen.ping.unicast.hosts=%s", unicastHosts) )); if (configuration.dataPath != null) { args.add(String.format("-Des.path.data=%s", configuration.dataPath)); } if (configuration.blobPath != null) { args.add(String.format("-Des.path.blobs=%s", configuration.blobPath)); } for (Attribute attribute : attributes) { if (attribute.hasText()) { args.add(String.format("-Des.node.mesos_%s=%s", attribute.getName(), attribute.getText().getValue())); } } for (String crateArg : configuration.crateArgs()) { args.add(crateArg); } return args; }
Source:
private synchronized void removeSubscription() { if (service.isRegistered(this)) { logger.debug("Removing WeMo GENA subscription for '{}'", this); String subscription = "bridge1"; if ((subscriptionState.get(subscription) != null) && subscriptionState.get(subscription).booleanValue()) { logger.debug("WeMo {}: Unsubscribing from service {}...", getUDN(), subscription); service.removeSubscription(this, subscription); } subscriptionState = new HashMap<String, Boolean>(); service.unregisterParticipant(this); } }

Target:
private synchronized void removeSubscription() { if (service.isRegistered(this)) { logger.debug("Removing WeMo GENA subscription for '{}'", this); if ((subscriptionState.get(SUBSCRIPTION) != null) && subscriptionState.get(SUBSCRIPTION).booleanValue()) { logger.debug("WeMo {}: Unsubscribing from service {}...", getUDN(), SUBSCRIPTION); service.removeSubscription(this, SUBSCRIPTION); } subscriptionState = new HashMap<String, Boolean>(); service.unregisterParticipant(this); } }
Source:
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(); } catch (StateValueTypeException e) { 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; }

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:
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; }

Target:
public boolean isInstructorAllowedToModify() { return getRecoveryFsList().getRows().stream() .allMatch(session -> instructorsForCourses.get(session.getCourseId()) .isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION)); }
Source:
boolean removeDispatchedEventAfterSyncWithPrimary(EventID id) { boolean interrupted = Thread.interrupted(); try { if (logger.isDebugEnabled()) { logger.debug("removing dispatched event after sync with primary on queue for {}", 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; }

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:
public void assertCanDelete(Project project) throws Exception { if (db.submoduleSubscriptions().bySuperProjectProject(project.getNameKey()) .iterator().hasNext()) { throw new Exception("Cannot delete project " + project.getName() + ", it has subscribed submodules." ); } }

Target:
public void assertCanDelete(Project project) throws Exception { if (db.submoduleSubscriptions().bySuperProjectProject(project.getNameKey()) .iterator().hasNext()) { throw new Exception("Project has subscribed submodules."); } }
Source:
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()); exchange.getIn().setBody(yqlResponse.getBody()); }

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:
private String getPostFromNotification( Notification notification ){ Optional<Post> post = postService.getPost(notification.postId()); String postContentPreview; if(post.isPresent()){ postContentPreview = post.get().getPostContent().getPreview(); } else { postContentPreview = ""; } return postContentPreview; }

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:
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("supplied query is using secondary index while it is disabled"); } return new EqualsFilePredicate(args.dbProvider, args.patchListCache, file); } }

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:
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"), true)); 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)); }

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:
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 (String element : ignore) { ignored.add(element); } return ignored; }

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:
void doShutdown() { try { if (state == State.STARTED) connector.stop(); WorkerConnector.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); WorkerConnector.this.state = State.FAILED; statusListener.onFailure(connName, t); } finally { ctx.close(); shutdownLatch.countDown(); metrics.close(); } }

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:
private static Maybe<Matcher> match(String pattern, String input) { Matcher m = Pattern.compile(pattern).matcher(input); if (m.find() && m.start()==0 && m.end()==input.length()) return Maybe.of(m); return Maybe.absent(); }

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:
private boolean shouldContinue(LocalDateTime lastRetrievalDate) { LocalDate today = LocalDate.now(); return (lastRetrievalDate == null || lastRetrievalDate.toLocalDate().plusDays(7).isEqual(today) || lastRetrievalDate.toLocalDate().plusDays(7).isBefore(today)); }

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:
private Set<Annotation> resolveQualifiers(AnnotatedElement... elements) { return resolvers.stream() .flatMap(resolver -> Arrays.stream(elements).map(resolver)) .flatMap(Collection::stream) .collect(toSet()); }

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:
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); 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); }

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:
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)); } return buf.slice(); }

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:
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); when(sourceCcjExternalRepository.findJudgment(eq("35"))).thenReturn(textData1); 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); }

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:
public void testSetScript() throws Exception { final SrlBankProblem problem = SrlBankProblem.newBuilder() .setId("4554") .setScript("this is a script") .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); }

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:
public PermissionResource getPermissionResource(String id) { return inject(new BackendPermissionResource(id, this, suggestedParentType)); }

Target:
public PermissionResource getPermissionResource(String id) { return inject(new BackendPermissionResource(id, targetId, this, suggestedParentType)); }
Source:
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()) { String s = "["; 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); } } } }

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:
public final HashMap<K, V> toHashMap() { HashMap<K, V> map = new HashMap<>(); for (Pair<K, V> pair : this) { map.put(pair.left, pair.right); } return map; }

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:
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."); } utf8DecodingBuffer.flip(); return utf8DecodingBuffer.toString(); }

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:
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() .next().body().close(); reqbasetwo.part("t-1") .iterator() .next().body().close(); } }

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:
public void testPersonsWithMultipleHistoricalVersionsCanBeDeleted() { createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); createPatientAndUpdateLinks(buildJanePatient()); myEmpiProviderR4.clearEmpiLinks(null); assertNoPatientLinksExist(); }

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:
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."); mListener.onCallFilteringComplete(mCall, mCurrentResult); mFinished = true; } }, mTimeoutsAdapter.getCallScreeningTimeoutMillis(mContext.getContentResolver())); }

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:
public ProjectCreateTestCase execute() throws Exception { ProjectsRestClient projectsRestClient = getProjectsRestClient(); ProjectApi api = projectsRestClient.create(mockProjectInput); return this; }

Target:
public ProjectCreateTestCase execute() throws Exception { ProjectsRestClient projectsRestClient = getProjectsRestClient(); projectsRestClient.create(name); return this; }
Source:
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."); } Set<String> undocumentedExceptions = javadoc.undocumentedThrownExceptions(); if (!undocumentedExceptions.isEmpty()) { context.reportIssue(this, reportTree, "Document this method thrown exception(s): " + undocumentedExceptions.stream().collect(Collectors.joining(", "))); } } } }

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:
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); } }

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:
public Config() { ch.qos.logback.classic.Logger jobExecutionLog = (ch.qos.logback.classic.Logger) LoggerFactory .getLogger(JobExecution.class); jobExecutionLog.setLevel(Level.ALL); JobExecutionLogAppender appender = new JobExecutionLogAppender(); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); appender.setContext(lc); appender.start(); jobExecutionLog.addAppender(appender); }

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:
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 (newOne) { added = true; } } } catch (IllegalArgumentException iae) { Activator.handleError(iae.getMessage(), iae, false); continue; } } return added; }

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:
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" ) ); }

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:
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() && !(channel instanceof DirectChannel)) { getTracer().detach(spanFromHeader); if (log.isDebugEnabled()) { log.debug("Detached " + spanFromHeader + " from current thread"); } } }

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:
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()); sBuilder.append("\nblockIds: " + getBlockIds()); sBuilder.append("\nisDirectory: " + isDirectory()); return sBuilder.toString(); }

Target:
public String toString() { return "ModuleFileMetaData [relativePath=" + relativePath + ", getNumberOfBlocks()=" + getNumberOfBlocks() + ", getFileName()=" + getFileName() + ", getFileLength()=" + getFileLength() + ", isDirectory()=" + isDirectory() + "]"; }
Source:
public String toString() { 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(",")); return "ClusterCheckResult{" + "status='" + status + "\'," + "host='" + host + "\'," + "replicas={" + replicasString + "}," + "plugin_stat={" + pluginStatString + "}" + '}'; }

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

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; }