auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Iterator<TokenCacheItem> getAll() { @SuppressWarnings("unchecked") Map<String, String> results = (Map<String, String>)mPrefs.getAll(); <START> ArrayList<TokenCacheItem> tokens = new ArrayList<>(results.values().size()); <END> Iterator<Entry<String, String>> tokenResultEntrySet = results.entrySet().iterator(); while (tokenResultEntrySet.hasNext()) { final Entry<String, String> tokenEntry = tokenResultEntrySet.next(); final String tokenKey = tokenEntry.getKey(); final String tokenValue = tokenEntry.getValue(); final String decryptedValue = decrypt(tokenKey, tokenValue); if (decryptedValue != null) { final TokenCacheItem tokenCacheItem = mGson.fromJson(decryptedValue, TokenCacheItem.class); tokens.add(tokenCacheItem); } } return tokens.iterator(); }</code><technical_language>List</technical_language>

Target:
public Iterator<TokenCacheItem> getAll() { @SuppressWarnings("unchecked") Map<String, String> results = (Map<String, String>)mPrefs.getAll(); final List<TokenCacheItem> tokens = new ArrayList<>(results.values().size()); Iterator<Entry<String, String>> tokenResultEntrySet = results.entrySet().iterator(); while (tokenResultEntrySet.hasNext()) { final Entry<String, String> tokenEntry = tokenResultEntrySet.next(); final String tokenKey = tokenEntry.getKey(); final String tokenValue = tokenEntry.getValue(); final String decryptedValue = decrypt(tokenKey, tokenValue); if (decryptedValue != null) { final TokenCacheItem tokenCacheItem = mGson.fromJson(decryptedValue, TokenCacheItem.class); tokens.add(tokenCacheItem); } } return tokens.iterator(); }
Source:
<code>public void killTask(ExecutorDriver driver, TaskID taskId) { LOGGER.info("Killing task : " + taskId.getValue()); if (task.process != null) { LOGGER.info("Found task to kill: " + taskId.getValue()); int pid = getPid(); if (pid == -1) { LOGGER.debug("Graceful shutdown failed. Could not read crate.pid."); } try { LOGGER.info("PID to kill: " + pid); <START> Runtime.getRuntime().exec("kill -USR2 " + pid); <END> } catch (IOException e) { LOGGER.debug("Graceful shutdown failed. Could not read crate.pid.", e); } task.process.destroy(); task.process = null; driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_KILLED) .build()); driver.stop(); } else { LOGGER.debug("No running task found :("); } }</code><technical_language>wait for work status update is sent</technical_language>

Target:
public void killTask(ExecutorDriver driver, TaskID taskId) { LOGGER.info("Killing task : " + taskId.getValue()); if (task.process != null) { LOGGER.info("Found task to kill: " + taskId.getValue()); int pid = task.pid(); if (pid == -1) { LOGGER.debug("Graceful shutdown failed. Could not read crate.pid."); task.process.destroy(); task.process = null; return; } boolean success = task.gracefulStop(); if (success) { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_KILLED) .build()); driver.stop(); } else { driver.sendStatusUpdate(TaskStatus.newBuilder() .setTaskId(taskId) .setState(TaskState.TASK_RUNNING) .build()); } } else { LOGGER.debug("No running task found :("); } }
Source:
<code><START> private List<String> runNodetoolCommandOnAllContainers(String nodetoolCommand, int timeoutSeconds) <END> throws IOException, InterruptedException { List<String> ret = Lists.newArrayList(); for (String containerName : containerNames) { ret.add(runNodetoolCommandOnContainer(nodetoolCommand, timeoutSeconds, containerName)); } return ret; }</code><technical_language>Shouldnt this return void return is anywhere. I intent follow runNodetoolCommandOnContainer, this doesnt necessary here</technical_language>

Target:
private void runNodetoolCommandOnAllContainers(String nodetoolCommand, int timeoutSeconds) throws IOException, InterruptedException { for (String containerName : containerNames) { runNodetoolCommandOnContainer(nodetoolCommand, timeoutSeconds, containerName); } }
Source:
<code>private void processStoreByMetricResource(final Path metaPath) { final Path path = metaPath.getParent(); final String metric = FilenameUtils.removeExtension(metaPath.getFileName().toString()); final Properties meta = new Properties(); try (final BufferedReader r = Files.newBufferedReader(path.resolve(String.format("%s.meta", metric)))) { meta.load(r); } catch (final IOException e) { throw Throwables.propagate(e); } final String group = meta.getProperty("GROUP"); if (group == null) { <START> throw NewtsConverterError.create("No group information found - please verify storeByGroup settings"); <END> } this.executor.execute(() -> this.processResource(path, metric, group)); }</code><technical_language>more archives do GROUP defined in meta files i.e. a some metrics collected for interface longer exists. I log error name of file in question, continue process remaining archives this happens</technical_language>

Target:
private void processStoreByMetricResource(final Path metaPath) { final Path path = metaPath.getParent(); final String metric = FilenameUtils.removeExtension(metaPath.getFileName().toString()); final Properties meta = new Properties(); try (final BufferedReader r = Files.newBufferedReader(metaPath)) { meta.load(r); } catch (final IOException e) { LOG.error("Failed to read .meta file: {}", metaPath, e); return; } final String group = meta.getProperty("GROUP"); if (group == null) { LOG.warn("No group information found - please verify storageStrategy settings"); return; } this.executor.execute(() -> this.processResource(path, metric, group)); }
Source:
<code>public static boolean isTargetQueueBoundByMatchingToRoutingKey(String queueBoundRoutingKey, String messageRoutingKey) { return SubscriptionsStoreUtil.matchTopics(messageRoutingKey, queueBoundRoutingKey); <START> } <END></code><technical_language>add method body of SubscriptionsStoreUtil.matchTopics is else calling a separate method</technical_language>

Target:
public static boolean isTargetQueueBoundByMatchingToRoutingKey(String queueBoundRoutingKey, String messageRoutingKey) { return matchTopics(messageRoutingKey, queueBoundRoutingKey); }
Source:
<code>public SpongeTagsData() { <START> this(Collections.<String>emptySet()); <END> }</code><technical_language>Is <String> necessary</technical_language>

Target:
public SpongeTagsData() { this(new HashSet<>()); }
Source:
<code>private BigInteger solve(final String formula) { ArrayDeque<BigInteger> stack = new ArrayDeque<BigInteger>(); for (int i = 0; i < formula.length(); ++i) { if ((formula.charAt(i) <= '9') && (formula.charAt(i) >= '0')) { BigInteger tmp = new BigInteger(Integer.valueOf( formula.charAt(i) - '0').toString()); for (int j = i + 1; j < formula.length(); ++j) <START> if ((formula.charAt(j) <= '9') <END> && (formula.charAt(j) >= '0')) { tmp = tmp.multiply( new BigInteger(Integer.valueOf(10).toString())) .add(new BigInteger(Integer.valueOf(formula .charAt(j) - '0').toString())); ++i; } else break; stack.push(tmp); continue; } else if (formula.charAt(i) == ' ') continue; try { switch (formula.charAt(i)) { case '/': BigInteger a = stack.pop(); try { stack.push(stack.pop().divide(a)); } catch (Exception e3) { System.out .print("Division by zero or another error with division!\n"); System.exit(1); } break; case '*': stack.push(stack.pop().multiply(stack.pop())); break; case '-': BigInteger b = stack.pop(); stack.push(stack.pop().subtract(b)); break; case '+': stack.push(stack.pop().add(stack.pop())); break; } } catch (Exception e3) { System.out.print("Error with operations."); System.exit(1); } } return stack.pop(); }</code><technical_language>Character.isDigit</technical_language>

Target:
private BigInteger solve(final String formula) { ArrayDeque<BigInteger> stack = new ArrayDeque<BigInteger>(); int begin = 0; boolean first = true; for (int i = 0; i < formula.length(); ++i) { if (Character.isDigit(formula.charAt(i))) { if (first) { begin = i; first = false; } else if (!Character.isDigit(formula.charAt(i + 1))) { stack.push(new BigInteger(formula.substring(begin, i + 1))); first = true; } } else if (formula.charAt(i) == ' ') { continue; } else { try { switch (formula.charAt(i)) { case '/': BigInteger a = stack.pop(); try { stack.push(stack.pop().divide(a)); } catch (Exception e3) { System.out .print("Division by zero or another error with division!\n"); System.exit(1); } break; case '*': stack.push(stack.pop().multiply(stack.pop())); break; case '-': BigInteger b = stack.pop(); stack.push(stack.pop().subtract(b)); break; case '+': stack.push(stack.pop().add(stack.pop())); break; } } catch (Exception e3) { System.out.print("Error with operations."); System.exit(1); } } } return stack.pop(); }
Source:
<code>public void onClick(final View v) { if (cacheCoords == null) { final AbstractActivity activity = (AbstractActivity) getActivity(); activity.showToast(activity.getString(R.string.err_location_unknown)); return; } CalcState theState = ((CalculateState) getActivity()).fetchCalculatoState(); final CoordinatesCalculateDialog calculateDialog = CoordinatesCalculateDialog.getInstance(gp, theState); <START> <END> calculateDialog.setTargetFragment(CoordinatesInputDialog.this, 1); calculateDialog.setCancelable(true); calculateDialog.show(myContext.getSupportFragmentManager(), "wpcalcdialog"); }</code><technical_language>Superfluous space</technical_language>

Target:
public void onClick(final View v) { if (cacheCoords == null) { final AbstractActivity activity = (AbstractActivity) getActivity(); activity.showToast(activity.getString(R.string.err_location_unknown)); return; } final CalcState newState = ((CalculateState) getActivity()).fetchCalculatorState(); final CoordinatesCalculateDialog calculateDialog = CoordinatesCalculateDialog.getInstance(gp, newState); calculateDialog.setTargetFragment(CoordinatesInputDialog.this, 1); calculateDialog.setCancelable(true); calculateDialog.show(myContext.getSupportFragmentManager(), "wpcalcdialog"); }
Source:
<code>public void beginTree(DetailAST rootAST) { final Map<Integer, TextBlock> cppComments = getFileContents() .getSingleLineComments(); final Map<Integer, List<TextBlock>> cComments = getFileContents() .getBlockComments(); final Set<Integer> lines = new HashSet<>(); lines.addAll(cppComments.keySet()); lines.addAll(cComments.keySet()); for (Integer lineNo : lines) { final String line = getLines()[lineNo - 1]; final String lineBefore; final TextBlock comment; if (cppComments.containsKey(lineNo)) { comment = cppComments.get(lineNo); lineBefore = line.substring(0, comment.getStartColNo()); } else { final List<TextBlock> commentList = cComments.get(lineNo); comment = commentList.get(commentList.size() - 1); lineBefore = line.substring(0, comment.getStartColNo()); if (comment.getText().length == 1 && !CommonUtils.isOnlyWhitespacesOrEmpty(line <START> .substring(comment.getEndColNo() + 1))) { <END> continue; } } if (!format.matcher(lineBefore).find() && !isLegalComment(comment)) { log(lineNo, MSG_KEY); } } }</code><technical_language>@Kietzmann substring line only</technical_language>

Target:
public void beginTree(DetailAST rootAST) { final Map<Integer, TextBlock> cppComments = getFileContents() .getSingleLineComments(); final Map<Integer, List<TextBlock>> cComments = getFileContents() .getBlockComments(); final Set<Integer> lines = new HashSet<>(); lines.addAll(cppComments.keySet()); lines.addAll(cComments.keySet()); for (Integer lineNo : lines) { final String line = getLines()[lineNo - 1]; final String lineBefore; final TextBlock comment; if (cppComments.containsKey(lineNo)) { comment = cppComments.get(lineNo); lineBefore = line.substring(0, comment.getStartColNo()); } else { final List<TextBlock> commentList = cComments.get(lineNo); comment = commentList.get(commentList.size() - 1); lineBefore = line.substring(0, comment.getStartColNo()); if (comment.getText().length == 1 && !CommonUtils.isBlank(line .substring(comment.getEndColNo() + 1))) { continue; } } if (!format.matcher(lineBefore).find() && !isLegalComment(comment)) { log(lineNo, MSG_KEY); } } }
Source:
<code>public Module getModule(Configuration configuration) { return new AbstractModule() { @Override protected void configure() { bind(Configuration.class).toInstance(configuration); bindConfigurationKeys(); } private void bindConfigurationKeys() { <START> configuration.listKeys().forEach(key -> <END> configuration.get(key).ifPresent(value -> { bind(getBindingKey(value, key)).toInstance(value); })); } private Key getBindingKey(Object configValue, String configKey) { if (configValue instanceof List) { return Key.get(new TypeLiteral<List<String>>() {}, named(configKey)); } return Key.get(configValue.getClass(), named(configKey)); } }; }</code><technical_language>I prefer {..} key -></technical_language>

Target:
public Module getModule(Configuration configuration) { return new AbstractModule() { @Override protected void configure() { bind(Configuration.class).toInstance(configuration); bindConfigurationKeys(); } private void bindConfigurationKeys() { configuration.listKeys().forEach(key -> configuration.get(key).ifPresent(value -> bind(getBindingKey(value, key)).toInstance(value))); } private Key getBindingKey(Object configValue, String configKey) { if (configValue instanceof List) { return Key.get(new TypeLiteral<List<String>>() {}, named(configKey)); } return Key.get(configValue.getClass(), named(configKey)); } }; }
Source:
<code>void completePlayerSetup(boolean asked) { if (asked) { skinLayout = (OoyalaSkinLayout) findViewById(R.id.ooyalaPlayer); PlayerDomain playerDomain = new PlayerDomain(domain); Options options = new Options.Builder().setShowPromoImage(false).setUseExoPlayer(true).build(); player = new OoyalaPlayer(pcode, playerDomain, options); SkinOptions skinOptions = new SkinOptions.Builder().build(); <START> controller = new OoyalaSkinLayoutController(getApplication(), skinLayout, player, skinOptions); <END> controller.addObserver(this); player.addObserver(this); OoyalaFreewheelManager fwManager = new OoyalaFreewheelManager(this, skinLayout, player); Map<String, String> freewheelParameters = new HashMap<String, String>(); freewheelParameters.put("fw_android_mrm_network_id", "380912"); freewheelParameters.put("fw_android_ad_server", "<LINK_0>"); freewheelParameters.put("fw_android_player_profile", "90750:ooyala_android"); freewheelParameters.put("FRMSegment", "channel=TEST;subchannel=TEST;section=TEST;mode=online;player=ooyala;beta=n"); freewheelParameters.put("fw_android_site_section_id", "ooyala_android_internalapp"); freewheelParameters.put("fw_android_video_asset_id", "NqcGg4bzoOmMiV35ZttQDtBX1oNQBnT-"); fwManager.overrideFreewheelParameters(freewheelParameters); if (player.setEmbedCode(embedCode)) { } } }</code><technical_language>playerLayoutController instead of controller</technical_language>

Target:
void completePlayerSetup(boolean asked) { if (asked) { skinLayout = (OoyalaSkinLayout) findViewById(R.id.ooyalaPlayer); PlayerDomain playerDomain = new PlayerDomain(domain); Options options = new Options.Builder().setShowPromoImage(false).setUseExoPlayer(true).build(); player = new OoyalaPlayer(pcode, playerDomain, options); SkinOptions skinOptions = new SkinOptions.Builder().build(); playerLayoutController = new OoyalaSkinLayoutController(getApplication(), skinLayout, player, skinOptions); playerLayoutController.addObserver(this); player.addObserver(this); OoyalaFreewheelManager fwManager = new OoyalaFreewheelManager(this, skinLayout, player); Map<String, String> freewheelParameters = new HashMap<String, String>(); freewheelParameters.put("fw_android_mrm_network_id", "380912"); freewheelParameters.put("fw_android_ad_server", "<LINK_0>"); freewheelParameters.put("fw_android_player_profile", "90750:ooyala_android"); freewheelParameters.put("FRMSegment", "channel=TEST;subchannel=TEST;section=TEST;mode=online;player=ooyala;beta=n"); freewheelParameters.put("fw_android_site_section_id", "ooyala_android_internalapp"); freewheelParameters.put("fw_android_video_asset_id", "NqcGg4bzoOmMiV35ZttQDtBX1oNQBnT-"); fwManager.overrideFreewheelParameters(freewheelParameters); if (player.setEmbedCode(embedCode)) { } } }
Source:
<code>public AbstractBucketLifecycleManager(String bucket, @Nullable UploadModule module) { super(bucket, false , false , false , <START> null , module); <END> }</code><technical_language>combine 'pathPrefix' 'stripPathPrefix' strip 'pathPrefix' null</technical_language>

Target:
public AbstractBucketLifecycleManager(String bucket, @Nullable UploadModule module) { super(bucket, false , false , null , module); }
Source:
<code><START> Date parseDateTimeString(String dateString, boolean isUTC, String... patterns) { <END> for (String pattern : patterns) { SimpleDateFormat utcFormatter = new SimpleDateFormat(pattern); if (isUTC) { utcFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); } try { return utcFormatter.parse(dateString); } catch (ParseException e) { log.debug("Unable to parse " + dateString + " using pattern " + pattern, e); } } throw new IllegalArgumentException(String.format("Date String %s not in valid UTC/local format using any of the following patterns %s", dateString, Arrays.toString(patterns))); }</code><technical_language>This method exposed</technical_language>

Target:
protected Date parseDateTimeString(String dateString, boolean isUTC, String... patterns) { for (String pattern : patterns) { SimpleDateFormat utcFormatter = new SimpleDateFormat(pattern); if (isUTC) { utcFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); } try { return utcFormatter.parse(dateString); } catch (ParseException e) { log.debug("Unable to parse " + dateString + " using pattern " + pattern, e); } } throw new IllegalArgumentException(String.format("Date String %s not in valid UTC/local format using any of the following patterns %s", dateString, Arrays.toString(patterns))); }
Source:
<code>public int hashCode() { <START> int result = name != null ? name.hashCode() : 0; <END> result = 31 * result + (sqlObjectType != null ? sqlObjectType.hashCode() : 0); result = 31 * result + (sqlObjectMethod != null ? sqlObjectMethod.hashCode() : 0); return result; }</code><technical_language>ditto readability here: int result = name == null ? 0 : name.hashCode();</technical_language>

Target:
public int hashCode() { int result = name == null ? 0 : name.hashCode(); result = 31 * result + (sqlObjectType != null ? sqlObjectType.hashCode() : 0); result = 31 * result + (sqlObjectMethod != null ? sqlObjectMethod.hashCode() : 0); return result; }
Source:
<code>private void checkContentUids(DDiagram origin, DDiagram copy) { List<IdentifiedElement> copied = <START> Lists.newArrayList(Iterators.filter(originalDiagram.eAllContents(), <END> IdentifiedElement.class)); List<IdentifiedElement> copies = Lists.newArrayList(Iterators.filter(copy.eAllContents(), IdentifiedElement.class)); assertEquals(copied.size(), copies.size()); EqualityHelper helper = new EqualityHelper() { @Override protected boolean haveEqualAttribute(EObject eObject1, EObject eObject2, EAttribute attribute) { boolean ignored = attribute.isID() || ViewpointPackage.Literals.DREPRESENTATION__NAME.equals(attribute); return ignored || super.haveEqualAttribute(eObject1, eObject2, attribute); } }; assertTrue(helper.equals(originalDiagram, copy)); for (int i = 0; i < copied.size(); i++) { IdentifiedElement copiedElt = copied.get(i); IdentifiedElement copyElt = copies.get(i); boolean equality = helper.equals(copiedElt, copyElt); boolean nullUIds = StringUtil.isEmpty(copiedElt.getUid()) || StringUtil.isEmpty(copyElt.getUid()); boolean duplicatedUids = copiedElt.getUid().equals(copyElt.getUid()); assertTrue(equality && !nullUIds && !duplicatedUids); } }</code><technical_language>avoid guava Iterable<EObject> = () -> res.getAllContents(); long nbElem = StreamSupport.stream(it.spliterator(), false).filter</technical_language>

Target:
private void checkContentUids(DDiagram origin, DDiagram copy) { List<IdentifiedElement> copied = collectAllIdentifiedElements(originalDiagram); List<IdentifiedElement> copies = collectAllIdentifiedElements(copy); assertEquals("Copied and copies lists must have the same size.", copied.size(), copies.size()); EqualityHelper helper = new EqualityHelper() { @Override protected boolean haveEqualAttribute(EObject eObject1, EObject eObject2, EAttribute attribute) { boolean ignored = attribute.isID() || ViewpointPackage.Literals.DREPRESENTATION__NAME.equals(attribute); return ignored || super.haveEqualAttribute(eObject1, eObject2, attribute); } }; assertTrue(helper.equals(originalDiagram, copy)); for (int i = 0; i < copied.size(); i++) { IdentifiedElement copiedElt = copied.get(i); IdentifiedElement copyElt = copies.get(i); boolean equality = helper.equals(copiedElt, copyElt); boolean nullUIds = StringUtil.isEmpty(copiedElt.getUid()) || StringUtil.isEmpty(copyElt.getUid()); boolean duplicatedUids = copiedElt.getUid().equals(copyElt.getUid()); assertTrue(equality && !nullUIds && !duplicatedUids); } }
Source:
<code>public Builder sortByField(String field, Order order) { <START> sorts.add(new SortByField(field, order)); <END> return this; }</code><technical_language>factory method for field-based SortBy here</technical_language>

Target:
public Builder sortByField(String field, Order order) { sorts.add(field(field, order)); return this; }
Source:
<code>private static Boolean isMatch(Boolean exactMatch, String query, String string) { if (string != null) { if (exactMatch) { <START> if (string.toLowerCase().equals(query)) { <END> return true; } } else { if (string.toLowerCase().contains(query)) { return true; } } } return false; }</code><technical_language>equalsIgnoreCase instead of equals. need worry changing query string case</technical_language>

Target:
private static Boolean isMatch(Boolean exactMatch, String query, String string) { if (string != null) { if (exactMatch) { if (StringUtils.containsIgnoreCase(string, query)) { return true; } } else { if (StringUtils.containsIgnoreCase(string, query)) { return true; } } } return false; }
Source:
<code><START> public int hashCode() { <END> return (shouldAudit ? 1 : 0); }</code><technical_language>This hashCode implementation include attributes PingCommand super class</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (shouldAudit ? 1 : 0); return result; }
Source:
<code>private String normalize(String number) { if (number.length() > 11 || number.length() < 10) { throw new IllegalArgumentException("Number must be 10 or 11 digits"); } if (number.length() == 11) { if (number.startsWith("1")) { number = number.substring(1, number.length()); } else { throw new IllegalArgumentException("Can only have 11 digits if number starts with '1'"); } } if (number.startsWith("0") || number.startsWith("1")){ throw new IllegalArgumentException("Illegal character in phone number. " + "Only digits, spaces, parentheses, hyphens or dots accepted."); } else if (number.charAt(3) == '0' || number.charAt(3) == '1'){ throw new IllegalArgumentException("Illegal character in phone number. " + "Only digits, spaces, parentheses, hyphens or dots accepted."); <START> } <END> return number; }</code><technical_language>I this is correct error message considering checking for</technical_language>

Target:
private String normalize(String number) { if (number.length() > 11 || number.length() < 10) { throw new IllegalArgumentException("Number must be 10 or 11 digits"); } if (number.length() == 11) { if (number.startsWith("1")) { number = number.substring(1, number.length()); } else { throw new IllegalArgumentException("Can only have 11 digits if number starts with '1'"); } } if (number.startsWith("0") || number.startsWith("1")){ throw new IllegalArgumentException("Illegal Area Or Exchange Code. " + "Only 2-9 are valid digits"); } else if (number.charAt(3) == '0' || number.charAt(3) == '1'){ throw new IllegalArgumentException("Illegal Area Or Exchange Code. " + "Only 2-9 are valid digits"); } return number; }
Source:
<code>public void testOvfDataUpdaterAllVmsAndTemplatesAreLocked() { int size = ITEMS_COUNT_PER_UPDATE - 1; List<Guid> vmGuids = generateGuidList(size); addVms(vmGuids, 2, VMStatus.ImageLocked, ImageStatus.OK); List<Guid> removedGuids = generateGuidList(size); List<Guid> templatesGuids = generateGuidList(size); addTemplates(templatesGuids, 2, VmTemplateStatus.Locked, ImageStatus.OK); initTestForPool(pool1.getId(), vmGuids, templatesGuids, removedGuids); updater.ovfUpdate_timer(); <START> verify(updater, never()).performOvfUpdate(any(Guid.class), any(Map.class)); <END> verify(updater, times(size)).executeRemoveVmInSpm(any(Guid.class), any(Guid.class), any(Guid.class)); verifyCorrectOvfDataUpdaterRun(pool1.getId(), Collections.<Guid> emptyList(), removedGuids); }</code><technical_language>s/any(Map.class)/anyMap()/</technical_language>

Target:
public void testOvfDataUpdaterAllVmsAndTemplatesAreLocked() { int size = ITEMS_COUNT_PER_UPDATE - 1; List<Guid> vmGuids = generateGuidList(size); addVms(vmGuids, 2, VMStatus.ImageLocked, ImageStatus.OK); List<Guid> removedGuids = generateGuidList(size); List<Guid> templatesGuids = generateGuidList(size); addTemplates(templatesGuids, 2, VmTemplateStatus.Locked, ImageStatus.OK); initTestForPool(pool1.getId(), vmGuids, templatesGuids, removedGuids); updater.ovfUpdate_timer(); verify(updater, never()).performOvfUpdate(any(Guid.class), anyMap()); verify(updater, times(size)).executeRemoveVmInSpm(any(Guid.class), any(Guid.class), any(Guid.class)); verifyCorrectOvfDataUpdaterRun(pool1.getId(), Collections.<Guid> emptyList(), removedGuids); }
Source:
<code>public void init(IWorkbench workbench, IStructuredSelection selection) { fSelectDirectories = new ImportTraceWizardPageSelectDirectories(workbench, selection); fScanPage = new ImportTraceWizardPageScan(workbench, selection); fSelectPage = new ImportTraceWizardPageSelectTraceType(workbench, selection); fImportOptions = new ImportTraceWizardPageOptions(workbench, selection); setNeedsProgressMonitor(true); <START> <END> }</code><technical_language>remove empty line</technical_language>

Target:
public void init(IWorkbench workbench, IStructuredSelection selection) { fSelectDirectories = new ImportTraceWizardPageSelectDirectories(workbench, selection); fScanPage = new ImportTraceWizardPageScan(workbench, selection); fSelectPage = new ImportTraceWizardPageSelectTraceType(workbench, selection); fResults.clear(); setNeedsProgressMonitor(true); }
Source:
<code>protected EClass checkForCommonSuperClass(IEObjectDescription one, IEObjectDescription two, ValidationMessageAcceptor acceptor) { Node<EClass> superClassesOne = getSuperClassTree(one.getEClass()); Node<EClass> superClassesTwo = getSuperClassTree(two.getEClass()); <START> List<EClass> flatOne = superClassesOne.flatten(); <END> List<EClass> flatTwo = superClassesTwo.flatten(); for(EClass eC : flatOne) { if(flatTwo.contains(eC)) return eC; } return null; }</code><technical_language>If flat representation of super type hierachy is need build a graph data structure (Node<T>)</technical_language>

Target:
protected EClass checkForCommonSuperClass(IEObjectDescription one, IEObjectDescription two, ValidationMessageAcceptor acceptor) { List<EClass> flatOne = buildSuperClassList(one.getEClass()); List<EClass> flatTwo = buildSuperClassList(two.getEClass()); for(EClass eC : flatOne) { if(flatTwo.contains(eC)) return eC; } return null; }
Source:
<code>public Emitter getEmitter( DropwizardEmitterConfig dropwizardEmitterConfig, ObjectMapper mapper, final Injector injector ) { <START> List<Emitter> alertEmitters = Lists.transform( <END> dropwizardEmitterConfig.getAlertEmitters(), s -> injector.getInstance(Key.get(Emitter.class, Names.named(s))) ); return new DropwizardEmitter(dropwizardEmitterConfig, mapper, alertEmitters); }</code><technical_language>native JDK functions/streams move guava</technical_language>

Target:
public Emitter getEmitter( DropwizardEmitterConfig dropwizardEmitterConfig, ObjectMapper mapper, final Injector injector ) { List<Emitter> alertEmitters = dropwizardEmitterConfig.getAlertEmitters() .stream() .map(s -> injector.getInstance( Key.get( Emitter.class, Names.named(s) ))) .collect(Collectors.toList()); return new DropwizardEmitter(dropwizardEmitterConfig, mapper, alertEmitters); }
Source:
<code>public Response workflowsExternalWorkflowRefGet(String externalWorkflowRef, String ifNoneMatch) { WorkflowInfoDTO workflowinfoDTO; try { Workflow workflow; String status="CREATED"; String tenantDomain = RestApiUtil.getLoggedInUserTenantDomain(); APIAdmin apiAdmin = new APIAdminImpl(); workflow=apiAdmin.getworkflowReferenceByExternalWorkflowReferenceID(externalWorkflowRef, status ,tenantDomain); try { workflowinfoDTO = WorkflowMappingUtil.fromWorkflowsToInfoDTO(workflow); return Response.ok().entity(workflowinfoDTO).build(); } <START> catch(NullPointerException e){ <END> RestApiUtil.handleInternalServerError("Error while retrieving workflow request by the external workflow reference" , e,log); } } catch(APIManagementException e){ RestApiUtil.handleInternalServerError("Error while retrieving workflow request by the external workflow reference" , e, log); } return null; }</code><technical_language>catch a NPE here? fromWorkflowsToInfoDTO() method is throwing either. please remove this</technical_language>

Target:
public Response workflowsExternalWorkflowRefGet(String externalWorkflowRef, String ifNoneMatch) { WorkflowInfoDTO workflowinfoDTO; try { Workflow workflow; String status = "CREATED"; String tenantDomain = RestApiUtil.getLoggedInUserTenantDomain(); APIAdmin apiAdmin = new APIAdminImpl(); workflow = apiAdmin.getworkflowReferenceByExternalWorkflowReferenceID(externalWorkflowRef, status, tenantDomain); workflowinfoDTO = WorkflowMappingUtil.fromWorkflowsToInfoDTO(workflow); return Response.ok().entity(workflowinfoDTO).build(); } catch (APIManagementException e) { RestApiUtil.handleInternalServerError("Error while retrieving workflow request by the " + "external workflow reference. ", e, log); } return null; }
Source:
<code>protected void activate(ComponentContext cContext, Map<String, Object> properties) { dbFolderName = ConfigConstants.getUserDataFolder() + File.separator + dbFolderName; File folder = new File(dbFolderName); if (!folder.exists()) { folder.mkdirs(); } File backup = new File(dbFolderName, "backup"); if (!backup.exists()) { backup.mkdirs(); } logger.debug("Json Storage Service: Activated."); if (properties == null || properties.isEmpty()) { return; } try { if (properties.get(CFG_MAX_BACKUP_FILES) != null) { maxBackupFiles = Integer.parseInt((String) properties.get(CFG_MAX_BACKUP_FILES)); } if (properties.get(CFG_WRITE_DELAY) != null) { writeDelay = Integer.parseInt((String) properties.get(CFG_WRITE_DELAY)); } if (properties.get(CFG_MAX_DEFER_DELAY) != null) { maxDeferredPeriod = Integer.parseInt((String) properties.get(CFG_MAX_DEFER_DELAY)); } <START> } catch (NumberFormatException nfe) { <END> logger.error("NumberFormatException: {}", nfe.getMessage()); } }</code><technical_language>do a catch for single - is now, ignore write_delay defer_delay parameters, if backup_files parsed, if set correctly</technical_language>

Target:
protected void activate(ComponentContext cContext, Map<String, Object> properties) { dbFolderName = ConfigConstants.getUserDataFolder() + File.separator + dbFolderName; File folder = new File(dbFolderName); if (!folder.exists()) { folder.mkdirs(); } File backup = new File(dbFolderName, "backup"); if (!backup.exists()) { backup.mkdirs(); } logger.debug("Json Storage Service: Activated."); if (properties == null || properties.isEmpty()) { return; } try { if (properties.get(CFG_MAX_BACKUP_FILES) != null) { maxBackupFiles = Integer.parseInt((String) properties.get(CFG_MAX_BACKUP_FILES)); } } catch (NumberFormatException nfe) { logger.error("Value for is invalid. Using {}.", properties.get(CFG_MAX_BACKUP_FILES), CFG_MAX_BACKUP_FILES, maxBackupFiles); } try { if (properties.get(CFG_WRITE_DELAY) != null) { writeDelay = Integer.parseInt((String) properties.get(CFG_WRITE_DELAY)); } } catch (NumberFormatException nfe) { logger.error("Value for is invalid. Using {}.", properties.get(CFG_WRITE_DELAY), CFG_WRITE_DELAY, writeDelay); } try { if (properties.get(CFG_MAX_DEFER_DELAY) != null) { maxDeferredPeriod = Integer.parseInt((String) properties.get(CFG_MAX_DEFER_DELAY)); } } catch (NumberFormatException nfe) { logger.error("Value for is invalid. Using {}.", properties.get(CFG_MAX_DEFER_DELAY), CFG_MAX_DEFER_DELAY, maxDeferredPeriod); } }
Source:
<code>private void updateActionAvailability() { getEditParameterCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); getResetParameterCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); <START> getResetAllParameterCommand().setIsExecutionAllowed(getItems() != null && ((List) getItems()).size() > 0); <END> }</code><technical_language>Cast 'List' generate a warning. consider a type</technical_language>

Target:
private void updateActionAvailability() { getEditParameterCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); getResetParameterCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); getResetAllParameterCommand().setIsExecutionAllowed(getItems() != null && ((List<GlusterVolumeOptionEntity>) getItems()).size() > 0); }
Source:
<code>public boolean isMultisimSupported(String callingPackage) { if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultPhone().getSubId(), callingPackage, "isMultisimSupported")) { return false; } final long identity = Binder.clearCallingIdentity(); try { return <START> isMultisimSupported(); <END> } finally { Binder.restoreCallingIdentity(identity); } }</code><technical_language>nit: rename isMultisimSupportedInternal() isMultisimSupportedWithPremissionChecked()</technical_language>

Target:
public boolean isMultisimSupported(String callingPackage) { if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultPhone().getSubId(), callingPackage, "isMultisimSupported")) { return false; } final long identity = Binder.clearCallingIdentity(); try { return isMultisimSupportedInternal(); } finally { Binder.restoreCallingIdentity(identity); } }
Source:
<code>public static void init(final Jenkins j) throws IOException { CompressionFilter.setUncaughtExceptionHandler(j.servletContext, new UncaughtExceptionHandler() { @Override public void reportException(Throwable e, ServletContext context, HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException { req.setAttribute("javax.servlet.error.exception",e); try { WebApp.get(j.servletContext).getSomeStapler() .invoke(req,rsp, Jenkins.getInstance(), "/oops"); } catch (ServletException x) { if (!Stapler.isSocketException(x)) { throw x; } } catch (IOException x) { if (!Stapler.isSocketException(x)) { throw x; } } } }); <START> Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); <END> }</code><technical_language>want catch SecurityException in case Tomcat decided prevent setting this</technical_language>

Target:
public static void init(final Jenkins j) throws IOException { CompressionFilter.setUncaughtExceptionHandler(j.servletContext, new UncaughtExceptionHandler() { @Override public void reportException(Throwable e, ServletContext context, HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException { req.setAttribute("javax.servlet.error.exception",e); try { WebApp.get(j.servletContext).getSomeStapler() .invoke(req,rsp, Jenkins.getInstance(), "/oops"); } catch (ServletException x) { if (!Stapler.isSocketException(x)) { throw x; } } catch (IOException x) { if (!Stapler.isSocketException(x)) { throw x; } } } }); try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); DefaultUncaughtExceptionHandler.LOGGER.log(Level.INFO, "Succesfully installed a global UncaughtExceptionHandler."); } catch (SecurityException ex) { DefaultUncaughtExceptionHandler.LOGGER.log(Level.SEVERE, "Failed to set the default UncaughtExceptionHandler. " + "If any threads die due to unhandled coding errors then there will be no logging of this information. " + "The lack of this diagnostic information will make it harder to track down issues which will reduce the supportability of Jenkins. " + "It is highly recomended that you consult the documentation that comes with you servlet container on how to allow the " + "`setDefaultUncaughtExceptionHandler` permission and enable it.", ex); } }
Source:
<code>public void execute(Context context) throws SQLException { context.execute(new CreateTableBuilder(getDialect(), TABLE_NAME) .addPkColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("uuid") .setIsNullable(false) <START> .setLimit(40) <END> .build()) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName(SNAPSHOT_UUID) .setIsNullable(false) .setLimit(40) .build()) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("kee") .setIsNullable(false) .setLimit(512) .build()) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("text_value") .setIsNullable(true) .setLimit(4000) .build()) .addColumn(ClobColumnDef.newClobColumnDefBuilder() .setColumnName("clob_value") .setIsNullable(true) .build()) .addColumn(BooleanColumnDef.newBooleanColumnDefBuilder() .setColumnName("is_empty") .setIsNullable(false) .build()) .addColumn(BigIntegerColumnDef.newBigIntegerColumnDefBuilder() .setColumnName("created_at") .setIsNullable(false) .build()) .build() ); context.execute(new CreateIndexBuilder(getDialect()) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName(SNAPSHOT_UUID) .setIsNullable(false) .setLimit(40) .build()) .setUnique(false) .setTable(TABLE_NAME) .setName(SNAPSHOT_UUID) .build() ); }</code><technical_language>constant VarcharColumnDef.UUID_SIZE (no magic number)</technical_language>

Target:
public void execute(Context context) throws SQLException { context.execute(new CreateTableBuilder(getDialect(), TABLE_NAME) .addPkColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("uuid") .setIsNullable(false) .setLimit(VarcharColumnDef.UUID_SIZE) .build()) .addColumn(SNAPSHOT_UUID_COLUMN) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("kee") .setIsNullable(false) .setLimit(512) .build()) .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("text_value") .setIsNullable(true) .setLimit(VarcharColumnDef.MAX_SIZE) .build()) .addColumn(ClobColumnDef.newClobColumnDefBuilder() .setColumnName("clob_value") .setIsNullable(true) .build()) .addColumn(BooleanColumnDef.newBooleanColumnDefBuilder() .setColumnName("is_empty") .setIsNullable(false) .build()) .addColumn(BigIntegerColumnDef.newBigIntegerColumnDefBuilder() .setColumnName("created_at") .setIsNullable(false) .build()) .build() ); context.execute(new CreateIndexBuilder(getDialect()) .addColumn(SNAPSHOT_UUID_COLUMN) .setUnique(false) .setTable(TABLE_NAME) .setName("ix_snapshot_uuid") .build() ); }
Source:
<code>public void execute() { if (!isProperlyConfigured()) { logger.warn("Binding not properly configured, exiting"); return; <START> } <END> if (!this.satelModule.isInitialized()) { logger.debug("Module not initialized yet, skipping refresh"); return; } logger.trace("Sending 'get new states' command"); this.satelModule .sendCommand(NewStatesCommand.buildMessage(this.satelModule.getIntegraType() == IntegraType.I256_PLUS)); }</code><technical_language>this removed polling mechanism is shutdown setProperlyConfigured(false) called (see AbstractActiveBinding.setProperlyConfigured())</technical_language>

Target:
public void execute() { if (!this.satelModule.isInitialized()) { logger.debug("Module not initialized yet, skipping refresh"); return; } logger.trace("Sending 'get new states' command"); if (this.newStatesCommand == null) { this.newStatesCommand = NewStatesCommand .buildMessage(this.satelModule.getIntegraType() == IntegraType.I256_PLUS); } this.satelModule.sendCommand(this.newStatesCommand); }
Source:
<code>public Map<String, Object> getProducerConfigs(final String clientId) { final Map<String, Object> clientProvidedProps = getClientPropsWithPrefix(PRODUCER_PREFIX, ProducerConfig.configNames()); checkIfUnexpectedUserSpecifiedConsumerConfig(clientProvidedProps, NON_CONFIGURABLE_PRODUCER_EOS_CONFIGS); final Map<String, Object> props = new HashMap<>(eosEnabled ? PRODUCER_EOS_OVERRIDES : PRODUCER_DEFAULT_OVERRIDES); if (StreamThread.eosBetaEnabled(this) && !StreamThread.eosUpgradeModeEnabled(this)) { <START> props.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, getString(StreamsConfig.APPLICATION_ID_CONFIG) + "-" + UUID.randomUUID()); <END> } props.putAll(getClientCustomProps()); props.putAll(clientProvidedProps); props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, originals().get(BOOTSTRAP_SERVERS_CONFIG)); props.put(CommonClientConfigs.CLIENT_ID_CONFIG, clientId); return props; }</code><technical_language>add this in ActiveTaskCreator class instead of here, suggest clientId + thread-id-suffix (the thread-name in form of clientId + "-StreamThread-" + threadIdx easy parse out middle -StreamThread- part) instead of UUID. In practice if client-Id is set default UUID-suffixIndex. comparing log clear clue transaction id belongs thread, while another random UUID reveal anything</technical_language>

Target:
public Map<String, Object> getProducerConfigs(final String clientId) { final Map<String, Object> clientProvidedProps = getClientPropsWithPrefix(PRODUCER_PREFIX, ProducerConfig.configNames()); checkIfUnexpectedUserSpecifiedConsumerConfig(clientProvidedProps, NON_CONFIGURABLE_PRODUCER_EOS_CONFIGS); final Map<String, Object> props = new HashMap<>(eosEnabled ? PRODUCER_EOS_OVERRIDES : PRODUCER_DEFAULT_OVERRIDES); props.putAll(getClientCustomProps()); props.putAll(clientProvidedProps); props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, originals().get(BOOTSTRAP_SERVERS_CONFIG)); props.put(CommonClientConfigs.CLIENT_ID_CONFIG, clientId); return props; }
Source:
<code>private boolean isInteresting(ThreadInfo thread) { for (StackTraceElement element : thread.getStackTrace()) { String className = element.getClassName(); <START> if (!className.startsWith("java.") && !className.startsWith("sun.") && END> !NON_INTERESTING_THREAD_FILTER.matchesFilter(element)) { return true; } } return false; }</code><technical_language>handle Filter? I dislike a special treatment of stacktraces. I is OK add filter (with wildcards) hard-coding them, wrong</technical_language>

Target:
private boolean isInteresting(ThreadInfo thread) { for (StackTraceElement element : thread.getStackTrace()) { if (!NON_INTERESTING_THREAD_FILTER.matchesFilter(element)) { return true; } } return false; }
Source:
<code>public String getBioentityInformation(@PathVariable String geneId) { Species species = speciesInferrer.inferSpeciesForGeneQuery(SemanticQuery.create(geneId)); Map<BioentityPropertyName, Set<String>> propertyValues = bioEntityPropertyDao.fetchGenePageProperties(geneId); String geneName = bioEntityPropertyDao.fetchPropertyValuesForGeneId(geneId, SYMBOL).stream() .collect(Collectors.joining("/")); Map<String, Object> model = bioEntityCardModelFactory.modelAttributes( geneId, species, BIOENTITY_PROPERTY_NAMES, geneName, propertyValues); <START> String bioentityProperties = model.get("bioentityProperties").toString(); <END> bioentityProperties = bioentityProperties.substring(0, bioentityProperties.length() - 1); JsonArray values = new JsonArray(); JsonObject jsonObject = new JsonObject(); ImmutableMap.of("text", geneId, "url", "<LINK_0>"+geneId,"relevance","0").forEach( (key, value) -> { jsonObject.addProperty(key,value); } ); values.add(jsonObject); JsonObject o = new JsonObject(); o.addProperty("type", "expression_atlas"); o.addProperty("name", "ExpressionAtlas"); o.add("values", values); String result = bioentityProperties + "," + GSON.toJson(o) + "]"; return result; }</code><technical_language>Patching serialized representations of objects is dangerous error prone. I strongly discourage do this. Start JsonArray jsonArray = GSON.fromJson(model.get("bioentityProperties").toString(), JsonArray.class); work jsonArray</technical_language>

Target:
public String getBioentityInformation(@PathVariable String geneId) { Species species = speciesInferrer.inferSpeciesForGeneQuery(SemanticQuery.create(geneId)); Map<BioentityPropertyName, Set<String>> propertyValues = bioEntityPropertyDao.fetchGenePageProperties(geneId); String geneName = bioEntityPropertyDao.fetchPropertyValuesForGeneId(geneId, SYMBOL).stream() .collect(Collectors.joining("/")); Map<String, Object> model = bioEntityCardModelFactory.modelAttributes( geneId, species, BIOENTITY_PROPERTY_NAMES, geneName, propertyValues); JsonArray jsonArray = GSON.fromJson(model.get("bioentityProperties").toString(), JsonArray.class); JsonArray values = new JsonArray(); JsonObject jsonObject = new JsonObject(); ImmutableMap.of("text", geneId, "url", "<LINK_0>"+geneId,"relevance","0").forEach( (key, value) -> { jsonObject.addProperty(key,value); } ); values.add(jsonObject); JsonObject o = new JsonObject(); o.addProperty("type", "expression_atlas"); o.addProperty("name", "ExpressionAtlas"); o.add("values", values); jsonArray.add(o); return GSON.toJson(jsonArray); }
Source:
<code>public void update(Username currentUser, String md5, ElasticProfile newProfile, LocalizedOperationResult result) { ElasticAgentProfileUpdateCommand command = new ElasticAgentProfileUpdateCommand(goConfigService, newProfile, elasticAgentExtension, currentUser, result, hashingService, md5); <START> validatePluginProperties(command, newProfile); <END> update(currentUser, newProfile, result, command); }</code><technical_language>Move this validation PluginProfileService</technical_language>

Target:
public void update(Username currentUser, String md5, ElasticProfile newProfile, LocalizedOperationResult result) { ElasticAgentProfileUpdateCommand command = new ElasticAgentProfileUpdateCommand(goConfigService, newProfile, elasticAgentExtension, currentUser, result, hashingService, md5); update(currentUser, newProfile, result, command); }
Source:
<code>public void testDeleteCount_nonPK() throws Exception { String schemaName = generateUniqueName(); <START> String dataTableName = "TBL_" + generateUniqueName(); <END> String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName); String indexTableName = "IND_" + generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { conn.createStatement().execute("CREATE TABLE " + dataTableFullName + " (ID INTEGER NOT NULL PRIMARY KEY, VAL1 INTEGER, VAL2 INTEGER) " + this.tableDDLOptions); conn.createStatement().execute(String.format( "CREATE INDEX %s ON %s (VAL1) INCLUDE (VAL2)", indexTableName, dataTableFullName)); PreparedStatement dataPreparedStatement = conn.prepareStatement("UPSERT INTO " + dataTableFullName + " VALUES(?,?,?)"); for (int i = 1; i <= 10; i++) { dataPreparedStatement.setInt(1, i); dataPreparedStatement.setInt(2, i + 1); dataPreparedStatement.setInt(3, i * 2); dataPreparedStatement.execute(); } conn.commit(); PreparedStatement deleteStmt = conn.prepareStatement("DELETE FROM " + dataTableFullName + " WHERE VAL1 > 6"); assertEquals(5, deleteStmt.executeUpdate()); conn.commit(); } }</code><technical_language>is a reason need this test carried immutable index test others</technical_language>

Target:
public void testDeleteCount_nonPK() throws Exception { String schemaName = generateUniqueName(); String dataTableName = "TBL_" + generateUniqueName(); String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName); String indexTableName1 = "IND_" + generateUniqueName(); String indexTableName2 = "IND_" + generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { setupForDeleteCount(conn, schemaName, dataTableName, indexTableName1, indexTableName2); PreparedStatement deleteStmt = conn.prepareStatement("DELETE FROM " + dataTableFullName + " WHERE VAL1 > 6"); assertEquals(5, deleteStmt.executeUpdate()); conn.commit(); } }