auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static <T, S> Stream<S> map( List<T> values, Function<T, S> mapper, Executor executor, int concurrency) { int size = values.size(); if (size <= 1 || concurrency == 1) { return values.stream().map(mapper); } List<StreamElement<T, S>> elements = values.stream() .map((Function<T, StreamElement<T, S>>) StreamElement::new) .collect(Collectors.toList()); Queue<StreamElement<T, S>> queue = new ConcurrentLinkedQueue<>(elements); if (size < concurrency) { <START> concurrency = size; <END> } for (int i = 0; i < concurrency; i++) { executor.execute(() -> runOperationsAndUpdateFutures(queue, mapper)); } return streamAllUnchecked(elements); }</code><technical_language>assigning a parameter feels odd</technical_language>

Target:
public static <T, S> Stream<S> map( List<T> values, Function<T, S> mapper, Executor executor, int concurrency) { int size = values.size(); if (size <= 1 || concurrency == 1) { return values.stream().map(mapper); } List<StreamElement<T, S>> elements = values.stream() .map(value -> StreamElement.of(value, new CompletableFuture<S>())) .collect(Collectors.toList()); Queue<StreamElement<T, S>> queue = new ConcurrentLinkedQueue<>(elements); int numThreads = size < concurrency ? size : concurrency; for (int i = 0; i < numThreads; i++) { executor.execute(() -> runOperationsAndUpdateFutures(queue, mapper)); } return streamAllUnchecked(elements); }
Source:
<code>public void testModerateResponsesButton() { resultsPage = loginToInstructorFeedbackResultsPage("CFResultsUiT.instr", "Open Session"); resultsPage.displayByQuestion(); ThreadHelper.waitFor(2000); ______TS("Typical case: test moderate responses button for individual response (including no response)"); verifyModerateResponsesButton(2, "CFResultsUiT.alice.b@gmail.tmt", "CFResultsUiT.benny.c@gmail.tmt", "CFResultsUiT.charlie.d@gmail.tmt", "CFResultsUiT.danny.e@gmail.tmt", "drop.out@gmail.tmt", "extra.guy@gmail.tmt", "CFResultsUiT.emily.f@gmail.tmt"); ______TS("Typical case: test moderate responses button for team response"); verifyModerateResponsesButton(4, "Team 1</td></div>'\""); resultsPage = loginToInstructorFeedbackResultsPage("CFResultsUiT.instr", "Session with Instructors as Givers"); resultsPage.displayByQuestion(); <START> ThreadHelper.waitFor(2000); <END> ______TS("Typical case: test moderate responses button for instructors as givers"); verifyModerateResponsesButton(1, "CFResultsUiT.instr@gmail.tmt", "CFResultsUiT.instr@gmail.tmt", "CFResultsUiT.instr@gmail.tmt"); }</code><technical_language>Try avoid a waitFor, wait page load element load instead</technical_language>

Target:
public void testModerateResponsesButton() { resultsPage = loginToInstructorFeedbackResultsPage("CFResultsUiT.instr", "Open Session"); resultsPage.displayByQuestion(); ______TS("Typical case: test moderate responses button for individual response (including no response)"); verifyModerateResponsesButton(2, "CFResultsUiT.alice.b@gmail.tmt", "CFResultsUiT.benny.c@gmail.tmt", "CFResultsUiT.charlie.d@gmail.tmt", "CFResultsUiT.danny.e@gmail.tmt", "drop.out@gmail.tmt", "extra.guy@gmail.tmt", "CFResultsUiT.emily.f@gmail.tmt"); ______TS("Typical case: test moderate responses button for team response"); verifyModerateResponsesButton(4, "Team 1</td></div>'\""); resultsPage = loginToInstructorFeedbackResultsPage("CFResultsUiT.instr", "Session with Instructors as Givers"); resultsPage.displayByQuestion(); resultsPage.waitForPageToLoad(); ______TS("Typical case: test moderate responses button for instructors as givers"); verifyModerateResponsesButton(1, "CFResultsUiT.instr@gmail.tmt", "CFResultsUiT.instr@gmail.tmt", "CFResultsUiT.instr@gmail.tmt"); }
Source:
<code>private void checkManagedConfiguration() { Log.d(TAG, "Checking managed configuration"); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { RestrictionsManager restrictionsManager = (RestrictionsManager) getSystemService(Context.RESTRICTIONS_SERVICE); Bundle appRestrictions = restrictionsManager.getApplicationRestrictions(); if (appRestrictions.containsKey("profileUrl")) { Toast.makeText(this, "Found managed configuration install URL " + appRestrictions.getString("profileUrl"), Toast.LENGTH_LONG).show(); Log.d(TAG, "Found managed configuration install URL " + appRestrictions.getString("profileUrl")); incomingRef = appRestrictions.getString("profileUrl"); <START> uiState = UiState.READY_TO_INSTALL; <END> uiStateScreenTransition(); startResourceInstall(); } } }</code><technical_language>create a new install mode for managed installations (i.e. INSTALL_MODE_BARCODE INSTALL_MODE_URL), add a line sets of lastInstallMode that</technical_language>

Target:
private void checkManagedConfiguration() { Log.d(TAG, "Checking managed configuration"); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { RestrictionsManager restrictionsManager = (RestrictionsManager) getSystemService(Context.RESTRICTIONS_SERVICE); Bundle appRestrictions = restrictionsManager.getApplicationRestrictions(); if (appRestrictions.containsKey("profileUrl")) { Log.d(TAG, "Found managed configuration install URL " + appRestrictions.getString("profileUrl")); incomingRef = appRestrictions.getString("profileUrl"); lastInstallMode = INSTALL_MODE_MANAGED_CONFIGURATION; uiState = UiState.READY_TO_INSTALL; uiStateScreenTransition(); startResourceInstall(); } } }
Source:
<code>public void testNeverPolicy() throws IOException, NamingException, WorkException { <START> log.info("Running testAlwaysPolicy()"); <END> int doWorkAccepted = server1Proxy.getDoWorkAccepted(); for (int i = 0; i < 10; i++) { server1Proxy.doWork(new ShortWork().setName("testNeverPolicy-work" + (i + 1))); } logWorkStats(); Assert.assertTrue("Expected doWorkAccepted = " + (doWorkAccepted + 10) + ", actual: " + server1Proxy.getDoWorkAccepted(), server1Proxy.getDoWorkAccepted() == doWorkAccepted + 10); }</code><technical_language>remove</technical_language>

Target:
public void testNeverPolicy() throws IOException, NamingException, WorkException { int doWorkAccepted = server1Proxy.getDoWorkAccepted(); for (int i = 0; i < 10; i++) { server1Proxy.doWork(new ShortWork()); } Assert.assertTrue("Expected doWorkAccepted = " + (doWorkAccepted + 10) + ", actual: " + server1Proxy.getDoWorkAccepted(), server1Proxy.getDoWorkAccepted() == doWorkAccepted + 10); }
Source:
<code>private boolean tagResource(String resourceId, String tagName) { <START> if(! Utils.isEmptyOrWhitespaces(tagName)) { <END> Tag tag = new Tag( "Name", tagName ); CreateTagsRequest ctr = new CreateTagsRequest(Collections.singletonList(resourceId), Arrays.asList( tag )); try { this.ec2Api.createTags( ctr ); } catch(Exception e) { logger.info("Error tagging resource " + resourceId + " with name=" + tagName + ": " + e); } return true; } return false; }</code><technical_language>For debug purpose, is is return statement in a function. like... java boolean result = false; if( ... ) { result = true; } return result; In debug mode, setting a break point function end quicker paths</technical_language>

Target:
private boolean tagResource(String resourceId, String tagName) { boolean result = false; if(! Utils.isEmptyOrWhitespaces(tagName)) { Tag tag = new Tag( "Name", tagName ); CreateTagsRequest ctr = new CreateTagsRequest(Collections.singletonList(resourceId), Arrays.asList( tag )); try { this.ec2Api.createTags( ctr ); } catch(Exception e) { logger.warning("Error tagging resource " + resourceId + " with name=" + tagName + ": " + e); } result = true; } return result; }
Source:
<code>private static int computeSizeOnDisk(ITmfStateValue sv) { <START> int size = Long.BYTES + Long.BYTES + Integer.BYTES + Integer.BYTES; <END> size += sv.serialize().length; return size; }</code><technical_language>Short.BYTES</technical_language>

Target:
private static int computeSizeOnDisk(ITmfStateValue sv) { int size = Long.BYTES + Long.BYTES + Integer.BYTES + Short.BYTES; size += sv.serialize().length; return size; }
Source:
<code>public int hashCode() { <START> return 31 * this.readName.hashCode() + this.pairStatus.hashCode(); <END> }</code><technical_language>I this is Objects.hash(readName, pairStatus);</technical_language>

Target:
public int hashCode() { return Objects.hash(readName, pairStatus); }
Source:
<code>public WebDriverWrapper(@Nonnull Config config, @Nonnull WebDriver webDriver, @Nullable SelenideProxyServer selenideProxy) { <START> if (config == null) throw new IllegalArgumentException("config must not be null"); <END> if (webDriver == null) throw new IllegalArgumentException("webDriver must not be null"); this.config = config; this.webDriver = webDriver; this.selenideProxy = selenideProxy; }</code><technical_language>easily Objects.requireNonNull explanation message in case</technical_language>

Target:
public WebDriverWrapper(@Nonnull Config config, @Nonnull WebDriver webDriver, @Nullable SelenideProxyServer selenideProxy) { this(config, webDriver, selenideProxy, new BrowserHealthChecker()); }
Source:
<code>public static void startH2O() { if (!H2OServerStarted) { H2OApp.main(new String[0]); H2O.waitForCloudSize(1, 10 * 1000 ); <START> H2OServerStarted = true; <END> } else { log.info("H2O Server is already Running"); } }</code><technical_language>add a log mention H2O server started properly</technical_language>

Target:
public static void startH2O() { if (!isH2OServerStarted) { H2OApp.main(new String[0]); H2O.waitForCloudSize(1, 10 * 1000 ); isH2OServerStarted = true; log.info("H2o Server has started."); } else { log.warn("H2O Server is already Running."); } }
Source:
<code>private <T extends Closeable> OutputStream writeArchive(Format<T> fmt) { final String pfx = prefix == null ? "" : prefix; final TreeWalk walk = new TreeWalk(repo); try { final T outa = fmt.createArchiveOutputStream(out); try { final MutableObjectId idBuf = new MutableObjectId(); final ObjectReader reader = walk.getObjectReader(); final RevWalk rw = new RevWalk(walk.getObjectReader()); walk.reset(rw.parseTree(tree)); if <START> (paths.size() != 0) { <END> walk.setFilter(PathFilterGroup.createFromStrings(paths)); } while (walk.next()) { final String name = pfx + walk.getPathString(); FileMode mode = walk.getFileMode(0); if (walk.isSubtree()) walk.enterSubtree(); if (mode == FileMode.GITLINK) mode = FileMode.TREE; if (mode == FileMode.TREE) { fmt.putEntry(outa, name + "/", mode, null); continue; } walk.getObjectId(idBuf, 0); fmt.putEntry(outa, name, mode, reader.open(idBuf)); } outa.close(); } finally { out.close(); } return out; } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfArchiveCommand, e); } finally { walk.release(); } }</code><technical_language>!paths.isEmpty()</technical_language>

Target:
private <T extends Closeable> OutputStream writeArchive(Format<T> fmt) { final String pfx = prefix == null ? "" : prefix; final TreeWalk walk = new TreeWalk(repo); try { final T outa = fmt.createArchiveOutputStream(out); try { final MutableObjectId idBuf = new MutableObjectId(); final ObjectReader reader = walk.getObjectReader(); final RevWalk rw = new RevWalk(walk.getObjectReader()); walk.reset(rw.parseTree(tree)); if (!paths.isEmpty()) walk.setFilter(PathFilterGroup.createFromStrings(paths)); while (walk.next()) { final String name = pfx + walk.getPathString(); FileMode mode = walk.getFileMode(0); if (walk.isSubtree()) walk.enterSubtree(); if (mode == FileMode.GITLINK) mode = FileMode.TREE; if (mode == FileMode.TREE) { fmt.putEntry(outa, name + "/", mode, null); continue; } walk.getObjectId(idBuf, 0); fmt.putEntry(outa, name, mode, reader.open(idBuf)); } outa.close(); } finally { out.close(); } return out; } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfArchiveCommand, e); } finally { walk.release(); } }
Source:
<code>public void testNormalFrame() { EmbeddedChannel decoderChannel = new EmbeddedChannel(new PerMessageDeflateDecoder(false, NEVER_SKIP)); byte[] payload = new byte[300]; random.nextBytes(payload); BinaryWebSocketFrame frame = new BinaryWebSocketFrame(true, WebSocketExtension.RSV3, Unpooled.wrappedBuffer(payload)); decoderChannel.writeInbound(frame); BinaryWebSocketFrame newFrame = decoderChannel.readInbound(); <START> <END> assertNotNull(newFrame); assertNotNull(newFrame.content()); assertEquals(WebSocketExtension.RSV3, newFrame.rsv()); assertEquals(300, newFrame.content().readableBytes()); byte[] finalPayload = new byte[300]; newFrame.content().readBytes(finalPayload); assertArrayEquals(finalPayload, payload); newFrame.release(); }</code><technical_language>this removed</technical_language>

Target:
public void testNormalFrame() { EmbeddedChannel decoderChannel = new EmbeddedChannel(new PerMessageDeflateDecoder(false)); byte[] payload = new byte[300]; random.nextBytes(payload); BinaryWebSocketFrame frame = new BinaryWebSocketFrame(true, WebSocketExtension.RSV3, Unpooled.wrappedBuffer(payload)); assertTrue(decoderChannel.writeInbound(frame)); BinaryWebSocketFrame newFrame = decoderChannel.readInbound(); assertNotNull(newFrame); assertNotNull(newFrame.content()); assertEquals(WebSocketExtension.RSV3, newFrame.rsv()); assertEquals(300, newFrame.content().readableBytes()); byte[] finalPayload = new byte[300]; newFrame.content().readBytes(finalPayload); assertArrayEquals(finalPayload, payload); newFrame.release(); }
Source:
<code>public Coordinator(CoordinatorConfig config) throws DatastreamException { _config = config; _eventQueue = new CoordinatorEventBlockingQueue(); _eventThread = new CoordinatorEventProcessor(); _eventThread.setDaemon(true); _adapter = new ZkAdapter(_config.getZkAddress(), _config.getCluster(), _config.getZkSessionTimeout(), _config.getZkConnectionTimeout(), this); _adapter.setListener(this); _eventCollectorFactory = new DatastreamEventCollectorFactory(config.getConfigProperties()); String transportFactory = config.getTransportProviderFactory(); TransportProviderFactory factory = ReflectionUtils.createInstance(transportFactory); if (factory == null) { throw new DatastreamException("invalid transport provider factory: " + transportFactory); } _transportProvider = factory.createTransportProvider(_config.getConfigProperties()); if (_transportProvider == null) { <START> throw new DatastreamException("failed to create transport provider, factory=" + transportFactory); <END> } _destinationManager = new DestinationManager(_transportProvider); }</code><technical_language>add space end "factory= "</technical_language>

Target:
public Coordinator(CoordinatorConfig config) throws DatastreamException { _config = config; _eventQueue = new CoordinatorEventBlockingQueue(); _eventThread = new CoordinatorEventProcessor(); _eventThread.setDaemon(true); _adapter = new ZkAdapter(_config.getZkAddress(), _config.getCluster(), _config.getZkSessionTimeout(), _config.getZkConnectionTimeout(), this); _adapter.setListener(this); _eventCollectorFactory = new DatastreamEventCollectorFactory(config.getConfigProperties()); String transportFactory = config.getTransportProviderFactory(); TransportProviderFactory factory = ReflectionUtils.createInstance(transportFactory); if (factory == null) { throw new DatastreamException("invalid transport provider factory: " + transportFactory); } _transportProvider = factory.createTransportProvider(_config.getConfigProperties()); if (_transportProvider == null) { throw new DatastreamException("failed to create transport provider, factory: " + transportFactory); } _destinationManager = new DestinationManager(_transportProvider); }
Source:
<code>public void run() { log.info("Starting"); if (setState(State.STARTING) == null) { log.info("StreamThread already shutdown. Not running"); return; } boolean cleanRun = false; try { runLoop(); cleanRun = true; } catch (final TimeoutException e) { <START> <END> throw new TimeoutException("The thread-consumer : " + threadMetadata.consumerClientId() + " and restore-consumer : " + threadMetadata.restoreConsumerClientId() + "has happened TimeoutExceptio" + " Try tuning 'default.api.timeout.ms' option", e); } catch (final KafkaException e) { log.error("Encountered the following unexpected Kafka exception during processing, " + "this usually indicate Streams internal errors:", e); throw e; } catch (final Exception e) { log.error("Encountered the following error during processing:", e); throw e; } finally { completeShutdown(cleanRun); } }</code><technical_language>nit: remove this extra line</technical_language>

Target:
public void run() { log.info("Starting"); if (setState(State.STARTING) == null) { log.info("StreamThread already shutdown. Not running"); return; } boolean cleanRun = false; try { runLoop(); cleanRun = true; } catch (final TimeoutException e) { throw new TimeoutException("The thread-consumer : " + threadMetadata.consumerClientId() + " and restore-consumer : " + threadMetadata.restoreConsumerClientId() + "has happened TimeoutException" + " Try increasing 'default.api.timeout.ms' option", e); } catch (final KafkaException e) { log.error("Encountered the following unexpected Kafka exception during processing, " + "this usually indicate Streams internal errors:", e); throw e; } catch (final Exception e) { log.error("Encountered the following error during processing:", e); throw e; } finally { completeShutdown(cleanRun); } }
Source:
<code>public void setFact(String name, String value) { if (this.facts == null) { this.facts = new HashMap<>(); } <START> HashMap<String, String> fact = new HashMap<String, String>() {{ put(name, value); }}; <END> if (this.checkForCloudProfileFacts(this, fact)) { this.setRHCloudProfileModified(new Date()); } this.facts.put(name, value); }</code><technical_language>is avoid this syntax creates anonymous class time is called. instantiating a map calling fact.put(name, value); fine</technical_language>

Target:
public void setFact(String name, String value) { if (this.facts == null) { this.facts = new HashMap<>(); } HashMap<String, String> fact = new HashMap<>(); fact.put(name, value); if (this.checkForCloudProfileFacts(fact)) { this.updateRHCloudProfileModified(); } this.facts.put(name, value); }
Source:
<code>public void expandPathInProjectExplorer(String path) { List<String> itemsPaths = splitPathOnSubitems(path); ListIterator<String> iterator = itemsPaths.listIterator(); while (iterator.hasNext()) { String currentItem = iterator.next(); if (!iterator.hasNext()) { <START> waitItem(currentItem); <END> openItemByPath(currentItem); break; } By nextItemLocator = By.xpath(format(PROJECT_EXPORER_ITEM_TEMPLATE, itemsPaths.get(iterator.nextIndex()))); if (!seleniumWebDriverHelper.isVisible(nextItemLocator)) { waitItem(currentItem); openItemByPath(currentItem); } } }</code><technical_language>Code if useless opening this item next previous iteration</technical_language>

Target:
public void expandPathInProjectExplorer(String path) { List<String> itemsPaths = splitJavaProjectPath(path); for (int i = 0; i < itemsPaths.size(); i++) { String currentItem = itemsPaths.get(i); int nextItemIndex = i + 1; if (nextItemIndex < itemsPaths.size() && isItemVisible(itemsPaths.get(nextItemIndex))) { continue; } waitItem(currentItem); openItemByPath(currentItem); } }
Source:
<code>protected void executeOperation(Channel channel) { retry = false; scheduleRead(channel); ByteBuf buf = channel.alloc().buffer(estimateSize()); codec.writeHeader(buf, header); writeXid(buf, xid); buf.writeByte(onePhaseCommit ? 1 : 0); writeVInt(buf, modifications.size()); <START> modifications.forEach(m -> m.writeTo(buf, codec)); <END> channel.writeAndFlush(buf); }</code><technical_language>lambdas => metaspace..</technical_language>

Target:
protected void executeOperation(Channel channel) { retry = false; scheduleRead(channel); ByteBuf buf = channel.alloc().buffer(estimateSize()); codec.writeHeader(buf, header); writeXid(buf, xid); buf.writeByte(onePhaseCommit ? 1 : 0); writeVInt(buf, modifications.size()); for (Modification m : modifications) { m.writeTo(buf, codec); } channel.writeAndFlush(buf); }
Source:
<code>private void prepareContractsGrantsInvoiceDocument(KualiDecimal totalAmountBilledToDate) { PowerMockito.suppress(PowerMockito.constructor(DocumentBase.class)); contractsGrantsInvoiceDocument = PowerMockito.spy(new ContractsGrantsInvoiceDocument()); <START> CuAward award = PowerMockito.spy(new CuAward()); <END> award.setAwardIndirectCostAmount(new KualiDecimal(50)); award.setAwardDirectCostAmount(new KualiDecimal(50)); AwardExtendedAttribute attribute = new AwardExtendedAttribute(); attribute.setBudgetTotalAmount(new KualiDecimal(50)); award.setExtension(attribute); InvoiceGeneralDetail invoiceGeneralDetail = Mockito.mock(InvoiceGeneralDetail.class); Mockito.when(invoiceGeneralDetail.getTotalAmountBilledToDate()).thenReturn(totalAmountBilledToDate); Mockito.when(invoiceGeneralDetail.getAward()).thenReturn(award); contractsGrantsInvoiceDocument.setInvoiceGeneralDetail(invoiceGeneralDetail); }</code><technical_language>Is a reason need spy CuAward? some Spring calls if extension attribute set explicitly</technical_language>

Target:
private void prepareContractsGrantsInvoiceDocument(KualiDecimal totalAmountBilledToDate) { PowerMockito.suppress(PowerMockito.constructor(DocumentBase.class)); contractsGrantsInvoiceDocument = PowerMockito.spy(new ContractsGrantsInvoiceDocument()); CuAward award = new CuAward(); award.setAwardIndirectCostAmount(new KualiDecimal(50)); award.setAwardDirectCostAmount(new KualiDecimal(50)); AwardExtendedAttribute attribute = new AwardExtendedAttribute(); attribute.setBudgetTotalAmount(new KualiDecimal(50)); award.setExtension(attribute); InvoiceGeneralDetail invoiceGeneralDetail = Mockito.mock(InvoiceGeneralDetail.class); Mockito.when(invoiceGeneralDetail.getTotalAmountBilledToDate()).thenReturn(totalAmountBilledToDate); Mockito.when(invoiceGeneralDetail.getAward()).thenReturn(award); contractsGrantsInvoiceDocument.setInvoiceGeneralDetail(invoiceGeneralDetail); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { <START> boolean doFilter = true; <END> try { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { LoginUserParameters params = null; String profileName = (String) request.getAttribute(FiltersHelper.Constants.REQUEST_PROFILE_KEY); ExtMap authRecord = (ExtMap) request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_RECORD_KEY); if (authRecord != null) { String engineSessionId = UUID.randomUUID().toString(); params = new LoginUserParameters(profileName, authRecord, engineSessionId); params.setActionType(loginAsAdmin ? VdcActionType.LoginAdminUser : VdcActionType.LoginUser); InitialContext context = new InitialContext(); try { VdcReturnValueBase returnValue = FiltersHelper.getBackend(context).login(params); if (returnValue.getSucceeded()) { HttpSession session = req.getSession(true); session.setAttribute( FiltersHelper.Constants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId ); req.setAttribute(FiltersHelper.Constants.REQUEST_USER_KEY, returnValue.getActionReturnValue()); } } finally { context.close(); } } } } catch (Exception ex) { doFilter = false; log.error(String.format("Error in login to engine. Message is: %1$s", ex.getMessage())); ((HttpServletResponse) response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (doFilter) { chain.doFilter(request, response); } }</code><technical_language>assume failure! set true if success</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean doFilter = false; try { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { String profileName = (String) request.getAttribute(FiltersHelper.Constants.REQUEST_PROFILE_KEY); ExtMap authRecord = (ExtMap) request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_RECORD_KEY); if (authRecord != null) { String engineSessionId = UUID.randomUUID().toString(); InitialContext context = new InitialContext(); try { VdcReturnValueBase returnValue = FiltersHelper.getBackend(context).login(new LoginUserParameters( profileName, authRecord, engineSessionId, loginAsAdmin ? VdcActionType.LoginAdminUser : VdcActionType.LoginUser) ); if (returnValue.getSucceeded()) { HttpSession session = req.getSession(true); session.setAttribute( FiltersHelper.Constants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId ); } } finally { context.close(); } } } doFilter = true; } catch (Exception ex) { log.error(String.format("Error in login to engine. Message is: %1$s", ex.getMessage())); ((HttpServletResponse) response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (doFilter) { chain.doFilter(request, response); } }
Source:
<code>public CellScanner(Context appCtx) { mAppContext = appCtx; <START> if ((Prefs.getInstance() != null) && Prefs.getInstance().isSimulateStumble()) { <END> mSimpleCellScanner = new MockSimpleCellScanner(mAppContext); } else { mSimpleCellScanner = new SimpleCellScannerImplementation(mAppContext); } }</code><technical_language>normal check if Prefs null, is assumed precondition app created this startup. do a Prefs.createGlobalInstance(appCtx) if concerned. Also, this code wrapped in a build-time check for debugging build</technical_language>

Target:
public CellScanner(Context appCtx) { mAppContext = appCtx; if (AppGlobals.isDebug && Prefs.getInstance().isSimulateStumble()) { mSimpleCellScanner = new MockSimpleCellScanner(mAppContext); } else { mSimpleCellScanner = new SimpleCellScannerImplementation(mAppContext); } }
Source:
<code><START> public void filePage002_tabsLoggedIn() { <END> CommonFunctions.logOut(driver); CommonFunctions.logInCookie(Properties.userName, Properties.password); FilePagePageObject filePage = new FilePagePageObject(driver); filePage.openFilePage(URLsContent.fileName); filePage.refreshAndVerifyTabs(0); filePage.refreshAndVerifyTabs(1); filePage.refreshAndVerifyTabs(2); }</code><technical_language>change method name filePageTests_002_tabsLoggedIn() apply convention rest of test methods</technical_language>

Target:
public void filePage002_tabsLoggedIn() { CommonFunctions.logOut(driver); CommonFunctions.logInCookie(Properties.userName, Properties.password); FilePagePageObject filePage = new FilePagePageObject(driver); filePage.openFilePage(URLsContent.fileName001); filePage.refreshAndVerifyTabs(0); filePage.refreshAndVerifyTabs(1); filePage.refreshAndVerifyTabs(2); }
Source:
<code>private void onEvent(NativeEvent event) { EventData eventData = EventData.create(event); <START> queue_.unshift(eventData); <END> queue_.setLength(QUEUE_LENGTH); }</code><technical_language>This codepath pretty hot run time mouse moves. sense a linked list a queue array get cheaper insertion/deletion? (GWT a Queue interface satisfied a LinkedList)</technical_language>

Target:
private void onEvent(NativeEvent event) { EventData eventData = EventData.create(event); queue_.add(eventData); if (queue_.size() > QUEUE_LENGTH) queue_.remove(); }
Source:
<code>public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { S3CreateBucketRequest s3CreateBucketRequest = getOmRequest().getCreateS3BucketRequest(); Preconditions.checkNotNull(s3CreateBucketRequest); S3CreateBucketRequest.Builder newS3CreateBucketRequest = s3CreateBucketRequest.toBuilder().setS3CreateVolumeInfo( S3CreateVolumeInfo.newBuilder().setCreationTime(Time.now())); int bucketLength = s3CreateBucketRequest.getS3Bucketname().length(); if (bucketLength < 3 || bucketLength >= 64) { throw new OMException("S3BucketName must be at least 3 and not more " + "than 63 characters long", OMException.ResultCodes.S3_BUCKET_INVALID_LENGTH); } <START> return getOmRequest().toBuilder() <END> .setCreateS3BucketRequest(newS3CreateBucketRequest) .setUserInfo(getUserInfo()).build(); }</code><technical_language>define 3 64 constants</technical_language>

Target:
public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { S3CreateBucketRequest s3CreateBucketRequest = getOmRequest().getCreateS3BucketRequest(); Preconditions.checkNotNull(s3CreateBucketRequest); S3CreateBucketRequest.Builder newS3CreateBucketRequest = s3CreateBucketRequest.toBuilder().setS3CreateVolumeInfo( S3CreateVolumeInfo.newBuilder().setCreationTime(Time.now())); int bucketLength = s3CreateBucketRequest.getS3Bucketname().length(); if (bucketLength < S3_BUCKET_MIN_LENGTH || bucketLength >= S3_BUCKET_MAX_LENGTH) { throw new OMException("S3BucketName must be at least 3 and not more " + "than 63 characters long", OMException.ResultCodes.S3_BUCKET_INVALID_LENGTH); } return getOmRequest().toBuilder() .setCreateS3BucketRequest(newS3CreateBucketRequest) .setUserInfo(getUserInfo()).build(); }
Source:
<code>public void setUp() throws Exception { Script startScript = BrickTestUtils.createProjectAndGetStartScript("newDataDialogTest"); variableBrickPosition = 1; listBrickPosition = 2; <START> startScript.addBrick(variableBrickPosition - 1, new SetVariableBrick()); <END> startScript.addBrick(listBrickPosition - 1, new AddItemToUserListBrick()); baseActivityTestRule.launchActivity(); }</code><technical_language>position is necessary, add in order want there: startScript.addBrick(new SetVariableBrick()); startScript.addBrick(new AddItemToUserListBrick());</technical_language>

Target:
public void setUp() throws Exception { Script startScript = BrickTestUtils.createProjectAndGetStartScript("newDataDialogTest"); variableBrickPosition = 1; listBrickPosition = 2; startScript.addBrick(new SetVariableBrick()); startScript.addBrick(new AddItemToUserListBrick()); baseActivityTestRule.launchActivity(); }
Source:
<code>public TerminalSession terminalWithHandle(String handle) { int total = getTerminalCount(); for (int i = 0; i < total; i++) { TerminalSession t = getTerminalAtIndex(i); <START> if (t.getHandle().equals(handle)) <END> { return t; } } return null; }</code><technical_language>getTerminalAtIndex return null a null check (realize vanishingly current contents of panel!)</technical_language>

Target:
public TerminalSession terminalWithHandle(String handle) { int total = getTerminalCount(); for (int i = 0; i < total; i++) { TerminalSession t = getTerminalAtIndex(i); if (t != null && t.getHandle().equals(handle)) { return t; } } return null; }
Source:
<code>public List<SdxCluster> listSdxByEnvCrn(String envCrn) { <START> LOGGER.info("Listing SDX clusters by environment crn {}", envCrn); <END> String accountIdFromCrn = getAccountIdFromCrn(envCrn); return sdxClusterRepository.findByAccountIdAndEnvCrnAndDeletedIsNull(accountIdFromCrn, envCrn); }</code><technical_language>this debug if need</technical_language>

Target:
public List<SdxCluster> listSdxByEnvCrn(String envCrn) { LOGGER.debug("Listing SDX clusters by environment crn {}", envCrn); String accountIdFromCrn = getAccountIdFromCrn(envCrn); return sdxClusterRepository.findByAccountIdAndEnvCrnAndDeletedIsNull(accountIdFromCrn, envCrn); }
Source:
<code>public LookupExtractor get(String lookupName) throws ISE { assertStarted(); <START> return lookupMap.get(lookupName); <END> }</code><technical_language>guarantee lookupMap contains referenced lookup (example, shutdown called assertStarted this line). Is OK here</technical_language>

Target:
public LookupExtractorFactory get(String lookupName) { final LookupExtractorFactory lookupExtractorFactory = lookupMap.get(lookupName); assertStarted(); return lookupExtractorFactory; }
Source:
<code>static RuleSet getCalciteLogicalRules() { final List<RelOptRule> ruleList = new ArrayList<>(); ruleList.add(CalcMergeRule.INSTANCE); ruleList.add(FilterCalcMergeRule.INSTANCE); ruleList.add(FilterToCalcRule.INSTANCE); ruleList.add(ProjectCalcMergeRule.INSTANCE); ruleList.add(ProjectToCalcRule.INSTANCE); ruleList.add(ProjectMergeRule.INSTANCE); ruleList.add(FilterProjectTransposeRule.INSTANCE); return RuleSets.ofList(ImmutableSet.copyOf(ruleList)); }</code><technical_language>Logical Calcite rules. Move L56</technical_language>

Target:
static RuleSet getCalciteLogicalRules() { final List<RelOptRule> ruleList = new ArrayList<>(); ruleList.add(CalcMergeRule.INSTANCE); ruleList.add(FilterCalcMergeRule.INSTANCE); ruleList.add(FilterToCalcRule.INSTANCE); ruleList.add(ProjectCalcMergeRule.INSTANCE); ruleList.add(ProjectToCalcRule.INSTANCE); ruleList.add(ProjectMergeRule.INSTANCE); ruleList.add(FilterProjectTransposeRule.INSTANCE); return RuleSets.ofList(ruleList); }
Source:
<code>public void testContentsOfContext() throws Exception { Cache<Key, String> c = cacheManager.getCache(); ContextExtractingInterceptor cex = new ContextExtractingInterceptor(); <START> assert c.getAdvancedCache().addInterceptorAfter(cex, InvocationContextInterceptor.class); <END> c.put(new Key("k"), "v"); assert "v".equals(c.get(new Key("k"))); TransactionManager tm = c.getAdvancedCache().getTransactionManager(); tm.begin(); c.getAdvancedCache().lock(new Key("k")); LockManager lockManager = TestingUtil.extractComponent(c, LockManager.class); assert cex.ctx instanceof LocalTxInvocationContext; assert cex.ctx.getLookedUpEntries().size() == 0 : "Looked up key should not be in transactional invocation context " + "as we don't perform any changes"; assertEquals(lockManager.getNumberOfLocksHeld(), 1, "Only one lock should be held"); c.put(new Key("k"), "v2"); assert cex.ctx.getLookedUpEntries().size() == 1 : "Still should only be one entry in the context"; assert lockManager.getNumberOfLocksHeld() == 1 : "Only one lock should be held"; tm.commit(); assert lockManager.getNumberOfLocksHeld() == 0 : "No locks should be held anymore"; assert "v2".equals(c.get(new Key("k"))); }</code><technical_language>assertTrue</technical_language>

Target:
public void testContentsOfContext() throws Exception { Cache<Key, String> c = cacheManager.getCache(); ContextExtractingInterceptor cex = new ContextExtractingInterceptor(); assertTrue(c.getAdvancedCache().addInterceptorAfter(cex, InvocationContextInterceptor.class)); c.put(new Key("k"), "v"); assertEquals("v", c.get(new Key("k"))); TransactionManager tm = c.getAdvancedCache().getTransactionManager(); tm.begin(); c.getAdvancedCache().lock(new Key("k")); LockManager lockManager = TestingUtil.extractComponent(c, LockManager.class); assertTrue(cex.ctx instanceof LocalTxInvocationContext); assertEquals("Looked up key should not be in transactional invocation context " + "as we don't perform any changes", 0, cex.ctx.getLookedUpEntries().size()); assertEquals("Only one lock should be held", 1, lockManager.getNumberOfLocksHeld()); c.put(new Key("k"), "v2"); assertEquals("Still should only be one entry in the context", 1, cex.ctx.getLookedUpEntries().size()); assertEquals("Only one lock should be held", 1, lockManager.getNumberOfLocksHeld()); tm.commit(); assertEquals("No locks should be held anymore", 0, lockManager.getNumberOfLocksHeld()); assertEquals("v2", c.get(new Key("k"))); }
Source:
<code>private void handleDeleteRequest(Request request) { try { DeleteRequest deleteRequest = DeleteRequest.readFrom(new DataInputStream(request.getInputStream())); MessageFormatInputStream stream = new MessageFormatInputStream(new BlobId(deleteRequest.getBlobId()), true); <START> MessageInfo info = new MessageInfo(new BlobId(deleteRequest.getBlobId()), stream.getSize(), 0); END> ArrayList<MessageInfo> infoList = new ArrayList<MessageInfo>(); infoList.add(info); MessageFormatWriteSet writeset = new MessageFormatWriteSet(stream, infoList); blobStore.delete(writeset); DeleteResponse response = new DeleteResponse(deleteRequest.getCorrelationId(), deleteRequest.getClientId(), (short)0); requestResponseChannel.sendResponse(response, request); } catch (Exception e) { } }</code><technical_language>if ttl is specified, log a warning siliently ignore? throw invalid exception delete ttl mutate in a request? MessageInfo offer a constructor require TTL 'unset' TTL is hidden interface? 0 -ive TTL implementation details required in interface</technical_language>

Target:
private void handleDeleteRequest(Request request) { try { DeleteRequest deleteRequest = DeleteRequest.readFrom(new DataInputStream(request.getInputStream())); MessageFormatInputStream stream = new DeleteMessageFormatInputStream(deleteRequest.getBlobId()); MessageInfo info = new MessageInfo(deleteRequest.getBlobId(), stream.getSize()); ArrayList<MessageInfo> infoList = new ArrayList<MessageInfo>(); infoList.add(info); MessageFormatWriteSet writeset = new MessageFormatWriteSet(stream, infoList); blobStore.delete(writeset); DeleteResponse response = new DeleteResponse(deleteRequest.getCorrelationId(), deleteRequest.getClientId(), (short)0); requestResponseChannel.sendResponse(response, request); } catch (Exception e) { } }
Source:
<code>private AssertionError assertionFailedError(String message) { try { Object o = constructorInvoker.newInstance("org.opentest4j.AssertionFailedError", MSG_ARG_TYPES_FOR_ASSERTION_FAILED_ERROR, message, actual, <START> expected); <END> if (o instanceof AssertionError) { AssertionError assertionError = (AssertionError) o; Failures.instance().removeAssertJRelatedElementsFromStackTraceIfNeeded(assertionError); return assertionError; } return null; } catch (Throwable e) { return null; } }</code><technical_language>code correct <LINK_0> expected actual</technical_language>

Target:
private AssertionError assertionFailedError(String message) { try { Object o = constructorInvoker.newInstance("org.opentest4j.AssertionFailedError", MSG_ARG_TYPES_FOR_ASSERTION_FAILED_ERROR, message, expected, actual); if (o instanceof AssertionError) { AssertionError assertionError = (AssertionError) o; Failures.instance().removeAssertJRelatedElementsFromStackTraceIfNeeded(assertionError); return assertionError; } return null; } catch (Throwable e) { return null; } }
Source:
<code>public List<SurveyAssignment> listAllContainingDevice(Long devId) { <START> List<SurveyAssignment> all = list(Constants.ALL_RESULTS); <END> List<SurveyAssignment> selected = new ArrayList<>(); for (SurveyAssignment ass : all) { List<Long> devs = ass.getDeviceIds(); if (devs.contains(devId)) { selected.add(ass); } } return selected; }</code><technical_language>I get assignments for a deviceId, including a screenshot console ![screenshot 2019-01-24 18-10-22](<LINK_0></technical_language>

Target:
public List<SurveyAssignment> listAllContainingDevice(Long devId) { List<SurveyAssignment> selected = listByProperty("deviceIds", devId, "Long"); return selected; }
Source:
<code>public TmfModelResponse<Map<String, String>> fetchTooltip(Map<String, Object> fetchParameters, @Nullable IProgressMonitor monitor) { Map<Long, Pair<ITmfStateSystem, Integer>> entries = getSelectedEntries(fetchParameters); if (entries.size() != 1) { return new TmfModelResponse<>(null, Status.COMPLETED, CommonStatusMessage.COMPLETED); } Entry<@NonNull Long, @NonNull Pair<ITmfStateSystem, Integer>> entry = entries.entrySet().iterator().next(); Map<String, String> tooltip = new HashMap<>(); Integer quark = Objects.requireNonNull(entry.getValue()).getSecond(); ITmfStateSystem ss = Objects.requireNonNull(entry.getValue()).getFirst(); tooltip.put(String.valueOf(Messages.QuarkColumnLabel), Integer.toString(quark)); <START> tooltip.put(String.valueOf(Messages.AttributePathColumnLabel), ss.getFullAttributePath(quark)); <END> return new TmfModelResponse<>(tooltip, Status.COMPLETED, CommonStatusMessage.COMPLETED); }</code><technical_language>Here, query of attribute time of query add tooltip</technical_language>

Target:
public TmfModelResponse<Map<String, String>> fetchTooltip(Map<String, Object> fetchParameters, @Nullable IProgressMonitor monitor) { Map<Long, Pair<ITmfStateSystem, Integer>> entries = getSelectedEntries(fetchParameters); if (entries.size() != 1) { return new TmfModelResponse<>(null, Status.COMPLETED, CommonStatusMessage.COMPLETED); } Entry<@NonNull Long, @NonNull Pair<ITmfStateSystem, Integer>> entry = entries.entrySet().iterator().next(); Map<String, String> tooltip = new HashMap<>(); Integer quark = Objects.requireNonNull(entry.getValue()).getSecond(); ITmfStateSystem ss = Objects.requireNonNull(entry.getValue()).getFirst(); tooltip.put(String.valueOf(Messages.QuarkColumnLabel), Integer.toString(quark)); tooltip.put(String.valueOf(Messages.AttributePathColumnLabel), ss.getFullAttributePath(quark)); tooltip.put(String.valueOf(Messages.ValueColumnLabel), getQuarkValue(fetchParameters, ss, quark)); return new TmfModelResponse<>(tooltip, Status.COMPLETED, CommonStatusMessage.COMPLETED); }
Source:
<code>public void setValues(String key, String[] values) { <START> md.put(key, values); <END> }</code><technical_language>check values is null empty</technical_language>

Target:
public void setValues(String key, String[] values) { if (values == null || values.length == 0) return; md.put(key, values); }
Source:
<code>public IStatus validate(Object value) { <START> if(value != null && !(value instanceof String)) <END> return ValidationStatus.cancel("Display name is not an instance of a string"); String param = (String) value; if(StringUtils.isNotEmpty(param)) { if(param.indexOf(SWT.TAB) >= 0 || param.indexOf(SWT.LF) >= 0) { return ValidationStatus.error("Display name may not contain tabs or new lines"); } if (param.length() > DISPLAY_NAME_LENGTH_LIMIT) { return ValidationStatus.error("Display name may not be longer than " + DISPLAY_NAME_LENGTH_LIMIT + " characters"); } } return ValidationStatus.ok(); }</code><technical_language>!= null is redundant !(value instanceof String)</technical_language>

Target:
public IStatus validate(Object value) { if(!(value instanceof String)) { return ValidationStatus.cancel("Display name is not an instance of a string"); } String param = (String) value; if(StringUtils.isNotEmpty(param)) { if(param.indexOf(SWT.TAB) >= 0 || param.indexOf(SWT.LF) >= 0) { return ValidationStatus.error("Display name may not contain tabs or new lines"); } if (param.length() > DISPLAY_NAME_LENGTH_LIMIT) { return ValidationStatus.error("Display name may not be longer than " + DISPLAY_NAME_LENGTH_LIMIT + " characters"); } } return ValidationStatus.ok(); }
Source:
<code>public void addInstance(Object instance) throws Exception { State currentState = state.get(); if ((currentState == State.STOPPING) || (currentState == State.STOPPED)) { throw new IllegalStateException(); } else { startInstance(instance); if (methodsMap.get(instance.getClass()).hasFor(PreDestroy.class)) { if (!managedInstances.contains(instance)) { <START> managedInstances.add(instance); <END> } } } }</code><technical_language>This is thread safe. is do "addIfAbsent" in a thread safe a ConcurrentLinkedQueue. external coordination (e.g., synchronize, lock, etc.) change users of managedInstance de-duplicate read</technical_language>

Target:
public void addInstance(Object instance) throws Exception { State currentState = state.get(); if ((currentState == State.STOPPING) || (currentState == State.STOPPED)) { throw new IllegalStateException(); } else { startInstance(instance); if (methodsMap.get(instance.getClass()).hasFor(PreDestroy.class)) { managedInstances.add(instance); } } }
Source:
<code>private void recipeElectricalDrill() { addRecipe(findItemStack("Cheap Electrical Drill"), "CMC", " T ", " P ", 'T', findItemStack("Mining Pipe"), 'C', dictCheapChip, 'M', findItemStack("Electrical Motor"), 'P', new ItemStack(Items.iron_pickaxe)); addRecipe(findItemStack("Average Electrical Drill"), "RCR", " D ", " d ", 'R', Items.redstone, 'C', dictCheapChip, 'D', findItemStack("Cheap Electrical Drill"), 'd', new ItemStack(Items.diamond)); addRecipe(findItemStack("Fast Electrical Drill"), "MCM", " T ", " P ", 'T', findItemStack("Mining Pipe"), 'C', dictAdvancedChip, 'M', findItemStack("Advanced Electrical Motor"), 'P', new ItemStack(Items.diamond_pickaxe)); addRecipe(findItemStack("Turbo Electrical Drill"), <START> "RCR", <END> " F ", " D ", 'F', findItemStack("Fast Electrical Drill"), 'C', dictAdvancedChip, 'R', findItemStack("Graphite Rod"), 'D', findItemStack("Synthetic Diamond")); addRecipe(findItemStack("Irresponsible Electrical Drill"), "DDD", "DFD", "DDD", 'F', findItemStack("Turbo Electrical Drill"), 'D', findItemStack("Synthetic Diamond")); }</code><technical_language>spaces indent again. Pretty of indentation failures caused tabs</technical_language>

Target:
private void recipeElectricalDrill() { addRecipe(findItemStack("Cheap Electrical Drill"), "CMC", " T ", " P ", 'T', findItemStack("Mining Pipe"), 'C', dictCheapChip, 'M', findItemStack("Electrical Motor"), 'P', new ItemStack(Items.iron_pickaxe)); addRecipe(findItemStack("Average Electrical Drill"), "RCR", " D ", " d ", 'R', Items.redstone, 'C', dictCheapChip, 'D', findItemStack("Cheap Electrical Drill"), 'd', new ItemStack(Items.diamond)); addRecipe(findItemStack("Fast Electrical Drill"), "MCM", " T ", " P ", 'T', findItemStack("Mining Pipe"), 'C', dictAdvancedChip, 'M', findItemStack("Advanced Electrical Motor"), 'P', new ItemStack(Items.diamond_pickaxe)); }
Source:
<code>public File asFile() { <START> return null; <END> }</code><technical_language>attempt Path.toFile() here</technical_language>

Target:
public File asFile() { try { return asPath().toFile(); } catch (UnsupportedOperationException e) { return null; } }
Source:
<code>private String getHtmlText(AbstractFile abstractFile) { try { int fileSize = (int) abstractFile.getSize(); byte[] buffer = new byte[fileSize]; abstractFile.read(buffer, 0, fileSize); String encoding = determineEncoding(buffer); if (encoding != null) { return new String(buffer, encoding); } else { return new String(buffer); } <START> } catch (TskCoreException | UnsupportedEncodingException ex) { <END> logger.log(Level.SEVERE, String.format("Unable to read from file '%s' (id=%d).", abstractFile.getName(), abstractFile.getId()), ex); return String.format("<p>%s</p>", Bundle.HtmlViewer_file_error()); } }</code><technical_language>I want provide a log message for UnsupportedEncodingException is a case "Unable read file"</technical_language>

Target:
private String getHtmlText(AbstractFile abstractFile) { try { int fileSize = (int) abstractFile.getSize(); byte[] buffer = new byte[fileSize]; abstractFile.read(buffer, 0, fileSize); CharsetMatch match = new CharsetDetector().setText(buffer).detect(); if (match != null) { return new String(buffer, match.getName()); } else { return new String(buffer); } } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Unable to read from file '%s' (id=%d).", abstractFile.getName(), abstractFile.getId()), ex); return String.format("<p>%s</p>", Bundle.HtmlViewer_file_error()); } catch (UnsupportedEncodingException ex) { logger.log(Level.SEVERE, String.format("Unsupported encoding for file '%s' (id=%d).", abstractFile.getName(), abstractFile.getId()), ex); return String.format("<p>%s</p>", Bundle.HtmlViewer_encoding_error()); } }
Source:
<code>public void testArithmetic() { <START> assertUpdate("CREATE TABLE tpch.test_pushdown(col1 bigint, col2 bigint)"); <END> assertUpdate("INSERT INTO tpch.test_pushdown VALUES(5, 4)", "VALUES(1)"); assertUpdate("INSERT INTO tpch.test_pushdown VALUES(2, 4)", "VALUES(1)"); assertUpdate("INSERT INTO tpch.test_pushdown VALUES(4, 4)", "VALUES(1)"); assertQuery("SELECT * FROM tpch.test_pushdown WHERE NOT(col1 + col2 - 6 = 0)", "VALUES (5, 4), (4, 4)"); assertUpdate("DROP TABLE tpch.test_pushdown"); }</code><technical_language>test table named test_arithmetic (same test name) is conflict executed in parallel</technical_language>

Target:
public void testArithmetic() { assertUpdate("CREATE TABLE test_arithmetic(col1 bigint, col2 bigint)"); assertUpdate("INSERT INTO test_arithmetic VALUES (5, 4), (2, 4), (4, 4)", "VALUES(3)"); assertQuery("SELECT * FROM test_arithmetic WHERE NOT(col1 + col2 - 6 = 0)", "VALUES (5, 4), (4, 4)"); }