auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Encounter createEncounter(String configName, DateTime encounterDatetime, String encounterType, String locationName, String patientUuid, String providerUuid, String visitUuid, String formUuid, Map<String, String> observations) { Location location = getLocationByName(configName, locationName); Patient patient = patientService.getPatientByUuid(configName, patientUuid); Provider provider = providerService.getProviderByUuid(configName, providerUuid); <START> Form form = formService.getFormByUuid(configName, formUuid); <END> Visit visit = null; if (StringUtils.isNotEmpty(visitUuid)) { visit = visitService.getVisitByUuid(configName, visitUuid); } List<Observation> observationList = MapUtils.isNotEmpty(observations) ? convertObservationMapToList(observations, encounterDatetime) : null; EncounterType type = new EncounterType(encounterType); Encounter encounter = new Encounter(location, type, encounterDatetime.toDate(), patient, visit, Collections.singletonList(provider.getPerson()), observationList, form); return encounterService.createEncounter(configName, encounter); }</code><technical_language>form is optional</technical_language>

Target:
public Encounter createEncounter(String configName, DateTime encounterDatetime, String encounterType, String locationName, String patientUuid, String providerUuid, String visitUuid, String formUuid, Map<String, String> observations) { Location location = getLocationByName(configName, locationName); Patient patient = patientService.getPatientByUuid(configName, patientUuid); Provider provider = providerService.getProviderByUuid(configName, providerUuid); Visit visit = null; Form form = null; if (StringUtils.isNotEmpty(visitUuid)) { visit = visitService.getVisitByUuid(configName, visitUuid); } if (StringUtils.isNotEmpty(formUuid)) { form = formService.getFormByUuid(configName, formUuid); } List<Observation> observationList = MapUtils.isNotEmpty(observations) ? convertObservationMapToList(observations, encounterDatetime) : null; EncounterType type = new EncounterType(encounterType); Encounter encounter = new Encounter(location, type, encounterDatetime.toDate(), patient, visit, Collections.singletonList(provider.getPerson()), observationList, form); return encounterService.createEncounter(configName, encounter); }
Source:
<code>public OutputColumns getOutputColumns() { if (lookUpEveryToken) { return new OutputColumns( new String[] { column.getName() + " (synonyms replaced)", column.getName() + " (synonyms found)", column.getName() + " (master terms found)" }, <START> new Class[] { String.class, List.class, List.class }); <END> } else { return new OutputColumns(String.class, new String[] { column.getName() + " (synonyms replaced)" }); } }</code><technical_language>For users difficult work Lists. I suggest introduce a configured enum RemoveDictionaryMatchesTransformer.RemovedMatchesType</technical_language>

Target:
public OutputColumns getOutputColumns() { if (lookUpEveryToken) { final Class[] columnTypes; if( replacedSynonymsType == ReplacedSynonymsType.STRING) { columnTypes = new Class[] { String.class, String.class, String.class }; } else { columnTypes = new Class[] { String.class, List.class, List.class }; } return new OutputColumns( new String[] { column.getName() + " (synonyms replaced)", column.getName() + " (synonyms found)", column.getName() + " (master terms found)" }, columnTypes); } else { return new OutputColumns(String.class, new String[] { column.getName() + " (synonyms replaced)" }); } }
Source:
<code>GarrukSavageHeraldEffect() { <START> super(Outcome.Detriment); <END> staticText = "reveal the top card of your library. If it's a creature card, " + "put it into your hand. Otherwise, put it on the bottom of your library"; }</code><technical_language>a good effect, recommends Outcome.Benefit for AI plays (otherwise AI ignore ability in some cases)</technical_language>

Target:
GarrukSavageHeraldEffect() { super(Outcome.Benefit); staticText = "reveal the top card of your library. If it's a creature card, " + "put it into your hand. Otherwise, put it on the bottom of your library"; }
Source:
<code><START> public void addSetter(String fieldName) <END> { try { Field f = clazz.getDeclaredField(fieldName); FixedWidthParser.TypeInfo t = new FixedWidthParser.TypeInfo(f.getName(), ClassUtils.primitiveToWrapper(f.getType())); t.setter = PojoUtils.createSetter(clazz, t.name, t.type); setters.add(t); } catch (NoSuchFieldException e) { throw new RuntimeException("Field " + fieldName + " not found in class " + clazz, e); } catch (Exception e) { throw e; } }</code><technical_language>a private method</technical_language>

Target:
private void addSetter(String fieldName) { try { Field f = clazz.getDeclaredField(fieldName); FixedWidthParser.TypeInfo t = new FixedWidthParser.TypeInfo(f.getName(), ClassUtils.primitiveToWrapper(f.getType())); t.setter = PojoUtils.createSetter(clazz, t.name, t.type); setters.add(t); } catch (NoSuchFieldException e) { throw new RuntimeException("Field " + fieldName + " not found in class " + clazz, e); } catch (Exception e) { throw new RuntimeException("Exception while adding a setter" + e.getMessage(), e); } }
Source:
<code>private Iterator<Map.Entry<Cell, Value>> getRowColumnRangePostFiltered( TableReference tableRef, RowColumnRangeIterator iterator, int batchHint) { return Iterators.concat(Iterators.transform(Iterators.partition(iterator, batchHint), batch -> { <START> Map<Cell, Value> raw = new LinkedHashMap<>(); <END> batch.forEach(entry -> raw.put(entry.getKey(), entry.getValue())); validatePreCommitRequirementsOnReadIfNecessary(tableRef, getStartTimestamp()); if (raw.isEmpty()) { return Collections.emptyIterator(); } return getWithPostFilteringSync( tableRef, raw, x -> x).iterator(); })); }</code><technical_language>this refactor is unnecessary - ImmutableMap is in insertion order</technical_language>

Target:
private Iterator<Map.Entry<Cell, Value>> getRowColumnRangePostFiltered( TableReference tableRef, RowColumnRangeIterator iterator, int batchHint) { return Iterators.concat(Iterators.transform(Iterators.partition(iterator, batchHint), batch -> { ImmutableMap.Builder<Cell, Value> rawBuilder = ImmutableMap.builder(); batch.forEach(rawBuilder::put); Map<Cell, Value> raw = rawBuilder.build(); validatePreCommitRequirementsOnReadIfNecessary(tableRef, getStartTimestamp()); if (raw.isEmpty()) { return Collections.emptyIterator(); } SortedMap<Cell, Value> postFiltered = ImmutableSortedMap.copyOf( getWithPostFilteringSync( tableRef, raw, x -> x), preserveInputRowOrder(batch)); return postFiltered.entrySet().iterator(); })); }
Source:
<code>public void handleLightMeasurementDeviceTransition(final String organisationIdentification, final String deviceIdentification, final String correlationUid, final EventMessageDataContainer eventMessageDataContainer) { final Event event = eventMessageDataContainer.getEvents().get(0); if (event == null) { LOGGER.error("No event received for light measurement device: {}", deviceIdentification); return; } LightMeasurementDevice lmd = this.lightMeasurementDeviceRepository .findByDeviceIdentification(deviceIdentification); if (lmd == null) { LOGGER.error("No light measurement device found: {}", deviceIdentification); return; } lmd = this.updateLmdLastCommunicationTime(lmd); if (this.isDuplicateEvent(event, lmd)) { LOGGER.info("Duplicate event detected for light measurement device: {}. Event[id:{} {}]", lmd.getDeviceIdentification(), event.getId(), event.getDateTime(), event.getDescription(), event.getEventType(), event.getIndex()); return; } final CdmaRun cdmaRun = this.getCdmaDevicesPerMastSegment(lmd); final TransitionType transitionType = this.determineTransitionTypeForEvent(event); <START> this.setTransitionService.transitionCdmaRun(cdmaRun, organisationIdentification, correlationUid, <END> transitionType); }</code><technical_language>convinced method name..</technical_language>

Target:
public void handleLightMeasurementDeviceTransition(final String organisationIdentification, final String deviceIdentification, final String correlationUid, final EventMessageDataContainer eventMessageDataContainer) { final Event event = eventMessageDataContainer.getEvents().get(0); if (event == null) { LOGGER.error("No event received for light measurement device: {}", deviceIdentification); return; } LightMeasurementDevice lmd = this.lightMeasurementDeviceRepository .findByDeviceIdentification(deviceIdentification); if (lmd == null) { LOGGER.error("No light measurement device found: {}", deviceIdentification); return; } lmd = this.updateLmdLastCommunicationTime(lmd); if (this.isDuplicateEvent(event, lmd)) { LOGGER.info("Duplicate event detected for light measurement device: {}. Event[id:{} {}]", lmd.getDeviceIdentification(), event.getId(), event.getDateTime(), event.getDescription(), event.getEventType(), event.getIndex()); return; } final CdmaRun cdmaRun = this.getCdmaDevicesPerMastSegment(lmd); final TransitionType transitionType = this.determineTransitionTypeForEvent(event); this.setTransitionService.setTransitionForCdmaRun(cdmaRun, organisationIdentification, correlationUid, transitionType); }
Source:
<code><START> private String getOwner(PublicKeyHash writer) { <END> int writerId = getWriterId(writer); try (PreparedStatement search = conn.prepareStatement("SELECT user_id FROM writerusage WHERE writer_id = ?;")) { search.setInt(1, writerId); ResultSet resultSet = search.executeQuery(); resultSet.next(); int userId = resultSet.getInt(1); try (PreparedStatement usersearch = conn.prepareStatement("SELECT name FROM users WHERE id = ?;")) { usersearch.setInt(1, userId); ResultSet userRes = usersearch.executeQuery(); userRes.next(); return userRes.getString(1); } catch (SQLException sqe) { LOG.log(Level.WARNING, sqe.getMessage(), sqe); throw new RuntimeException(sqe); } } catch (SQLException sqe) { LOG.log(Level.WARNING, sqe.getMessage(), sqe); throw new RuntimeException(sqe); } }</code><technical_language>sql statement join writerusage users tables</technical_language>

Target:
private String getOwner(PublicKeyHash writer) { int writerId = getWriterId(writer); try (Connection conn = getConnection(); PreparedStatement search = conn.prepareStatement("SELECT u.name FROM users u, writerusage wu WHERE u.id = wu.user_id AND wu.writer_id = ?;")) { search.setInt(1, writerId); ResultSet resultSet = search.executeQuery(); resultSet.next(); return resultSet.getString(1); } catch (SQLException sqe) { LOG.log(Level.WARNING, sqe.getMessage(), sqe); throw new RuntimeException(sqe); } }
Source:
<code>public void install(ISourceViewer viewer, AnnotationPainter painter) { Assert.isNotNull(viewer); Assert.isNotNull(painter); fViewer= viewer; fPainter= painter; initPainter(); StyledText text= fViewer.getTextWidget(); if (text == null || text.isDisposed()) { return; } updateStylesWidth= new UpdateStylesWidth(); <START> ((ITextViewerExtension4) fViewer).addTextPresentationListener(updateStylesWidth); <END> visibleLines= new VisibleLines(); fViewer.addViewportListener(visibleLines); text.addMouseListener(fMouseTracker); text.addMouseTrackListener(fMouseTracker); text.addMouseMoveListener(fMouseTracker); text.setLineSpacingProvider(this); setColor(text.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY)); }</code><technical_language>check provided viewer type ITextViewerExtension4</technical_language>

Target:
public void install(ISourceViewer viewer, AnnotationPainter painter) { Assert.isNotNull(viewer); Assert.isNotNull(painter); fViewer= viewer; fPainter= painter; initPainter(); StyledText text= fViewer.getTextWidget(); if (text == null || text.isDisposed()) { return; } if (fViewer instanceof ITextViewerExtension4) { updateStylesWidth= new UpdateStylesWidth(); ((ITextViewerExtension4) fViewer).addTextPresentationListener(updateStylesWidth); } visibleLines= new VisibleLines(); fViewer.addViewportListener(visibleLines); text.addMouseListener(fMouseTracker); text.addMouseTrackListener(fMouseTracker); text.addMouseMoveListener(fMouseTracker); text.setLineSpacingProvider(this); setColor(text.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY)); }
Source:
<code>private boolean isValid(TransactionWrite write, AdvancedCache<byte[], byte[]> readCache) { if (write.skipRead()) { if (isTrace) { log.tracef("Operation %s wasn't read.", write); } return true; } CacheEntry<byte[], byte[]> entry = readCache.getCacheEntry(write.key); if (write.wasNonExisting()) { if (isTrace) { log.tracef("Key didn't exist for operation %s. Entry is %s", write, entry); } <START> return entry == null; <END> } if (isTrace) { log.tracef("Checking version for operation %s. Entry is %s", write, entry); } return entry != null && write.versionRead == extractVersion(entry.getMetadata().version()); }</code><technical_language>I entry == null || entry.getValue() == null support tombstones</technical_language>

Target:
private boolean isValid(TransactionWrite write, AdvancedCache<byte[], byte[]> readCache) { if (write.skipRead()) { if (isTrace) { log.tracef("Operation %s wasn't read.", write); } return true; } CacheEntry<byte[], byte[]> entry = readCache.getCacheEntry(write.key); if (write.wasNonExisting()) { if (isTrace) { log.tracef("Key didn't exist for operation %s. Entry is %s", write, entry); } return entry == null || entry.getValue() == null; } if (isTrace) { log.tracef("Checking version for operation %s. Entry is %s", write, entry); } return entry != null && write.versionRead == extractVersion(entry.getMetadata().version()); }
Source:
<code>public boolean waitForLocks(WaitForLocksRequest request) { LockRequest legacyRequest = toLegacyWaitForLocksRequest(request.getLockDescriptors()); lockAnonymous(legacyRequest); <START> return true; <END> }</code><technical_language>This return (lockAnonymous(legacyRequest) != null);</technical_language>

Target:
public WaitForLocksResponse waitForLocks(WaitForLocksRequest request) { LockRequest legacyRequest = toLegacyWaitForLocksRequest(request.getLockDescriptors()); lockAnonymous(legacyRequest); return WaitForLocksResponse.successful(); }
Source:
<code>private void cleanupLeftoverTasks() throws TaskException { List<TaskInfo> allTasks = this.getAllTasks(); List<String> deletedTasks = new ArrayList<>(); <START> String taskName = ""; <END> for (TaskInfo taskInfo : allTasks) { taskName = taskInfo.getName(); if (!newlyRegisteredTasks.contains(taskName)) { deleteTask(taskName); deletedTasks.add(taskName); } } if (!deletedTasks.isEmpty()) { log.info("Deleted " + deletedTasks.size() + " leftover tasks " + deletedTasks); } }</code><technical_language>Variable initialization is reduntant here</technical_language>

Target:
private void cleanupLeftoverTasks() throws TaskException { List<TaskInfo> allTasks = this.getAllTasks(); List<String> deletedTasks = new ArrayList<>(); String taskName; for (TaskInfo taskInfo : allTasks) { taskName = taskInfo.getName(); if (!newlyRegisteredTasks.contains(taskName)) { deleteTask(taskName); deletedTasks.add(taskName); } } if (!deletedTasks.isEmpty()) { for (String deletedTask : deletedTasks) { log.info("Deleted leftover task: " + deletedTask); } } }
Source:
<code>public void visitLineNumber(int line, Label start) { <START> _lineNumber = line; <END> }</code><technical_language>a safety precaution, this assignment grab line number in case generated synthetic lambda method contains more line numbers</technical_language>

Target:
public void visitLineNumber(int line, Label start) { if (_lineNumber == -1) { _lineNumber = line; } }
Source:
<code>private void fillTreeItemWithGitDirectory(RepositoryMapping m, TreeItem treeItem, IPath gitDir, boolean isAlternative) { if (m.getGitDir() == null) treeItem.setText(2, UIText.ExistingOrNewPage_SymbolicValueEmptyMapping); else { IPath relativePath = new Path(m.getGitDir()); if (isAlternative) { IPath withoutLastSegment = relativePath.removeLastSegments(1); IPath path; if (withoutLastSegment.isEmpty()) path = Path.fromPortableString("."); else path = withoutLastSegment; treeItem.setText(0, path.toString()); } treeItem.setText(2, relativePath.toOSString()); Repository repo = null; <START> try { <END> IProject project = m.getContainer().getProject(); repo = new RepositoryBuilder() .setGitDir(gitDir.toFile()).build(); File workTree = repo.getWorkTree(); IPath workTreePath = Path.fromOSString(workTree .getAbsolutePath()); if (workTreePath.isPrefixOf(project.getLocation())) { IPath makeRelativeTo = project.getLocation() .makeRelativeTo(workTreePath); String repoRelativePath = makeRelativeTo .append("/.project").toPortableString(); ObjectId headCommitId = repo.resolve(Constants.HEAD); if (headCommitId != null) { try (RevWalk revWalk = new RevWalk(repo)) { RevCommit headCommit = revWalk .parseCommit(headCommitId); RevTree headTree = headCommit.getTree(); TreeWalk projectInRepo = TreeWalk.forPath(repo, repoRelativePath, headTree); if (projectInRepo != null) { treeItem.setChecked(true); } } } } } catch (IOException e1) { Activator .logError( UIText.ExistingOrNewPage_FailedToDetectRepositoryMessage, e1); } finally { if (repo != null) { repo.close(); } } } }</code><technical_language>try resource</technical_language>

Target:
private void fillTreeItemWithGitDirectory(RepositoryMapping m, TreeItem treeItem, IPath gitDir, boolean isAlternative) { if (m.getGitDir() == null) treeItem.setText(2, UIText.ExistingOrNewPage_SymbolicValueEmptyMapping); else { IPath relativePath = new Path(m.getGitDir()); if (isAlternative) { IPath withoutLastSegment = relativePath.removeLastSegments(1); IPath path; if (withoutLastSegment.isEmpty()) path = Path.fromPortableString("."); else path = withoutLastSegment; treeItem.setText(0, path.toString()); } treeItem.setText(2, relativePath.toOSString()); try (Repository repo = new RepositoryBuilder() .setGitDir(gitDir.toFile()).build();) { IProject project = m.getContainer().getProject(); File workTree = repo.getWorkTree(); IPath workTreePath = Path.fromOSString(workTree .getAbsolutePath()); if (workTreePath.isPrefixOf(project.getLocation())) { IPath makeRelativeTo = project.getLocation() .makeRelativeTo(workTreePath); String repoRelativePath = makeRelativeTo .append("/.project").toPortableString(); ObjectId headCommitId = repo.resolve(Constants.HEAD); if (headCommitId != null) { try (RevWalk revWalk = new RevWalk(repo)) { RevCommit headCommit = revWalk .parseCommit(headCommitId); RevTree headTree = headCommit.getTree(); TreeWalk projectInRepo = TreeWalk.forPath(repo, repoRelativePath, headTree); if (projectInRepo != null) { treeItem.setChecked(true); } } } } } catch (IOException e1) { Activator .logError( UIText.ExistingOrNewPage_FailedToDetectRepositoryMessage, e1); } } }
Source:
<code>public void testCassandraOutputOperator() { TestOutputOperator outputOperator = setupForOutputOperatorTest(); List<FieldInfo> fieldInfos = Lists.newArrayList(); fieldInfos.add(new FieldInfo("id", "id", null)); fieldInfos.add(new FieldInfo("age", "age", null)); fieldInfos.add(new FieldInfo("doubleValue", "doubleValue", null)); fieldInfos.add(new FieldInfo("floatValue", "floatValue", null)); fieldInfos.add(new FieldInfo("last_visited", "last_visited", null)); fieldInfos.add(new FieldInfo("lastname", "lastname", null)); fieldInfos.add(new FieldInfo("list1", "list1", null)); fieldInfos.add(new FieldInfo("map1", "map1", null)); fieldInfos.add(new FieldInfo("set1", "set1", null)); fieldInfos.add(new FieldInfo("test", "test", null)); outputOperator.setFieldInfos(fieldInfos); <START> outputOperator.input.setup(tpc); <END> outputOperator.setup(context); outputOperator.activate(context); List<TestPojo> events = Lists.newArrayList(); for (int i = 0; i < 3; i++) { Set<Integer> set = new HashSet<Integer>(); set.add(i); List<Integer> list = new ArrayList<Integer>(); list.add(i); Map<String, Integer> map = new HashMap<String, Integer>(); map.put("key" + i, i); events.add(new TestPojo(UUID.randomUUID(), i, "abclast", true, i, 2.0, set, list, map, new Date(System.currentTimeMillis()))); } outputOperator.beginWindow(0); for (TestPojo event : events) { outputOperator.input.process(event); } outputOperator.endWindow(); Assert.assertEquals("rows in db", 3, outputOperator.getNumOfEventsInStore()); outputOperator.getEventsInStore(); }</code><technical_language>I setup of port is setup of operator</technical_language>

Target:
public void testCassandraOutputOperator() { TestOutputOperator outputOperator = setupForOutputOperatorTest(); List<FieldInfo> fieldInfos = Lists.newArrayList(); fieldInfos.add(new FieldInfo("id", "id", null)); fieldInfos.add(new FieldInfo("age", "age", null)); fieldInfos.add(new FieldInfo("doubleValue", "doubleValue", null)); fieldInfos.add(new FieldInfo("floatValue", "floatValue", null)); fieldInfos.add(new FieldInfo("last_visited", "last_visited", null)); fieldInfos.add(new FieldInfo("lastname", "lastname", null)); fieldInfos.add(new FieldInfo("list1", "list1", null)); fieldInfos.add(new FieldInfo("map1", "map1", null)); fieldInfos.add(new FieldInfo("set1", "set1", null)); fieldInfos.add(new FieldInfo("test", "test", null)); outputOperator.setFieldInfos(fieldInfos); outputOperator.setup(context); outputOperator.input.setup(tpc); outputOperator.activate(context); List<TestPojo> events = Lists.newArrayList(); for (int i = 0; i < 3; i++) { Set<Integer> set = new HashSet<Integer>(); set.add(i); List<Integer> list = new ArrayList<Integer>(); list.add(i); Map<String, Integer> map = new HashMap<String, Integer>(); map.put("key" + i, i); events.add(new TestPojo(UUID.randomUUID(), i, "abclast", true, i, 2.0, set, list, map, new Date(System.currentTimeMillis()))); } outputOperator.beginWindow(0); for (TestPojo event : events) { outputOperator.input.process(event); } outputOperator.endWindow(); Assert.assertEquals("rows in db", 3, outputOperator.getNumOfEventsInStore()); outputOperator.getEventsInStore(); }
Source:
<code><START> public void setLocation(Path newBriefcaseDir) { <END> briefcaseDir = Optional.of(newBriefcaseDir); Path cacheFilePath = newBriefcaseDir.resolve(CACHE_FILE_NAME); cacheFile = Optional.of(cacheFilePath); if (Files.exists(cacheFilePath)) try (InputStream in = Files.newInputStream(cacheFilePath); ObjectInputStream ois = new ObjectInputStream(in)) { hashByPath = (Map<String, String>) ois.readObject(); formDefByPath = (Map<String, BriefcaseFormDefinition>) ois.readObject(); } catch (InvalidClassException e) { log.warn("The serialized forms cache is incompatible due to an update on Briefcase"); delete(cacheFilePath); } catch (IOException | ClassNotFoundException e) { log.warn("Can't read forms cache file", e); delete(cacheFilePath); } if (!Files.exists(cacheFilePath)) { createFile(cacheFilePath); hashByPath = new HashMap<>(); formDefByPath = new HashMap<>(); } update(); }</code><technical_language>setting a location existing directory a valid cache, cache is rebuilt. Is intended</technical_language>

Target:
public void setLocation(Path newBriefcaseDir) { briefcaseDir = Optional.of(newBriefcaseDir); Path cacheFilePath = newBriefcaseDir.resolve(CACHE_FILE_NAME); cacheFile = Optional.of(cacheFilePath); if (Files.exists(cacheFilePath)) try (InputStream in = Files.newInputStream(cacheFilePath); ObjectInputStream ois = new ObjectInputStream(in)) { hashByPath = (Map<String, String>) ois.readObject(); formDefByPath = (Map<String, BriefcaseFormDefinition>) ois.readObject(); } catch (InvalidClassException e) { log.warn("The serialized forms cache is incompatible due to an update on Briefcase"); delete(cacheFilePath); } catch (IOException | ClassNotFoundException e) { log.warn("Can't read forms cache file", e); delete(cacheFilePath); } if (!Files.exists(cacheFilePath)) { createFile(cacheFilePath); hashByPath = new HashMap<>(); formDefByPath = new HashMap<>(); } }
Source:
<code>private void loadExclusivePIDList() { try (FileReader reader = new FileReader(exclusivePIDStore)) { exclusivcePIDMap = GSON.fromJson(reader, ExclusivePIDMap.class); if (exclusivcePIDMap != null) { exclusivcePIDMap.initializeProcessPIDMapping(); } } catch (JsonSyntaxException | JsonIOException | IOException e) { <START> logger.error("Error loading exclusive pids from {}.", exclusivePIDStore.getAbsolutePath(), e); <END> } finally { if (exclusivcePIDMap == null) { exclusivcePIDMap = new ExclusivePIDMap(); } } }</code><technical_language>end if file exist (which is a perfectly valid case)</technical_language>

Target:
private void loadExclusivePIDList() { try (FileReader reader = new FileReader(exclusivePIDStore)) { exclusivePIDMap = gson.fromJson(reader, ExclusivePIDMap.class); if (exclusivePIDMap != null) { exclusivePIDMap.initializeProcessPIDMapping(); } } catch (JsonSyntaxException | JsonIOException e) { logger.error("Error parsing exclusive pids from '{}': {}", exclusivePIDStore.getAbsolutePath(), e.getMessage()); } catch (IOException e) { logger.debug("Error loading exclusive pids from '{}': {}", exclusivePIDStore.getAbsolutePath(), e.getMessage()); } finally { if (exclusivePIDMap == null) { exclusivePIDMap = new ExclusivePIDMap(); } } }
Source:
<code>public static void input(SpatialPartitioningState state, @SqlType(GEOMETRY_TYPE_NAME) Slice slice, @SqlType(INTEGER) long partitionCount) { Envelope envelope = deserializeEnvelope(slice); if (envelope == null) { return; } Rectangle extent = new Rectangle(envelope.getXMin(), envelope.getYMin(), envelope.getXMax(), envelope.getYMax()); if (state.getCount() == 0) { state.setPartitionCount(toIntExact(partitionCount)); state.setExtent(extent); state.setSamples(new ArrayList<>()); } else { state.setExtent(state.getExtent().merge(extent)); } List<Rectangle> samples = state.getSamples(); if (samples.size() <= MAX_SAMPLE_COUNT) { samples.add(extent); } else { <START> int sampleIndex = (int) floor(ThreadLocalRandom.current().nextDouble() * state.getCount()); <END> if (sampleIndex < MAX_SAMPLE_COUNT) { samples.set(sampleIndex, extent); } } state.setCount(state.getCount() + 1); }</code><technical_language>ThreadLocalRandom.current().nextInt(state.getCount())</technical_language>

Target:
public static void input(SpatialPartitioningState state, @SqlType(GEOMETRY_TYPE_NAME) Slice slice, @SqlType(INTEGER) long partitionCount) { Envelope envelope = deserializeEnvelope(slice); if (envelope == null) { return; } Rectangle extent = new Rectangle(envelope.getXMin(), envelope.getYMin(), envelope.getXMax(), envelope.getYMax()); if (state.getCount() == 0) { state.setPartitionCount(toIntExact(partitionCount)); state.setExtent(extent); state.setSamples(new ArrayList<>()); } else { state.setExtent(state.getExtent().merge(extent)); } List<Rectangle> samples = state.getSamples(); if (samples.size() <= MAX_SAMPLE_COUNT) { samples.add(extent); } else { long sampleIndex = ThreadLocalRandom.current().nextLong(state.getCount()); if (sampleIndex < MAX_SAMPLE_COUNT) { samples.set(toIntExact(sampleIndex), extent); } } state.setCount(state.getCount() + 1); }
Source:
<code>public static void preInit() { wrench = ItemManager.register(new ItemWrench_Neptune("item.wrench")); gearWood = ItemManager.register(new ItemBC_Neptune("item.gear.wood")); gearStone = ItemManager.register(new ItemBC_Neptune("item.gear.stone")); gearIron = ItemManager.register(new ItemBC_Neptune("item.gear.iron")); gearGold = ItemManager.register(new ItemBC_Neptune("item.gear.gold")); gearDiamond = ItemManager.register(new ItemBC_Neptune("item.gear.diamond")); if (BCLib.DEV) { diamondShard = ItemManager.register(new ItemBC_Neptune("item.diamond.shard")); } paintbrush = ItemManager.register(new ItemPaintbrush_BC8("item.paintbrush")); list = ItemManager.register(new ItemList_BC8("item.list")); if (BCLib.DEV) { mapLocation = ItemManager.register(new ItemMapLocation("item.map_location")); markerConnector = ItemManager.register(new ItemMarkerConnector("item.marker_connector")); } <START> volumeBox = ItemManager.register(new ItemVolumeBox("item.volume_box")); <END> if (BCLib.DEV) { goggles = ItemManager.register(new ItemGoggles("item.goggles")); } BCLibItems.guide.setCreativeTab(CreativeTabManager.getTab("buildcraft.main")); }</code><technical_language>If marker connector is locked DEV volume box *also* locked DEV</technical_language>

Target:
public static void preInit() { wrench = ItemManager.register(new ItemWrench_Neptune("item.wrench")); gearWood = ItemManager.register(new ItemBC_Neptune("item.gear.wood")); gearStone = ItemManager.register(new ItemBC_Neptune("item.gear.stone")); gearIron = ItemManager.register(new ItemBC_Neptune("item.gear.iron")); gearGold = ItemManager.register(new ItemBC_Neptune("item.gear.gold")); gearDiamond = ItemManager.register(new ItemBC_Neptune("item.gear.diamond")); if (BCLib.DEV) { diamondShard = ItemManager.register(new ItemBC_Neptune("item.diamond.shard")); } paintbrush = ItemManager.register(new ItemPaintbrush_BC8("item.paintbrush")); list = ItemManager.register(new ItemList_BC8("item.list")); if (BCLib.DEV) { mapLocation = ItemManager.register(new ItemMapLocation("item.map_location")); } markerConnector = ItemManager.register(new ItemMarkerConnector("item.marker_connector")); volumeBox = ItemManager.register(new ItemVolumeBox("item.volume_box")); if (BCLib.DEV) { goggles = ItemManager.register(new ItemGoggles("item.goggles")); } BCLibItems.guide.setCreativeTab(CreativeTabManager.getTab("buildcraft.main")); }
Source:
<code>public static void setOptions(SWTBot bot, int optionFlags, String traceTypeName) { SWTBotCheckBox checkBox = bot.checkBox(Messages.ImportTraceWizard_CreateLinksInWorkspace); if (checkBox.isEnabled()) { if ((optionFlags & ImportTraceWizardPage.OPTION_CREATE_LINKS_IN_WORKSPACE) != 0) { checkBox.select(); } else { checkBox.deselect(); } } checkBox = bot.checkBox(Messages.ImportTraceWizard_PreserveFolderStructure); if ((optionFlags & ImportTraceWizardPage.OPTION_PRESERVE_FOLDER_STRUCTURE) != 0) { checkBox.select(); } else { checkBox.deselect(); } <START> checkBox = bot.checkBox(Messages.ImportTraceWizard_ImportUnrecognized); <END> if ((optionFlags & ImportTraceWizardPage.OPTION_IMPORT_UNRECOGNIZED_TRACES) != 0) { checkBox.select(); } else { checkBox.deselect(); } checkBox = bot.checkBox(Messages.ImportTraceWizard_OverwriteExistingTrace); if ((optionFlags & ImportTraceWizardPage.OPTION_OVERWRITE_EXISTING_RESOURCES) != 0) { checkBox.select(); } else { checkBox.deselect(); } checkBox = bot.checkBox(Messages.ImportTraceWizard_CreateExperiment); if ((optionFlags & ImportTraceWizardPage.OPTION_CREATE_EXPERIMENT) != 0) { checkBox.select(); } else { checkBox.deselect(); } SWTBotCombo comboBox = bot.comboBoxWithLabel(Messages.ImportTraceWizard_TraceType); if (traceTypeName != null && !traceTypeName.isEmpty()) { comboBox.setSelection(traceTypeName); } else { comboBox.setSelection(ImportTraceWizardPage.TRACE_TYPE_AUTO_DETECT); } }</code><technical_language>This checkbox disabled if Trace Type is set automatic detection</technical_language>

Target:
public static void setOptions(SWTBot bot, int optionFlags, String traceTypeName) { SWTBotCombo comboBox = bot.comboBoxWithLabel(Messages.ImportTraceWizard_TraceType); if (traceTypeName != null && !traceTypeName.isEmpty()) { comboBox.setSelection(traceTypeName); } else { comboBox.setSelection(ImportTraceWizardPage.TRACE_TYPE_AUTO_DETECT); } SWTBotCheckBox checkBox = bot.checkBox(Messages.ImportTraceWizard_CreateLinksInWorkspace); if (checkBox.isEnabled()) { if ((optionFlags & ImportTraceWizardPage.OPTION_CREATE_LINKS_IN_WORKSPACE) != 0) { checkBox.select(); } else { checkBox.deselect(); } } checkBox = bot.checkBox(Messages.ImportTraceWizard_PreserveFolderStructure); if ((optionFlags & ImportTraceWizardPage.OPTION_PRESERVE_FOLDER_STRUCTURE) != 0) { checkBox.select(); } else { checkBox.deselect(); } checkBox = bot.checkBox(Messages.ImportTraceWizard_ImportUnrecognized); if (checkBox.isEnabled()) { if ((optionFlags & ImportTraceWizardPage.OPTION_IMPORT_UNRECOGNIZED_TRACES) != 0) { checkBox.select(); } else { checkBox.deselect(); } } checkBox = bot.checkBox(Messages.ImportTraceWizard_OverwriteExistingTrace); if ((optionFlags & ImportTraceWizardPage.OPTION_OVERWRITE_EXISTING_RESOURCES) != 0) { checkBox.select(); } else { checkBox.deselect(); } checkBox = bot.checkBox(Messages.ImportTraceWizard_CreateExperiment); if ((optionFlags & ImportTraceWizardPage.OPTION_CREATE_EXPERIMENT) != 0) { checkBox.select(); } else { checkBox.deselect(); } }
Source:
<code>public void testZeroLengthInterval(){ <START> SimpleInterval interval = new SimpleInterval("1",100,99); <END> }</code><technical_language>Call getStart() getEnd() in this test</technical_language>

Target:
public void testZeroLengthInterval(){ SimpleInterval interval = new SimpleInterval("1",100,99); Assert.assertEquals(interval.getContig(), "1"); Assert.assertEquals(interval.getStart(), 100); Assert.assertEquals(interval.getEnd(), 99); }
Source:
<code>private static double medianOrDefault(final List<Double> list) { <START> return list.size() > 0 ? new Median().evaluate(list.stream().mapToDouble(d->d).toArray()) : 1.0; <END> }</code><technical_language>1. Magic number (1.0) 2. this method easier read/use if List<List<Double>> turned a matrix double[][]? 3. If default a parameter, this a reasonable utility</technical_language>

Target:
private static double medianOrDefault(final List<Double> list) { return list.size() > 0 ? new Median().evaluate(list.stream().mapToDouble(d->d).toArray()) : DUMMY_VALUE_NEVER_USED; }
Source:
<code>public void applyPhysics(Material oldType, int newTypeId, byte oldData, byte newData) { ItemTable itemTable = ItemTable.instance(); Material newType = Material.getMaterial(newTypeId); for (int y = -1; y <= 1; y++) { for (BlockFace face : LAYER) { if (y == 0 && face == BlockFace.SELF) continue; GlowBlock notify = this.getRelative(face.getModX(), face.getModY() + y, face.getModZ()); BlockFace blockFace; if (y == 0) { blockFace = face.getOppositeFace(); } else if (y == -1 && face == BlockFace.SELF) { blockFace = BlockFace.UP; } else if (y == 1 && face == BlockFace.SELF) { blockFace = BlockFace.DOWN; } else { blockFace = null; } BlockType notifyType = itemTable.getBlock(notify.getTypeId()); if (notifyType != null) { notifyType.onNearBlockChanged(notify, blockFace, this, oldType, oldData, newType, newData); } } } BlockType type = itemTable.getBlock(oldType); if (type != null) { type.onBlockChanged(this, oldType, oldData, newType, newData); } <START> type.receivePulse(this); <END> }</code><technical_language>update() applyPhysics update block, pulse block is updated</technical_language>

Target:
public void applyPhysics(Material oldType, int newTypeId, byte oldData, byte newData) { ItemTable itemTable = ItemTable.instance(); Material newType = Material.getMaterial(newTypeId); for (int y = -1; y <= 1; y++) { for (BlockFace face : LAYER) { if (y == 0 && face == BlockFace.SELF) continue; GlowBlock notify = this.getRelative(face.getModX(), face.getModY() + y, face.getModZ()); BlockFace blockFace; if (y == 0) { blockFace = face.getOppositeFace(); } else if (y == -1 && face == BlockFace.SELF) { blockFace = BlockFace.UP; } else if (y == 1 && face == BlockFace.SELF) { blockFace = BlockFace.DOWN; } else { blockFace = null; } BlockType notifyType = itemTable.getBlock(notify.getTypeId()); if (notifyType != null) { notifyType.onNearBlockChanged(notify, blockFace, this, oldType, oldData, newType, newData); } } } BlockType type = itemTable.getBlock(oldType); if (type != null) { type.onBlockChanged(this, oldType, oldData, newType, newData); } }
Source:
<code>public ContainerExecDecorator(KubernetesClient client, String podName, String containerName, String path, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished) { this.client = client; this.podName = podName; this.containerName = containerName; this.alive = alive; this.started = started; <START> this.finished = finished; <END> }</code><technical_language>if path is removed, constructor deprecated a new path argument added</technical_language>

Target:
public ContainerExecDecorator(KubernetesClient client, String podName, String containerName, String path, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished) { this(client, podName, containerName, alive, started, finished); }
Source:
<code>public Iterable<SchedulingPipelinedRegion> getAllPipelinedRegions() { <START> return vertexRegions.values().stream().collect(Collectors.toSet()); <END> }</code><technical_language>I new HashSet<>(vertexRegions.values())</technical_language>

Target:
public Iterable<SchedulingPipelinedRegion> getAllPipelinedRegions() { return new HashSet<>(getVertexRegions().values()); }
Source:
<code>public void updateEnvironment(@NotNull Map<String, String> env, @NotNull User userInfo) { final String externalId = userInfo.getExternalId(); env.put("SSH_ORIGINAL_COMMAND", "git"); env.put("GITEA_PUSHER_EMAIL", userInfo.getEmail()); if (externalId != null) { <START> env.put("GL_ID", PREFIX_USER + externalId); <END> env.put("GITEA_PUSHER_ID", userInfo.getExternalId()); } }</code><technical_language>Gitea need GL_ID GITEA_PUSHER_ID</technical_language>

Target:
public void updateEnvironment(@NotNull Map<String, String> env, @NotNull User userInfo) { final String externalId = userInfo.getExternalId(); env.put("SSH_ORIGINAL_COMMAND", "git"); env.put("GITEA_PUSHER_EMAIL", userInfo.getEmail()); if (externalId != null) { env.put("GITEA_PUSHER_ID", userInfo.getExternalId()); } }
Source:
<code>public CachingHasher build() throws IllegalArgumentException { <START> List<long[]> cache = new ArrayList<long[]>(); <END> for (byte[] buff : buffers) { long[] result = new long[2]; result[0] = function.apply(buff, 0); result[1] = function.apply(buff, 1) - result[0]; cache.add(result); } return new CachingHasher(function, cache); }</code><technical_language>final</technical_language>

Target:
public final CachingHasher build() throws IllegalArgumentException { List<long[]> cache = new ArrayList<long[]>(); for (byte[] buff : buffers) { long[] result = new long[2]; result[0] = function.apply(buff, 0); result[1] = function.apply(buff, 1) - result[0]; cache.add(result); } return new CachingHasher(function, cache); }
Source:
<code>protected @Nullable List<@NonNull ITimeGraphRowModel> getRowModel(@NonNull ITmfStateSystem ss, @NonNull SelectionTimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { TreeMultimap<Integer, ITmfStateInterval> intervals = TreeMultimap.create(Comparator.naturalOrder(), Comparator.comparing(ITmfStateInterval::getStartTime)); Map<@NonNull Long, @NonNull Integer> entries = getSelectedEntries(filter); Collection<Long> times = getTimes(filter, ss.getStartTime(), ss.getCurrentEndTime()); for (ITmfStateInterval interval : <START> ss.query2D(getSelectedEntries(filter).values(), <END> times)) { if (monitor != null && monitor.isCanceled()) { return null; } intervals.put(interval.getAttribute(), interval); } List<ITimeGraphRowModel> rows = new ArrayList<>(); for (Map.Entry<Long, Integer> entry : entries.entrySet()) { if (monitor != null && monitor.isCanceled()) { return null; } List<ITimeGraphState> eventList = new ArrayList<>(); for (ITmfStateInterval interval : intervals.get(entry.getValue())) { long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; Object state = interval.getValue(); String value = state == null ? null : state.toString(); eventList.add(new TimeGraphState(startTime, duration, entry.getKey(), value)); } rows.add(new TimeGraphRowModel(entry.getKey(), eventList)); } return rows; }</code><technical_language>reuse entries line 113</technical_language>

Target:
protected @Nullable List<@NonNull ITimeGraphRowModel> getRowModel(@NonNull ITmfStateSystem ss, @NonNull SelectionTimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { TreeMultimap<Integer, ITmfStateInterval> intervals = TreeMultimap.create(Comparator.naturalOrder(), Comparator.comparing(ITmfStateInterval::getStartTime)); Map<@NonNull Long, @NonNull Integer> entries = getSelectedEntries(filter); Collection<Long> times = getTimes(filter, ss.getStartTime(), ss.getCurrentEndTime()); for (ITmfStateInterval interval : entries.values(), times)) { if (monitor != null && monitor.isCanceled()) { return null; } intervals.put(interval.getAttribute(), interval); } List<ITimeGraphRowModel> rows = new ArrayList<>(); for (Map.Entry<Long, Integer> entry : entries.entrySet()) { if (monitor != null && monitor.isCanceled()) { return null; } List<ITimeGraphState> eventList = new ArrayList<>(); for (ITmfStateInterval interval : intervals.get(entry.getValue())) { long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; Object state = interval.getValue(); String value = state == null ? null : state.toString(); eventList.add(new TimeGraphState(startTime, duration, entry.getKey(), value)); } rows.add(new TimeGraphRowModel(entry.getKey(), eventList)); } return rows; }
Source:
<code>protected StorageDomain map(org.ovirt.engine.core.common.businessentities.StorageDomain entity, StorageDomain template) { StorageDomain model = super.map(entity, template); if (!isFiltered()) { switch (entity.getStorageType()) { case ISCSI: mapVolumeGroupIscsi(model, entity); break; case FCP: mapVolumeGroupFcp(model, entity); break; case NFS: <START> mapNFSProperties(model, entity); <END> case LOCALFS: case POSIXFS: case GLUSTERFS: mapFileDomain(model, entity); break; } } return model; }</code><technical_language>is confusing a "case" a "break". I imagine else scratching head wondering is reason for this, adding apparently missing "break". suggest repeat call "mapFileDomain" add "break"</technical_language>

Target:
protected StorageDomain map(org.ovirt.engine.core.common.businessentities.StorageDomain entity, StorageDomain template) { StorageDomain model = super.map(entity, template); if (!isFiltered()) { switch (entity.getStorageType()) { case ISCSI: mapVolumeGroupIscsi(model, entity); break; case FCP: mapVolumeGroupFcp(model, entity); break; case NFS: case LOCALFS: case POSIXFS: case GLUSTERFS: mapFileDomain(model, entity); break; } } return model; }
Source:
<code>private static Object handleJoinPointFuture( ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.timelimiter.TimeLimiter timeLimiter, boolean blocking) throws Throwable { if(blocking) { <START> return timeLimiter.executeFutureSupplier(() -> { <END> try { return (Future<?>) proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new CompletionException(throwable); } }); } return timeLimiter.executeCompletionStage(timeLimiterExecutorService, () -> { try { return (CompletionStage<?>) proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new CompletionException(throwable); } }); }</code><technical_language>I this work. method is intercepted returns a Future, Aspect returns a value. I Aspect should/must return type intercepted method</technical_language>

Target:
private static Object handleJoinPointFuture( ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.timelimiter.TimeLimiter timeLimiter, boolean blocking) throws Throwable { if(blocking) { return timeLimiter.executeFutureSupplier(() -> CompletableFuture.supplyAsync(() -> { try { return proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new CompletionException(throwable); } }) ); } return timeLimiter.executeCompletionStage(timeLimiterExecutorService, () -> { try { return (CompletionStage<?>) proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new CompletionException(throwable); } }); }
Source:
<code>public static List<FieldProjection> from(Fields fields, boolean include) { Assert.notNull(fields, "Fields must not be null!"); List<FieldProjection> projections = new ArrayList<FieldProjection>(); for (Field field : fields) { <START> <END> if (!include) { if (!Fields.UNDERSCORE_ID.equals(field.getName())) { throw new IllegalArgumentException( String .format( "Exclusion of field %s not allowed. Projections by the mongodb aggregation framework only support the exclusion of the %s field!", field.getName(), Fields.UNDERSCORE_ID)); } } projections.add(new FieldProjection(field, include ? null : 0)); } return projections; }</code><technical_language>Do fix this here? I simply rejecting _id in .addExclude( ) enough, it</technical_language>

Target:
public static List<FieldProjection> from(Fields fields, boolean include) { Assert.notNull(fields, "Fields must not be null!"); List<FieldProjection> projections = new ArrayList<FieldProjection>(); for (Field field : fields) { projections.add(new FieldProjection(field, include ? null : 0)); } return projections; }
Source:
<code>ElasticsearchHttpSpanConsumer(ElasticsearchHttpStorage es) { this.es = es; this.indexNameFormatter = es.indexNameFormatter(); <START> this.indexToServiceSpansCache = Collections.synchronizedMap(new LinkedHashMap<String, Set<Pair<String>>>() { <END> @Override protected boolean removeEldestEntry(Map.Entry<String, Set<Pair<String>>> eldest) { return size() > MAX_CACHE_DAYS; } }); }</code><technical_language>if static, initialized ctor.. final static</technical_language>

Target:
ElasticsearchHttpSpanConsumer(ElasticsearchHttpStorage es) { this.es = es; this.indexNameFormatter = es.indexNameFormatter(); }
Source:
<code>public void testSchemaHandling() throws Exception { Schema inputSchema = Schema.recordOf("sourceRecord", Schema.Field.of(ID, Schema.of(Schema.Type.STRING)), Schema.Field.of(NAME, Schema.of(Schema.Type.STRING)), Schema.Field.of(SALARY, Schema.of(Schema.Type.STRING)), Schema.Field.of(DESIGNATIONID, Schema.unionOf(Schema.of(Schema.Type.STRING), Schema.of(Schema.Type.NULL)))); ValueMapper.Config config = new ValueMapper.Config("designationid:designation_lookup_table:designationName", "designationid:DEFAULTID"); MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema); new ValueMapper(config).configurePipeline(configurer); Schema outputSchema = configurer.getOutputSchema(); <START> Assert.assertEquals(Schema.of(Schema.Type.STRING).getType(), <END> outputSchema.getField(DESIGNATIONNAME).getSchema().getType()); Assert.assertEquals(Schema.of(Schema.Type.STRING).getType(), outputSchema.getField(SALARY).getSchema().getType()); }</code><technical_language>assert entire Schema objects equal checking a single field type. schema object directly, need check field field</technical_language>

Target:
public void testSchemaHandling() throws Exception { Schema inputSchema = Schema.recordOf("sourceRecord", Schema.Field.of(ID, Schema.of(Schema.Type.STRING)), Schema.Field.of(NAME, Schema.of(Schema.Type.STRING)), Schema.Field.of(SALARY, Schema.of(Schema.Type.STRING)), Schema.Field.of(DESIGNATIONID, Schema.nullableOf(Schema.of(Schema.Type.STRING)))); ValueMapper.Config config = new ValueMapper.Config("designationid:designation_lookup_table:designationName", "designationid:DEFAULTID"); MockPipelineConfigurer configurer = new MockPipelineConfigurer(inputSchema); new ValueMapper(config).configurePipeline(configurer); Schema outputSchema = configurer.getOutputSchema(); Schema expectedOutputSchema = Schema.recordOf("sourceRecord.formatted", Schema.Field.of(ID, Schema.of(Schema.Type.STRING)), Schema.Field.of(NAME, Schema.of(Schema.Type.STRING)), Schema.Field.of(SALARY, Schema.of(Schema.Type.STRING)), Schema.Field.of(DESIGNATIONNAME, Schema.of(Schema.Type.STRING))); Assert.assertEquals(expectedOutputSchema, outputSchema); }
Source:
<code>public void createDestination(Datastream datastream) { <START> <END> }</code><technical_language>Is implemented supported? way, throw here</technical_language>

Target:
public void createDestination(Datastream datastream) { throw new UnsupportedOperationException("Create destination is not supported for event hub."); }