auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SiriusGenericDecorator(IDecoratorTarget decoratorTarget, Set<SiriusDecorationDescriptorProvider> decorationDescriptorProviders) { super(decoratorTarget); this.decorationDescriptorProviders = decorationDescriptorProviders; editPart = (GraphicalEditPart) getDecoratorTarget().getAdapter(GraphicalEditPart.class); <START> View view = (View) getDecoratorTarget().getAdapter(View.class); DRepresentationElement model = (DRepresentationElement) view.getElement(); <END> }</code><technical_language>delete (dead code)</technical_language>

Target:
public SiriusGenericDecorator(IDecoratorTarget decoratorTarget, Set<SiriusDecorationDescriptorProvider> decorationDescriptorProviders) { super(decoratorTarget); this.decorationDescriptorProviders = decorationDescriptorProviders; editPart = (GraphicalEditPart) getDecoratorTarget().getAdapter(GraphicalEditPart.class); View view = (View) getDecoratorTarget().getAdapter(View.class); DRepresentationElement model = (DRepresentationElement) view.getElement(); this.session = SessionManager.INSTANCE.getSession(model.getTarget()); }
Source:
<code>public static void main(String[] args) throws InterruptedException { long count = 0; long nanos = System.nanoTime(); <START> int max = 10; <END> if (0 < args.length) { max = Integer.parseInt(args[0]); } List<ExampleDTLSClient> clients = new ArrayList<>(); for (int index = 0; index < max; ++index) { ExampleDTLSClient client = startTest(args); clients.add(client); } for (ExampleDTLSClient client : clients) { count += client.waitReady(100000, TimeUnit.SECONDS); } nanos = System.nanoTime() - nanos; System.out.println(count + " messages in " + TimeUnit.NANOSECONDS.toMillis(nanos) + " ms"); System.out.println((count * 1000) / TimeUnit.NANOSECONDS.toMillis(nanos) + " messages per s"); }</code><technical_language>I for 1 client default</technical_language>

Target:
public static void main(String[] args) throws InterruptedException { long count = 0; long nanos = System.nanoTime(); int max = 1; if (0 < args.length) { max = Integer.parseInt(args[0]); } List<ExampleDTLSClient> clients = new ArrayList<>(); for (int index = 0; index < max; ++index) { ExampleDTLSClient client = startTest(args); clients.add(client); } for (ExampleDTLSClient client : clients) { count += client.waitReady(100000, TimeUnit.SECONDS); } nanos = System.nanoTime() - nanos; System.out.println(count + " messages in " + TimeUnit.NANOSECONDS.toMillis(nanos) + " ms"); System.out.println((count * 1000) / TimeUnit.NANOSECONDS.toMillis(nanos) + " messages per s"); }
Source:
<code>protected PurchaseOrderDocument createPurchaseOrderDocumentFromSourceDocument( PurchaseOrderDocument sourceDocument, String docType) throws WorkflowException { PurchaseOrderDocument newDocument = super.createPurchaseOrderDocumentFromSourceDocument(sourceDocument, docType); List<PurApItem> items = (List<PurApItem>) newDocument.getItems(); items.stream() .flatMap((item) -> item.getSourceAccountingLines().stream()) <START> .forEach((accountingLine) -> accountingLine.setOverrideCode(AccountingLineOverride.CODE.NONE)); <END> return newDocument; }</code><technical_language>a filter step in here, accounting lines override code get set none? confirm, do need do this target lines</technical_language>

Target:
protected PurchaseOrderDocument createPurchaseOrderDocumentFromSourceDocument( PurchaseOrderDocument sourceDocument, String docType) throws WorkflowException { PurchaseOrderDocument newDocument = super.createPurchaseOrderDocumentFromSourceDocument(sourceDocument, docType); resetOverrideCodesOnItemAccountingLines(newDocument); return newDocument; }
Source:
<code>public void init() { if (catalinaBase == null || "".equals(catalinaBase)) catalinaBase = catalinaHome; log.info("Java home: " + java); lifecycle = new TomcatServerLifecycle(this); <START> evaluateFile((evaluatedFile) -> { <END> Path filesystemFile; try { URL resource = getClass().getResource("/" + evaluatedFile); filesystemFile = FileSystems.getDefault().getPath(evaluatedFile); Path target = FileSystems.getDefault().getPath(catalinaBase, "conf", "radargun-tomcat-" + ServiceHelper.getContext().getSlaveIndex() + ".xml"); if (resource != null) { try (InputStream is = resource.openStream()) { log.info("Found " + evaluatedFile + " as a resource"); Files.copy(is, target, StandardCopyOption.REPLACE_EXISTING); } } else if (filesystemFile.toFile().exists()) { log.info("Found " + evaluatedFile + " in plugin directory"); Files.copy(filesystemFile, target, StandardCopyOption.REPLACE_EXISTING); } else if (FileSystems.getDefault().getPath(catalinaBase, "conf", evaluatedFile).toFile().exists()) { log.info("Found " + evaluatedFile + " in server conf/ directory"); filesystemFile = FileSystems.getDefault().getPath(catalinaBase, "conf", evaluatedFile); Files.copy(filesystemFile, target, StandardCopyOption.REPLACE_EXISTING); } else { throw new FileNotFoundException("File " + evaluatedFile + " not found neither as resource nor in filesystem."); } } catch (IOException e) { log.error("Failed to copy file", e); throw new RuntimeException(e); } return filesystemFile.toString(); }); }</code><technical_language>again, I if is a remove some of this boiler plate code? a method in ProcessService class</technical_language>

Target:
public void init() { if (catalinaBase == null || "".equals(catalinaBase)) catalinaBase = catalinaHome; log.info("Java home: " + java); lifecycle = new TomcatServerLifecycle(this); evaluateFile(catalinaHome, "conf"); }
Source:
<code>public QuestionableActivityListingDTO checkNonCuresAuditCriteriaOnCreate(CertifiedProductSearchDetails newListing) { QuestionableActivityListingDTO activity = null; if (ff4j.check(FeatureList.EFFECTIVE_RULE_DATE)) { <START> if (!newListing.getIcs().getInherits()) { <END> List<CertificationResult> matchingCertResults = newListing.getCertificationResults().stream() .filter(cr -> cr.isSuccess() && (cr.getCriterion().getId().equals(d2Criterion.getId()) || cr.getCriterion().getId().equals(d3Criterion.getId()) || cr.getCriterion().getId().equals(d10Criterion.getId()))) .collect(Collectors.toList()); if (matchingCertResults.size() > 0) { String criteriaNumbers = matchingCertResults.stream() .map(cr -> cr.getCriterion().getNumber()) .collect(Collectors.joining(", ")); activity = new QuestionableActivityListingDTO(); activity.setAfter(criteriaNumbers); } } } return activity; }</code><technical_language>is chance newListing.getIcs() null</technical_language>

Target:
public QuestionableActivityListingDTO checkNonCuresAuditCriteriaOnCreate(CertifiedProductSearchDetails newListing) { QuestionableActivityListingDTO activity = null; Date certificationDate = new Date(newListing.getCertificationDate()); if (certificationDate.equals(specialProperties.getEffectiveRuleDate()) || certificationDate.after(specialProperties.getEffectiveRuleDate())) { if (!hasICS(newListing)) { List<CertificationResult> matchingCertResults = newListing.getCertificationResults().stream() .filter(cr -> cr.isSuccess() && (cr.getCriterion().getId().equals(d2Criterion.getId()) || cr.getCriterion().getId().equals(d3Criterion.getId()) || cr.getCriterion().getId().equals(d10Criterion.getId()))) .collect(Collectors.toList()); if (matchingCertResults.size() > 0) { String criteriaNumbers = matchingCertResults.stream() .map(cr -> cr.getCriterion().getNumber()) .collect(Collectors.joining(", ")); activity = new QuestionableActivityListingDTO(); activity.setAfter(criteriaNumbers); } } } return activity; }
Source:
<code>public static void setUpClass() throws Exception { <START> repository = new TestRepository(); <END> repository.create(HistoryGuru.class.getResourceAsStream( "repositories.zip")); RepositoryFactory.setIgnored(); FileUtilities.getAllFiles(new File(repository.getSourceRoot()), files, true); RuntimeEnvironment.getInstance().setVerbose(true); HistoryGuru instance = HistoryGuru.getInstance(); instance.addRepositories(repository.getSourceRoot()); instance.createCache(); Collection<String> repos = new ArrayList<>(); repos.add("git"); repos.add("bazaar"); repos.add("mercurial"); repos.add("teamware"); repos.add("rcs_test"); repos.add("nonexistent"); instance.createCache(repos); }</code><technical_language>copyright</technical_language>

Target:
public static void setUpClass() throws Exception { repository = new TestRepository(); repository.create(HistoryGuru.class.getResourceAsStream( "repositories.zip")); RepositoryFactory.setIgnored(RuntimeEnvironment.getInstance()); FileUtilities.getAllFiles(new File(repository.getSourceRoot()), files, true); RuntimeEnvironment.getInstance().setVerbose(true); HistoryGuru instance = HistoryGuru.getInstance(); instance.addRepositories(repository.getSourceRoot()); instance.createCache(); Collection<String> repos = new ArrayList<>(); repos.add("git"); repos.add("bazaar"); repos.add("mercurial"); repos.add("teamware"); repos.add("rcs_test"); repos.add("nonexistent"); instance.createCache(repos); }
Source:
<code>public void write(Path path, byte[] data, Consumer<Long> progressConsumer) { FileWrapper directory = getDirectory(path); Optional<FileWrapper> existingFile = userContext.getByPath(path).join(); if (existingFile.isPresent() && existingFile.get().getFileProperties().isDirectory) { <START> return; <END> } AsyncReader resetableFileInputStream = new AsyncReader.ArrayBacked(data); String fileName = path.getFileName().toString(); ProgressConsumer<Long> pc = l -> progressConsumer.accept(l); FileWrapper fileWrapper = directory.uploadOrOverwriteFile(fileName, resetableFileInputStream, data.length, userContext.network, userContext.crypto, pc, userContext.crypto.random.randomBytes(32)).join(); }</code><technical_language>check is writable</technical_language>

Target:
public void write(Path path, byte[] data, Consumer<Long> progressConsumer) { FileWrapper directory = getDirectory(path); AsyncReader resetableFileInputStream = new AsyncReader.ArrayBacked(data); String fileName = path.getFileName().toString(); ProgressConsumer<Long> pc = l -> progressConsumer.accept(l); FileWrapper fileWrapper = directory.uploadOrOverwriteFile(fileName, resetableFileInputStream, data.length, userContext.network, userContext.crypto, pc, userContext.crypto.random.randomBytes(32)).join(); }
Source:
<code>public void handleCancel(String consumerTag) { <START> log.info("consumer has been cancelled unexpectedly: " + consumerTag); <END> queue.handleEnd(); }</code><technical_language>change this</technical_language>

Target:
public void handleCancel(String consumerTag) { log.debug("consumer has been cancelled unexpectedly: " + consumerTag); queue.handleEnd(); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; List<Cookie> ssoCookies = CookieUtils.getCookiesForName(req, cookieName); if (ssoCookies.isEmpty()) { for (final String path : unAuthenticatedPaths) { if (req.getRequestURI().contains(path)) { final Subject sub = new Subject(); sub.getPrincipals().add(new PrimaryPrincipal("anonymous")); LOGGER.unAuthenticatePathBypass(path, req.getRequestURI()); continueWithEstablishedSecurityContext(sub, req, res, chain); } } if (req.getMethod().equals("OPTIONS")) { Subject sub = new Subject(); sub.getPrincipals().add(new PrimaryPrincipal("anonymous")); continueWithEstablishedSecurityContext(sub, req, res, chain); } <START> else { <END> sendRedirectToLoginURL(req, res); } } else { for(Cookie ssoCookie : ssoCookies) { String wireToken = ssoCookie.getValue(); try { JWT token = new JWTToken(wireToken); if (validateToken(req, res, chain, token)) { Subject subject = createSubjectFromToken(token); continueWithEstablishedSecurityContext(subject, req, res, chain); return; } } catch (ParseException ignore) { } } if(res != null && !res.isCommitted()) { sendRedirectToLoginURL(req, res); } } }</code><technical_language>good reason bumped this else line</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; List<Cookie> ssoCookies = CookieUtils.getCookiesForName(req, cookieName); if (ssoCookies.isEmpty()) { for (final String path : unAuthenticatedPaths) { if (req.getRequestURI().contains(path)) { final Subject sub = new Subject(); sub.getPrincipals().add(new PrimaryPrincipal("anonymous")); LOGGER.unauthenticatedPathBypass(path, req.getRequestURI()); continueWithEstablishedSecurityContext(sub, req, res, chain); } } if ("OPTIONS".equals(req.getMethod())) { Subject sub = new Subject(); sub.getPrincipals().add(new PrimaryPrincipal("anonymous")); continueWithEstablishedSecurityContext(sub, req, res, chain); } else { sendRedirectToLoginURL(req, res); } } else { for(Cookie ssoCookie : ssoCookies) { String wireToken = ssoCookie.getValue(); try { JWT token = new JWTToken(wireToken); if (validateToken(req, res, chain, token)) { Subject subject = createSubjectFromToken(token); continueWithEstablishedSecurityContext(subject, req, res, chain); return; } } catch (ParseException ignore) { } } if(res != null && !res.isCommitted()) { sendRedirectToLoginURL(req, res); } } }
Source:
<code>private List<List<Type>> computeChains(Symbol m, Type type) { Symbol.TypeSymbol typeSymbol = type.symbol(); Set<ClassJavaType> superTypes = ((JavaSymbol.TypeJavaSymbol) typeSymbol).directSuperTypes(); List<List<Type>> result = new ArrayList<>(); for (Type superType: superTypes) { <START> for (List<Type> chain: computeChains(m, superType)) { <END> List<Type> newChain = new ArrayList<>(); newChain.addAll(chain); newChain.add(type); result.add(newChain); } } boolean definesSymbol = definesSymbol(m, typeSymbol, false); boolean isSpecialization = !((JavaType) startType).isParameterized() && ((JavaType) type).isParameterized(); if (definesSymbol && !isSpecialization && result.isEmpty()) { List<Type> newChain = new ArrayList<>(); newChain.add(type); result.add(newChain); } return result; }</code><technical_language>This dealt Stream API IMO : supertypes.stream.map(computeChains).map(c -> newChain).collect</technical_language>

Target:
private List<List<Type>> computeChains(Symbol m, Type type) { Symbol.TypeSymbol typeSymbol = type.symbol(); Set<ClassJavaType> superTypes = ((JavaSymbol.TypeJavaSymbol) typeSymbol).directSuperTypes(); List<List<Type>> result = superTypes.stream() .flatMap(superType -> computeChains(m, superType).stream()) .peek(c -> c.add(type)) .collect(Collectors.toList()); boolean definesSymbol = definesSymbol(m, typeSymbol); boolean isSpecialization = !((JavaType) startType).isParameterized() && ((JavaType) type).isParameterized(); if (definesSymbol && !isSpecialization && result.isEmpty()) { result.add(Lists.newArrayList(type)); } return result; }
Source:
<code>public VisitContext getVisitContext(FacesContext context, Collection<String> ids, Set<VisitHint> hints) { if (ids != null) { UIViewRoot viewRoot = context.getViewRoot(); char separator = UINamingContainer.getSeparatorChar(context); String containerClientIdAndSeparator = viewRoot.getContainerClientId(context) + separator; ArrayList<String> newIds = new ArrayList<String>(); for (String id : ids) { if (!id.startsWith(separator + "")) { <START> if (!id.startsWith(containerClientIdAndSeparator)) { <END> id = containerClientIdAndSeparator + id; } } newIds.add(id); } ids = newIds; } return wrappedVisitContextFactory.getVisitContext(context, ids, hints); }</code><technical_language>line 35 36 simplified if (!id.startsWith(separator) && !id.startsWith(containerClientIdAndSeparator) {? wondering if containerClientId prepended id begins seperatorChar. sense? I technically if prepend a seperatorChar start root. in a portlet, root containerClientId</technical_language>

Target:
public VisitContext getVisitContext(FacesContext context, Collection<String> ids, Set<VisitHint> hints) { if (ids != null) { UIViewRoot viewRoot = context.getViewRoot(); String separator = String.valueOf(UINamingContainer.getSeparatorChar(context)); String containerClientIdAndSeparator = viewRoot.getContainerClientId(context) + separator; List<String> newIds = new ArrayList<String>(); for (String id : ids) { if (!id.startsWith(separator) && !id.startsWith(containerClientIdAndSeparator)) { id = containerClientIdAndSeparator + id; } newIds.add(id); } ids = newIds; } return wrappedVisitContextFactory.getVisitContext(context, ids, hints); }
Source:
<code>public SortedMap<Dependency, SortedSet<Dependency>> getMulePlugins() { <START> return this.mulePlugins; <END> }</code><technical_language>Is a reason do .putAll</technical_language>

Target:
public Map<Dependency, Set<Dependency>> getMulePlugins() { return this.mulePlugins; }
Source:
<code>public void prepareTestEnvironment() { File tmpDirFile = new File(System.getProperty("java.io.tmpdir"), "pyflink_" + UUID.randomUUID()); tmpDirFile.mkdirs(); this.tmpDirPath = tmpDirFile.getAbsolutePath(); <START> if (new File("flink-python/lib").exists()) { <END> pythonLibDir = new File("flink-python/lib").getAbsolutePath(); } else if (new File("lib").exists()) { pythonLibDir = new File("lib").getAbsolutePath(); } }</code><technical_language>This is a hack for me. avoid kind of hacks</technical_language>

Target:
public void prepareTestEnvironment() { File tmpDirFile = new File(System.getProperty("java.io.tmpdir"), "pyflink_" + UUID.randomUUID()); tmpDirFile.mkdirs(); this.tmpDirPath = tmpDirFile.getAbsolutePath(); }
Source:
<code>public void resetPassword(final String id) { try { LOGGER.debug("Resetting password of user id {}", id); Optional<User> optionalUser = userRepository.findById(id); if (!optionalUser.isPresent()) { throw new UserNotFoundException(id); } final User user = optionalUser.get(); if (!IDP_SOURCE_GRAVITEE.equals(user.getSource())) { throw new UserNotInternallyManagedException(id); } user.setPassword(null); user.setUpdatedAt(new Date()); userRepository.update(user); final Map<String, Object> params = getTokenRegistrationParams(convert(user, false), "/#!/resetPassword/"); notifierService.trigger(PortalHook.PASSWORD_RESET, params); auditService.createPortalAuditLog( Collections.singletonMap(USER, user.getId()), User.AuditEvent.PASSWORD_RESET, user.getUpdatedAt(), null, null); emailService.sendAsyncEmailNotification(new EmailNotificationBuilder() .to(user.getEmail()) <START> .subject("Password reset - " + getDisplayName(user)) <END> .template(EmailNotificationBuilder.EmailTemplate.PASSWORD_RESET) .params(params) .build() ); } catch (TechnicalException ex) { final String message = "An error occurs while trying to reset password for user " + id; LOGGER.error(message, ex); throw new TechnicalManagementException(message, ex); } }</code><technical_language>suggestion .subject("Password reset - " + convert(user, false).getDisplayName())</technical_language>

Target:
public void resetPassword(final String id) { try { LOGGER.debug("Resetting password of user id {}", id); Optional<User> optionalUser = userRepository.findById(id); if (!optionalUser.isPresent()) { throw new UserNotFoundException(id); } final User user = optionalUser.get(); if (!IDP_SOURCE_GRAVITEE.equals(user.getSource())) { throw new UserNotInternallyManagedException(id); } user.setPassword(null); user.setUpdatedAt(new Date()); userRepository.update(user); final Map<String, Object> params = getTokenRegistrationParams(convert(user, false), "/#!/resetPassword/"); notifierService.trigger(PortalHook.PASSWORD_RESET, params); auditService.createPortalAuditLog( Collections.singletonMap(USER, user.getId()), User.AuditEvent.PASSWORD_RESET, user.getUpdatedAt(), null, null); emailService.sendAsyncEmailNotification(new EmailNotificationBuilder() .to(user.getEmail()) .subject("Password reset - " + convert(user, false).getDisplayName()) .template(EmailNotificationBuilder.EmailTemplate.PASSWORD_RESET) .params(params) .build() ); } catch (TechnicalException ex) { final String message = "An error occurs while trying to reset password for user " + id; LOGGER.error(message, ex); throw new TechnicalManagementException(message, ex); } }
Source:
<code>void download(DownloadBatch downloadBatch, Map<DownloadBatchId, DownloadBatch> downloadBatchMap) { DownloadBatchId downloadBatchId = downloadBatch.getId(); if (!downloadBatchMap.containsKey(downloadBatchId)) { downloadBatchMap.put(downloadBatchId, downloadBatch); } DownloadBatch batchToDownload = downloadBatchMap.get(downloadBatchId); executor.submit(() -> { <START> Wait.<Void>waitFor(serviceCriteria, waitForDownloadService) <END> .thenPerform(executeDownload(batchToDownload, downloadBatchMap)); }); }</code><technical_language>this convert a Callable a Runnable? I this is inlined before</technical_language>

Target:
void download(DownloadBatch downloadBatch, Map<DownloadBatchId, DownloadBatch> downloadBatchMap) { DownloadBatchId downloadBatchId = downloadBatch.getId(); if (!downloadBatchMap.containsKey(downloadBatchId)) { downloadBatchMap.put(downloadBatchId, downloadBatch); } DownloadBatch batchToDownload = downloadBatchMap.get(downloadBatchId); executor.submit(new Runnable() { @Override public void run() { Wait.<Void>waitFor(serviceCriteria, waitForDownloadService) .thenPerform(executeDownload(batchToDownload, downloadBatchMap)); } }); }
Source:
<code>public int available() { final ReentrantLock lock = this.lock; <START> lock.lock(); <END> try { return objects.size(); } finally { lock.unlock(); } }</code><technical_language>bother locking if size returned is immediately invalid? aka, some other thread changed size</technical_language>

Target:
public int available() { return objects.size(); }
Source:
<code>final void execute(final Channel channel) { channel.executingCalls.put(id,this); future = channel.executor.submit(new Runnable() { private int startIoId; private int calcLastIoId() { int endIoId = channel.lastIoId(); if (startIoId==endIoId) return 0; return endIoId; } public void run() { String oldThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(oldThreadName+" for "+channel.getName()+" id="+id); try { Command rsp; CURRENT.set(Request.this); startIoId = channel.lastIoId(); try { channel.pipeWriter.get(lastIoId).get(); RSP r = Request.this.perform(channel); rsp = new Response<RSP, EXC>(Request.this, id, calcLastIoId(), r); } catch (Throwable t) { rsp = new Response<RSP, Throwable>(Request.this, id, calcLastIoId(), t); } finally { CURRENT.set(null); } if(chainCause) { rsp.chainCause(createdAt); } channel.send(rsp); } catch (IOException e) { if (e instanceof ChannelClosedException) { <START> logger.log(Level.INFO, "Failed to send back a reply to the request {0}: {1}", new Object[] {this, e}); <END> } else { logger.log(Level.WARNING, "Failed to send back a reply to the request " + this, e); } } finally { channel.executingCalls.remove(id); Thread.currentThread().setName(oldThreadName); } } }); }</code><technical_language>I retain original behavior FINE level locate caused Closed in some cases. retrieve message new API method getMessage() update in ChannelStateException</technical_language>

Target:
final void execute(final Channel channel) { channel.executingCalls.put(id,this); future = channel.executor.submit(new Runnable() { private int startIoId; private int calcLastIoId() { int endIoId = channel.lastIoId(); if (startIoId==endIoId) return 0; return endIoId; } public void run() { String oldThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(oldThreadName+" for "+channel.getName()+" id="+id); try { Command rsp; CURRENT.set(Request.this); startIoId = channel.lastIoId(); try { channel.pipeWriter.get(lastIoId).get(); RSP r = Request.this.perform(channel); rsp = new Response<RSP, EXC>(Request.this, id, calcLastIoId(), r); } catch (Throwable t) { rsp = new Response<RSP, Throwable>(Request.this, id, calcLastIoId(), t); } finally { CURRENT.set(null); } if(chainCause) { rsp.chainCause(createdAt); } channel.send(rsp); } catch (IOException e) { if (e instanceof ChannelClosedException && !logger.isLoggable(Level.FINE)) { logger.log(Level.INFO, "Failed to send back a reply to the request {0}: {1}", new Object[] {this, e}); } else { logger.log(Level.WARNING, "Failed to send back a reply to the request " + this, e); } } finally { channel.executingCalls.remove(id); Thread.currentThread().setName(oldThreadName); } } }); }
Source:
<code>public double getDouble(int field) { checkFieldType(field, ImmutableSet.of(DOUBLE)); <START> return Double.valueOf(String.valueOf(getFieldValue(field))); <END> }</code><technical_language>return Double.parseDouble(getFieldValue(field).toString());</technical_language>

Target:
public double getDouble(int field) { checkFieldType(field, ImmutableSet.of(DOUBLE)); return Double.parseDouble(getFieldValue(field).toString()); }
Source:
<code>public Object getPropertyValue(Object id) { if (sfName.equals(id)) { return getName(); } if (sfPath.equals(id)) { return getPath().toString(); } if (sfLocation.equals(id)) { <START> return getLocation().getScheme() + ':' + getLocation().getPath(); <END> } if (sfIsLinked.equals(id)) { return Boolean.valueOf(getResource().isLinked()).toString(); } if (sfEventType.equals(id)) { if (getTraceType() != null) { IConfigurationElement ce = sfTraceTypeAttributes.get(getTraceType()); return (ce != null) ? (getCategory(ce) + " : " + ce.getAttribute(TmfTraceType.NAME_ATTR)) : ""; } } Map<String, String> traceProperties = getTraceProperties(); if (id != null && !traceProperties.isEmpty()) { String key = (String) id; key = key.replaceFirst(this.getName() + "_", ""); String value = traceProperties.get(key); return value; } return null; }</code><technical_language>URIUtil.toUnencodedString? I I help</technical_language>

Target:
public Object getPropertyValue(Object id) { if (sfName.equals(id)) { return getName(); } if (sfPath.equals(id)) { return getPath().toString(); } if (sfLocation.equals(id)) { return URIUtil.toUnencodedString(getLocation()); } if (sfIsLinked.equals(id)) { return Boolean.valueOf(getResource().isLinked()).toString(); } if (sfEventType.equals(id)) { if (getTraceType() != null) { IConfigurationElement ce = sfTraceTypeAttributes.get(getTraceType()); return (ce != null) ? (getCategory(ce) + " : " + ce.getAttribute(TmfTraceType.NAME_ATTR)) : ""; } } Map<String, String> traceProperties = getTraceProperties(); if (id != null && !traceProperties.isEmpty()) { String key = (String) id; key = key.replaceFirst(this.getName() + "_", ""); String value = traceProperties.get(key); return value; } return null; }
Source:
<code><START> private boolean shouldEnforceAutoApproveReasonRule(MaintenanceDocument document) { <END> String documentInitiator = document.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId(); Collection<String> byPassInitiators = getParameterService().getParameterValuesAsString(KFSConstants.OptionalModuleNamespaces.CONTRACTS_AND_GRANTS, CUKFSConstants.CGParms.AWARD_RULE_COMPNONENT, CUKFSConstants.CGParms.BYPASS_AWARD_EXTENSION_AUTO_APPROVE_REASON_RULE_INITIATORS); if (LOG.isDebugEnabled()) { LOG.debug("shouldEnforceAutoApproveReasonRule, the document intiator: " + documentInitiator); LOG.debug("shouldEnforceAutoApproveReasonRule, the bypass intiators: " + byPassInitiators); } if (CollectionUtils.isNotEmpty(byPassInitiators) && byPassInitiators.contains(documentInitiator)) { LOG.debug("shouldEnforceAutoApproveReasonRule, the document initiator is in the list of bypass initiators, so do not enfource for the auto approve reason rule."); return false; } return true; }</code><technical_language>formatting is a bit in this file, want format</technical_language>

Target:
private boolean shouldEnforceAutoApproveReasonRule(MaintenanceDocument document) { String documentInitiator = document.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId(); Collection<String> byPassInitiators = getParameterService().getParameterValuesAsString( KFSConstants.OptionalModuleNamespaces.CONTRACTS_AND_GRANTS, CUKFSConstants.CGParms.AWARD_RULE_COMPNONENT, CUKFSConstants.CGParms.BYPASS_AWARD_EXTENSION_AUTO_APPROVE_REASON_RULE_INITIATORS); if (LOG.isDebugEnabled()) { LOG.debug("shouldEnforceAutoApproveReasonRule, the document intiator: " + documentInitiator); LOG.debug("shouldEnforceAutoApproveReasonRule, the bypass intiators: " + byPassInitiators); } if (CollectionUtils.isNotEmpty(byPassInitiators) && byPassInitiators.contains(documentInitiator)) { LOG.debug("shouldEnforceAutoApproveReasonRule, the document initiator is in the list of bypass initiators, so do not enforce for the auto approve reason rule."); return false; } return true; }
Source:
<code>public static TmfStateValue newValueLong(long longValue) { <START> return new LongStateValue(longValue); <END> }</code><technical_language>For consistency, I passing -1 results in a nullValue</technical_language>

Target:
public static TmfStateValue newValueLong(long longValue) { if (longValue == -1) { return nullValue(); } return new LongStateValue(longValue); }
Source:
<code><START> public synchronized void initCamelCronService() { <END> if (this.service == null) { this.service = CronHelper.resolveCamelCronService( getCamelContext(), this.cronService ); if (this.service == null) { throw new RuntimeCamelException("Cannot find any CamelCronService: please add a valid implementation, such as 'camel-quartz', in order to use the 'camel-cron' component"); } try { getCamelContext().addService(this.service, true, false); } catch (Exception e) { throw new RuntimeCamelException(e); } } }</code><technical_language>I a fan of this, move this doStart initialized there</technical_language>

Target:
public void initCamelCronService() { if (this.service == null) { this.service = CronHelper.resolveCamelCronService( getCamelContext(), this.cronService ); if (this.service == null) { throw new RuntimeCamelException("Cannot find any CamelCronService: please add a valid implementation, such as 'camel-quartz', in order to use the 'camel-cron' component"); } try { getCamelContext().addService(this.service, true, false); } catch (Exception e) { throw new RuntimeCamelException(e); } } }
Source:
<code>public void assertNoneProxyForGetTarget() { ElasticJob proxy = new TargetJob(); assertFalse(AopUtils.isAopProxy(proxy)); <START> assertEquals(AopTargetUtils.getTarget(proxy), proxy); <END> }</code><technical_language>For multiple parameter asserts, assertThat used</technical_language>

Target:
public void assertNoneProxyForGetTarget() { ElasticJob proxy = new TargetJob(); assertFalse(AopUtils.isAopProxy(proxy)); assertThat(AopTargetUtils.getTarget(proxy), is(proxy)); }
Source:
<code>public int writeData() throws Exception { String linestr = this.groupedFields ? influxDbWriteObjectSerializer.getGroupedLineProtocolString(influxDbWriteObject,measurement) <START> : influxDbWriteObjectSerializer.getLineProtocolString(influxDbWriteObject); <END> final byte[] line = linestr.getBytes(UTF_8); return writeData(line); }</code><technical_language>a base abstract class, InfluxDbBaseSender.java preferable implementation follow SRP. of now, this implementation 2 underlying ways function. This logic part of new GroupedInfluxDbHttpSender</technical_language>

Target:
public int writeData() throws Exception { String linestr = influxDbWriteObjectSerializer.getLineProtocolString(influxDbWriteObject); final byte[] line = linestr.getBytes(UTF_8); return writeData(line); }
Source:
<code>private void updateSliderIfInteger(UISlider slider) { T settingValue = getSetting().getValue(); if (settingValue instanceof Float || settingValue instanceof Double) { return; } <START> slider.setIncrement(1.0f); <END> slider.setPrecision(0); }</code><technical_language>this trigger Byte, Short Long Integer</technical_language>

Target:
private void updateSliderIfInteger(UISlider slider) { T settingValue = getSetting().get(); if (settingValue instanceof Float || settingValue instanceof Double) { return; } slider.setIncrement(1.0f); slider.setPrecision(0); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { LOG.debug("Prepare to interceptor request in Filter"); if (!(request instanceof HttpServletRequest)) { filterChain.doFilter(request, response); return; } if (request instanceof HttpServletRequest) { HttpServletRequest hrequest = (HttpServletRequest) request; HttpServletResponse hresponse = (HttpServletResponse) response; final String servletPath = hrequest.getServletPath(); LOG.debug("servlet Request: " + servletPath); try { if (!servletPath.startsWith(ResourceHandler.RESOURCE_IDENTIFIER)) { checkHeaders(hrequest); } } catch (SanitizationException e) { LOG.error("Error in SanitilizeMessage {}: ", e.getLocalizedMessage(), e); <START> ESAPI.authenticator().logout(); <END> hrequest.getServletContext().getRequestDispatcher(NavigationConstant.CUSTOM_ERROR_XHTML) .forward(hrequest, hresponse); } finally { ESAPI.httpUtilities().clearCurrent(); } if (hresponse.isCommitted()) { return; } filterChain.doFilter(hrequest, hresponse); } else { LOG.debug("request is not instance of HttpServletRequest"); filterChain.doFilter(request, response); return; } }</code><technical_language>I this give error add users ESAPI api. Please run locally confirm</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { LOG.debug("Prepare to interceptor request in Filter"); if (!(request instanceof HttpServletRequest)) { filterChain.doFilter(request, response); return; } if (request instanceof HttpServletRequest) { HttpServletRequest hrequest = (HttpServletRequest) request; HttpServletResponse hresponse = (HttpServletResponse) response; final String servletPath = hrequest.getServletPath(); LOG.debug("servlet Request: {}", servletPath); try { if (!servletPath.startsWith(ResourceHandler.RESOURCE_IDENTIFIER)) { checkHeaders(hrequest); } } catch (SanitizationException e) { LOG.error("Error in SanitilizeMessage {}: ", e.getLocalizedMessage(), e); hrequest.getSession().invalidate(); hrequest.getServletContext().getRequestDispatcher(NavigationConstant.CUSTOM_ERROR_XHTML) .forward(hrequest, hresponse); } finally { ESAPI.httpUtilities().clearCurrent(); } if (hresponse.isCommitted()) { return; } filterChain.doFilter(hrequest, hresponse); } else { LOG.debug("request is not instance of HttpServletRequest"); filterChain.doFilter(request, response); return; } }
Source:
<code>public void createResources() { if (checkpointManager != null) { checkpointManager.createResources(); <START> checkpointManager.stop(); <END> } createChangelogStreams(); }</code><technical_language>Do for this method is called once? If so, do need create checkpoint manager construction, create close createResources</technical_language>

Target:
public void createResources() { if (checkpointManager != null) { checkpointManager.createResources(); } createChangelogStreams(); }
Source:
<code>private void decorateResource(@NonNull IResource resource, IDecoration decoration) throws CoreException { if (resource.getType() == IResource.ROOT || !resource.isAccessible() || !ResourceUtil.isSharedWithGit(resource)) { return; } IndexDiffData indexDiffData = <START> ResourceStateFactory.getInstance() .getIndexDiffDataOrNull(resource); <END> if (indexDiffData == null) { return; } IDecoratableResource decoratableResource = null; final DecorationHelper helper = new DecorationHelper( Activator.getDefault().getPreferenceStore()); try { decoratableResource = new DecoratableResourceAdapter(indexDiffData, resource); } catch (IOException e) { throw new CoreException(Activator.createErrorStatus( NLS.bind(UIText.Decorator_exceptionMessage, resource), e)); } helper.decorate(decoration, decoratableResource); }</code><technical_language>this null? I problem is RepositoryCache is holding reference repo. delete GitProvider.deconfigure() (there more projects in repo) avoid returning repo in ResourceStateFactorygetIndexDiffDataOrNull() if project of resource is configured</technical_language>

Target:
private void decorateResource(@NonNull IResource resource, IDecoration decoration) throws CoreException { if (resource.getType() == IResource.ROOT || !resource.isAccessible()) { return; } IndexDiffData indexDiffData = ResourceStateFactory.getInstance() .getIndexDiffDataOrNull(resource); if (indexDiffData == null) { return; } IDecoratableResource decoratableResource = null; final DecorationHelper helper = new DecorationHelper( Activator.getDefault().getPreferenceStore()); try { decoratableResource = new DecoratableResourceAdapter(indexDiffData, resource); } catch (IOException e) { throw new CoreException(Activator.createErrorStatus( NLS.bind(UIText.Decorator_exceptionMessage, resource), e)); } helper.decorate(decoration, decoratableResource); }
Source:
<code>public Optional<ImmutableGameModeData> with(Key<? extends BaseValue<?>> key, Object value, ImmutableGameModeData immutable) { <START> return Optional.absent(); <END> }</code><technical_language>absent</technical_language>

Target:
public Optional<ImmutableGameModeData> with(Key<? extends BaseValue<?>> key, Object value, ImmutableGameModeData immutable) { if (!key.equals(Keys.GAME_MODE)) { return Optional.absent(); } return Optional.<ImmutableGameModeData>of( ImmutableDataCachingUtil.getManipulator(ImmutableSpongeGameModeData.class, (GameMode) value)); }
Source:
<code>public TestingWarningCollector(WarningCollectorConfig config, TestingWarningCollectorConfig testConfig) { super(config); requireNonNull(testConfig, "testConfig is null"); addWarnings = testConfig.getAddWarnings(); for (int warningCode = 1; warningCode <= testConfig.getPreloadedWarnings(); warningCode++) { <START> super.add(createTestWarning(warningCode)); <END> } warningCode.set(testConfig.getPreloadedWarnings()); }</code><technical_language>super. is unnecessary</technical_language>

Target:
public TestingWarningCollector(WarningCollectorConfig config, TestingWarningCollectorConfig testConfig) { this.config = requireNonNull(config, "config is null"); requireNonNull(testConfig, "testConfig is null"); addWarnings = testConfig.getAddWarnings(); for (int warningCode = 1; warningCode <= testConfig.getPreloadedWarnings(); warningCode++) { add(createTestWarning(warningCode)); } warningCode.set(testConfig.getPreloadedWarnings()); }
Source:
<code>protected Position handlePosition(Position position) { class AsyncRequestAndCallback implements InvocationCallback<Response> { private Integer delay = retryDelayMin; private Map<String, Object> jsonPayload; private Invocation.Builder requestBuilder; AsyncRequestAndCallback(Position position) { String formattedUrl; try { <START> formattedUrl = (json) ? url : formatRequest(position); <END> } catch (UnsupportedEncodingException | JsonProcessingException e) { throw new RuntimeException("Forwarding formatting error", e); } requestBuilder = client.target(formattedUrl).request(); if (header != null && !header.isEmpty()) { for (String line: header.split("\\r?\\n")) { String[] values = line.split(":", 2); requestBuilder.header(values[0].trim(), values[1].trim()); } } if (json) { jsonPayload = prepareJsonPayload(position); } deliveryPendingCurrent.incrementAndGet(); send(); } private void send() { if (json) { requestBuilder.async().post(Entity.json(jsonPayload), this); } else { requestBuilder.async().get(this); } } private void retry() { try { deliveryFaliuresInRow.incrementAndGet(); if (!retryEnabled || deliveryPendingCurrent.get() > deliveryPendingLimit) { deliveryPendingCurrent.decrementAndGet(); } else { Integer i = 0; for ( ; i < delay; i++) { Thread.sleep(1000); if (deliveryFaliuresInRow.get() == 0) { delay = retryDelayMin; break; } } if (i >= delay && delay < retryDelayMax) { delay++; } send(); } } catch (Exception e) { } } public void completed(Response response) { if (response.getStatus() == 200) { deliveryFaliuresInRow.set(0); deliveryPendingCurrent.decrementAndGet(); } else { retry(); } } public void failed(Throwable throwable) { retry(); } } new AsyncRequestAndCallback(position); return position; }</code><technical_language>Please remove unnecessary parentheses everywhere</technical_language>

Target:
protected Position handlePosition(Position position) { AsyncRequestAndCallback request = new AsyncRequestAndCallback(position); request.send(); return position; }
Source:
<code>private HeadersRequest requestHeadersImpl(int count) { long startNumber; boolean reverse = false; if (!hasGaps()) { startNumber = maxNum + 1; } else { List<HeaderElement> longestChain = getLongestChain(); startNumber = longestChain.get(longestChain.size() - 1).header.getNumber(); <START> if (!rnd.nextBoolean()) reverse = true; <END> } int headersCount; if (endBlockNumber != null) headersCount = (int) Math.min(count, endBlockNumber - startNumber + 1); else headersCount = count; return new HeadersRequestImpl(startNumber, headersCount, reverse); }</code><technical_language>requesting reverse headers close a gap need request count headers sense request MAX_CHAIN_LEN</technical_language>

Target:
private HeadersRequest requestHeadersImpl(int count) { long startNumber; int headersCount; boolean reverse = false; if (!hasGaps()) { startNumber = maxNum + 1; if (endBlockNumber != null) { headersCount = (int) Math.min(count, endBlockNumber - startNumber + 1); } else { headersCount = count; } } else { List<HeaderElement> longestChain = getLongestChain(); startNumber = longestChain.get(longestChain.size() - 1).header.getNumber(); headersCount = MAX_CHAIN_LEN; if (!rnd.nextBoolean()) reverse = true; } return new HeadersRequestImpl(startNumber, headersCount, reverse); }
Source:
<code>public QueryIterator iterator(FetchOptions fetchOptions) throws SearchException { hSearchQuery.maxResults(getNodeMaxResults()); <START> if (fetchOptions.getFetchMode().equals(FetchOptions.FetchMode.EAGER)) { <END> ClusteredQueryCommand command = ClusteredQueryCommand.createEagerIterator(hSearchQuery, cache); HashMap<UUID, ClusteredTopDocs> topDocsResponses = broadcastQuery(command); return new DistributedIterator(sort, fetchOptions.getFetchSize(), this.resultSize, maxResults, firstResult, topDocsResponses, cache); } else if (fetchOptions.getFetchMode().equals(FetchOptions.FetchMode.LAZY)) { UUID lazyItId = UUID.randomUUID(); ClusteredQueryCommand command = ClusteredQueryCommand.createLazyIterator(hSearchQuery, cache, lazyItId); HashMap<UUID, ClusteredTopDocs> topDocsResponses = broadcastQuery(command); return new DistributedLazyIterator(sort, fetchOptions.getFetchSize(), this.resultSize, maxResults, firstResult, lazyItId, topDocsResponses, asyncExecutor, cache); } else { throw new IllegalArgumentException("Unknown FetchMode " + fetchOptions.getFetchMode()); } }</code><technical_language>I guess simplified as: fetchOptions.getFetchMode() == FetchOptions.FetchMode.EAGER</technical_language>

Target:
public ResultIterator iterator(FetchOptions fetchOptions) throws SearchException { hSearchQuery.maxResults(getNodeMaxResults()); switch (fetchOptions.getFetchMode()) { case EAGER: { ClusteredQueryCommand command = ClusteredQueryCommand.createEagerIterator(hSearchQuery, cache); HashMap<UUID, ClusteredTopDocs> topDocsResponses = broadcastQuery(command); return new DistributedIterator(sort, fetchOptions.getFetchSize(), this.resultSize, maxResults, firstResult, topDocsResponses, cache); } case LAZY: { UUID lazyItId = UUID.randomUUID(); ClusteredQueryCommand command = ClusteredQueryCommand.createLazyIterator(hSearchQuery, cache, lazyItId); HashMap<UUID, ClusteredTopDocs> topDocsResponses = broadcastQuery(command); return new DistributedLazyIterator(sort, fetchOptions.getFetchSize(), this.resultSize, maxResults, firstResult, lazyItId, topDocsResponses, asyncExecutor, cache); } default: throw new IllegalArgumentException("Unknown FetchMode " + fetchOptions.getFetchMode()); } }
Source:
<code>public void onReceive(Context context, Intent intent) { Log.d(TAG, "onReceive"); int notifyId = intent.getIntExtra(NOTIFICATION_ID, NavigationServiceProvider.NOTIFICATION_ID + 1); <START> int actionNum = intent.getIntExtra(ACTION_NUM, 0); <END> if (actionNum == DISMISS_FEEDBACK_NOTIFICATION) { Log.d(TAG, "Dismiss intent"); } else { Log.d(TAG, "Capturing user feedback from notification"); captureFeedback(context, intent, notifyId); } }</code><technical_language>Instead of checking for intent extra here, checking for action: String action = intent.getAction();</technical_language>

Target:
public void onReceive(Context context, Intent intent) { Log.d(TAG, "onReceive"); int notifyId = intent.getIntExtra(NOTIFICATION_ID, NavigationServiceProvider.NOTIFICATION_ID + 1); String action = intent.getAction(); if (action == ACTION_DISMISS_FEEDBACK) { Log.d(TAG, "Dismiss intent"); } else if (action == ACTION_REPLY) { Log.d(TAG, "Capturing user feedback from notification"); captureFeedback(context, intent, notifyId); } }
Source:
<code>public static void setUpClass() throws HandlerRequestException { <START> HashMap<String, String> receivedPathParameters = new HashMap<>(3); <END> receivedPathParameters.put(JobIDPathParameter.KEY, JOBID.toString()); receivedPathParameters.put(JobVertexIdPathParameter.KEY, JOB_VERTEXID.toString()); receivedPathParameters.put(SubtaskIndexPathParameter.KEY, Integer.toString(SUBTASK_INDEX)); testRequest = new HandlerRequest<>( EmptyRequestBody.getInstance(), new SubtaskMessageParameters(), receivedPathParameters, Collections.emptyMap()); metricFetcher = new MetricFetcherImpl<>( () -> null, address -> null, TestingUtils.defaultExecutor(), Time.milliseconds(1000L), MetricOptions.METRIC_FETCHER_UPDATE_INTERVAL.defaultValue()); RestHandlerConfiguration restHandlerConfiguration = RestHandlerConfiguration.fromConfiguration(new Configuration()); handler = new SubtaskAllExecutionAttemptsDetailsHandler( () -> null, Time.milliseconds(100), Collections.emptyMap(), SubtaskAllExecutionAttemptDetailsHeaders.getInstance(), new ExecutionGraphCache( restHandlerConfiguration.getTimeout(), Time.milliseconds(restHandlerConfiguration.getRefreshInterval())), TestingUtils.defaultExecutor(), metricFetcher); }</code><technical_language>do set 3 initialCapacity</technical_language>

Target:
public static void setUpClass() throws HandlerRequestException { HashMap<String, String> receivedPathParameters = new HashMap<>(); receivedPathParameters.put(JobIDPathParameter.KEY, JOBID.toString()); receivedPathParameters.put(JobVertexIdPathParameter.KEY, JOB_VERTEXID.toString()); receivedPathParameters.put(SubtaskIndexPathParameter.KEY, Integer.toString(SUBTASK_INDEX)); testRequest = new HandlerRequest<>( EmptyRequestBody.getInstance(), new SubtaskMessageParameters(), receivedPathParameters, Collections.emptyMap()); metricFetcher = new MetricFetcherImpl<>( () -> null, address -> null, TestingUtils.defaultExecutor(), Time.milliseconds(1000L), MetricOptions.METRIC_FETCHER_UPDATE_INTERVAL.defaultValue()); RestHandlerConfiguration restHandlerConfiguration = RestHandlerConfiguration.fromConfiguration(new Configuration()); handler = new SubtaskAllExecutionAttemptsDetailsHandler( () -> null, Time.milliseconds(100), Collections.emptyMap(), SubtaskAllExecutionAttemptDetailsHeaders.getInstance(), new DefaultExecutionGraphCache( restHandlerConfiguration.getTimeout(), Time.milliseconds(restHandlerConfiguration.getRefreshInterval())), TestingUtils.defaultExecutor(), metricFetcher); }
Source:
<code>public void after() { TmfTraceStub trace = fTrace; assertNotNull(trace); <START> TmfSignalManager.dispatchSignal(new TmfTraceClosedSignal(this, trace)); <END> fViewBot.close(); fBot.waitUntil(ConditionHelpers.ViewIsClosed(fViewBot)); fTrace.dispose(); }</code><technical_language>dispatched UI thread, TimeGraphViewTest:304 is wrong</technical_language>

Target:
public void after() { TmfTraceStub trace = fTrace; assertNotNull(trace); UIThreadRunnable.syncExec(() -> TmfSignalManager.dispatchSignal(new TmfTraceClosedSignal(this, trace))); fViewBot.close(); fBot.waitUntil(ConditionHelpers.ViewIsClosed(fViewBot)); fTrace.dispose(); }