auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Set<ConfigOption<?>> optionalOptions() { final Set<ConfigOption<?>> options = new HashSet<>(); options.add(PROPS_GROUP_ID); options.add(SCAN_STARTUP_MODE); options.add(SCAN_STARTUP_SPECIFIC_OFFSETS); options.add(SCAN_STARTUP_TIMESTAMP_MILLIS); options.add(SINK_PARTITIONER); <START> return options; <END> }</code><technical_language>remove sink semantic option</technical_language>

Target:
public Set<ConfigOption<?>> optionalOptions() { final Set<ConfigOption<?>> options = super.optionalOptions(); options.remove(SINK_SEMANTIC); return options; }
Source:
<code>public static String createActionBlocker(ZooKeeper zk, String node, CreateMode mode, VoltLogger hostLog, String request) { ZooKeeperLock lock = new ZooKeeperLock(zk, VoltZK.actionBlockers, "lock"); try { lock.acquireLock(); return setActionBlocker(zk, node, mode, hostLog, request); } catch (IOException e) { <START> VoltDB.crashLocalVoltDB("Unable to create action blocker " + node, true, e); <END> } finally { try { lock.releaseLock(); } catch (IOException e) } return null; }</code><technical_language>Error message reflect actual cause</technical_language>

Target:
public static String createActionBlocker(ZooKeeper zk, String node, CreateMode mode, VoltLogger hostLog, String request) { ZooKeeperLock zklock = new ZooKeeperLock(zk, VoltZK.actionLock, "lock"); String lockingMessage = null; try { if(!zklock.acquireLockWithTimeout(TimeUnit.SECONDS.toMillis(60))) { lockingMessage = "Could not acquire a lock to create action blocker:" + request; } else { lockingMessage = setActionBlocker(zk, node, mode, hostLog, request); } } finally { try { zklock.releaseLock(); } catch (IOException e) } return lockingMessage; }
Source:
<code>@Override public boolean process(Set<? extends TypeElement> types, RoundEnvironment env) { <START> <END> try { Map<TypeElement, List<ExecutableElement>> providerMethods = providerMethodsByClass(env); for (Map.Entry<String, List<ExecutableElement>> module : delayedTypes.entrySet()) { providerMethods.put( processingEnv.getElementUtils().getTypeElement(module.getKey()), module.getValue()); } for (Map.Entry<TypeElement, List<ExecutableElement>> module : providerMethods.entrySet()) { TypeElement type = module.getKey(); String providesName = type.asType().toString(); try { Map<String, Object> parsedAnnotation = CodeGen.getAnnotation(Module.class, type); writeModuleAdapter(type, parsedAnnotation, module.getValue()); delayedTypes.remove(providesName); } catch (IllegalStateException e) { delayedTypes.put(providesName, module.getValue()); } } } catch (IOException e) { error("Code gen failed: " + e); } if (env.processingOver() && delayedTypes.size() > 0) { error("Could not find types required by provides methods for %s", delayedTypes.keySet() .toString()); } return true; }</code><technical_language>nit: nuke this empty line</technical_language>

Target:
@Override public boolean process(Set<? extends TypeElement> types, RoundEnvironment env) { try { remainingTypes.putAll(providerMethodsByClass(env)); for (Iterator<String> i = remainingTypes.keySet().iterator(); i.hasNext();) { String typeName = i.next(); TypeElement type = processingEnv.getElementUtils().getTypeElement(typeName); List<ExecutableElement> providesTypes = remainingTypes.get(typeName); try { Map<String, Object> parsedAnnotation = CodeGen.getAnnotation(Module.class, type); writeModuleAdapter(type, parsedAnnotation, providesTypes); i.remove(); } catch (IllegalStateException e) { } } } catch (IOException e) { error("Code gen failed: " + e); } if (env.processingOver() && remainingTypes.size() > 0) { error("Could not find types required by provides methods for %s", remainingTypes.keySet() .toString()); } return true; }
Source:
<code>public void tickCubeServer(BooleanSupplier tryToTickFaster, Random rand) { if (!isFullyPopulated) { return; } tickCubeCommon(tryToTickFaster); while (!pendingTickListEntriesTreeSet.isEmpty()) { assert storage != null : "There are blocks to tick in cube but getStorage() is empty!"; NextTickListEntry ntle = pendingTickListEntriesTreeSet.first(); if (ntle.scheduledTime > world.getTotalWorldTime()) <START> return; <END> BlockPos pos = ntle.position; IBlockState iblockstate = this.storage.get(blockToLocal(pos.getX()), blockToLocal(pos.getY()), blockToLocal(pos.getZ())); if (iblockstate.getMaterial() != Material.AIR && iblockstate.getBlock() == ntle.getBlock()) { iblockstate.getBlock().updateTick((WorldServer) world, ntle.position, iblockstate, rand); } pendingTickListEntriesTreeSet.remove(ntle); pendingTickListEntriesHashSet.remove(ntle); } }</code><technical_language>This is work before. If this is reached, entries moved hashset treeset</technical_language>

Target:
public void tickCubeServer(BooleanSupplier tryToTickFaster, Random rand) { if (!isFullyPopulated) { return; } tickCubeCommon(tryToTickFaster); Iterator<NextTickListEntry> pti = pendingTickListEntriesTreeSet.iterator(); while (pti.hasNext()) { assert storage != null : "There are blocks to tick in cube but getStorage() is empty!"; NextTickListEntry ntle = pti.next(); if (ntle.scheduledTime > world.getTotalWorldTime()) break; BlockPos pos = ntle.position; IBlockState iblockstate = this.storage.get(blockToLocal(pos.getX()), blockToLocal(pos.getY()), blockToLocal(pos.getZ())); if (iblockstate.getMaterial() != Material.AIR && iblockstate.getBlock() == ntle.getBlock()) { iblockstate.getBlock().updateTick((WorldServer) world, ntle.position, iblockstate, rand); } pti.remove(); } int tickLimit = 256; pti = pendingTickListEntriesHashSet.iterator(); while (pti.hasNext() && --tickLimit != 0) { NextTickListEntry ntle = pti.next(); pendingTickListEntriesTreeSet.add(ntle); pti.remove(); } }
Source:
<code><START> public FeatureVector[] classify(Object[] examples) { <END> if (!(examples instanceof Word[])) { String type = examples == null ? "null" : examples.getClass().getName(); logger.error("Classifier 'WordTypeInformation(Word)' defined on line 71 of CommonFeatures.lbj received '" + type + "' as input."); new Exception().printStackTrace(); System.exit(1); } return super.classify(examples); }</code><technical_language>exiting, STDERR</technical_language>

Target:
public FeatureVector[] classify(Object[] examples) { if (!(examples instanceof Word[])) { String type = examples == null ? "null" : examples.getClass().getName(); System.err.println("Classifier 'WordTypeInformation(Word)' defined on line 71 of CommonFeatures.lbj received '" + type + "' as input."); new Exception().printStackTrace(); System.exit(1); } return super.classify(examples); }
Source:
<code>private void register(Set<CommandType> commandTypes) { for (CommandType type : commandTypes) { final String id = type.getId(); if (this.commandTypes.containsKey(id)) { <START> Log.warn(CommandTypeRegistryImpl.class, "Command type with ID " + id + " is already registered."); <END> } else { this.commandTypes.put(id, type); } } }</code><technical_language>this translated JavaScript I [getClass](<LINK_0> method here, is a misunderstanding side</technical_language>

Target:
private void register(Set<CommandType> commandTypes) { for (CommandType type : commandTypes) { final String id = type.getId(); if (this.commandTypes.containsKey(id)) { Log.warn(getClass(), "Command type with ID " + id + " is already registered."); } else { this.commandTypes.put(id, type); } } }
Source:
<code>private static boolean isGenericBeforeCtor(DetailAST ast) { return ast.getParent().getParent().getType() == TokenTypes.LITERAL_NEW <START> && ast.getParent().getNextSibling().getType() == TokenTypes.IDENT; <END> }</code><technical_language>is identifier? this cover new OuterClass.InnerClass() new package.Class()</technical_language>

Target:
private static boolean isGenericBeforeCtor(DetailAST ast) { final DetailAST parent = ast.getParent(); return parent.getParent().getType() == TokenTypes.LITERAL_NEW && (parent.getNextSibling().getType() == TokenTypes.IDENT || parent.getNextSibling().getType() == TokenTypes.DOT); }
Source:
<code>public ClouderaManagerParcelStatusListenerTask(ClouderaManagerApiPojoFactory clouderaManagerApiPojoFactory, CloudbreakEventService cloudbreakEventService, Map<String, String> parcelVersions, ParcelStatus parcelStatus) { super(clouderaManagerApiPojoFactory, cloudbreakEventService); <START> this.parcelVersion = parcelVersions; <END> this.parcelStatus = parcelStatus; }</code><technical_language>here, rename field omit this</technical_language>

Target:
public ClouderaManagerParcelStatusListenerTask(ClouderaManagerApiPojoFactory clouderaManagerApiPojoFactory, CloudbreakEventService cloudbreakEventService, Map<String, String> parcelVersions, ParcelStatus parcelStatus) { super(clouderaManagerApiPojoFactory, cloudbreakEventService); this.parcelVersions = parcelVersions; this.parcelStatus = parcelStatus; }
Source:
<code>public static WebDriver getWebDriverFirefox() { <START> return driver2; <END> }</code><technical_language>change please :(</technical_language>

Target:
public static WebDriver getWebDriverFirefox() { return driverFF; }
Source:
<code>private void push(Candidate toInsert) { boolean isNew = toInsert.add(SEEN); if (!isNew) { for (Candidate p = queue;; p = p.queueNext) { if (p.sourceCommit.equals(toInsert.sourceCommit)) { p.regionList = Region.merge(p.regionList, <START> toInsert.regionList); <END> return; } } } int time = toInsert.getTime(); Candidate n = queue; if (n == null || time > n.getTime() || (time == n.getTime() && isAncestor(n.sourceCommit, toInsert.sourceCommit))) { toInsert.queueNext = n; queue = toInsert; return; } for (Candidate p = n;; p = n) { n = p.queueNext; if (n == null || time > n.getTime() || (time == n.getTime() && isAncestor(n.sourceCommit, toInsert.sourceCommit))) { toInsert.queueNext = n; p.queueNext = toInsert; return; } } }</code><technical_language>toInsert is discarded this point, regionList replaces itself. Is necessary deepCopy in merge method</technical_language>

Target:
private void push(Candidate toInsert) { boolean isNew = toInsert.add(SEEN); if (!isNew) { for (Candidate p = queue; p != null; p = p.queueNext) { if (p.sourceCommit.equals(toInsert.sourceCommit)) { p.regionList = Region.merge(p.regionList, toInsert.regionList); return; } } } int time = toInsert.getTime(); Candidate n = queue; if (n == null || time >= n.getTime()) { toInsert.queueNext = n; queue = toInsert; return; } for (Candidate p = n;; p = n) { n = p.queueNext; if (n == null || time >= n.getTime()) { toInsert.queueNext = n; p.queueNext = toInsert; return; } } }
Source:
<code>public JavaWriter beginAnonymousInnerClass(String referenceType, String name, Set<Modifier> modifiers, String declaredType) throws IOException { indent(); <START> if (modifiers != null) { <END> emitModifiers(modifiers); } if (referenceType != null) { out.write(referenceType); out.write(" "); } if (name != null) { out.write(name); out.write(" = "); } out.write("new "); out.write(declaredType); out.write("() {\n"); pushScope(Scope.ANONYMOUS_INNER_CLASS); return this; }</code><technical_language>prefer require empty sets</technical_language>

Target:
public JavaWriter beginAnonymousInnerClass(String referenceType, String name, Set<Modifier> modifiers, String declaredType) throws IOException { indent(); if (modifiers != null) { emitModifiers(modifiers); } if (referenceType != null) { out.write(referenceType); out.write(" "); } if (name != null) { out.write(name); out.write(" = "); } out.write("new "); out.write(declaredType); out.write("() {\n"); scopes.push(Scope.ANONYMOUS_INNER_CLASS); return this; }
Source:
<code>public static void createMissingHistoricVariables(PvmExecutionImpl execution) { Collection<VariableInstanceEntity> variables = ((ExecutionEntity) execution).getVariablesInternal(); if (variables != null && variables.size() > 0) { for (VariableInstanceEntity variable : variables) { if (variable.getProcessDefinitionId() == null && <START> getHistoryLevel().isHistoryEventProduced(HistoryEventTypes.VARIABLE_INSTANCE_CREATE, variable)) { <END> VariableInstanceHistoryListener.INSTANCE.onCreate(variable, variable.getExecution()); } } } }</code><technical_language>remove this part, is checked in listener's #onCreate method</technical_language>

Target:
public static void createMissingHistoricVariables(PvmExecutionImpl execution) { Collection<VariableInstanceEntity> variables = ((ExecutionEntity) execution).getVariablesInternal(); if (variables != null && variables.size() > 0) { for (VariableInstanceEntity variable : variables) { if (variable.wasCreatedBefore713()) { VariableInstanceHistoryListener.INSTANCE.onCreate(variable, variable.getExecution()); } } } }
Source:
<code>public void apply(RequestTemplate template) { <START> if (tokenExists(oAuth2ClientContext)) { <END> logger.debug("Applying RequestInterceptor customization"); template.header(header, value(tokenType)); } }</code><technical_language>this check optional. OAuth2RestTemplate is - a Filter catches exception redirects auth server</technical_language>

Target:
public void apply(RequestTemplate template) { template.header(header, extract(tokenType)); }
Source:
<code>public void viewUserProfile_shouldPass() throws Exception { User user = Users.signUpAndSignIn(); Users.viewProfile(user); <START> Users.viewProfile(); <END> }</code><technical_language>do check in this TC? "viewProfile" methods do</technical_language>

Target:
public void viewUserProfile_shouldPass() throws Exception { User user = Users.signUpAndSignIn(); Users.viewProfile(user); }
Source:
<code>protected void endWithFailure() { setSucceeded(false); <START> log(); <END> }</code><technical_language>setSucceeded(true)</technical_language>

Target:
protected void endWithFailure() { setSucceeded(true); log(); }
Source:
<code>public void email(final String email, final String link) throws IOException { this.email(email); try { this.postman.send( new Envelope.MIME() .with(new StSubject("Netbout email verification")) .with( new StRecipient( email.substring(email.indexOf('!') + 1) ) ) .with( new EnHTML( <START> StringUtils.join( <END> new Markdown.Default().html( StringUtils.join( "Hi,<br/>Your notification e-mail ", "address for [netbout](http://", "www.netbout.com) has been changed. ", "Please verify it by clicking ", "[here](", link, ")." ) ), "If you did not change your e-mail address ", "you can ignore this message <br/>", "This is an automated e-mail, please ", "do not reply. If you have any questions, ", "submit an issue <a href=\"", "<LINK_0>\"", ">here</a><br/><br/> Best regards,<br/>", "Netbout team" ) ) ) ); } catch (final IOException exc) { throw new IOException( "Exception while sending the verification email ", exc ); } }</code><technical_language>@amihaiemil reason decided StringUtils instead of a Joiner</technical_language>

Target:
public void email(final String email, final String link) throws IOException { this.email(email); try { this.postman.send( new Envelope.MIME() .with(new StSubject("Netbout email verification")) .with( new StRecipient( email.substring(email.indexOf('!') + 1) ) ) .with( new EnHTML( StringUtils.join( new Markdown.Default().html( StringUtils.join( "Hi,<br/>Your notification e-mail ", "address for [netbout](http://", "www.netbout.com) has been changed. ", "Please verify it by clicking ", "[here](", link, ")." ) ), "If you did not change your e-mail address ", "you can ignore this message <br/>", "This is an automated e-mail, please ", "do not reply. If you have any questions, ", "submit an issue <a href=\"", EmAlias.NETBOUT_GITHUB, "\">here</a><br/><br/> Best regards,<br/>", "Netbout team" ) ) ) ); } catch (final IOException exc) { throw new IOException( "Exception while sending the verification email.", exc ); } }
Source:
<code>public void beforeMethod() throws Exception { <START> super.beforeMethod(); <END> subscriptionCatalog = new SubscriptionCatalog(catalog, clock); }</code><technical_language>need if (hasFailed()) {return;} dance</technical_language>

Target:
public void beforeMethod() throws Exception { if (hasFailed()) { return; } super.beforeMethod(); currentVersion = catalog.versionForDate(clock.getUTCNow()); }
Source:
<code>public MessagePacker writePayload(ByteBuffer src) throws IOException { if(src.remaining() >= FLUSH_THRESHOLD) { <START> out.flush(buffer, 0, position); <END> position = 0; MessageBuffer wrapped = MessageBuffer.wrap(src); out.flush(wrapped, src.position(), src.remaining()); } else { while(src.remaining() > 0) { if(position >= buffer.size()) flush(); int writeLen = Math.min(buffer.size() - position, src.remaining()); buffer.putByteBuffer(position, src, writeLen); position += writeLen; src.position(src.position() + writeLen); } } return this; }</code><technical_language>call MessagePacker.flush</technical_language>

Target:
public MessagePacker writePayload(ByteBuffer src) throws IOException { if(src.remaining() >= FLUSH_THRESHOLD) { flush(); MessageBuffer wrapped = MessageBuffer.wrap(src); out.flush(wrapped, src.position(), src.remaining()); src.position(src.limit()); } else { while(src.remaining() > 0) { if(position >= buffer.size()) flush(); int writeLen = Math.min(buffer.size() - position, src.remaining()); buffer.putByteBuffer(position, src, writeLen); position += writeLen; src.position(src.position() + writeLen); } } return this; }
Source:
<code>private void closeOpenEditorsForProject(IProject project) { <START> <END> final List<IEditorReference> editorsToBeClosed = new ArrayList<>(); Map<IFile, IEditorReference> fileEditors = findAllEditorReferences(); Set<IFile> keySet = fileEditors.keySet(); for (IFile file : keySet) { if (file.getProject().equals(project)) { editorsToBeClosed.add(fileEditors.get(file)); } } if (!editorsToBeClosed.isEmpty()) { PlatformUI.getWorkbench().getDisplay() .syncExec(new Runnable() { @Override public void run() { IEditorReference[] editorToBeClosed = new IEditorReference[editorsToBeClosed .size()]; editorToBeClosed = editorsToBeClosed .toArray(editorToBeClosed); activePage.closeEditors(editorToBeClosed, true); } }); } }</code><technical_language>style nit: unnecessary empty lines bad formatting</technical_language>

Target:
private void closeOpenEditorsForProject(IProject project) { final List<IEditorReference> editorRefsToClose = new ArrayList<>(); Map<IFile, IEditorReference> fileEditors = findAllEditorReferences(); Set<IFile> keySet = fileEditors.keySet(); for (IFile file : keySet) { if (file.getProject().equals(project)) { editorRefsToClose.add(fileEditors.get(file)); } } if (editorRefsToClose.isEmpty()) { return; } PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @Override public void run() { IEditorReference[] editorsToClose = new IEditorReference[editorRefsToClose .size()]; editorsToClose = editorRefsToClose.toArray(editorsToClose); activePage.closeEditors(editorsToClose, true); } }); }
Source:
<code>public static Expr flatten(Expr expr) { if (expr instanceof BinaryOpExprBase) { BinaryOpExprBase binary = (BinaryOpExprBase) expr; Expr left = flatten(binary.left); Expr right = flatten(binary.right); if (Evals.isAllConstants(left, right)) { expr = Evals.toConstant(expr.eval(null)); } else if (left != binary.left || right != binary.right) { return Evals.binaryOp(binary, left, right); } } else if (expr instanceof UnaryExpr) { UnaryExpr unary = (UnaryExpr) expr; Expr eval = flatten(unary.expr); if (Evals.isConstant(eval)) { expr = Evals.toConstant(expr.eval(null)); } else if (eval != unary.expr) { if (expr instanceof UnaryMinusExpr) { expr = new UnaryMinusExpr(eval); <START> } else { <END> expr = new UnaryNotExpr(eval); } } } else if (expr instanceof FunctionExpr) { FunctionExpr functionExpr = (FunctionExpr) expr; List<Expr> args = functionExpr.args; boolean flattened = false; for (int i = 0; i < args.size(); i++) { Expr flatten = flatten(args.get(i)); flattened |= flatten != args.get(i); args.set(i, flatten); } if (Evals.isAllConstants(args)) { expr = Evals.toConstant(expr.eval(null)); } else if (flattened) { expr = new FunctionExpr(functionExpr.name, args); } } return expr; }</code><technical_language>prefer dynamically constructing class name else if for UnaryNotExpr() returning original expr for unimplemented cases. Someone's add another UnaryExpr type this work right</technical_language>

Target:
public static Expr flatten(Expr expr) { if (expr instanceof BinaryOpExprBase) { BinaryOpExprBase binary = (BinaryOpExprBase) expr; Expr left = flatten(binary.left); Expr right = flatten(binary.right); if (Evals.isAllConstants(left, right)) { expr = expr.eval(null).toExpr(); } else if (left != binary.left || right != binary.right) { return Evals.binaryOp(binary, left, right); } } else if (expr instanceof UnaryExpr) { UnaryExpr unary = (UnaryExpr) expr; Expr eval = flatten(unary.expr); if (eval instanceof ConstantExpr) { expr = expr.eval(null).toExpr(); } else if (eval != unary.expr) { if (expr instanceof UnaryMinusExpr) { expr = new UnaryMinusExpr(eval); } else if (expr instanceof UnaryNotExpr) { expr = new UnaryNotExpr(eval); } else { expr = unary; } } } else if (expr instanceof FunctionExpr) { FunctionExpr functionExpr = (FunctionExpr) expr; List<Expr> args = functionExpr.args; boolean flattened = false; List<Expr> flattening = Lists.newArrayListWithCapacity(args.size()); for (int i = 0; i < args.size(); i++) { Expr flatten = flatten(args.get(i)); flattened |= flatten != args.get(i); flattening.add(flatten); } if (Evals.isAllConstants(flattening)) { expr = expr.eval(null).toExpr(); } else if (flattened) { expr = new FunctionExpr(functionExpr.name, flattening); } } return expr; }
Source:
<code>private NearbyLocation convert(SolrDocument doc, Geometry originalLocation) { String location = getField(doc, "location_geo", String.class); String title = Optional.ofNullable(getField(doc, "title_txt", String.class)) .filter(Objects::nonNull) <START> .filter(s -> !"".equals(s)) <END> .orElse("NO TITLE"); String cardinalDirection = ""; double distance = 0; try { Geometry geo = WKT_READER_THREAD_LOCAL.get().read(location); cardinalDirection = bearingToCardinalDirection(getBearing(originalLocation.getCentroid(), geo.getCentroid())); distance = originalLocation.distance(geo.getCentroid()) * KM_PER_DEGREE; } catch (org.locationtech.jts.io.ParseException e) { LOGGER.debug("Could not parse location for item (object: {})", doc.toString(), e); } return new NearbyLocationImpl(title, cardinalDirection, distance); }</code><technical_language>filter(s -> !s.isEmpty()) <LINK_0></technical_language>

Target:
private NearbyLocation convert(SolrDocument doc, Geometry originalLocation) { String location = getField(doc, LOCATION, String.class); String title = Optional.ofNullable(getField(doc, NAME, String.class)) .filter(Objects::nonNull) .filter(s -> !s.isEmpty()) .orElse("NO TITLE"); String cardinalDirection = ""; double distance = 0; try { Geometry geo = WKT_READER_THREAD_LOCAL.get().read(location); cardinalDirection = bearingToCardinalDirection(getBearing(originalLocation.getCentroid(), geo.getCentroid())); distance = convertDegreeToKilometer(originalLocation.distance(geo.getCentroid())); } catch (org.locationtech.jts.io.ParseException e) { LOGGER.debug("Could not parse location for item (object: {})", doc.toString(), e); } return new NearbyLocationImpl(title, cardinalDirection, distance); }
Source:
<code>public void copyLogToClipboard(){ AuditLog item = getSelectedItem(); <START> getEventBus().fireEvent(new CopyToClipboardEvent(item.toStringForLogging())); END> }</code><technical_language>move copy functionality ClipboardUtils class. a public static method anyway, need hide functionality events system. a global method. 339 call ClipboardUtils.copyLogToClipboard(...)</technical_language>

Target:
public void copyLogToClipboard(){ StringBuilder contents = new StringBuilder(); for (HasCopyToClipboard row : getSelectedItems()) { contents.append(row.toClipboardString()); contents.append("\n"); } ClipboardUtils.copyToClipboard(contents.toString()); }
Source:
<code>private void cleanCache() { Reference<? extends ClassLoader> ref; while ((ref = DEAD.poll()) != null) { <START> classLoaderCache.remove(((LoaderRef) ref).key); <END> } }</code><technical_language>avoid items killing new ones, lets verify reference coming in cache first: ObjectId key = ((LoaderRef) ref).key; if (classLoaderCache.get(key) == ref) { classLoaderCache.remove(key); }</technical_language>

Target:
private void cleanCache() { Reference<? extends ClassLoader> ref; while ((ref = DEAD.poll()) != null) { ObjectId key = ((LoaderRef) ref).key; if (classLoaderCache.get(key) == ref) { classLoaderCache.remove(key); } } }
Source:
<code>public Long getIngressTimestamp() { Object result = getMessageAnnotation(AMQPMessageSupport.INGRESS_TIMESTAMP); <START> if (result == null) { return null; } <END> return (Long) result; }</code><technical_language>Unnecessary null check variable is Object typed</technical_language>

Target:
public Long getIngressTimestamp() { return (Long) getMessageAnnotation(AMQPMessageSupport.INGRESS_TIME); }
Source:
<code>public @Nullable Converter<?, RequestBody> requestBodyConverter( Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { <START> if (type instanceof Class && ((Class<?>) type).isAnnotationPresent(XmlRootElement.class)) { <END> switch (convertingMediaType) { case XML: return new JaxbXmlRequestConverter<>(contextForType((Class<?>) type), marshalProps, (Class<?>) type); case JSON: return new JaxbJsonRequestConverter<>(contextForType((Class<?>) type), marshalProps, (Class<?>) type); default: throw new IllegalArgumentException("Unsupported content type: " + convertingMediaType); } } return null; }</code><technical_language>Is this annotation present for JSON? a weird</technical_language>

Target:
public @Nullable Converter<?, RequestBody> requestBodyConverter( Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { JAXBContext context = contextForType((Class<?>) type); if (contentType.equals(XML)) { if (((Class<?>) type).isAnnotationPresent(XmlRootElement.class)) { return new JaxbXmlRequestConverter<>(context, (Class<?>) type); } } else { return new JaxbGenericRequestConverter<>(context, contentType, (Class<?>) type); } return null; }
Source:
<code>private String getDate() { <START> final DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ", Locale.ENGLISH); <END> df.setTimeZone(TimeZone.getTimeZone("GMT")); return df.format(new Date()) + "GMT"; }</code><technical_language>Is safer Locale.US instead of ENGLISH</technical_language>

Target:
private String getDate() { final DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ", Locale.US); df.setTimeZone(TimeZone.getTimeZone("GMT")); return df.format(new Date()) + "GMT"; }
Source:
<code><START> private void addJdkPathToSdkProperties(String path) throws IOException { <END> File sdkPropertiesFile = new File(Server.getServersPathFile(), SDKConstants.OPENMRS_SDK_PROPERTIES); Properties sdkProperties = getSdkProperties(); List<String> jdkPaths = getJdkPathsFromProperties(sdkProperties); if (!path.equals(System.getProperty("java.home")) && !isPathLineDuplicated(jdkPaths, path)) { if (jdkPaths.size() == 5) { jdkPaths.set(4, path); } else { jdkPaths.add(path); } Collections.sort(jdkPaths); String updatedProperty = convertListToPropertyString(jdkPaths); sdkProperties.setProperty(SDKConstants.OPENMRS_SDK_PROPERTIES_JDK_HOME, updatedProperty); savePropertiesChangesToFile(sdkProperties, sdkPropertiesFile, AVAILABLE_JDK_VERSIONS); } }</code><technical_language>catch IOException rethrow IllegalStateException (RuntimeException) this method do calling it</technical_language>

Target:
private void addJdkPathToSdkProperties(String path) { File sdkPropertiesFile = new File(Server.getServersPathFile(), SDKConstants.OPENMRS_SDK_PROPERTIES); Properties sdkProperties = null; sdkProperties = getSdkProperties(); List<String> jdkPaths = getJdkPaths(); if (!path.equals(System.getProperty("java.home")) && !isPathLineDuplicated(jdkPaths, path)) { if (jdkPaths.size() == 5) { jdkPaths.set(4, path); } else { jdkPaths.add(path); } Collections.sort(jdkPaths); String updatedProperty = convertListToPropertyString(jdkPaths); sdkProperties.setProperty(SDKConstants.OPENMRS_SDK_PROPERTIES_JDK_HOME, updatedProperty); savePropertiesChangesToFile(sdkProperties, sdkPropertiesFile, SDK_PROPERTIES_FILE); } }
Source:
<code>public Collection<CommandType> getCommandTypes(long deviceId, boolean sms) { List<CommandType> result = new ArrayList<>(); Position lastPosition = Context.getDeviceManager().getLastPosition(deviceId); if (lastPosition != null) { Collection<String> commands; if (sms) { <START> commands = Context.getServerManager().getProtocol(lastPosition.getProtocol()).getSupportedSmsCommands(); <END> } else { commands = Context.getServerManager().getProtocol(lastPosition.getProtocol()).getSupportedCommands(); } for (String commandKey : commands) { result.add(new CommandType(commandKey)); } } else { result.add(new CommandType(Command.TYPE_CUSTOM)); } return result; }</code><technical_language>I code more readable if get protocol ternary operator get commands list</technical_language>

Target:
public Collection<CommandType> getCommandTypes(long deviceId, boolean sms) { List<CommandType> result = new ArrayList<>(); Position lastPosition = Context.getDeviceManager().getLastPosition(deviceId); if (lastPosition != null) { BaseProtocol protocol = Context.getServerManager().getProtocol(lastPosition.getProtocol()); Collection<String> commands; commands = sms ? protocol.getSupportedSmsCommands() : protocol.getSupportedCommands(); for (String commandKey : commands) { result.add(new CommandType(commandKey)); } } else { result.add(new CommandType(Command.TYPE_CUSTOM)); } return result; }
Source:
<code>protected void verifyOutput(ProductContent source, ProductContentDTO dto, boolean childrenGenerated) { if (source != null) { assertEquals(source.isEnabled(), dto.getEnabled()); if (childrenGenerated) { Content content = source.getContent(); ContentDTO contentDto = dto.getContent(); <START> assertEquals(content.getUuid(), contentDto.getUuid()); assertEquals(content.getId(), contentDto.getId()); assertEquals(content.getType(), contentDto.getType()); assertEquals(content.getLabel(), contentDto.getLabel()); assertEquals(content.getName(), contentDto.getName()); assertEquals(content.getVendor(), contentDto.getVendor()); assertEquals(content.getContentUrl(), contentDto.getContentUrl()); assertEquals(content.getRequiredTags(), contentDto.getRequiredTags()); assertEquals(content.getReleaseVersion(), contentDto.getReleaseVer()); assertEquals(content.getGpgUrl(), contentDto.getGpgUrl()); assertEquals(content.getMetadataExpiration(), contentDto.getMetadataExpire()); assertEquals(content.getModifiedProductIds(), contentDto.getModifiedProductIds()); assertEquals(content.getArches(), contentDto.getArches()); <END> } } else { assertNull(dto); } }</code><technical_language>Code duplication: This replaced calling ContentTranslatorTest's verifyOutput method</technical_language>

Target:
protected void verifyOutput(ProductContent source, ProductContentDTO dto, boolean childrenGenerated) { if (source != null) { assertEquals(source.isEnabled(), dto.getEnabled()); if (childrenGenerated) { this.contentTranslatorTest.verifyOutput( source.getContent(), dto.getContent(), childrenGenerated); } } else { assertNull(dto); } }
Source:
<code>public void setBaseIri(String baseIri) { if (baseIri == null) <START> return; <END> this.baseIri = baseIri; }</code><technical_language>Style: braces in if, if line. Logic: accept null silently. Throw exception. Validate.notNull() for this</technical_language>

Target:
public void setBaseIri(String baseIri) { Validate.notNull(baseIri); this.baseIri = baseIri; }
Source:
<code>public final boolean breakpointDisabled( @Cached("breakpoint.getAssumption()") final Assumption bpUnchanged) { <START> return ActivityThread.isSteppingType(breakpoint.getSteppingType()); <END> }</code><technical_language>disabled state of breakpoint depend stepping. I is a good approach. fits in this location I implemented, I think</technical_language>

Target:
public final boolean breakpointDisabled( @Cached("breakpoint.getAssumption()") final Assumption bpUnchanged) { return breakpoint.getSteppingType().isSet(); }
Source:
<code>protected TestOrder cloneForRevisionHelper(TestOrder target) { super.cloneForRevisionHelper(target); target.setSpecimenSource(getSpecimenSource()); target.setLaterality(getLaterality()); target.setClinicalHistory(getClinicalHistory()); target.setFrequency(getFrequency()); target.setNumberOfRepeats(getNumberOfRepeats()); target.setOrderGroup(getOrderGroup()); <START> target.setSortWeight(getSortWeight()); <END> return target; }</code><technical_language>this in superclass</technical_language>

Target:
protected TestOrder cloneForRevisionHelper(TestOrder target) { super.cloneForRevisionHelper(target); target.setSpecimenSource(getSpecimenSource()); target.setLaterality(getLaterality()); target.setClinicalHistory(getClinicalHistory()); target.setFrequency(getFrequency()); target.setNumberOfRepeats(getNumberOfRepeats()); return target; }
Source:
<code><START> public FluoConfiguration setApplicationName(String applicationName) { <END> return setNonEmptyString(CLIENT_APPLICATION_NAME_PROP, applicationName); }</code><technical_language>check app name chars allowed in a zookeeper node name</technical_language>

Target:
public FluoConfiguration setApplicationName(String applicationName) { verifyApplicationName(applicationName); setProperty(CLIENT_APPLICATION_NAME_PROP, applicationName); return this; }
Source:
<code>protected void executeQueryCommand() { List<VmTemplate> returnValue = DbFacade.getInstance() .getVmTemplateDao() .getAllForStorageDomain(getParameters().getId(), getUserID(), getParameters().isFiltered()); for (VmTemplate template : returnValue) { <START> VmTemplateHandler.updateDisksFromDb(template); <END> Collections.sort(template.getDiskList(), new DiskByDiskAliasComparator()); } Collections.sort(returnValue, Collections.reverseOrder(new VmTemplateComparerByDiskSize())); getQueryReturnValue().setReturnValue(returnValue); }</code><technical_language>need check isWithDisks here</technical_language>

Target:
protected void executeQueryCommand() { List<VmTemplate> returnValue = DbFacade.getInstance() .getVmTemplateDao() .getAllForStorageDomain(getParameters().getId(), getUserID(), getParameters().isFiltered()); if (getParameters().isWithDisks()) { for (VmTemplate template : returnValue) { VmTemplateHandler.updateDisksFromDb(template); Collections.sort(template.getDiskList(), new DiskByDiskAliasComparator()); } } Collections.sort(returnValue, Collections.reverseOrder(new VmTemplateComparerByDiskSize())); getQueryReturnValue().setReturnValue(returnValue); }
Source:
<code>public void onLoadFinished(Loader<List<User>> listLoader, List<User> orgs) { this.orgs = orgs; orgListAdapter.setList(orgs); int sharedPreferencesOrgId = sharedPreferences.getInt(PREF_ORG_ID, -1); <START> int targetOrgId = (org == null) ? sharedPreferencesOrgId : org.getId(); <END> for (int i = 0; i < orgs.size(); ++i) { User availableOrg = orgs.get(i); if (availableOrg.getId() == targetOrgId) { getSupportActionBar().setSelectedNavigationItem(i); break; } } }</code><technical_language>Parentheses needed for null check</technical_language>

Target:
public void onLoadFinished(Loader<List<User>> listLoader, List<User> orgs) { this.orgs = orgs; orgListAdapter.setList(orgs); int sharedPreferencesOrgId = sharedPreferences.getInt(PREF_ORG_ID, -1); int targetOrgId = org == null ? sharedPreferencesOrgId : org.getId(); for (int i = 0; i < orgs.size(); ++i) { User availableOrg = orgs.get(i); if (availableOrg.getId() == targetOrgId) { getSupportActionBar().setSelectedNavigationItem(i); break; } } }
Source:
<code>public void onClick(final View arg0) { if (requestTokenDialog == null) { requestTokenDialog = new ProgressDialog(TokenAuthorizationActivity.this); requestTokenDialog.setCancelable(false); requestTokenDialog.setMessage(getAuthDialogWait()); } requestTokenDialog.show(); startButton.setEnabled(false); startButton.setOnTouchListener(null); startButton.setOnClickListener(null); RxUtils.networkScheduler.createWorker().schedule(new Action0() { @Override public void call() { <START> requestToken(usernameEditText.getText().toString(), passwordEditText.getText().toString()); <END> } }); }</code><technical_language>supposed access usernameEditText.getText() network thread. Capture username password final String variables right scheduling action</technical_language>

Target:
public void onClick(final View arg0) { if (requestTokenDialog == null) { requestTokenDialog = new ProgressDialog(TokenAuthorizationActivity.this); requestTokenDialog.setCancelable(false); requestTokenDialog.setMessage(getAuthDialogWait()); } requestTokenDialog.show(); startButton.setEnabled(false); startButton.setOnTouchListener(null); startButton.setOnClickListener(null); final String username = usernameEditText.getText().toString(); final String password = passwordEditText.getText().toString(); RxUtils.networkScheduler.createWorker().schedule(new Action0() { @Override public void call() { requestToken(username, password); } }); }
Source:
<code>private void writeLine(String line) throws Exception { logger.debug("Sending request:'" + line + "'"); if (!isConnected()) { login(); } BufferedWriter writer; try { writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); writer.write(line); writer.newLine(); writer.flush(); } catch (Exception e) { <START> logger.debug("Could not write line. Disconnecting..., exception was: " + e); <END> disconnect(); throw (e); } }</code><technical_language>Please parameterized logging, method signature takes a Throwable argument</technical_language>

Target:
private void writeLine(String line) throws Exception { logger.debug("Sending request:'{}'", line); if (!isConnected()) { login(); } BufferedWriter writer; try { writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); writer.write(line); writer.newLine(); writer.flush(); } catch (Exception e) { logger.debug("Could not write line. Disconnecting..., exception..", e); disconnect(); throw (e); } }
Source:
<code>public void regressionTest() throws Exception { final Img<UnsignedByteType> image = openUnsignedByteType(getClass(), "lowresbridge.tif"); final Img<UnsignedByteType> expectedOutput = openUnsignedByteType( getClass(), "rotatedscaledcenter.tif"); final AffineTransform2D transform = new AffineTransform2D(); transform.translate(-image.dimension(0) / 2, -image.dimension(0) / 2); transform.rotate(1); transform.scale(0.5); transform.translate(image.dimension(0) / 2, image.dimension(0) / 2); final RandomAccessibleInterval<UnsignedByteType> actualOutput = ops <START> .transform().realTransform(image, transform); <END> final Cursor<UnsignedByteType> cursor = Views.iterable(actualOutput) .localizingCursor(); final RandomAccess<UnsignedByteType> actualRA = actualOutput.randomAccess(); final RandomAccess<UnsignedByteType> expectedRA = expectedOutput .randomAccess(); while (cursor.hasNext()) { cursor.fwd(); actualRA.setPosition(cursor); expectedRA.setPosition(cursor); assertEquals(expectedRA.get().get(), actualRA.get().get(), 0); } }</code><technical_language>ops().run(net.imagej.ops.transform.realTransform.DefaultTransformView.class, image, transform);, ensure DefaultTransformView is tested</technical_language>

Target:
public void regressionTest() throws Exception { final Img<UnsignedByteType> image = openUnsignedByteType(getClass(), "lowresbridge.tif"); final Img<UnsignedByteType> expectedOutput = openUnsignedByteType( getClass(), "rotatedscaledcenter.tif"); final AffineTransform2D transform = new AffineTransform2D(); transform.translate(-image.dimension(0) / 2, -image.dimension(0) / 2); transform.rotate(1); transform.scale(0.5); transform.translate(image.dimension(0) / 2, image.dimension(0) / 2); @SuppressWarnings("unchecked") final RandomAccessibleInterval<UnsignedByteType> actualOutput = (RandomAccessibleInterval<UnsignedByteType>) ops.run( net.imagej.ops.transform.realTransform.DefaultTransformView.class, image, transform); final Cursor<UnsignedByteType> cursor = Views.iterable(actualOutput) .localizingCursor(); final RandomAccess<UnsignedByteType> actualRA = actualOutput.randomAccess(); final RandomAccess<UnsignedByteType> expectedRA = expectedOutput .randomAccess(); while (cursor.hasNext()) { cursor.fwd(); actualRA.setPosition(cursor); expectedRA.setPosition(cursor); assertEquals(expectedRA.get().get(), actualRA.get().get(), 0); } }
Source:
<code>public void testIfColonPresentAtTheStartInUriCreds() { locator.setUri("http://:foobar@localhost:9999"); assertEquals("http://localhost:9999", locator.getRawUri()); <START> assertEquals("user", locator.getUsername()); <END> assertEquals("foobar", locator.getPassword()); }</code><technical_language>This test is invalid user in this case empty string user specified. colon splits username password</technical_language>

Target:
public void testIfColonPresentAtTheStartInUriCreds() { locator.setUri("http://:foobar@localhost:9999"); assertEquals("http://localhost:9999", locator.getRawUri()); assertEquals("", locator.getUsername()); assertEquals("foobar", locator.getPassword()); }
Source:
<code>protected void createDefaultEndStates(final Flow flow) { createRedirectUnauthorizedServiceUrlEndState(flow); createServiceErrorEndState(flow); createRedirectEndState(flow); createPostEndState(flow); createInjectHeadersActionState(flow); createGenericLoginSuccessEndState(flow); createServiceWarningViewState(flow); <START> createMfaDeniedViewState(flow); <END> createMfaUnavailableViewState(flow); createEndWebflowEndState(flow); }</code><technical_language>this belong here? I a home configures mfa flow in general. try flow defn _pure_ possible, interject a feature is used</technical_language>

Target:
protected void createDefaultEndStates(final Flow flow) { createRedirectUnauthorizedServiceUrlEndState(flow); createServiceErrorEndState(flow); createRedirectEndState(flow); createPostEndState(flow); createInjectHeadersActionState(flow); createGenericLoginSuccessEndState(flow); createServiceWarningViewState(flow); createEndWebflowEndState(flow); }
Source:
<code>public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle args = getArguments(); int size = args.getInt(ARG_SIZE); String message = args.getString(ARG_MESSAGE); <START> messagingListener = new SimpleMessagingListener(){ <END> @Override public void updateProgress(int progress) { updateDownloadProgress(progress); } }; MessagingController.getInstance(getActivity()).addDownloadProgressListener(messagingListener); dialog = new ProgressDialog(getActivity()); dialog.setMessage(message); dialog.setMax(size); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setProgress(0); dialog.show(); return dialog; }</code><technical_language>Code style: Missing space</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle args = getArguments(); int size = args.getInt(ARG_SIZE); String message = args.getString(ARG_MESSAGE); progress = 0; messagingListener = new SimpleMessagingListener() { @Override public void updateProgress(int progress) { updateDownloadProgress(progress); } }; MessagingController.getInstance(getActivity()).addDownloadProgressListener(messagingListener); dialog = new ProgressDialog(getActivity()); dialog.setMessage(message); dialog.setMax(size); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setProgress(0); dialog.show(); return dialog; }
Source:
<code>public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = getPermissionList(getParameters().getEvent()); if (hasHostExternalStatus()) { permissionList.add(new PermissionSubject(getParameters().getEvent().getVdsId(), VdcObjectType.VDS, ActionGroup.EDIT_HOST_CONFIGURATION)); <START> } <END> return permissionList; }</code><technical_language>setting permissions for that</technical_language>

Target:
public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = getPermissionList(getParameters().getEvent()); if (hasHostExternalStatus()) { permissionList.add(new PermissionSubject(getParameters().getEvent().getVdsId(), VdcObjectType.VDS, ActionGroup.EDIT_HOST_CONFIGURATION)); } if (hasStorageDomainExternalStatus()) { permissionList.add(new PermissionSubject(getParameters().getEvent().getStorageDomainId(), VdcObjectType.Storage, ActionGroup.EDIT_STORAGE_DOMAIN_CONFIGURATION)); } return permissionList; }
Source:
<code>protected boolean overlapInstant(Instant aStart, Instant aEnd, Instant bStart, Instant bEnd) { <START> return (aStart.isBefore(bEnd) && bStart.isBefore(aEnd)); <END> }</code><technical_language>Remove extra parentheses</technical_language>

Target:
protected boolean overlapInstant(Instant aStart, Instant aEnd, Instant bStart, Instant bEnd) { return aStart.isBefore(bEnd) && bStart.isBefore(aEnd); }
Source:
<code>public void testSortingNoSortMapping() throws Exception { expectedEx.expect(UnsupportedQueryException.class); expectedEx.expectMessage("Source WFS_ID does not support specified sort property title"); mapSchemaToFeatures(ONE_TEXT_PROPERTY_SCHEMA_PERSON, ONE_FEATURE); setUpMocks(null, null, ONE_FEATURE, ONE_FEATURE); final QueryImpl propertyIsLikeQuery = new QueryImpl(builder.attribute(Metacard.ANY_TEXT).is().like().text("literal")); setupMapper(null, null, null); source.setMetacardMappers(metacardMappers); source.setDisableSorting(false); propertyIsLikeQuery.setSortBy(new SortByImpl("title", SortOrder.ASCENDING)); <START> final ArgumentCaptor<GetFeatureType> captor = ArgumentCaptor.forClass(GetFeatureType.class); <END> source.query(new QueryRequestImpl(propertyIsLikeQuery)); }</code><technical_language>need a captor for this test (or for of tests expect exception)</technical_language>

Target:
public void testSortingNoSortMapping() throws Exception { expectedEx.expect(UnsupportedQueryException.class); expectedEx.expectMessage("Source WFS_ID does not support specified sort property title"); mapSchemaToFeatures(ONE_TEXT_PROPERTY_SCHEMA_PERSON, ONE_FEATURE); setUpMocks(null, null, ONE_FEATURE, ONE_FEATURE); final QueryImpl propertyIsLikeQuery = new QueryImpl(builder.attribute(Metacard.ANY_TEXT).is().like().text("literal")); setupMapper(null, null, null); source.setMetacardMappers(metacardMappers); source.setDisableSorting(false); propertyIsLikeQuery.setSortBy(new SortByImpl("title", SortOrder.ASCENDING)); source.query(new QueryRequestImpl(propertyIsLikeQuery)); }
Source:
<code><START> public static Boolean isDefaultMaskPassword() { <END> return null; }</code><technical_language>this? need a state? true / false / undefined? boolean.. mask not... Besides.. if need option.. I DEFAULT_MASK_PASSWORD = null; instead of returning null here. I understand need it</technical_language>

Target:
public static Boolean isDefaultMaskPassword() { return DEFAULT_MASK_PASSWORD; }
Source:
<code>public final Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable { if (ctx.isOriginLocal() && !isLocalModeForced(command)) { <START> if (!isSynchronous(command)) { <END> rpcManager.sendToAll(command, DeliverOrder.PER_SENDER); return invokeNext(ctx, command); } else { RpcOptions rpcOptions = rpcManager.getSyncRpcOptions(); return asyncInvokeNext(ctx, command, rpcManager.invokeCommandOnAll(command, MapResponseCollector.ignoreLeavers(), rpcOptions)); } } return invokeNext(ctx, command); }</code><technical_language>invert if avoid negate condition</technical_language>

Target:
public final Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable { if (ctx.isOriginLocal() && !isLocalModeForced(command)) { if (isSynchronous(command)) { RpcOptions rpcOptions = rpcManager.getSyncRpcOptions(); return asyncInvokeNext(ctx, command, rpcManager.invokeCommandOnAll(command, MapResponseCollector.ignoreLeavers(), rpcOptions)); } else { rpcManager.sendToAll(command, DeliverOrder.PER_SENDER); return invokeNext(ctx, command); } } return invokeNext(ctx, command); }
Source:
<code>protected boolean verifySnapshotsStatus(List<Snapshot> snapshots) { for (Snapshot snapshot : snapshots) { <START> if (snapshot.getStatus() != SnapshotStatus.OK && snapshot.getStatus() != SnapshotStatus.BROKEN) { <END> return false; } } return true; }</code><technical_language>broken is considered valid - btu, note broken status removed</technical_language>

Target:
protected boolean verifySnapshotsStatus(List<Snapshot> snapshots) { for (Snapshot snapshot : snapshots) { if (snapshot.getStatus() != SnapshotStatus.OK) { return false; } } return true; }