auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public VDS getUpServer(Guid clusterId) { List<VDS> servers = DbFacade.getInstance() .getVdsDAO() .getAllForVdsGroupWithStatus(clusterId, VDSStatus.Up); if (servers == null || servers.isEmpty()) { throw new VdcBLLException(VdcBllErrors.NO_UP_SERVER_FOUND); <START> } <END> return servers.get(GlusterCoreUtil.random(servers.size() - 1)); }</code><technical_language>I missed this before: consider org.ovirt.engine.core.utils.RandomUtils.pickRandom</technical_language>

Target:
public VDS getUpServer(Guid clusterId) { List<VDS> servers = getVdsDao() .getAllForVdsGroupWithStatus(clusterId, VDSStatus.Up); if (servers == null || servers.isEmpty()) { throw new VdcBLLException(VdcBllErrors.NO_UP_SERVER_FOUND); } return RandomUtils.instance().pickRandom(servers); }
Source:
<code>public TextFormat getFormat() { <START> return format; <END> }</code><technical_language>this</technical_language>

Target:
public TextFormat getFormat() { return this.format; }
Source:
<code>public void loadPlugins() throws Exception { if (!pluginsLoading.compareAndSet(false, true)) { return; } for (File file : listFiles(installedPluginsDir)) { if (file.isDirectory()) { loadPlugin(file.getAbsolutePath()); } } for (String plugin : plugins) { <START> if (plugin.startsWith("fbraptor") || plugin.startsWith("shardedmysql")) { <END> continue; } loadPlugin(plugin); } metadata.verifyComparableOrderableContract(); pluginsLoaded.set(true); }</code><technical_language>unnecessary change</technical_language>

Target:
public void loadPlugins() throws Exception { if (!pluginsLoading.compareAndSet(false, true)) { return; } for (File file : listFiles(installedPluginsDir)) { if (file.isDirectory()) { loadPlugin(file.getAbsolutePath()); } } for (String plugin : plugins) { loadPlugin(plugin); } metadata.verifyComparableOrderableContract(); pluginsLoaded.set(true); }
Source:
<code>private int indexOfSourceDecimalSeparator(String source) { String separator = fDecimalSeparator == '\'' ? "''" : String.valueOf(fDecimalSeparator); int patternPos = fPattern.indexOf(separator); int sourcePos = -1; while (patternPos != -1 && patternPos <= fPatternDecimalSeparatorIndex) { sourcePos = source.indexOf(fDecimalSeparator, sourcePos + 1); if (sourcePos == -1) { break; } char p = patternPos < fPattern.length() - 1 ? fPattern.charAt(patternPos + 1) : '\0'; if ((p >= 'a' && p <= 'z') || (p >= 'A' && p <= 'Z')) { while (sourcePos < source.length() - 1) { if (source.charAt(sourcePos <START> + <END> 1) == ' ') { sourcePos++; } else { break; } } } patternPos = fPattern.indexOf(separator, patternPos + separator.length()); } if (sourcePos == -1) { sourcePos = source.length(); } return sourcePos; }</code><technical_language>is issue tabs mixed spaces, for example 2015 \t 1 31 11 22 33 456</technical_language>

Target:
private int indexOfSourceDecimalSeparator(String source) { String separator = fDecimalSeparator == '\'' ? "''" : String.valueOf(fDecimalSeparator); int patternPos = fPattern.indexOf(separator); int sourcePos = -1; while (patternPos != -1 && patternPos <= fPatternDecimalSeparatorIndex) { sourcePos = source.indexOf(fDecimalSeparator, sourcePos + 1); if (sourcePos == -1) { break; } char p = patternPos < fPattern.length() - 1 ? fPattern.charAt(patternPos + 1) : '\0'; if ((p >= 'a' && p <= 'z') || (p >= 'A' && p <= 'Z')) { while (sourcePos < source.length() - 1) { char s = source.charAt(sourcePos + 1); if (s == ' ' || s == '\t') { sourcePos++; } else { break; } } } patternPos = fPattern.indexOf(separator, patternPos + separator.length()); } if (sourcePos == -1) { sourcePos = source.length(); } return sourcePos; }
Source:
<code>public List<ProviderSyncResult> updateAndGetStatuses(Stack stack, Set<InstanceMetaData> checkableInstances) { return checkedMeasure(() -> { List<ProviderSyncResult> results = new ArrayList<>(); List<CloudVmInstanceStatus> statuses = stackInstanceProviderChecker.checkStatus(stack, checkableInstances); statuses.forEach(s -> { Optional<InstanceMetaData> instanceMetaData = checkableInstances.stream() .filter(i -> s.getCloudInstance().getInstanceId().equals(i.getInstanceId())) .findFirst(); if (instanceMetaData.isPresent()) { InstanceStatus instanceStatus = updateStatuses(stack, s, instanceMetaData.get()); if (instanceStatus != null) { results.add(new ProviderSyncResult("", instanceStatus, false, s.getCloudInstance().getInstanceId())); } } else { LOGGER.info(":::Auto sync::: Cannot find instanceMetaData"); } }); checkableInstances.forEach(instanceMetaData -> { if (statuses.stream().noneMatch(s -> s.getCloudInstance().getInstanceId().equals(instanceMetaData.getInstanceId()))) { <START> if (!flowLogService.isOtherFlowRunning(stack.getId())) { <END> if (updateStatus) { setStatusIfNotTheSame(instanceMetaData, InstanceStatus.DELETED_ON_PROVIDER_SIDE); instanceMetaDataService.save(instanceMetaData); } else { LOGGER.debug("updateStatus flag is false, don't update status"); } } else { LOGGER.debug(":::Auto sync::: do not update instance status to deleted because flow is running for stack: {}", stack.getName()); } } }); return results; }, LOGGER, ":::Auto sync::: provider is checked in {}ms"); }</code><technical_language>strange need this. I StackStatusCheckerJob checks</technical_language>

Target:
public List<ProviderSyncResult> updateAndGetStatuses(Stack stack, Set<InstanceMetaData> checkableInstances) { return checkedMeasure(() -> { List<ProviderSyncResult> results = new ArrayList<>(); List<CloudVmInstanceStatus> statuses = stackInstanceProviderChecker.checkStatus(stack, checkableInstances); if (flowLogService.isOtherFlowRunning(stack.getId())) { throw new InterruptSyncingException(":::Auto sync::: interrupt syncing in updateAndGetStatuses, flow is running on freeipa stack " + stack.getName()); } else { statuses.forEach(s -> { Optional<InstanceMetaData> instanceMetaData = checkableInstances.stream() .filter(i -> s.getCloudInstance().getInstanceId().equals(i.getInstanceId())) .findFirst(); if (instanceMetaData.isPresent()) { InstanceStatus instanceStatus = updateStatuses(s, instanceMetaData.get()); if (instanceStatus != null) { results.add(new ProviderSyncResult("", instanceStatus, false, s.getCloudInstance().getInstanceId())); } } else { LOGGER.info(":::Auto sync::: Cannot find instanceMetaData"); } }); checkableInstances.forEach(instanceMetaData -> { if (statuses.stream().noneMatch(s -> s.getCloudInstance().getInstanceId().equals(instanceMetaData.getInstanceId()))) { if (updateStatus) { setStatusIfNotTheSame(instanceMetaData, InstanceStatus.DELETED_ON_PROVIDER_SIDE); instanceMetaDataService.save(instanceMetaData); } else { LOGGER.debug("updateStatus flag is false, don't update status"); } } }); return results; } }, LOGGER, ":::Auto sync::: provider is checked in {}ms"); }
Source:
<code>public static String doubleToGoString(double d) { if (d == Double.POSITIVE_INFINITY) { return "+Inf"; } if (d == Double.NEGATIVE_INFINITY) { return "-Inf"; } <START> if (d == Double.NaN) { <END> return "NaN"; } return Double.toString(d); }</code><technical_language>a straight comparison work here? NaN equal itself</technical_language>

Target:
public static String doubleToGoString(double d) { if (d == Double.POSITIVE_INFINITY) { return "+Inf"; } if (d == Double.NEGATIVE_INFINITY) { return "-Inf"; } if (Double.isNaN(d)) { return "NaN"; } return Double.toString(d); }
Source:
<code><START> synchronized boolean writeToDirectories(List<File> directories) { <END> boolean success = false; for (File dir : directories) { try { File statusFile = new File(dir, BOOKIE_STATUS_FILENAME); writeToFile(statusFile, toString()); success = true; } catch (IOException e) { LOG.warn("IOException while trying to write bookie status to directory {}." + " This is fine if not all directories are failed.", dir); } } if(success){ LOG.info("Successfully persist bookie status {}", this.bookieMode); } else { LOG.warn("Failed to persist bookie status {}", this.bookieMode); } return success; }</code><technical_language>I see, boolean is anywhere, dropped in favor of void</technical_language>

Target:
synchronized void writeToDirectories(List<File> directories) { boolean success = false; for (File dir : directories) { try { File statusFile = new File(dir, BOOKIE_STATUS_FILENAME); writeToFile(statusFile, toString()); success = true; } catch (IOException e) { LOG.warn("IOException while trying to write bookie status to directory {}." + " This is fine if not all directories are failed.", dir); } } if(success){ LOG.info("Successfully persist bookie status {}", this.bookieMode); } else { LOG.warn("Failed to persist bookie status {}", this.bookieMode); } }
Source:
<code>private void initTable(CommonApplicationConstants constants) { <START> String width = "284px"; END> searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getFirstName(); } }, constants.firsNamePermissionsPopup(), width); searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getLastName(); } }, constants.lastNamePermissionsPopup(), width); searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getLoginName(); } }, constants.userNamePermissionsPopup(), width); }</code><technical_language>this a constant /** * This is max width of a column in this dialogs */ private static final MAX_COL_WIDTH = "248px"; people understand is</technical_language>

Target:
private void initTable(CommonApplicationConstants constants) { searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getFirstName(); } }, constants.firsNamePermissionsPopup(), MAX_COL_WIDTH); searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getLastName(); } }, constants.lastNamePermissionsPopup(), MAX_COL_WIDTH); searchItems.addColumn(new EntityModelTextColumn<DbUser>() { @Override public String getText(DbUser user) { return user.getLoginName(); } }, constants.userNamePermissionsPopup(), MAX_COL_WIDTH); }
Source:
<code><START> public static Properties loadProperties(Properties properties, InputStream inputStream) throws IOException { <END> try { properties.load(inputStream); return properties; } finally { close(inputStream); } }</code><technical_language>I closing resource in scope is allocated is anti-pattern. RG is baselined Java 7, try-with-resources instead, please</technical_language>

Target:
public static Properties loadProperties(Properties properties, InputStream inputStream) throws IOException { properties.load(inputStream); return properties; }
Source:
<code>private JsonResponse proceedToLogin(Subject currentUser, AuthenticationToken token) { JsonResponse response = null; try { logoutCurrentUser(); currentUser.getSession(true); <START> LOG.info("Try to login"); <END> currentUser.login(token); Set<String> roles = securityService.getAssociatedRoles(); String principal = securityService.getPrincipal(); String ticket; if ("anonymous".equals(principal)) { ticket = "anonymous"; } else { ticket = TicketContainer.instance.getTicket(principal); } Map<String, String> data = new HashMap<>(); data.put("principal", principal); data.put("roles", gson.toJson(roles)); data.put("ticket", ticket); response = new JsonResponse(Response.Status.OK, "", data); NotebookAuthorization.getInstance().setRoles(principal, roles); } catch (AuthenticationException uae) { LOG.error("Exception in login: ", uae); } return response; }</code><technical_language>delete this, this is for debugging I believe</technical_language>

Target:
private JsonResponse proceedToLogin(Subject currentUser, AuthenticationToken token) { JsonResponse response = null; try { logoutCurrentUser(); currentUser.getSession(true); currentUser.login(token); Set<String> roles = securityService.getAssociatedRoles(); String principal = securityService.getPrincipal(); String ticket; if ("anonymous".equals(principal)) { ticket = "anonymous"; } else { ticket = TicketContainer.instance.getTicket(principal); } Map<String, String> data = new HashMap<>(); data.put("principal", principal); data.put("roles", gson.toJson(roles)); data.put("ticket", ticket); response = new JsonResponse(Response.Status.OK, "", data); NotebookAuthorization.getInstance().setRoles(principal, roles); } catch (AuthenticationException uae) { LOG.error("Exception in login: ", uae); } return response; }
Source:
<code>public String getAvailableSchemas() throws AxisFault { String fileList = ""; StringBuilder fBuf = null; BufferedReader dis = null; try { InputStream in = PolicyEditorService.class.getResourceAsStream( ORG_WSO2_CARBON_POLICYEDITOR_XSD + "policies.xml"); dis = new BufferedReader(new InputStreamReader(in, Charsets.UTF_8)); fBuf = new StringBuilder(); String line = ""; while ((line = dis.readLine()) != null) { fBuf.append(line).append("\n"); } fileList = fBuf.toString(); } catch (IOException e) { throw new AxisFault("Axis fault while getting schemas.", e); } finally { if(dis != null){ try{ dis.close(); }catch (IOException ioe){ log.error("Error occurred while closing BufferedReader"); } <START> } <END> } return "<![CDATA[" + fileList + "]]>"; }</code><technical_language>calling new Util method</technical_language>

Target:
public String getAvailableSchemas() throws AxisFault { String fileList = ""; StringBuilder fBuf = null; BufferedReader dis = null; try { InputStream in = PolicyEditorService.class.getResourceAsStream( ORG_WSO2_CARBON_POLICYEDITOR_XSD + "policies.xml"); dis = new BufferedReader(new InputStreamReader(in, Charsets.UTF_8)); fBuf = new StringBuilder(); String line = ""; while ((line = dis.readLine()) != null) { fBuf.append(line).append("\n"); } fileList = fBuf.toString(); } catch (IOException e) { throw new AxisFault("Axis fault while getting schemas.", e); } finally { IdentityIOStreamUtils.closeReader(dis); } return "<![CDATA[" + fileList + "]]>"; }
Source:
<code>private void verifyEvents(boolean isClustered, StateListener<String, String> listener, List<CacheEntry<String, String>> expected) { assertEquals(listener.events.size(), isClustered ? expected.size() : expected.size() * 2); int eventPosition = 0; for (CacheEntryEvent<String, String> event : listener.events) { int position; <START> boolean even; <END> if (isClustered) { even = true; position = eventPosition; } else { even = (eventPosition & 1) == 1; position = eventPosition / 2; } assertEquals(event.getType(), Event.Type.CACHE_ENTRY_CREATED); assertEquals(event.getKey(), expected.get(position).getKey()); assertEquals(event.isPre(), !even); if (even) { assertEquals(event.getValue(), expected.get(position).getValue()); } else { assertNull(event.getValue()); } eventPosition++; } }</code><technical_language>rename isPost</technical_language>

Target:
private void verifyEvents(boolean isClustered, StateListener<String, String> listener, List<CacheEntry<String, String>> expected) { assertEquals(listener.events.size(), isClustered ? expected.size() : expected.size() * 2); int eventPosition = 0; for (CacheEntryEvent<String, String> event : listener.events) { int position; boolean isPost; if (isClustered) { isPost = true; position = eventPosition; } else { isPost = (eventPosition & 1) == 1; position = eventPosition / 2; } assertEquals(event.getType(), Event.Type.CACHE_ENTRY_CREATED); assertEquals(event.getKey(), expected.get(position).getKey()); assertEquals(event.isPre(), !isPost); if (isPost) { assertEquals(event.getValue(), expected.get(position).getValue()); } else { assertNull(event.getValue()); } eventPosition++; } }
Source:
<code>public String getQuotaStatsFieldName() { <START> return QUOTA_FIELD_NAME; <END> }</code><technical_language>QUOTA_STATS_FIELD_NAME</technical_language>

Target:
public String getQuotaStatsFieldName() { return QUOTA_STATS_FIELD_NAME; }
Source:
<code>public Object doWork() { final String sampleName = FilenameUtils.getBaseName(snpCountsFile.getAbsolutePath()); final AllelicPanelOfNormals allelicPoN = allelicPoNFile != null ? AllelicPanelOfNormals.read(allelicPoNFile) : AllelicPanelOfNormals.EMPTY_PON; final AllelicCountCollection acc = new AllelicCountCollection(snpCountsFile); final AlleleFractionSegmenter segmenter = new AlleleFractionSegmenter(initialNumStates, acc, allelicPoN); <START> final TargetCollection<AllelicCount> tc = new HashedListTargetCollection<>(acc.getCounts()); <END> final List<Pair<SimpleInterval, Double>> segmentation = segmenter.findSegments(); final List<ModeledSegment> segments = segmentation.stream() .map(pair -> new ModeledSegment(pair.getLeft(), tc.targetCount(pair.getLeft()), pair.getRight())) .collect(Collectors.toList()); SegmentUtils.writeModeledSegmentFile(outputSegmentsFile, segments, sampleName, true); return "SUCCESS"; }</code><technical_language>Conversion of List<Pair<SimpleInterval, Double>> List<ModeledSegment> moved a method AlleleFractionSegmenter</technical_language>

Target:
public Object doWork() { final String sampleName = FilenameUtils.getBaseName(snpCountsFile.getAbsolutePath()); final AllelicPanelOfNormals allelicPoN = allelicPoNFile != null ? AllelicPanelOfNormals.read(allelicPoNFile) : AllelicPanelOfNormals.EMPTY_PON; final AllelicCountCollection acc = new AllelicCountCollection(snpCountsFile); final AlleleFractionSegmenter segmenter = new AlleleFractionSegmenter(initialNumStates, acc, allelicPoN); final List<ModeledSegment> segments = segmenter.getModeledSegments(); SegmentUtils.writeModeledSegmentFile(outputSegmentsFile, segments, sampleName, true); return "SUCCESS"; }
Source:
<code>public PcapTimestampScale getTimestampPrecision() { <START> return PcapTimestampScale.MICROSECOND; <END> }</code><technical_language>If if_tsresol is smaller microseconds, lose precision! nanoseconds this is smallest resolution framework supports</technical_language>

Target:
public PcapTimestampScale getTimestampPrecision() { return PcapTimestampScale.NANOSECOND; }
Source:
<code>public UserResetTokenDTO createResetUserPasswordToken(final String username, final String email) throws UserRetrievalException { UserDTO foundUser = userDAO.findUserByNameAndEmail(username, email); if (foundUser == null) { throw new UserRetrievalException("Cannot find user with name " + username + " and email address " + email); } char[] buf = new char[GENERATED_PASSWORD_LENGTH]; for (int idx = 0; idx < buf.length; ++idx) { <START> buf[idx] = SYMBOLS[random.nextInt(SYMBOLS.length)]; <END> } String password = new String(buf); userResetTokenDAO.deletePreviousUserTokens(foundUser.getId()); UserResetTokenDTO userResetToken = userResetTokenDAO.create(password, foundUser.getId()); return userResetToken; }</code><technical_language>Is this right algorithm for this? Is some "high quality" random algorithm instead of this? I here, still..</technical_language>

Target:
public UserResetTokenDTO createResetUserPasswordToken(final String username, final String email) throws UserRetrievalException { UserDTO foundUser = userDAO.findUserByNameAndEmail(username, email); if (foundUser == null) { throw new UserRetrievalException("Cannot find user with name " + username + " and email address " + email); } String password = UUID.randomUUID().toString(); userResetTokenDAO.deletePreviousUserTokens(foundUser.getId()); UserResetTokenDTO userResetToken = userResetTokenDAO.create(password, foundUser.getId()); return userResetToken; }
Source:
<code>void handleRevocation(final Collection<TopicPartition> revokedPartitions) { final Set<TaskId> revokedTasks = new HashSet<>(); final Set<TopicPartition> remainingPartitions = new HashSet<>(revokedPartitions); for (final Task task : tasks.values()) { if (remainingPartitions.containsAll(task.inputPartitions())) { revokedTasks.add(task.id()); } remainingPartitions.removeAll(task.inputPartitions()); } if (!remainingPartitions.isEmpty()) { log.info("The following partitions are missing from the task partitions. It is possible that" + <START> "they have been cleaned up by the onAssignment callback", remainingPartitions); <END> } for (final TaskId taskId : revokedTasks) { final Task task = tasks.get(taskId); task.suspend(); } }</code><technical_language>This sense, onPartitionsRevoked is called onAssignment</technical_language>

Target:
void handleRevocation(final Collection<TopicPartition> revokedPartitions) { final Set<TaskId> revokedTasks = new HashSet<>(); final Set<TopicPartition> remainingPartitions = new HashSet<>(revokedPartitions); for (final Task task : tasks.values()) { if (remainingPartitions.containsAll(task.inputPartitions())) { revokedTasks.add(task.id()); } remainingPartitions.removeAll(task.inputPartitions()); } if (!remainingPartitions.isEmpty()) { log.warn("The following partitions are missing from the task partitions. It could potentially " + "due to race condition of consumer detecting the heartbeat failure, or the tasks " + "have been cleaned up by the handleAssignment callback.", remainingPartitions); } for (final TaskId taskId : revokedTasks) { final Task task = tasks.get(taskId); task.suspend(); } }
Source:
<code>private String getString(String param) { <START> return Constant.messages.getString(MESSAGE_PREFIX + param, ""); <END> }</code><technical_language>Call I18N.getString(String) (there parameters in resource messages)</technical_language>

Target:
private String getString(String param) { return Constant.messages.getString(MESSAGE_PREFIX + param); }
Source:
<code>public void dosCborObject() throws Throwable { <START> if(true)throw new RuntimeException(); <END> byte[] raw = ArrayOps.hexToBytes("5b0004000000000000"); try { CborObject.fromByteArray(raw); Assert.fail("Should have failed!"); } catch (RuntimeException e) }</code><technical_language>yep, revert I check works github</technical_language>

Target:
public void dosCborObject() throws Throwable { byte[] raw = ArrayOps.hexToBytes("5b0004000000000000"); try { CborObject.fromByteArray(raw); Assert.fail("Should have failed!"); } catch (RuntimeException e) }
Source:
<code>public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) { <START> return isInitialized == 1; <END> } for (int i = 0; i < getLocationCount(); i++) { if (!getLocation(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }</code><technical_language>4 spaces</technical_language>

Target:
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; for (int i = 0; i < getLocationCount(); i++) { if (!getLocation(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
Source:
<code>public static String getModString(int state) { StringBuilder sb = new StringBuilder(); for (GameMod mod : GameMod.values()) { if ((state & mod.getBit()) > 0) { sb.append(mod.getName()); sb.append(','); } } if (sb.length() > 0) { sb.setLength(sb.length() - 1); return sb.toString(); } <START> return "None"; <END> }</code><technical_language>Please avoid code style changes this existing code</technical_language>

Target:
public static String getModString(int state) { StringBuilder sb = new StringBuilder(); for (GameMod mod : GameMod.values()) { if ((state & mod.getBit()) > 0) { sb.append(mod.getName()); sb.append(','); } } if (sb.length() > 0) { sb.setLength(sb.length() - 1); return sb.toString(); } else return "None"; }
Source:
<code>public ListProjectsOptions id(String id) { <START> this.queryParameters.replaceValues("id", ImmutableSet.of(id + "")); <END> return this; }</code><technical_language>curious...why id + "" here</technical_language>

Target:
public ListProjectsOptions id(String id) { this.queryParameters.replaceValues("id", ImmutableSet.of(id)); return this; }
Source:
<code>protected Query<Map<String, Object>> createInactiveStatusesSinceQuery( Handle handle, DateTime timestamp, @Nullable Integer maxNumStatuses, @Nullable String datasource ) { final String whereStmt = getWhereClause(datasource); String sql = StringUtils.format( "SELECT " + " id, " + " status_payload, " + " created_date, " + " datasource, " + " payload " + "FROM " + " %s " + "WHERE " <START> + whereStmt <END> + "ORDER BY created_date DESC", getEntryTable() ); if (maxNumStatuses != null) { sql += " FETCH FIRST :n ROWS ONLY"; } Query<Map<String, Object>> query = handle.createQuery(sql).bind("start", timestamp.toString()); if (maxNumStatuses != null) { query = query.bind("n", maxNumStatuses); } if (datasource != null) { query = query.bind("ds", datasource); } return query; }</code><technical_language>nit: whereStmt replaced geWhereClause(datasource), get rid of extra variable</technical_language>

Target:
protected Query<Map<String, Object>> createInactiveStatusesSinceQuery( Handle handle, DateTime timestamp, @Nullable Integer maxNumStatuses, @Nullable String datasource ) { String sql = StringUtils.format( "SELECT " + " id, " + " status_payload, " + " created_date, " + " datasource, " + " payload " + "FROM " + " %s " + "WHERE " + getWhereClauseForInactiveStatusesSinceQuery(datasource) + "ORDER BY created_date DESC", getEntryTable() ); if (maxNumStatuses != null) { sql += " FETCH FIRST :n ROWS ONLY"; } Query<Map<String, Object>> query = handle.createQuery(sql).bind("start", timestamp.toString()); if (maxNumStatuses != null) { query = query.bind("n", maxNumStatuses); } if (datasource != null) { query = query.bind("ds", datasource); } return query; }
Source:
<code>private boolean extractTextAndIndex(AbstractFile aFile, Map<String, String> extractedMetadata) throws IngesterException { ImageConfig imageConfig = new ImageConfig(); imageConfig.setOCREnabled(KeywordSearchSettings.getOcrOption()); List<ProcessTerminator> terminators = new ArrayList<>(); terminators.add(() -> context.fileIngestIsCancelled()); terminators.add(new TimedProcessTerminator(OCR_TIMEOUT_SECONDS)); HybridTerminator terminator = new HybridTerminator(terminators); <START> Lookup extractionContext = Lookups.fixed(imageConfig, terminator); <END> try { TextExtractor extractor = TextExtractorFactory.getExtractor(aFile, extractionContext); Reader fileText = extractor.getReader(); Reader finalReader; try { Map<String, String> metadata = extractor.getMetadata(); if (!metadata.isEmpty()) { extractedMetadata.putAll(metadata); } CharSource formattedMetadata = getMetaDataCharSource(metadata); finalReader = CharSource.concat(new CharSource() { @Override public Reader openStream() throws IOException { return fileText; } }, formattedMetadata).openStream(); } catch (IOException ex) { logger.log(Level.WARNING, String.format("Could not format extracted metadata for file %s [id=%d]", aFile.getName(), aFile.getId()), ex); finalReader = fileText; } return Ingester.getDefault().indexText(finalReader, aFile.getId(), aFile.getName(), aFile, context); } catch (TextExtractorFactory.NoTextExtractorFound | TextExtractor.InitReaderException ex) { return false; } }</code><technical_language>This cancel extractor is listening terminator, instead of OCR task. instead add TimedProcessTerminator (and 30 minute constant) ImageConfig class instead? construct a HybridTerminator OCR task is started in TikaTextExtractor. setExtractionSettings() in TikaTextExtractor for construct hybrid terminator. add a getter ImageConfig called getOcrTimeoutTerminator()</technical_language>

Target:
private boolean extractTextAndIndex(AbstractFile aFile, Map<String, String> extractedMetadata) throws IngesterException { ImageConfig imageConfig = new ImageConfig(); imageConfig.setOCREnabled(KeywordSearchSettings.getOcrOption()); ProcessTerminator terminator = () -> context.fileIngestIsCancelled(); Lookup extractionContext = Lookups.fixed(imageConfig, terminator); try { TextExtractor extractor = TextExtractorFactory.getExtractor(aFile, extractionContext); Reader fileText = extractor.getReader(); Reader finalReader; try { Map<String, String> metadata = extractor.getMetadata(); if (!metadata.isEmpty()) { extractedMetadata.putAll(metadata); } CharSource formattedMetadata = getMetaDataCharSource(metadata); finalReader = CharSource.concat(new CharSource() { @Override public Reader openStream() throws IOException { return fileText; } }, formattedMetadata).openStream(); } catch (IOException ex) { logger.log(Level.WARNING, String.format("Could not format extracted metadata for file %s [id=%d]", aFile.getName(), aFile.getId()), ex); finalReader = fileText; } return Ingester.getDefault().indexText(finalReader, aFile.getId(), aFile.getName(), aFile, context); } catch (TextExtractorFactory.NoTextExtractorFound | TextExtractor.InitReaderException ex) { return false; } }
Source:
<code>private SecurityGroup generateSecurityGroup(ClaudiaData claudiaData, TierInstance tierInstance) throws EntityNotFoundException { SecurityGroup securityGroup = new SecurityGroup(); securityGroup.setName("sg_" + claudiaData.getVdc() + "_" + tierInstance.getName()); <START> log.info("Generate Object Security Group " + "sg_" + claudiaData.getService() + "_" + claudiaData.getVdc() <END> + "_" + tierInstance.getTier().getRegion() + "_" + tierInstance.getName()); List<Rule> rules = getDefaultRules(); List<ProductRelease> productReleases = tierInstance.getTier().getProductReleases(); if (productReleases != null) { for (ProductRelease productRelease : tierInstance.getTier().getProductReleases()) { getRulesFromProduct(productRelease, rules); } } securityGroup.setRules(rules); return securityGroup; }</code><technical_language>I do understand problem coherence change log.info content well</technical_language>

Target:
private SecurityGroup generateSecurityGroup(ClaudiaData claudiaData, TierInstance tierInstance) throws EntityNotFoundException { SecurityGroup securityGroup = new SecurityGroup(); String secGroupName = "sg_" + claudiaData.getVdc() + "_" + tierInstance.getName(); securityGroup.setName(secGroupName); log.info("Generate Object Security Group " + secGroupName); List<Rule> rules = getDefaultRules(); List<ProductRelease> productReleases = tierInstance.getTier().getProductReleases(); if (productReleases != null) { for (ProductRelease productRelease : tierInstance.getTier().getProductReleases()) { getRulesFromProduct(productRelease, rules); } } securityGroup.setRules(rules); return securityGroup; }
Source:
<code>private HarvestedResource createHarvestedResource(File file) { try { return new HarvestedFile( new FileInputStream(file), file.getName(), file.toURI().toASCIIString()); } catch (FileNotFoundException e) { <START> LOGGER.debug( <END> "Failed to get input stream from file [{}]. Create event will not be sent to listener", file.toURI()); return null; } }</code><technical_language>Audit</technical_language>

Target:
private HarvestedResource createHarvestedResource(File file) { try { return new HarvestedFile( new FileInputStream(file), file.getName(), file.toURI().toASCIIString()); } catch (FileNotFoundException e) { LOGGER.debug( "Failed to get input stream from file [{}]. Create event will not be sent to listener", file.toURI(), e); return null; } }
Source:
<code>public void saveSearch(IAtsUser atsUser, AtsSearchData data) { ArtifactId userArt = atsUser.getStoreObject(); IAtsChangeSet changes = atsClient.getStoreService().createAtsChangeSet("Save ATS Search", atsClient.getUserService().getCurrentUser()); try { boolean found = false; for (IAttribute<Object> attr : atsClient.getAttributeResolver().getAttributes(userArt, AtsAttributeTypes.QuickSearch)) { String jsonValue = ((String) attr.getValue()); <START> AtsSearchData existing = fromJson(jsonValue); <END> if (existing.getUuid() == data.getUuid()) { changes.setAttribute(userArt, attr.getId(), getStoreString(data)); found = true; } } if (!found) { changes.addAttribute(atsUser, AtsAttributeTypes.QuickSearch, getStoreString(data)); } if (!changes.isEmpty()) { changes.execute(); } } catch (Exception ex) { throw new OseeCoreException("Unable to store ATS Search", ex); } }</code><technical_language>check existing is null?</technical_language>

Target:
public void saveSearch(IAtsUser atsUser, AtsSearchData data) { ArtifactId userArt = atsUser.getStoreObject(); IAtsChangeSet changes = atsClient.getStoreService().createAtsChangeSet("Save ATS Search", atsClient.getUserService().getCurrentUser()); try { IAttribute<Object> attr = getAttrById(userArt, data.getUuid()); if (attr == null) { changes.addAttribute(atsUser, AtsAttributeTypes.QuickSearch, getStoreString(data)); } else { changes.setAttribute(userArt, attr.getId(), getStoreString(data)); } if (!changes.isEmpty()) { changes.execute(); } } catch (Exception ex) { throw new OseeCoreException("Unable to store ATS Search", ex); } }
Source:
<code>public CompletableFuture<Object> dispatch(Message request) throws Exception { <START> ResponseFuture responseFuture = new ResponseFuture(fn -> request); <END> Message requestMessage = composeRequest(request, responseFuture.correlationId()); String methodName = request.header(ServiceHeaders.METHOD); checkArgument(methodName != null, "Method name can't be null"); String serviceName = request.header(ServiceHeaders.SERVICE_REQUEST); checkArgument(serviceName != null, "Method name can't be null"); return futureInvoke(requestMessage, message -> message); }</code><technical_language>naming: ResponseFuture, DispatchingFuture, is futures</technical_language>

Target:
public CompletableFuture<Object> dispatch(Message request) throws Exception { ServiceResponse responseFuture = new ServiceResponse(fn -> request); Message requestMessage = composeRequest(request, responseFuture.correlationId()); String methodName = request.header(ServiceHeaders.METHOD); checkArgument(methodName != null, "Method name can't be null"); String serviceName = request.header(ServiceHeaders.SERVICE_REQUEST); checkArgument(serviceName != null, "Method name can't be null"); return futureInvoke(requestMessage, message -> message); }
Source:
<code>private static InputSource sourceToInputSource(Source source) { if (source instanceof SAXSource) { return ((SAXSource) source).getInputSource(); } else if (source instanceof StreamSource) { StreamSource ss = (StreamSource) source; InputSource inputSource = new InputSource(ss.getSystemId()); inputSource.setByteStream(ss.getInputStream()); inputSource.setCharacterStream(ss.getReader()); inputSource.setPublicId(ss.getPublicId()); return inputSource; } else { <START> return new InputSource(source.getSystemId()); <END> } }</code><technical_language>code a copy of SAXSource.sourceToInputSource() - call do this if null is returned</technical_language>

Target:
private static InputSource sourceToInputSource(Source source) { InputSource inputSource = SAXSource.sourceToInputSource(source); if (inputSource == null) { inputSource = new InputSource(source.getSystemId()); } return inputSource; }
Source:
<code>public byte[] encrypt(byte[] plain) { try { byte[] salt = new byte[saltSize]; <START> SecureRandom rnd = new SecureRandom(); <END> rnd.nextBytes(salt); SecretKey tmp = getKeyFromPassword(passPhrase, salt); SecretKey secret = new SecretKeySpec(tmp.getEncoded(), cipherAlgName); Cipher ecipher = Cipher.getInstance(transformation); ecipher.init(Cipher.ENCRYPT_MODE, secret); return new EncryptedData( salt, ecipher.getParameters().getParameterSpec(IvParameterSpec.class).getIV(), ecipher.doFinal(plain) ).toByteAray(); } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidParameterSpecException | IllegalBlockSizeException | BadPaddingException ex) { throw new RuntimeException(ex); } }</code><technical_language>SecureRandom static instead</technical_language>

Target:
public byte[] encrypt(byte[] plain) { try { byte[] salt = new byte[saltSize]; SECURE_RANDOM_INSTANCE.nextBytes(salt); SecretKey tmp = getKeyFromPassword(passPhrase, salt); SecretKey secret = new SecretKeySpec(tmp.getEncoded(), cipherAlgName); Cipher ecipher = Cipher.getInstance(transformation); ecipher.init(Cipher.ENCRYPT_MODE, secret); return new EncryptedData( salt, ecipher.getParameters().getParameterSpec(IvParameterSpec.class).getIV(), ecipher.doFinal(plain) ).toByteAray(); } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidParameterSpecException | IllegalBlockSizeException | BadPaddingException ex) { throw new RuntimeException(ex); } }
Source:
<code>public void loadPageShouldThrowIllegalArgumentExceptionWhenParamOrderIsNull() throws Exception { this.mockMvc.perform(get(REQUEST_URL) <START> .param("sort", NAME).param("order", null)); <END> }</code><technical_language>Extract param names constants a lot of places</technical_language>

Target:
public void loadPageShouldThrowIllegalArgumentExceptionWhenParamOrderIsNull() throws Exception { this.mockMvc.perform(get(REQUEST_URL) .param(SORT, NAME).param(ORDER, null)); }
Source:
<code>public void propertyChange(final PropertyChangeEvent event) { if(!"value".equals(event.getPropertyName())){ return; } final Stream<Boolean> evaluationStream = conditions.entrySet() .stream() .flatMap(e -> e.getValue() <START> .stream()) <END> .map(condition -> { final boolean negate = condition.isNegation(); return negate != Arrays.stream(condition.getValues()) .anyMatch(conditionValue -> evaluate( condition, conditionValue)); }); final boolean show = "OR".equalsIgnoreCase(operator) ? evaluationStream.anyMatch(i -> i) : evaluationStream.anyMatch(i -> i); sourceParameter.setShow(show); sourceParameter.redraw(); sourceParameter.firePropertyChange("show", null, show); }</code><technical_language>level evaluated separately. property shown, if levels evaluated true</technical_language>

Target:
public void propertyChange(final PropertyChangeEvent event) { if(!"value".equals(event.getPropertyName())){ return; } final boolean show = conditions.stream() .allMatch(group -> group.getAggregator().apply(group.getConditions().stream().map(this::evaluateCondition))); sourceParameter.setShow(show); sourceParameter.redraw(); sourceParameter.firePropertyChange("show", null, show); }
Source:
<code>public void flush() { network.setDataCenterId(getSelectedDc().getId()); network.setName(getName().getEntity()); network.setStp(getIsStpEnabled().getEntity()); network.setDescription(getDescription().getEntity()); network.setComment(getComment().getEntity()); network.setVmNetwork(getIsVmNetwork().getEntity()); String label = getNetworkLabel().getSelectedItem(); if (getExternal().getEntity() && getPhysicalNetwork().getEntity()) { label = !getPhysicalNetworkDatacenter().getEntity() ? getNeutronPhysicalNetwork().getEntity() : null; } <START> network.setLabel(label == null || !label.isEmpty() ? <END> label : null); network.setMtu(0); if (getMtu().getIsChangable()) { network.setMtu(Integer.parseInt(getMtu().getEntity().toString())); } network.setDnsResolverConfiguration(getDnsConfigurationModel().flush()); network.setVlanId(null); if (getHasVLanTag().getEntity()) { network.setVlanId(Integer.parseInt(getVLanTag().getEntity().toString())); } for (VnicProfileModel profileModel : getProfiles().getItems()) { profileModel.flush(); } if (getQos().getIsChangable()) { HostNetworkQos qos = getQos().getSelectedItem(); network.setQosId(qos == EMPTY_HOST_NETWORK_QOS ? null : qos.getId()); } }</code><technical_language>logically code is OK, stopped read carefully :( outcome reading time consumed: StringHelper.isNotNullOrEmpty(label) ? label : null</technical_language>

Target:
public void flush() { network.setDataCenterId(getSelectedDc().getId()); network.setName(getName().getEntity()); network.setStp(getIsStpEnabled().getEntity()); network.setDescription(getDescription().getEntity()); network.setComment(getComment().getEntity()); network.setVmNetwork(getIsVmNetwork().getEntity()); String label = getNetworkLabel().getSelectedItem(); if (getExternal().getEntity() && getPhysicalNetwork().getEntity()) { label = !getPhysicalNetworkDatacenter().getEntity() ? getNeutronPhysicalNetwork().getEntity() : null; } network.setLabel(StringHelper.isNotNullOrEmpty(label) ? label : null); network.setMtu(0); if (getMtu().getIsChangable()) { network.setMtu(Integer.parseInt(getMtu().getEntity().toString())); } network.setDnsResolverConfiguration(getDnsConfigurationModel().flush()); network.setVlanId(null); if (getHasVLanTag().getEntity()) { network.setVlanId(Integer.parseInt(getVLanTag().getEntity().toString())); } for (VnicProfileModel profileModel : getProfiles().getItems()) { profileModel.flush(); } if (getQos().getIsChangable()) { HostNetworkQos qos = getQos().getSelectedItem(); network.setQosId(qos == EMPTY_HOST_NETWORK_QOS ? null : qos.getId()); } }
Source:
<code>public void testSkewedQuery() { int reservePool = 10; int generalPool = 12; <START> ImmutableMap<String, Map<String, Long>> queries = ImmutableMap.<String, Map<String, Long>>builder() <END> .put("q_1", ImmutableMap.of("n1", 0L, "n2", 8L, "n3", 0L, "n4", 0L, "n5", 0L)) .put("q_2", ImmutableMap.of("n1", 3L, "n2", 5L, "n3", 2L, "n4", 4L, "n5", 0L)) .put("q_3", ImmutableMap.of("n1", 0L, "n2", 0L, "n3", 9L, "n4", 0L, "n5", 0L)) .put("q_r", ImmutableMap.of("n1", 6L, "n2", 6L, "n3", 6L, "n4", 6L, "n5", 6L)) .build(); assertEquals( lowMemoryKiller.chooseQueryToKill( LowMemoryKillerTestingUtils.toQueryMemoryInfoList("q_r", queries), toNodeMemoryInfoList(reservePool, generalPool, "q_r", queries)), Optional.of(new QueryId("q_2"))); }</code><technical_language>Declare map</technical_language>

Target:
public void testSkewedQuery() { int reservePool = 10; int generalPool = 12; Map<String, Map<String, Long>> queries = ImmutableMap.<String, Map<String, Long>>builder() .put("q_1", ImmutableMap.of("n1", 0L, "n2", 8L, "n3", 0L, "n4", 0L, "n5", 0L)) .put("q_2", ImmutableMap.of("n1", 3L, "n2", 5L, "n3", 2L, "n4", 4L, "n5", 0L)) .put("q_3", ImmutableMap.of("n1", 0L, "n2", 0L, "n3", 9L, "n4", 0L, "n5", 0L)) .put("q_r", ImmutableMap.of("n1", 6L, "n2", 6L, "n3", 6L, "n4", 6L, "n5", 6L)) .build(); assertEquals( lowMemoryKiller.chooseQueryToKill( toQueryMemoryInfoList("q_r", queries), toNodeMemoryInfoList(reservePool, generalPool, "q_r", queries)), Optional.of(new QueryId("q_2"))); }
Source:
<code>public void addTopicPartition(SystemStreamPartition ssp, long nextOffset) { <START> LOG.info(String.format("Adding new topic and partition %s, offset = %s to queue for consumer %s", ssp, nextOffset, <END> this)); topicPartitions2SSP.put(KafkaSystemConsumer.toTopicPartition(ssp), ssp); LOG.info(String.format("Got offset %s for new topic and partition %s.", nextOffset, ssp)); nextOffsets.put(ssp, nextOffset); kafkaConsumerMetrics.setTopicPartitionValue(metricName, nextOffsets.size()); }</code><technical_language>Minor: "partition %s offset %s queue" for consistency</technical_language>

Target:
public void addTopicPartition(SystemStreamPartition ssp, long nextOffset) { LOG.info(String.format("Adding new topicPartition %s with offset %s to queue for consumer %s", ssp, nextOffset, this)); topicPartitionToSSP.put(KafkaSystemConsumer.toTopicPartition(ssp), ssp); nextOffsets.put(ssp, nextOffset); kafkaConsumerMetrics.setNumTopicPartitions(metricName, nextOffsets.size()); }
Source:
<code>private ClientRegistration.Builder createClientBuilder(String id) { ClientRegistration.Builder result = ClientRegistration.withRegistrationId(id); result.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE); result.redirectUriTemplate("{baseUrl}/login/oauth2/code/{registrationId}"); result.clientId(properties.getClientId()); result.clientSecret(properties.getClientSecret()); AuthorizationServerEndpoints endpoints = new AuthorizationServerEndpoints(properties.getAuthorizationServerUri()); result.authorizationUri(endpoints.authorizationEndpoint(properties.getTenantId())); result.tokenUri(endpoints.tokenEndpoint(properties.getTenantId())); result.jwkSetUri(endpoints.jwkSetEndpoint(properties.getTenantId())); Map<String, Object> configurationMetadata = new LinkedHashMap<>(); String tenantId = this.properties.getTenantId(); <START> String endSessionEndpoint = String.format("<LINK_0>", <END> StringUtils.hasText(tenantId) ? tenantId : "common"); configurationMetadata.put("end_session_endpoint", endSessionEndpoint); result.providerConfigurationMetadata(configurationMetadata); return result; }</code><technical_language>Add this AuthorizationServerEndpoints</technical_language>

Target:
private ClientRegistration.Builder createClientBuilder(String id) { ClientRegistration.Builder result = ClientRegistration.withRegistrationId(id); result.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE); result.redirectUriTemplate("{baseUrl}/login/oauth2/code/{registrationId}"); result.clientId(properties.getClientId()); result.clientSecret(properties.getClientSecret()); AuthorizationServerEndpoints endpoints = new AuthorizationServerEndpoints(properties.getAuthorizationServerUri()); result.authorizationUri(endpoints.authorizationEndpoint(properties.getTenantId())); result.tokenUri(endpoints.tokenEndpoint(properties.getTenantId())); result.jwkSetUri(endpoints.jwkSetEndpoint(properties.getTenantId())); Map<String, Object> configurationMetadata = new LinkedHashMap<>(); String endSessionEndpoint = endpoints.endSessionEndpoint(properties.getTenantId()); configurationMetadata.put("end_session_endpoint", endSessionEndpoint); result.providerConfigurationMetadata(configurationMetadata); return result; }
Source:
<code>public BugzillaPeoplePart() { <START> setPartName(Messages.BugzillaPeoplePart_People); <END> }</code><technical_language>This is string need do this</technical_language>

Target:
public BugzillaPeoplePart() { }
Source:
<code>private String getConnectorUlr(String accountId, List<Pair<String, String>> queryParams) { UriBuilder builder = UriBuilder .fromPath(connectorUrl) .path(format(CONNECTOR_CHARGES_RESOURCE, accountId)); queryParams.stream().forEach(pair -> { if (isNotBlank(pair.getRight())) { <START> builder.queryParam(pair.getKey(), pair.getRight()); <END> } }); return builder.toString(); }</code><technical_language>pair.getValue() returns right getKey() call, fine ways</technical_language>

Target:
private String getConnectorUlr(String accountId, List<Pair<String, String>> queryParams) { UriBuilder builder = UriBuilder .fromPath(connectorUrl) .path(format(CONNECTOR_CHARGES_RESOURCE, accountId)); queryParams.stream().forEach(pair -> { if (isNotBlank(pair.getRight())) { builder.queryParam(pair.getKey(), pair.getValue()); } }); return builder.toString(); }
Source:
<code><START> public Dialog onCreateDialog(Bundle savedInstanceState) { <END> Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); return dialog; }</code><technical_language>call super</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { super.onCreateDialog(savedInstanceState); Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); return dialog; }
Source:
<code>@Override public void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException { <START> System.out.println("preBatchMutate my coproc " + this); <END> throw new IOException(); }</code><technical_language>Please remove System.out</technical_language>

Target:
public void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException { throw new IOException(); }
Source:
<code><START> public Sink<JetInputOutputFormat<KeyOut, ValueOut>> createDataSink(DataStore<KeyOut, ValueOut> dataOutStore) { <END> JetEngine.dataOutStore = dataOutStore; Sink<JetInputOutputFormat<KeyOut, ValueOut>> sink = Sinks.fromProcessor("gora-jet-sink", new JetSink<KeyOut, ValueOut>()); return sink; }</code><technical_language>This method package private</technical_language>

Target:
public Sink<JetInputOutputFormat<KeyOut, ValueOut>> createDataSink(DataStore<KeyOut, ValueOut> dataOutStore) { JetEngine.dataOutStore = dataOutStore; return Sinks.fromProcessor("gora-jet-sink", new JetSink<KeyOut, ValueOut>()); }