auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void executeQueryCommand() { if (getVdsStaticDao().getAllForHost(getParameters().getServerName()).size() > 0 || getVdsStaticDao().getAllWithIpAddress(getParameters().getServerName()).size() > 0) { setReturnMessage(); } SSHClient client = null; try { client = connect(getParameters().getServerName()); validateFingerprint(client, getParameters().getFingerprint()); authenticate(client, ROOT, getParameters().getPassword()); String serversXml = executeCommand(client); Map<String, String> serverFingerPrint = extractServers(serversXml); <START> if (isServerPartOfCluster(serverFingerPrint)) { <END> setReturnMessage(); } getQueryReturnValue().setReturnValue(serverFingerPrint); } catch (Exception e) { throw new RuntimeException(e); } finally { if (client != null) { client.disconnect(); } } }</code><technical_language>pass serverFingerPrint.keys() this method</technical_language>

Target:
protected void executeQueryCommand() { if (getVdsStaticDao().getAllForHost(getParameters().getServerName()).size() > 0 || getVdsStaticDao().getAllWithIpAddress(getParameters().getServerName()).size() > 0) { setReturnMessage(); } SSHClient client = null; try { client = connect(getParameters().getServerName()); validateFingerprint(client, getParameters().getFingerprint()); authenticate(client, ROOT, getParameters().getPassword()); String serversXml = executeCommand(client); Map<String, String> serverFingerPrint = extractServers(serversXml); if (areServersPartOfCluster(serverFingerPrint.keySet())) { setReturnMessage(); } getQueryReturnValue().setReturnValue(serverFingerPrint); } catch (Exception e) { throw new RuntimeException(e); } finally { if (client != null) { client.disconnect(); } } }
Source:
<code>public Builder clientResetHandler(SyncSession.ClientResetHandler handler) { <START> if (handler == null) { <END> throw new IllegalArgumentException("Non-null 'handler' required."); } this.clientResetHandler = handler; return this; }</code><technical_language>Util.checkNull(handler, "handler"); simply</technical_language>

Target:
public Builder clientResetHandler(SyncSession.ClientResetHandler handler) { Util.checkNull(handler, "handler"); this.clientResetHandler = handler; return this; }
Source:
<code>public void testUnsetCommand() throws SQLException { <START> PostgreSQLContainer postgres = (PostgreSQLContainer) new PostgreSQLContainer().withCommand("postgres -c max_connections=42").withCommand(); <END> postgres.start(); try { ResultSet resultSet = performQuery(postgres,"SELECT current_setting('max_connections')"); String result = resultSet.getString(1); assertNotEquals("max_connections should not be overriden", "42", result); } finally { postgres.stop(); } }</code><technical_language>suggestion PostgreSQLContainer postgres = new PostgreSQLContainer<>().withCommand("postgres -c max_connections=42").withCommand();</technical_language>

Target:
public void testUnsetCommand() throws SQLException { try (PostgreSQLContainer postgres = new PostgreSQLContainer<>().withCommand("postgres -c max_connections=42").withCommand()) { postgres.start(); ResultSet resultSet = performQuery(postgres, "SELECT current_setting('max_connections')"); String result = resultSet.getString(1); assertNotEquals("max_connections should not be overriden", "42", result); } }
Source:
<code>public synchronized void registerHandler(HttpHandlerRegistrationInfo registrationInfo, HttpHandler handler) { if (undertow == null) { Undertow.Builder builder = Undertow.builder(); if (key.getSslContext() != null) { builder.addHttpsListener(key.getPort(), key.getHost(), key.getSslContext()); } else { builder.addHttpListener(key.getPort(), key.getHost()); } if (options != null) { if (options.getIoThreads() != null) { builder.setIoThreads(options.getIoThreads()); } if (options.getWorkerThreads() != null) { builder.setWorkerThreads(options.getWorkerThreads()); } if (options.getBufferSize() != null) { builder.setBufferSize(options.getBufferSize()); } if (options.getDirectBuffers() != null) { builder.setDirectBuffers(options.getDirectBuffers()); } } undertow = builder.setHandler(rootHandler).build(); LOG.info("Starting Undertow server on {}://{}:{}", key.getSslContext() != null ? "https" : "http", key.getHost(), key.getPort()); undertow.start(); } String path = registrationInfo.getUri().getPath(); String methods = registrationInfo.getMethodRestrict(); <START> boolean prefixMatch = !registrationInfo.isMatchOnUriPrefix(); <END> rootHandler.add(path, methods != null ? methods.split(",") : null, prefixMatch, handler); }</code><technical_language>is boolean inverted</technical_language>

Target:
public synchronized void registerHandler(HttpHandlerRegistrationInfo registrationInfo, HttpHandler handler) { if (undertow == null) { Undertow.Builder builder = Undertow.builder(); if (key.getSslContext() != null) { builder.addHttpsListener(key.getPort(), key.getHost(), key.getSslContext()); } else { builder.addHttpListener(key.getPort(), key.getHost()); } if (options != null) { if (options.getIoThreads() != null) { builder.setIoThreads(options.getIoThreads()); } if (options.getWorkerThreads() != null) { builder.setWorkerThreads(options.getWorkerThreads()); } if (options.getBufferSize() != null) { builder.setBufferSize(options.getBufferSize()); } if (options.getDirectBuffers() != null) { builder.setDirectBuffers(options.getDirectBuffers()); } } undertow = builder.setHandler(rootHandler).build(); LOG.info("Starting Undertow server on {}://{}:{}", key.getSslContext() != null ? "https" : "http", key.getHost(), key.getPort()); undertow.start(); } String path = registrationInfo.getUri().getPath(); String methods = registrationInfo.getMethodRestrict(); boolean prefixMatch = registrationInfo.isMatchOnUriPrefix(); rootHandler.add(path, methods != null ? methods.split(",") : null, prefixMatch, handler); }
Source:
<code>public void project(ICause cause) throws ContradictionException { RealInterval res; switch (op) { <START> case NEG: case ABS: case EXP: case LN: case SQRT: <END> case COS: res = RealUtils.acos_wrt(this, e); if (res.getLB() > res.getUB()) { throw model.getSolver().getContradictionException().set(cause, null, ""); } break; case SIN: res = RealUtils.asin_wrt(this, e); if (res.getLB() > res.getUB()) { throw model.getSolver().getContradictionException().set(cause, null, ""); } break; case TAN: case ACOS: case ASIN: case ATAN: case COSH: case SINH: case TANH: case ACOSH: case ASINH: case ATANH: default: throw new UnsupportedOperationException("Equation does not support " + op.name()); } e.intersect(res, cause); }</code><technical_language>moved other treated cases</technical_language>

Target:
public void project(ICause cause) throws ContradictionException { RealInterval res; switch (op) { case COS: res = RealUtils.acos_wrt(this, e); break; case SIN: res = RealUtils.asin_wrt(this, e); break; case NEG: res = new RealIntervalConstant(-this.getUB(), -this.getLB()); break; case SQR: res = RealUtils.iRoot(this, 2, e); break; case SQRT: res = RealUtils.iPower(this, 2); break; case CUB: res = RealUtils.iRoot(this, 3, e); break; case CBRT: res = RealUtils.iPower(this, 3); break; case ABS: res = new RealIntervalConstant(-this.getUB(), this.getUB()); break; case EXP: case LN: case TAN: case ACOS: case ASIN: case ATAN: case COSH: case SINH: case TANH: case ACOSH: case ASINH: case ATANH: default: throw new UnsupportedOperationException("Equation does not support " + op.name()+". Consider using Ibex instead."); } e.intersect(res, cause); }
Source:
<code>public Banner update(Long bannerId, Banner banner) { <START> if (!bannerRepository.exists(bannerId)) <END> throw new BannerNotFoundException(); return bannerRepository.saveAndFlush(banner); }</code><technical_language>if { }</technical_language>

Target:
public Banner update(Long bannerId, Banner banner) { if (!bannerRepository.exists(bannerId)) { throw new BannerNotFoundException(); } return bannerRepository.saveAndFlush(banner); }
Source:
<code>private static Map<Integer, String> getExecutableNames(ITmfTrace trace) { Map<Integer, String> executableNames = new HashMap<>(); KernelAnalysisModule kernelAnlysis = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID); if (kernelAnlysis == null) { return Collections.emptyMap(); } Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(kernelAnlysis); <START> if (!threadIds.isEmpty()) { <END> for (Integer tid : threadIds) { String execName = KernelThreadInformationProvider.getExecutableName(kernelAnlysis, tid); if (execName != null) { executableNames.put(tid, execName); } } } return executableNames; }</code><technical_language>avoid imbrication in code flow, do fast returns simple conditions, code out of if, if (threadIds.isEmpty()) { return Collections.emptyMap(); } rest of code here</technical_language>

Target:
private static Map<Integer, String> getExecutableNames(ITmfTrace trace) { Map<Integer, String> executableNames = new HashMap<>(); KernelAnalysisModule kernelAnlysis = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID); if (kernelAnlysis == null) { return Collections.emptyMap(); } Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(kernelAnlysis); if (threadIds.isEmpty()) { return Collections.emptyMap(); } for (Integer tid : threadIds) { String execName = KernelThreadInformationProvider.getExecutableName(kernelAnlysis, tid); if (execName != null) { executableNames.put(tid, execName); } } return executableNames; }
Source:
<code>public void validate(final T credentials, final WebContext context) throws HttpAction { init(context); try { final CommonProfile profile = this.cache.get(credentials, () -> { logger.debug("Delegating authentication to {}...", delegate); delegate.validate(credentials, context); return credentials.getUserProfile(); }); credentials.setUserProfile(profile); logger.debug("Found cached credential. Using cached profile {}...", profile); } catch (UncheckedExecutionException e) { if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); <START> } else if (e.getCause() != null) { <END> throw new TechnicalException(e.getCause()); } else { throw new TechnicalException(e); } } catch (ExecutionException e) { if (e.getCause() instanceof HttpAction) { throw (HttpAction) e.getCause(); } else if (e.getCause() != null) { throw new TechnicalException(e.getCause()); } else { throw new TechnicalException(e); } } catch (ExecutionError e) { if (e.getCause() instanceof Error) { throw (Error) e; } else if (e.getCause() != null) { throw new TechnicalException(e.getCause()); } else { throw new TechnicalException(e); } } }</code><technical_language>Note else clauses redundant. typing much! :)</technical_language>

Target:
public void validate(final T credentials, final WebContext context) throws HttpAction { init(context); try { final CommonProfile profile = this.cache.get(credentials, () -> { logger.debug("Delegating authentication to {}...", delegate); delegate.validate(credentials, context); return credentials.getUserProfile(); }); credentials.setUserProfile(profile); logger.debug("Found cached credential. Using cached profile {}...", profile); } catch (Exception e) { throw new CredentialsException(e); } }
Source:
<code>@Override public float getPagesFillFactor() { if (!metricsEnabled || fillFactorProvider == null) return 0; T2<Long, Long> fillFactor = fillFactorProvider.apply(); long totalAllocated = Math.max(fillFactor.get2(), (getPageSize() * totalAllocatedPages.longValue())); <START> return (float) (totalAllocated - (fillFactor.get2() - fillFactor.get1())) / totalAllocated; <END> }</code><technical_language>review? totalAlloc-ff.get1() / totalAlloc</technical_language>

Target:
@Override public float getPagesFillFactor() { if (!metricsEnabled || freeSpaceProvider == null) return 0; long freeSpace = freeSpaceProvider.apply(); long totalAllocated = getPageSize() * totalAllocatedPages.longValue(); return (float) (totalAllocated - freeSpace) / totalAllocated; }
Source:
<code>public final int parseArguments(final Parameters params) throws CmdLineException { final String token = params.getParameter(0); String projectName = token; while (projectName.endsWith("/")) { projectName = projectName.substring(0, projectName.length() - 1); } <START> if (projectName.endsWith(".git")) { <END> projectName = projectName.substring(0, projectName.length() - 4); while (projectName.endsWith("/")) { projectName = projectName.substring(0, projectName.length() - 1); } } while (projectName.startsWith("/")) { projectName = projectName.substring(1); } boolean projectExists = false; for (Project.NameKey name : projectCache.all()) { if (name.get().equals(projectName)) { projectExists = true; break; } } if (!projectExists) { throw new CmdLineException(owner, "'" + token + "': not a Gerrit project"); } final ProjectControl control; try { Project.NameKey nameKey = new Project.NameKey(projectName); control = projectControlFactory.validateFor(nameKey, ProjectControl.OWNER | ProjectControl.VISIBLE); } catch (NoSuchProjectException e) { throw new CmdLineException(owner, "'" + token + "': not a Gerrit project"); } setter.addValue(control); return 1; }</code><technical_language>Change "if" "while" strip ".git" end of project name</technical_language>

Target:
public final int parseArguments(final Parameters params) throws CmdLineException { final String token = params.getParameter(0); String projectName = token; while (projectName.endsWith("/")) { projectName = projectName.substring(0, projectName.length() - 1); } if (projectName.endsWith(".git")) { projectName = projectName.substring(0, projectName.length() - 4); while (projectName.endsWith("/")) { projectName = projectName.substring(0, projectName.length() - 1); } } while (projectName.startsWith("/")) { projectName = projectName.substring(1); } final ProjectControl control; try { Project.NameKey nameKey = new Project.NameKey(projectName); control = projectControlFactory.validateFor(nameKey, ProjectControl.OWNER | ProjectControl.VISIBLE); } catch (NoSuchProjectException e) { throw new CmdLineException(owner, "'" + projectName + "': is not a Gerrit project"); } setter.addValue(control); return 1; }
Source:
<code>protected boolean tryFeed(Material food, GlowPlayer player) { <START> if (isAdult() && !isTamed()) { <END> int taming = computeTamingAmount(food); if (taming > 0) { domestication = Math.max(domestication + taming, maxDomestication); super.tryFeed(food, player); return true; } } return super.tryFeed(food, player); }</code><technical_language>Remove a nesting level inverting this if-statement</technical_language>

Target:
protected boolean tryFeed(Material food, GlowPlayer player) { if (!isAdult() || isTamed()) { return super.tryFeed(food, player); } int taming = computeDomestication(food); if (taming > 0) { domestication = Math.max(domestication + taming, maxDomestication); super.tryFeed(food, player); return true; } return super.tryFeed(food, player); }
Source:
<code>public ImportSourceDescriptor importDescriptor(@Context UriInfo uriInfo, @QueryParam("projectPath") String projectPath) throws ApiException, IOException { final VirtualFile virtualFile = vfsRegistry.getProvider(workspaceId).getMountPoint(true).getVirtualFile(projectPath); if (virtualFile.getChild(".svn") != null) { <START> return DtoFactory.getInstance().createDto(ImportSourceDescriptor.class) <END> .withType("subversion") .withLocation(subversionApi.getRepositoryUrl(((VirtualFileImpl)virtualFile).getIoFile().getPath())); } else { throw new ServerException("Not subversion repository"); } }</code><technical_language>DtoFactory.newDto static import instead of DtoFactory.getInstance().createDto</technical_language>

Target:
public ImportSourceDescriptor importDescriptor(@Context UriInfo uriInfo, @QueryParam("projectPath") String projectPath) throws ApiException, IOException { final VirtualFile virtualFile = vfsRegistry.getProvider(workspaceId).getMountPoint(true).getVirtualFile(projectPath); if (virtualFile.getChild(".svn") != null) { return newDto(ImportSourceDescriptor.class) .withType("subversion") .withLocation(subversionApi.getRepositoryUrl(((VirtualFileImpl)virtualFile).getIoFile().getPath())); } else { throw new ServerException("Not subversion repository"); } }
Source:
<code>private static ProxyProvider.Proxy mapProxyType(ProxyOptions.Type type, ClientLogger logger) { switch (type) { case HTTP: return ProxyProvider.Proxy.HTTP; case SOCKS4: return ProxyProvider.Proxy.SOCKS4; case SOCKS5: return ProxyProvider.Proxy.SOCKS5; default: throw logger.logExceptionAsError(new IllegalStateException( <START> String.format("Unknown Proxy type '%s' in use. Not configuring Netty proxy.", type))); <END> } }</code><technical_language>of this error message users perspective - this require do a search for this string hope a valid result. additional guidance provide in user solve this a web search required</technical_language>

Target:
private static ProxyProvider.Proxy mapProxyType(ProxyOptions.Type type, ClientLogger logger) { Objects.requireNonNull(type, "'ProxyOptions.getType()' cannot be null."); switch (type) { case HTTP: return ProxyProvider.Proxy.HTTP; case SOCKS4: return ProxyProvider.Proxy.SOCKS4; case SOCKS5: return ProxyProvider.Proxy.SOCKS5; default: throw logger.logExceptionAsError(new IllegalStateException( String.format("Unknown proxy type '%s' in use. Use a proxy type from 'ProxyOptions.Type'.", type))); } }
Source:
<code>protected void SyncSearch() { DiskImage diskImage = (DiskImage) getEntity(); if (diskImage == null) { return; } AsyncQuery _asyncQuery = new AsyncQuery(); _asyncQuery.setModel(this); _asyncQuery.asyncCallback = new INewAsyncCallback() { @Override public void OnSuccess(Object model, Object returnValue) { SearchableListModel searchableListModel = (SearchableListModel) model; searchableListModel.setItems((ArrayList<StorageDomain>) ((VdcQueryReturnValue) returnValue).getReturnValue()); } }; <START> GetStorageDomainsByImageIdParameters getImageByImageIdParameters = <END> new GetStorageDomainsByImageIdParameters(diskImage.getImageId()); getImageByImageIdParameters.setRefresh(getIsQueryFirstTime()); Frontend.RunQuery(VdcQueryType.GetStorageDomainsByImageId, getImageByImageIdParameters, _asyncQuery); setIsQueryFirstTime(false); }</code><technical_language>parameter name changed getImageByImageIdParameters GetStorageDomainsByImageIdParameters</technical_language>

Target:
protected void SyncSearch() { DiskImage diskImage = (DiskImage) getEntity(); if (diskImage == null) { return; } AsyncQuery _asyncQuery = new AsyncQuery(); _asyncQuery.setModel(this); _asyncQuery.asyncCallback = new INewAsyncCallback() { @Override public void OnSuccess(Object model, Object returnValue) { SearchableListModel searchableListModel = (SearchableListModel) model; searchableListModel.setItems((ArrayList<StorageDomain>) ((VdcQueryReturnValue) returnValue).getReturnValue()); } }; GetStorageDomainsByImageIdParameters getStorageDomainsByImageIdParameters = new GetStorageDomainsByImageIdParameters(diskImage.getImageId()); getStorageDomainsByImageIdParameters.setRefresh(getIsQueryFirstTime()); Frontend.RunQuery(VdcQueryType.GetStorageDomainsByImageId, getStorageDomainsByImageIdParameters, _asyncQuery); setIsQueryFirstTime(false); }
Source:
<code>private void setPanelMessage(String message) { String itemName; dscAlarmItemUpdate.setSysMessage(message); itemName = getItemName(DSCAlarmItemType.PANEL_MESSAGE, 0, 0); <START> if (itemName != "") { <END> updateItem(itemName, 0, message); } }</code><technical_language>I add this line, comparing a String operator work accidentally. change (and other occurrences) if (!("".equals(itemName)) if (StringUtils.isNotEmpty(itemName))</technical_language>

Target:
private void setPanelMessage(String message) { String itemName; dscAlarmItemUpdate.setSysMessage(message); itemName = getItemName(DSCAlarmItemType.PANEL_MESSAGE, 0, 0); if (StringUtils.isNotEmpty(itemName)) { updateItem(itemName, 0, message); } }
Source:
<code>public void onLeash(PlayerLeashEntityEvent e) { if (!isEnabled()) { return; } <START> Player p = (Player)e.getPlayer(); <END> ItemStack item = p.getInventory().getItemInMainHand(); SlimefunItem slimeItem = SlimefunItem.getByItem(item); if (slimeItem instanceof GrapplingHook) { e.setCancelled(true); } }</code><technical_language>need cast a Player a Player here</technical_language>

Target:
public void onLeash(PlayerLeashEntityEvent e) { if (!isEnabled()) { return; } Player p = e.getPlayer(); ItemStack item = p.getInventory().getItemInMainHand(); SlimefunItem slimeItem = SlimefunItem.getByItem(item); if (slimeItem instanceof GrapplingHook) { e.setCancelled(true); } }
Source:
<code>public Mono<Void> cancelScheduledMessages(Iterable<Long> sequenceNumbers, String associatedLinkName) { return isAuthorized(ManagementConstants.OPERATION_CANCEL_SCHEDULED_MESSAGE) .then(createChannel.flatMap(channel -> { final Message requestMessage = createManagementMessage( ManagementConstants.OPERATION_CANCEL_SCHEDULED_MESSAGE, associatedLinkName); final List<Long> numbers = new ArrayList<>(); sequenceNumbers.forEach(s -> numbers.add(s)); <START> Long[] longs = numbers.toArray(new Long[0]); <END> requestMessage.setBody(new AmqpValue(Collections.singletonMap(ManagementConstants.SEQUENCE_NUMBERS, longs))); return sendWithVerify(channel, requestMessage, null); })).then(); }</code><technical_language>final Long[] longs consistent</technical_language>

Target:
public Mono<Void> cancelScheduledMessages(Iterable<Long> sequenceNumbers, String associatedLinkName) { return isAuthorized(ManagementConstants.OPERATION_CANCEL_SCHEDULED_MESSAGE) .then(createChannel.flatMap(channel -> { final Message requestMessage = createManagementMessage( ManagementConstants.OPERATION_CANCEL_SCHEDULED_MESSAGE, associatedLinkName); final List<Long> numbers = new ArrayList<>(); sequenceNumbers.forEach(s -> numbers.add(s)); final Long[] longs = numbers.toArray(new Long[0]); requestMessage.setBody(new AmqpValue(Collections.singletonMap(ManagementConstants.SEQUENCE_NUMBERS, longs))); return sendWithVerify(channel, requestMessage, null); })).then(); }
Source:
<code>public <E extends Exception> boolean suppressed(Class<E> type) { <START> return Arrays.stream(getSuppressed()).map(type::isInstance).anyMatch(x -> x); <END> }</code><technical_language>sure, write Arrays.stream(getSuppressed()).anyMatch(type::isInstance)</technical_language>

Target:
public <E extends Exception> boolean suppressed(Class<E> type) { return Arrays.stream(getSuppressed()).anyMatch(type::isInstance); }
Source:
<code>private void doStart() throws Exception { Run<?,?> run = getContext().get(Run.class); TaskListener listener = getContext().get(TaskListener.class); FilePath workspace = getContext().get(FilePath.class); Launcher launcher = getContext().get(Launcher.class); Map<String,String> overrides = new LinkedHashMap<>(); List<MultiBinding.Unbinder> unbinders = new ArrayList<>(); for (MultiBinding<?> binding : step.bindings) { if (binding.getDescriptor().requiresWorkspace() && (workspace == null || launcher == null)) { throw new MissingContextVariableException(FilePath.class); } MultiBinding.MultiEnvironment environment = binding.bind(run, workspace, launcher, listener); unbinders.add(environment.getUnbinder()); overrides.putAll(environment.getValues()); } if (!overrides.isEmpty()) { boolean unix = launcher != null ? launcher.isUnix() : true; <START> listener.getLogger().println("Masking exact matches of " + overrides.keySet().stream().map( <END> v -> unix ? "$" + v : "%" + v + "%" ).collect(Collectors.joining(" or "))); } getContext().newBodyInvoker(). withContext(EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), new Overrider(overrides))). withContext(BodyInvoker.mergeConsoleLogFilters(getContext().get(ConsoleLogFilter.class), new Filter(overrides.values(), run.getCharset().name()))). withCallback(new Callback2(unbinders)). start(); }</code><technical_language>nit: change wording slightly emphasize "exact". suggestion listener.getLogger().println("Masking exact matches of " + overrides.keySet().stream().map(</technical_language>

Target:
private void doStart() throws Exception { Run<?,?> run = getContext().get(Run.class); TaskListener listener = getContext().get(TaskListener.class); FilePath workspace = getContext().get(FilePath.class); Launcher launcher = getContext().get(Launcher.class); Map<String,String> overrides = new LinkedHashMap<>(); List<MultiBinding.Unbinder> unbinders = new ArrayList<>(); for (MultiBinding<?> binding : step.bindings) { if (binding.getDescriptor().requiresWorkspace() && (workspace == null || launcher == null)) { throw new MissingContextVariableException(FilePath.class); } MultiBinding.MultiEnvironment environment = binding.bind(run, workspace, launcher, listener); unbinders.add(environment.getUnbinder()); overrides.putAll(environment.getValues()); } if (!overrides.isEmpty()) { boolean unix = launcher != null ? launcher.isUnix() : true; listener.getLogger().println("Masking only exact matches of " + overrides.keySet().stream().map( v -> unix ? "$" + v : "%" + v + "%" ).collect(Collectors.joining(" or "))); } getContext().newBodyInvoker(). withContext(EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), new Overrider(overrides))). withContext(BodyInvoker.mergeConsoleLogFilters(getContext().get(ConsoleLogFilter.class), new Filter(overrides.values(), run.getCharset().name()))). withCallback(new Callback2(unbinders)). start(); }
Source:
<code>public Throwable cause() { Object result = this.result; if (result == CANCELLATION_CAUSE_HOLDER) { <START> throw new LeanCancellationException(); <END> } return (result instanceof CauseHolder) ? ((CauseHolder) result).cause : null; }</code><technical_language>this is correct... I hoped unit tests for this :). This method return cause() throw it</technical_language>

Target:
public Throwable cause() { Object result = this.result; if (result != CANCELLATION_CAUSE_HOLDER) { return (result instanceof CauseHolder) ? ((CauseHolder) result).cause : null; } CancellationException ce = new LeanCancellationException(); if (RESULT_UPDATER.compareAndSet(this, CANCELLATION_CAUSE_HOLDER, new CauseHolder(ce))) { return ce; } return ((CauseHolder) this.result).cause; }
Source:
<code>protected void processOldImageFromDb() { <START> updateOldImageActive(Snapshot.SnapshotType.PREVIEW, <END> false); }</code><technical_language>supdateOldImageActive/updateOldImageAsActive</technical_language>

Target:
protected void processOldImageFromDb() { updateOldImageAsActive(Snapshot.SnapshotType.PREVIEW, false); }
Source:
<code>public void testAnalyze() throws HaskellException { Function add5 = new Function(); Expr add5Expr = new Apply(new Ident("(+)"), add5.addArgument()); add5.setExpr(add5Expr); assertEquals("\\ arg0 = ((+) arg0)", add5.toHaskell()); Expr addition = new Apply(add5, new Value(new ConstT("Int"), "5")); <START> assertEquals("Int", addition.analyze(this.env).prune().toHaskellType()); <END> }</code><technical_language>I undercaffeinated, I get Int in ghci: Prelude> :t (\x -> (+) x) (\x -> (+) x) :: Num a => a -> a -> a Prelude> :t (\x -> (+) x) (5 :: Int) (\x -> (+) x) (5 :: Int) :: Int -> Int Prelude> :t (\x -> (+) x) (5 :: Int) (10 :: Int) (\x -> (+) x) (5 :: Int) (10 :: Int) :: Int Prelude> (\x -> (+) x) 5 10 15</technical_language>

Target:
public void testAnalyze() throws HaskellException { Function.FunctionArgument arg = new Function.FunctionArgument(new ConstT("Int")); Expr applies = new Apply(new Ident("(+)"), arg); Function f = new Function(applies, arg); assertEquals("(Int -> (Int -> Int))", f.analyze(this.env).prune().toHaskellType()); Function.FunctionArgument arg1 = new Function.FunctionArgument(new ConstT("Int")); Function add5 = new Function(new Apply(new Apply(f, new Value(new ConstT("Int"), "5")), arg1), arg1); assertEquals("(Int -> Int)", add5.analyze(this.env).prune().toHaskellType()); }
Source:
<code>private List<String> externalTableBasePathWithClause() throws IOException, SemanticException { Path externalTableLocation = new Path(Path.SEPARATOR, new Path("replica_external_base")); DistributedFileSystem fileSystem = replica.miniDFSCluster.getFileSystem(); externalTableLocation = PathBuilder.fullyQualifiedHDFSUri(externalTableLocation, fileSystem); fileSystem.mkdirs(externalTableLocation); return Collections.singletonList( "'" + HiveConf.ConfVars.REPL_EXTERNAL_TABLE_BASE_DIR.varname + "'='" + externalTableLocation.toString() + "'" <START> ); <END> }</code><technical_language>Similar other places verifying contents of external table location info file, a check verify out-of-bound partition location good</technical_language>

Target:
private List<String> externalTableBasePathWithClause() throws IOException, SemanticException { Path externalTableLocation = new Path(REPLICA_EXTERNAL_BASE); DistributedFileSystem fileSystem = replica.miniDFSCluster.getFileSystem(); externalTableLocation = PathBuilder.fullyQualifiedHDFSUri(externalTableLocation, fileSystem); fileSystem.mkdirs(externalTableLocation); return Collections.singletonList( "'" + HiveConf.ConfVars.REPL_EXTERNAL_TABLE_BASE_DIR.varname + "'='" + externalTableLocation.toString() + "'" ); }
Source:
<code>private static ChatColor toColor(String name) { <START> if (name.equalsIgnoreCase("obfuscated")) <END> return ChatColor.MAGIC; if (name.equalsIgnoreCase("underlined")) return ChatColor.UNDERLINE; for (ChatColor color : ChatColor.values()) { if (color == ChatColor.MAGIC) continue; if (color.name().equalsIgnoreCase(name.toUpperCase())) return color; } return null; }</code><technical_language>ignore case</technical_language>

Target:
private static ChatColor toColor(String name) { if (name.equals("obfuscated")) return ChatColor.MAGIC; if (name.equals("underlined")) return ChatColor.UNDERLINE; for (ChatColor color : ChatColor.values()) { if (color == ChatColor.MAGIC) continue; if (color.name().equalsIgnoreCase(name.toUpperCase())) return color; } return null; }
Source:
<code>public void testPrefixTrim() { String logDir = getContext().getServerConfig().get("--log-path") + File.separator + "log"; StreamLogFiles log = new StreamLogFiles(getContext(), false); final long numSegments = 50; for(long x = 0; x < numSegments * StreamLogFiles.RECORDS_PER_LOG_FILE; x++) { writeToLog(log, x); } File logs = new File(logDir); assertThat((long) logs.list().length).isEqualTo(numSegments); final long endSegment = 25; long trimAddress = endSegment * StreamLogFiles.RECORDS_PER_LOG_FILE + 1; Set<SegmentHandle> trimmedHandles = new HashSet<>(); <START> for (SegmentHandle sh : log.getSegmentHandles()) { <END> if (sh.getSegment() < endSegment) { trimmedHandles.add(sh); } } log.prefixTrim(trimAddress); log.compact(); assertThat(log.getSegmentHandles().size()).isEqualTo((int) endSegment); String[] afterTrimFiles = logs.list(); assertThat(afterTrimFiles).hasSize((int) (numSegments - endSegment)); Set<String> fileNames = new HashSet<>(Arrays.asList(afterTrimFiles)); for (long x = endSegment + 1; x < numSegments; x++) { String logFile = Long.toString(x) + ".log"; assertThat(fileNames).contains(logFile); } log.prefixTrim(trimAddress); long trimmedExceptions = 0; for(long x = 0; x < numSegments * StreamLogFiles.RECORDS_PER_LOG_FILE; x++) { ILogData logData = log.read(x); if(logData.isTrimmed()) { trimmedExceptions++; } } for (SegmentHandle sh : trimmedHandles) { assertThat(sh.getWriteChannel().isOpen()).isFalse(); } assertThat(trimmedExceptions).isEqualTo(trimAddress + 1); }</code><technical_language>rename this OpenSegments</technical_language>

Target:
public void testPrefixTrim() { String logDir = getContext().getServerConfig().get("--log-path") + File.separator + "log"; StreamLogFiles log = new StreamLogFiles(getContext(), false); final long numSegments = 50; for(long x = 0; x < numSegments * StreamLogFiles.RECORDS_PER_LOG_FILE; x++) { writeToLog(log, x); } File logs = new File(logDir); assertThat((long) logs.list().length).isEqualTo(numSegments); final long endSegment = 25; long trimAddress = endSegment * StreamLogFiles.RECORDS_PER_LOG_FILE + 1; Set<SegmentHandle> trimmedHandles = new HashSet<>(); for (SegmentHandle sh : log.getOpenSegmentHandles()) { if (sh.getSegment() < endSegment) { trimmedHandles.add(sh); } } log.prefixTrim(trimAddress); log.compact(); assertThat(log.getOpenSegmentHandles().size()).isEqualTo((int) endSegment); String[] afterTrimFiles = logs.list(); assertThat(afterTrimFiles).hasSize((int) (numSegments - endSegment)); Set<String> fileNames = new HashSet<>(Arrays.asList(afterTrimFiles)); for (long x = endSegment + 1; x < numSegments; x++) { String logFile = Long.toString(x) + ".log"; assertThat(fileNames).contains(logFile); } log.prefixTrim(trimAddress); long trimmedExceptions = 0; for(long x = 0; x < numSegments * StreamLogFiles.RECORDS_PER_LOG_FILE; x++) { ILogData logData = log.read(x); if(logData.isTrimmed()) { trimmedExceptions++; } } for (SegmentHandle sh : trimmedHandles) { assertThat(sh.getWriteChannel().isOpen()).isFalse(); } assertThat(trimmedExceptions).isEqualTo(trimAddress + 1); }
Source:
<code>private int getFlag(String propertyName) { if (propertyName==null) return 0; <START> <END> switch (propertyName) { case BUSY_PROPERTY: return BUSY_FLAG; case PROPAGATED_CONFLICT_PROPERTY: return PROPAGATED_CONFLICT_FLAG; case PROPAGATED_ERROR_MARKER_PROPERTY: return PROPAGATED_ERROR_FLAG; case PROPAGATED_WARNING_MARKER_PROPERTY: return PROPAGATED_WARNING_FLAG; default: break; } return 0; }</code><technical_language>Missing whitespace ==, missing {}, trailing whitespace</technical_language>

Target:
private int getFlag(String propertyName) { if (propertyName == null) { return 0; } switch (propertyName) { case BUSY_PROPERTY: return BUSY_FLAG; case PROPAGATED_CONFLICT_PROPERTY: return PROPAGATED_CONFLICT_FLAG; case PROPAGATED_ERROR_MARKER_PROPERTY: return PROPAGATED_ERROR_FLAG; case PROPAGATED_WARNING_MARKER_PROPERTY: return PROPAGATED_WARNING_FLAG; default: break; } return 0; }
Source:
<code><START> public static String createAndRegisterNewRequestToken(String... properties) <END> { String newToken = UUID.randomUUID().toString(); registerRequestToken(newToken); if (properties.length != 0) { addTraceTokenProperties(properties); } return newToken; }</code><technical_language>This method sets request token current thread, scope returned caller easy for caller unset it</technical_language>

Target:
public static String createAndRegisterNewRequestToken(String... properties) { checkArgument((properties.length % 2) == 0, "odd number of elements in properties"); String newToken = UUID.randomUUID().toString(); registerRequestToken(newToken); if (properties.length != 0) { addTraceTokenProperties(properties); } return newToken; }
Source:
<code>private int computeHashCode() { final int[] parts = new int[4]; parts[0] = (mapping == null) ? 0 : mapping.hashCode(); parts[1] = (semantic == null) ? 0 : getSemanticID().hashCode(); parts[2] = (line == null) ? 0 : getLineID().hashCode(); <START> parts[3] = (column == null) ? 0 : getColumnID().hashCode(); <END> final String sep = "/"; return KeyCache.DEFAULT.getKey(parts[0] + sep + parts[1] + sep + parts[2] + sep + parts[3]); }</code><technical_language>Calling hashCode() Integer instances is a no-op (it is guaranteed return integer's value)</technical_language>

Target:
private int computeHashCode() { final int[] parts = new int[4]; parts[0] = (mapping == null) ? 0 : mapping.hashCode(); parts[1] = (semantic == null) ? 0 : getSemanticID(); parts[2] = (line == null) ? 0 : getLineID(); parts[3] = (column == null) ? 0 : getColumnID(); final String sep = "/"; return KeyCache.DEFAULT.getKey(parts[0] + sep + parts[1] + sep + parts[2] + sep + parts[3]); }
Source:
<code>private static @NotNull Vector2 readPosition(@NotNull JsonValue jsonValue, @Nullable String superComponent) { Optional<String> string = Optional.ofNullable(jsonValue.getString("position", null)); return string .map(SolMath::readV2) <START> .orElseThrow(() -> new SolDescriptiveException("Some of your " + superComponent + "s is missing a required \"position\" argument, or it is malformed.")); <END> }</code><technical_language>syntax of exception. "Some of gunslots is missing a.."</technical_language>

Target:
private static @NotNull Vector2 readPosition(@NotNull JsonValue jsonValue, @Nullable String superComponent) { Optional<String> string = Optional.ofNullable(jsonValue.getString("position", null)); return string .map(SolMath::readVector2String) .orElseThrow(() -> new SolDescriptiveException("Some of your " + superComponent + "s is missing a required \"position\" argument, or it is malformed.")); }
Source:
<code>public void patch(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, Patch patch) throws UnprocessableEntityException, PatchBadRequestException, SQLException, AuthorizeException { itemPatch.patch(context, apiCategory, model, uuid, patch); <START> findOne(context, uuid); <END> }</code><technical_language>This is necessary. is done in RestResourceController, retrieved is returned</technical_language>

Target:
public void patch(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, Patch patch) throws UnprocessableEntityException, PatchBadRequestException, SQLException, AuthorizeException, ResourceNotFoundException { ItemRest restModel = findOne(context, uuid); if (restModel == null) { throw new ResourceNotFoundException(apiCategory + "." + model + " with id: " + uuid + " not found"); } itemPatch.patch(restModel, context, patch); }
Source:
<code>public void testExists() throws Exception { h.execute("insert into something (id, name) values (1, 'Coda')"); h.registerCollectorFactory(new MaybeCollectorFactory()); @SuppressWarnings("unchecked") Maybe<String> rs = h.createQuery("select name from something where id = :id") .bind("id", 1) .mapTo(String.class) <START> .collectInto(Maybe.class); <END> assertThat(rs.isKnown(), equalTo(true)); assertThat(rs.getValue(), equalTo("Coda")); }</code><technical_language>this need @SuppressWarnings</technical_language>

Target:
public void testExists() throws Exception { Handle h = h2.getSharedHandle(); h.execute("insert into something (id, name) values (1, 'Coda')"); h.registerCollectorFactory(new GuavaOptionalCollectorFactory()); @SuppressWarnings("unchecked") Optional<String> rs = h.createQuery("select name from something where id = :id") .bind("id", 1) .mapTo(String.class) .collectInto(Optional.class); assertThat(rs.isPresent(), equalTo(true)); assertThat(rs.get(), equalTo("Coda")); }
Source:
<code>public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { final ITmfTrace trace = fTrace; if (signal.getSource() == this || trace == null) { return; } TmfTraceContext ctx = TmfTraceManager.getInstance().getTraceContext(trace); long beginTime = ctx.getSelectionRange().getStartTime().toNanos(); long endTime = ctx.getSelectionRange().getEndTime().toNanos(); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { <START> if (fTimeGraphViewer.getControl().isDisposed()) { <END> return; } if (beginTime == getTimeGraphViewer().getSelectionBegin() && endTime == getTimeGraphViewer().getSelectionEnd()) { return; } if (beginTime == endTime) { fTimeGraphViewer.setSelectedTime(beginTime, true); } else { fTimeGraphViewer.setSelectionRange(beginTime, endTime, true); } synchingToTime(fTimeGraphViewer.getSelectionBegin()); } }); }</code><technical_language>cache a for thread safety. I recommend getter</technical_language>

Target:
public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { final ITmfTrace trace = fTrace; if (signal.getSource() == this || trace == null) { return; } TmfTraceContext ctx = TmfTraceManager.getInstance().getTraceContext(trace); long beginTime = ctx.getSelectionRange().getStartTime().toNanos(); long endTime = ctx.getSelectionRange().getEndTime().toNanos(); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (fTimeGraphViewer.getControl().isDisposed()) { return; } if (beginTime == fTimeGraphViewer.getSelectionBegin() && endTime == fTimeGraphViewer.getSelectionEnd()) { return; } if (beginTime == endTime) { fTimeGraphViewer.setSelectedTime(beginTime, true); } else { fTimeGraphViewer.setSelectionRange(beginTime, endTime, true); } synchingToTime(fTimeGraphViewer.getSelectionBegin()); } }); }
Source:
<code>@Override public void <START> unlink(String <END> pathname) throws ErrnoException { os.unlink(pathname); }</code><technical_language>do need this, checks? onWriteToDisk()</technical_language>

Target:
@Override public void unlink(String pathname) throws ErrnoException { BlockGuard.getThreadPolicy().onWriteToDisk(); os.unlink(pathname); }
Source:
<code>private void setUpRsync() { logger.fine("setUpRsync called..."); if (DataCaptureModuleUtil.rsyncSupportEnabled(settingsWrapper.getValueForKey(SettingsServiceBean.Key.UploadMethods))) { try { ScriptRequestResponse scriptRequestResponse = commandEngine.submit(new RequestRsyncScriptCommand(dvRequestService.getDataverseRequest(), dataset)); logger.fine("script: " + scriptRequestResponse.getScript()); if (scriptRequestResponse.getScript() != null && !scriptRequestResponse.getScript().isEmpty()) { setRsyncScript(scriptRequestResponse.getScript()); <START> rsyncScriptFilename = "upload-" + workingVersion.getDataset().getIdentifier() + ".bash"; <END> setHasRsyncScript(true); } else { setHasRsyncScript(false); } } catch (EJBException ex) { logger.warning("Problem getting rsync script (EJBException): " + EjbUtil.ejbExceptionToString(ex)); } catch (RuntimeException ex) { logger.warning("Problem getting rsync script (RuntimeException): " + ex.getLocalizedMessage()); } catch (CommandException cex) { logger.warning("Problem getting rsync script (Command Exception): " + cex.getLocalizedMessage()); } } }</code><technical_language>This naming logic exists in 2 places centralized. a bundle string build it</technical_language>

Target:
private void setUpRsync() { logger.fine("setUpRsync called..."); if (DataCaptureModuleUtil.rsyncSupportEnabled(settingsWrapper.getValueForKey(SettingsServiceBean.Key.UploadMethods))) { try { ScriptRequestResponse scriptRequestResponse = commandEngine.submit(new RequestRsyncScriptCommand(dvRequestService.getDataverseRequest(), dataset)); logger.fine("script: " + scriptRequestResponse.getScript()); if (scriptRequestResponse.getScript() != null && !scriptRequestResponse.getScript().isEmpty()) { setRsyncScript(scriptRequestResponse.getScript()); rsyncScriptFilename = DataCaptureModuleUtil.getScriptName(workingVersion); setHasRsyncScript(true); } else { setHasRsyncScript(false); } } catch (EJBException ex) { logger.warning("Problem getting rsync script (EJBException): " + EjbUtil.ejbExceptionToString(ex)); } catch (RuntimeException ex) { logger.warning("Problem getting rsync script (RuntimeException): " + ex.getLocalizedMessage()); } catch (CommandException cex) { logger.warning("Problem getting rsync script (Command Exception): " + cex.getLocalizedMessage()); } } }
Source:
<code>protected void updateTitle(String brand) { <START> if (brand != null) { <END> IBrandManager brandManager = TasksUiPlugin.getDefault().getBrandManager(); setTitle(brandManager.getConnectorLabel(getConnector(), brand)); } }</code><technical_language>more sense mark brand parameter of setBrand @NonNull instead of checking here</technical_language>

Target:
protected void updateTitle(String brand) { IBrandManager brandManager = TasksUiPlugin.getDefault().getBrandManager(); setTitle(brandManager.getConnectorLabel(getConnector(), brand)); }
Source:
<code>public static <T extends JavaSource<?>> T create(final Class<T> type) { for (JavaParser parser : getParsers()) { final T result = parser.create(type); <START> if (result != null) <END> { return result; } } return null; }</code><technical_language>This is required for cases roaster-jdt is in classpath</technical_language>

Target:
public static <T extends JavaSource<?>> T create(final Class<T> type) { for (JavaParser parser : getParsers()) { final T result = parser.create(type); if (result != null) { return result; } } throw new ParserException("Cannot find JavaParserProvider capable of producing JavaSource of type " + type.getSimpleName(), new IllegalArgumentException(type.getName())); }
Source:
<code>public void execute() { final DialogBox db = new DialogBox(false, true); db.setText("About MIT App Inventor"); db.setStyleName("ode-DialogBox"); db.setHeight("200px"); db.setWidth("400px"); db.setGlassEnabled(true); db.setAnimationEnabled(true); db.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) + "<BR/>Use Companion: " + BlocklyPanel.getCompVersion() + <START> "<BR/>Target Android SDK: " + YaVersion.TARGET_SDK_VERSION; <END> Config config = Ode.getInstance().getSystemConfig(); String releaseNotesUrl = config.getReleaseNotesUrl(); if (!Strings.isNullOrEmpty(releaseNotesUrl)) { html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl + "\" target=\"_blank\">release notes</a>"; } String tosUrl = config.getTosUrl(); if (!Strings.isNullOrEmpty(tosUrl)) { html += "<BR/><BR/><a href=\"" + tosUrl + "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>"; } HTML message = new HTML(html); SimplePanel holder = new SimplePanel(); Button ok = new Button("Close"); ok.addClickListener(new ClickListener() { public void onClick(Widget sender) { db.hide(); } }); holder.add(ok); DialogBoxContents.add(message); DialogBoxContents.add(holder); db.setWidget(DialogBoxContents); db.show(); }</code><technical_language>add strings (sans <br> tag) OdeMessages translated. asked consider including Android version number (e.g., "Android 9.0 Pie") of users mapping of SDK version marketing version. Add a string in YaVersion include here</technical_language>

Target:
public void execute() { final DialogBox db = new DialogBox(false, true); db.setText("About MIT App Inventor"); db.setStyleName("ode-DialogBox"); db.setHeight("200px"); db.setWidth("400px"); db.setGlassEnabled(true); db.setAnimationEnabled(true); db.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) + "<BR/>" + MESSAGES.useCompanion(YaVersion.PREFERRED_COMPANION, YaVersion.PREFERRED_COMPANION + "u") + "<BR/>" + MESSAGES.targetSdkVersion(YaVersion.TARGET_SDK_VERSION, YaVersion.TARGET_ANDROID_VERSION); Config config = Ode.getInstance().getSystemConfig(); String releaseNotesUrl = config.getReleaseNotesUrl(); if (!Strings.isNullOrEmpty(releaseNotesUrl)) { html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl + "\" target=\"_blank\">release notes</a>"; } String tosUrl = config.getTosUrl(); if (!Strings.isNullOrEmpty(tosUrl)) { html += "<BR/><BR/><a href=\"" + tosUrl + "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>"; } HTML message = new HTML(html); SimplePanel holder = new SimplePanel(); Button ok = new Button("Close"); ok.addClickListener(new ClickListener() { public void onClick(Widget sender) { db.hide(); } }); holder.add(ok); DialogBoxContents.add(message); DialogBoxContents.add(holder); db.setWidget(DialogBoxContents); db.show(); }
Source:
<code>protected void processValue(int quark, long timestamp, ITmfStateValue value) throws AttributeNotFoundException, TimeRangeException, StateValueTypeException { ITmfStateSystemBuilder ss = fProvider.getAssignedStateSystem(); <START> if (fStack == ValueTypeStack.TYPE_STACK_PUSH) { <END> ss.pushAttribute(timestamp, value, quark); } else if (fStack == ValueTypeStack.TYPE_STACK_POP) { ss.popAttribute(timestamp, quark); } else { ss.modifyAttribute(timestamp, value, quark); } }</code><technical_language>switch/case (saves check most) also, is incrementValue() in method above? handled in place, clearer? is a ss.incrementAttribute() now</technical_language>

Target:
protected void processValue(int quark, long timestamp, ITmfStateValue value) throws AttributeNotFoundException, TimeRangeException, StateValueTypeException { ITmfStateSystemBuilder ss = fProvider.getAssignedStateSystem(); switch (fStack) { case POP: ss.popAttribute(timestamp, quark); break; case PUSH: ss.pushAttribute(timestamp, value, quark); break; case NULL: case PEEK: default: ss.modifyAttribute(timestamp, value, quark); break; } }