auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void syncHeight(final boolean scrollToBottom, final boolean ensureVisible) { if (!options_.include() && !hasErrors_ && execScope_ == NotebookQueueUnit.EXEC_SCOPE_CHUNK) { if (isVisible()) { setVisible(false); host_.onOutputHeightChanged(this, 0, ensureVisible); } return; } if (!isVisible() && (state_ == CHUNK_EMPTY || state_ == CHUNK_PRE_OUTPUT)) return; setVisible(true); int height = ChunkOutputUi.CHUNK_COLLAPSED_HEIGHT; if (expansionState_.getValue() == EXPANDED) { int contentHeight = root_.getElement().getOffsetHeight() + 19; height = Math.max(ChunkOutputUi.MIN_CHUNK_HEIGHT, contentHeight); <START> height = Math.min(height, 650); <END> if (pendingRenders_ > 0 && height < renderedHeight_) return; } if (height == renderedHeight_ && !ensureVisible) return; renderedHeight_ = height; if (scrollToBottom) root_.getElement().setScrollTop(root_.getElement().getScrollHeight()); if (chunkOutputSize_ != ChunkOutputSize.Full) frame_.getElement().getStyle().setHeight(height, Unit.PX); host_.onOutputHeightChanged(this, height + 7, ensureVisible); }</code><technical_language>MAX_CHUNK_HEIGHT</technical_language>

Target:
public void syncHeight(final boolean scrollToBottom, final boolean ensureVisible) { if (!options_.include() && !hasErrors_ && execScope_ == NotebookQueueUnit.EXEC_SCOPE_CHUNK) { if (isVisible()) { setVisible(false); host_.onOutputHeightChanged(this, 0, ensureVisible); } return; } if (!isVisible() && (state_ == CHUNK_EMPTY || state_ == CHUNK_PRE_OUTPUT)) return; setVisible(true); int height = ChunkOutputUi.CHUNK_COLLAPSED_HEIGHT; if (expansionState_.getValue() == EXPANDED) { int contentHeight = root_.getElement().getOffsetHeight() + 19; height = Math.max(ChunkOutputUi.MIN_CHUNK_HEIGHT, contentHeight); height = Math.min(height, ChunkOutputUi.MAX_CHUNK_HEIGHT); if (pendingRenders_ > 0 && height < renderedHeight_) return; } if (height == renderedHeight_ && !ensureVisible) return; renderedHeight_ = height; if (scrollToBottom) root_.getElement().setScrollTop(root_.getElement().getScrollHeight()); if (chunkOutputSize_ != ChunkOutputSize.Full) frame_.getElement().getStyle().setHeight(height, Unit.PX); host_.onOutputHeightChanged(this, height + 7, ensureVisible); }
Source:
<code>private void generateAspects(ITmfEventField[] fieldsArray) { ImmutableList.Builder<ITmfEventAspect> builder = new ImmutableList.Builder<>(); builder.add(ITmfEventAspect.BaseAspects.TIMESTAMP); builder.add(ITmfEventAspect.BaseAspects.EVENT_TYPE); for (ITmfEventField field : fieldsArray) { String name = field.getName(); if (name == null) { break; } ITmfEventAspect aspect = ITmfEventAspect.BaseAspects.CONTENTS.createAspect(name, name); if (name.equals(ASPECT_CPU)) { <START> aspect = new XmlStubCpuAspect((TmfEventFieldAspect) aspect); <END> } builder.add(aspect); } builder.add(ITmfEventAspect.BaseAspects.CONTENTS); @SuppressWarnings("null") @NonNull Collection<ITmfEventAspect> aspectList = builder.build(); fAspects = aspectList; }</code><technical_language>generates a class cast exception</technical_language>

Target:
private void generateAspects(ITmfEventField[] fieldsArray) { ImmutableList.Builder<ITmfEventAspect> builder = new ImmutableList.Builder<>(); builder.add(ITmfEventAspect.BaseAspects.TIMESTAMP); builder.add(ITmfEventAspect.BaseAspects.EVENT_TYPE); for (ITmfEventField field : fieldsArray) { String name = field.getName(); if (name == null) { break; } final ITmfEventAspect aspect = ITmfEventAspect.BaseAspects.CONTENTS.createAspect(name, name); if (name.equals(ASPECT_CPU)) { builder.add(new TmfCpuAspect() { @Override public @Nullable Integer resolve(ITmfEvent event) { Object result = aspect.resolve(event); if (result instanceof Number) { return ((Number) result).intValue(); } return null; } }); } else { builder.add(aspect); } } builder.add(ITmfEventAspect.BaseAspects.CONTENTS); @SuppressWarnings("null") @NonNull Collection<ITmfEventAspect> aspectList = builder.build(); fAspects = aspectList; }
Source:
<code>public Collection<ThingUID> removeOlderResults(DiscoveryService source, long timestamp, Collection<ThingTypeUID> thingTypeUIDs) { HashSet<ThingUID> removedThings = new HashSet<>(); String sourceName = source.getClass().getName(); for (DiscoveryResult discoveryResult : getAll()) { <START> String discovererName = resultDiscovererMap.get(discoveryResult); <END> if (thingTypeUIDs.contains(discoveryResult.getThingTypeUID()) && discoveryResult.getTimestamp() < timestamp && sourceName.equals(discovererName)) { ThingUID thingUID = discoveryResult.getThingUID(); removedThings.add(thingUID); remove(thingUID); logger.debug("Removed from inbox because it was older than {}", thingUID, new Date(timestamp)); } } return removedThings; }</code><technical_language>"PersistentInbox" here. discovererName null if discoveryResult loaded storage discoveryResults removed again. I assume sourceName need persisted in order correctly implement this</technical_language>

Target:
public Collection<ThingUID> removeOlderResults(DiscoveryService source, long timestamp, Collection<ThingTypeUID> thingTypeUIDs) { HashSet<ThingUID> removedThings = new HashSet<>(); for (DiscoveryResult discoveryResult : getAll()) { Class<?> discoverer = resultDiscovererMap.get(discoveryResult); if (thingTypeUIDs.contains(discoveryResult.getThingTypeUID()) && discoveryResult.getTimestamp() < timestamp && (discoverer == null || source.getClass() == discoverer)) { ThingUID thingUID = discoveryResult.getThingUID(); removedThings.add(thingUID); remove(thingUID); logger.debug("Removed from inbox because it was older than {}", thingUID, new Date(timestamp)); } } return removedThings; }
Source:
<code>public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("diagnosis"); description.addRequiredProperty("encounter"); <START> description.addRequiredProperty("uuid"); <END> description.addRequiredProperty("condition"); description.addRequiredProperty("rank"); description.removeProperty("patient"); description.addRequiredProperty("patient"); description.addRequiredProperty("voided"); return description; }</code><technical_language>uuid is updatable</technical_language>

Target:
public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("diagnosis"); description.addRequiredProperty("condition"); description.addRequiredProperty("rank"); description.removeProperty("patient"); description.addRequiredProperty("voided"); description.addRequiredProperty("certainty"); description.addRequiredProperty("encounter"); return description; }
Source:
<code>public void obviousCallsTest() { final double[] weights = new double[] {0.5, 0.5}; final double[] minorAlleleFractions = new double[] {0.1, 0.5}; final double memoryLength = 1e3; <START> AlleleFractionHiddenMarkovModel model = new AlleleFractionHiddenMarkovModel(minorAlleleFractions, weights, <END> memoryLength, AllelicPanelOfNormals.EMPTY_PON, NO_BIAS_OR_OUTLIERS_PARAMS); final Random random = new Random(13); final int chainLength = 10000; final List<SimpleInterval> positions = new ArrayList<>(); final List<AllelicCount> data = new ArrayList<>(); int position = 1; for (int n = 0; n < chainLength; n++) { position += random.nextInt((int) (2*memoryLength)) + (int) memoryLength; final SimpleInterval interval = new SimpleInterval("chr1", position, position); positions.add(interval); if ( n < 2500) { data.add(new AllelicCount(interval, 10, 90)); } else if ( n < 5000) { data.add(new AllelicCount(interval, 50, 50)); } else if ( n < 7500) { data.add(new AllelicCount(interval, 90, 10)); } else { data.add(new AllelicCount(interval, 40, 60)); } } List<Integer> states = ViterbiAlgorithm.apply(data, positions, model); for (int pos = 0; pos < chainLength; pos++) { if ( pos < 2500) { Assert.assertEquals((int) states.get(pos), 0); } else if ( pos < 5000) { Assert.assertEquals((int) states.get(pos), 1); } else if ( pos < 7500) { Assert.assertEquals((int) states.get(pos), 0); } else { Assert.assertEquals((int) states.get(pos), 1); } } }</code><technical_language>final</technical_language>

Target:
public void obviousCallsTest() { final double[] weights = new double[] {0.5, 0.5}; final double[] minorAlleleFractions = new double[] {0.1, 0.5}; final double memoryLength = 1e3; final AlleleFractionHiddenMarkovModel model = new AlleleFractionHiddenMarkovModel(minorAlleleFractions, weights, memoryLength, AllelicPanelOfNormals.EMPTY_PON, NO_BIAS_OR_OUTLIERS_PARAMS); final Random random = new Random(13); final int chainLength = 10000; final List<SimpleInterval> positions = new ArrayList<>(); final List<AllelicCount> data = new ArrayList<>(); int position = 1; for (int n = 0; n < chainLength; n++) { position += random.nextInt((int) (2*memoryLength)) + (int) memoryLength; final SimpleInterval interval = new SimpleInterval("chr1", position, position); positions.add(interval); if (n < 2500) { data.add(new AllelicCount(interval, 10, 90)); } else if ( n < 5000) { data.add(new AllelicCount(interval, 50, 50)); } else if ( n < 7500) { data.add(new AllelicCount(interval, 90, 10)); } else { data.add(new AllelicCount(interval, 40, 60)); } } final List<Integer> states = ViterbiAlgorithm.apply(data, positions, model); for (int pos = 0; pos < chainLength; pos++) { if (pos < 2500) { Assert.assertEquals((int) states.get(pos), 0); } else if (pos < 5000) { Assert.assertEquals((int) states.get(pos), 1); } else if (pos < 7500) { Assert.assertEquals((int) states.get(pos), 0); } else { Assert.assertEquals((int) states.get(pos), 1); } } }
Source:
<code>public C requestMatchers(RequestMatcher... requestMatchers) { <START> if (!Objects.equals(requestMatchers[0], AnyRequestMatcher.INSTANCE)){ <END> Assert.state(!this.anyRequestConfigured, "Can't configure requestMatchers after anyRequest"); } return chainRequestMatchers(Arrays.asList(requestMatchers)); }</code><technical_language>do more tweak here. I understand need this check in order for anyMatcher work correctly, current solution break this scenario: java .anyMatcher() .requestMatchers(AnyRequestMatcher.INSTANCE) While odd for a user do this, want consistent in behavior. java .anyMatcher() .anyMatcher() is disallowed, earlier disallowed. break here: java .anyMatcher() .requestMatchers(AnyRequestMatcher.INSTANCE, new UrlPathRequestMatcher("/path")) I answer lies in adjusting anyRequest method implementation. If set anyRequestConfigured is configured, I extra if check is unnecessary: java public C anyRequest() { Assert.state(!this.anyRequestConfigured, "Can't configure anyRequest itself"); C configurer = requestMatchers(ANY_REQUEST); this.anyRequestConfigured = true; return configurer; }</technical_language>

Target:
public C requestMatchers(RequestMatcher... requestMatchers) { Assert.state(!this.anyRequestConfigured, "Can't configure requestMatchers after anyRequest"); return chainRequestMatchers(Arrays.asList(requestMatchers)); }
Source:
<code>public static File fileToHtml(String infilexml, String infilexsl, String outfilename) { Document doc = null; File stylesheet = null; File datafile = null; File outfile = null; try { stylesheet = new File(infilexsl); datafile = new File(infilexml); outfile = new File(outfilename); DocumentBuilder builder = XmlUtils.newXxeDisabledDocumentBuilderFactory().newDocumentBuilder(); doc = builder.parse(datafile); TransformerFactory tFactory = TransformerFactory.newInstance(); StreamSource stylesource = new StreamSource(stylesheet); Transformer transformer = tFactory.newTransformer(stylesource); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(outfile); transformer.transform(source, result); } catch (TransformerException | SAXException | ParserConfigurationException | IOException e) { showDialogForGUI(); logger.error(e.getMessage(), e); <START> return outfile; <END> } finally { } return outfile; }</code><technical_language>This is necessary, next statement returns</technical_language>

Target:
public static File fileToHtml(String infilexml, String infilexsl, String outfilename) { Document doc = null; File stylesheet = null; File datafile = null; File outfile = null; try { stylesheet = new File(infilexsl); datafile = new File(infilexml); outfile = new File(outfilename); DocumentBuilder builder = XmlUtils.newXxeDisabledDocumentBuilderFactory().newDocumentBuilder(); doc = builder.parse(datafile); TransformerFactory tFactory = TransformerFactory.newInstance(); StreamSource stylesource = new StreamSource(stylesheet); Transformer transformer = tFactory.newTransformer(stylesource); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(outfile); transformer.transform(source, result); } catch (TransformerException | SAXException | ParserConfigurationException | IOException e) { showDialogForGUI(); logger.error(e.getMessage(), e); } finally { } return outfile; }
Source:
<code>public static boolean accept(String name) { try { getFactory(name); return true; } catch (IllegalArgumentException e) { <START> return false; <END> } }</code><technical_language>expensive check if exists ... if other way, this do</technical_language>

Target:
public static boolean accept(String name) { return MESSAGE_FACTORIES_NAMES.contains(name); }
Source:
<code>public void disconnect(ChatComponent reason) { NetState state = this.currentState; if (state == NetState.LOGIN) { this.sendPacket(new LoginOutDisconnect(reason)) .addListener(future -> this.channel.close()); } else if (state == NetState.PLAY) { this.sendPacket(new PlayOutDisconnect(reason)) .addListener(future -> this.channel.close()); this.player.remove(); } else { this.channel.close(); } <START> if (name != null) { <END> ChatComponent chat = ChatComponent.create() .setColor(ChatColor.YELLOW) .setTranslate("multiplayer.player.left") .addWith(name); TridentServer.instance().players().forEach(e -> e.sendMessage(chat, ChatType.CHAT)); } }</code><technical_language>Player messages a disconnecting _player_ instead of a closed _connection_</technical_language>

Target:
public void disconnect(ChatComponent reason) { NetState state = this.currentState; if (state == NetState.LOGIN) { this.sendPacket(new LoginOutDisconnect(reason)) .addListener(future -> this.channel.close()); } else if (state == NetState.PLAY) { this.sendPacket(new PlayOutDisconnect(reason)) .addListener(future -> this.channel.close()); this.player.remove(); } else { this.channel.close(); } }
Source:
<code>public SnappyCompressor(int directBufferSize) { try { SnappyLoader.getVersion(); } catch (Throwable t) { <START> throw new RuntimeException("native snappy library not available: " + <END> "SnappyCompressor has not been loaded.", t); } this.directBufferSize = directBufferSize; uncompressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize); compressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize); compressedDirectBuf.position(directBufferSize); }</code><technical_language>Is 'native snappy library' is missing java-snappy jar</technical_language>

Target:
public SnappyCompressor(int directBufferSize) { this.directBufferSize = directBufferSize; uncompressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize); compressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize); compressedDirectBuf.position(directBufferSize); }
Source:
<code>private List<PickerMilestone> convertToPickerMilestones(TurboIssue issue, List<TurboMilestone> milestones) { List<PickerMilestone> originalMilestones = new ArrayList<>(); <START> for (int i = 0; i < milestones.size(); i++) { <END> PickerMilestone convertedMilestone = new PickerMilestone(milestones.get(i)); if (isExistingMilestone(issue, convertedMilestone)) { convertedMilestone.setExisting(true); } originalMilestones.add(convertedMilestone); } Collections.sort(originalMilestones); selectExistingMilestone(originalMilestones, issue); return originalMilestones; }</code><technical_language>iterate enhanced for loop</technical_language>

Target:
private List<PickerMilestone> convertToPickerMilestones(TurboIssue issue, List<TurboMilestone> milestones) { List<PickerMilestone> originalMilestones = new ArrayList<>(); milestones.stream() .forEach(milestone -> { PickerMilestone convertedMilestone = new PickerMilestone(milestone); if (isExistingMilestone(issue, convertedMilestone)) { convertedMilestone.setExisting(true); } originalMilestones.add(convertedMilestone); }); Collections.sort(originalMilestones); return originalMilestones; }
Source:
<code>protected AppInstallStatus doTaskBackground(Void... params) { CommCareApp app = CommCareApplication._().getCurrentApp(); app.setupSandbox(); AndroidCommCarePlatform platform = app.getCommCarePlatform(); AndroidResourceManager resourceManager = new AndroidResourceManager(platform); if (!resourceManager.isUpgradeTableStaged()) { <START> resourceManager.recordUpdateInstallFailure(AppInstallStatus.UnknownFailure); <END> return AppInstallStatus.UnknownFailure; } try { resourceManager.upgrade(); } catch (UnresolvedResourceException e) { resourceManager.recordUpdateInstallFailure(e); return AppInstallStatus.UnknownFailure; } ResourceInstallUtils.initAndCommitApp(app); return AppInstallStatus.Installed; }</code><technical_language>Depends this stuff for, worth making AppInstall Status expresses "we thought a staged upgrade table install it", instead of UnknownFailure</technical_language>

Target:
protected AppInstallStatus doTaskBackground(Void... params) { return installStagedUpdate(); }
Source:
<code>public void testTypes() { tEnv().executeSql(TABLE); tEnv().executeSql(SINK); <START> tEnv().from("datagen_t").executeInsert("sink"); <END> execInsertTableAndWaitResult( tEnv().from("datagen_t"), "sink"); }</code><technical_language>use: Lists.newArrayList(tEnv().executeSql("select * datagen_t").collect()). In this way, types verified</technical_language>

Target:
public void testTypes() throws Exception { tEnv().executeSql(TABLE); List<Row> results = new ArrayList<>(); try (CloseableIterator<Row> iter = tEnv().executeSql("select * from datagen_t").collect()) { while (iter.hasNext()) { results.add(iter.next()); } } Assert.assertEquals("Unexpected number of results",10, results.size()); }
Source:
<code>public void triggerLogoutWarning() { AlertDialog.Builder builder = new AlertDialog.Builder(this); <START> builder.setTitle("Logging our your app"); <END> builder.setMessage(R.string.logout_warning) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); installApp(); } }) .setNegativeButton("CANCEL", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); AlertDialog dialog = builder.create(); dialog.show(); }</code><technical_language>"our" => "out"</technical_language>

Target:
private void triggerLogoutWarning() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.logging_out); builder.setMessage(R.string.logout_warning) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); CommCareApplication._().expireUserSession(); installApp(); } }) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); AlertDialog dialog = builder.create(); dialog.show(); }
Source:
<code>public Response add(Storage storage) { <START> validateParameters(storage, "address", "type", "host"); <END> StorageServerConnections storageConnection = getMapper(Storage.class, StorageServerConnections.class).map(storage, null); Guid hostId = getHostId(storage.getHost()); switch (storageConnection.getstorage_type()) { case ISCSI: validateParameters(storage, "iqn", "port"); break; case NFS: case LOCALFS: validateParameters(storage, "path"); break; case POSIXFS: case GLUSTERFS: validateParameters(storage, "path", "vfsType"); break; default: break; } return performCreate(VdcActionType.AddStorageServerConnection, getAddParams(storageConnection, hostId), ENTITY_RETRIEVER); }</code><technical_language>1. checking host existence, id name specified, i.e "host.id|name" 2. "address" relevant for storage types? ..</technical_language>

Target:
public Response add(Storage storage) { validateParameters(storage, "address", "type", "host.id|name"); StorageServerConnections storageConnection = getMapper(Storage.class, StorageServerConnections.class).map(storage, null); Guid hostId = getHostId(storage.getHost()); switch (storageConnection.getstorage_type()) { case ISCSI: validateParameters(storage, "iqn", "port"); break; case NFS: case LOCALFS: validateParameters(storage, "path"); break; case POSIXFS: case GLUSTERFS: validateParameters(storage, "path", "vfsType"); break; default: break; } return performCreate(VdcActionType.AddStorageServerConnection, getAddParams(storageConnection, hostId), ENTITY_RETRIEVER); }
Source:
<code>private String expandStashURL(Run<?, ?> run, final TaskListener listener) { String url = stashServerBaseUrl; DescriptorImpl descriptor = getDescriptor(); <START> if ("".equals(url) || url == null) { <END> url = descriptor.getStashRootUrl(); } try { if (!(run instanceof AbstractBuild<?, ?>)) { url = TokenMacro.expandAll(run, new FilePath(run.getRootDir()), listener, url); } else { url = TokenMacro.expandAll((AbstractBuild<?, ?>) run, listener, url); } } catch (IOException | InterruptedException | MacroEvaluationException ex) { PrintStream logger = listener.getLogger(); logger.println("Unable to expand Stash Server URL"); ex.printStackTrace(logger); } return url; }</code><technical_language>this (url == null || url.isEmpty() ) changes</technical_language>

Target:
private String expandStashURL(Run<?, ?> run, final TaskListener listener) { String url = stashServerBaseUrl; DescriptorImpl descriptor = getDescriptor(); if (url == null || url.isEmpty()) { url = descriptor.getStashRootUrl(); } try { if (!(run instanceof AbstractBuild<?, ?>)) { url = TokenMacro.expandAll(run, new FilePath(run.getRootDir()), listener, url); } else { url = TokenMacro.expandAll((AbstractBuild<?, ?>) run, listener, url); } } catch (IOException | InterruptedException | MacroEvaluationException ex) { PrintStream logger = listener.getLogger(); logger.println("Unable to expand Stash Server URL"); ex.printStackTrace(logger); } return url; }
Source:
<code>public String getUrl() { String url = type.getUrl(host, port, database); if (this.type == DBMSType.MYSQL) { url += "?allowPublicKeyRetrieval=true"; <START> url += "&useSSL=" + this.isUseSSL(); <END> } return url; }</code><technical_language>Please extract this allowPublicKey a property in DBMSConnectionProperties do url for this. server options passed property connection manager in DBMSConnection. SSL is duplicated is there. this.connection = DriverManager.getConnection(connectionProperties.getUrl(), connectionProperties.asProperties());</technical_language>

Target:
public String getUrl() { String url = type.getUrl(host, port, database); return url; }
Source:
<code>public void should_notMapTaskVariables_when_thereIsNoMapping() { ProcessInstance processInstance = processBaseRuntime.startProcessWithProcessDefinitionKey(TASK_NO_MAPPING); List<Task> tasks = taskBaseRuntime.getTasksByProcessInstanceId(processInstance.getId()); <START> assertThat(tasks).isNotEmpty(); <END> assertThat(tasks).hasSize(1); Task task = tasks.get(0); assertThat(task.getName()).isEqualTo("testSimpleTask"); List<VariableInstance> procVariables = processBaseRuntime.getProcessVariablesByProcessId(processInstance.getId()); assertThat(procVariables) .isNotNull() .extracting(VariableInstance::getName, VariableInstance::getValue) .containsOnly(tuple("process_variable_unmapped_1", "unmapped1Value"), tuple("process_variable_inputmap_1", "inputmap1Value"), tuple("process_variable_outputmap_1", "outputmap1Value")); List<VariableInstance> taskVariables = taskBaseRuntime.getTasksVariablesByTaskId(task.getId()); assertThat(taskVariables) .isEmpty(); Map<String, Object> variables = new HashMap<>(); variables.put("task_input_variable_name_1", "outputValue"); variables.put("task_output_variable_name_1", "outputTaskValue"); taskBaseRuntime.completeTask(task.getId(), variables); assertThat(procVariables) .isNotNull() .extracting(VariableInstance::getName, VariableInstance::getValue) .containsOnly(tuple("process_variable_unmapped_1", "unmapped1Value"), tuple("process_variable_inputmap_1", "inputmap1Value"), tuple("process_variable_outputmap_1", "outputmap1Value")); processBaseRuntime.delete(processInstance.getId()); }</code><technical_language>Tip: need this check hasSize(1) complain if empty</technical_language>

Target:
public void should_notMapTaskVariables_when_thereIsNoMapping() { ProcessInstance processInstance = processBaseRuntime.startProcessWithProcessDefinitionKey(TASK_NO_MAPPING); List<Task> tasks = taskBaseRuntime.getTasksByProcessInstanceId(processInstance.getId()); assertThat(tasks).hasSize(1); Task task = tasks.get(0); assertThat(task.getName()).isEqualTo("testSimpleTask"); List<VariableInstance> procVariables = processBaseRuntime.getProcessVariablesByProcessId(processInstance.getId()); assertThat(procVariables) .isNotNull() .extracting(VariableInstance::getName, VariableInstance::getValue) .containsOnly(tuple("process_variable_unmapped_1", "unmapped1Value"), tuple("process_variable_inputmap_1", "inputmap1Value"), tuple("process_variable_outputmap_1", "outputmap1Value")); List<VariableInstance> taskVariables = taskBaseRuntime.getTasksVariablesByTaskId(task.getId()); assertThat(taskVariables) .isEmpty(); Map<String, Object> variables = new HashMap<>(); variables.put("task_input_variable_name_1", "outputValue"); variables.put("task_output_variable_name_1", "outputTaskValue"); taskBaseRuntime.completeTask(task.getId(), variables); assertThat(procVariables) .isNotNull() .extracting(VariableInstance::getName, VariableInstance::getValue) .containsOnly(tuple("process_variable_unmapped_1", "unmapped1Value"), tuple("process_variable_inputmap_1", "inputmap1Value"), tuple("process_variable_outputmap_1", "outputmap1Value")); }
Source:
<code>public UpdateCalibrationResponse putBatchCalibration(@Auth final AccessToken accessToken, final List<Calibration> calibrations) { if (calibrations.size() > CalibrationDynamoDB.MAX_PUT_SIZE){ <START> throw new WebApplicationException(Response.status(400).entity(new JsonError(400, String.format("Batch size shhould be less than %s", CalibrationDynamoDB.MAX_PUT_SIZE))).build()); <END> } final Map<String, Optional<Boolean>> putBatchResponse = calibrationDAO.putBatch(calibrations); return UpdateCalibrationResponse.createFromPutBatchResponse(putBatchResponse); }</code><technical_language>typo</technical_language>

Target:
public UpdateCalibrationResponse putBatchCalibration(@Auth final AccessToken accessToken, final List<Calibration> calibrations) { if (calibrations.size() > CalibrationDynamoDB.MAX_PUT_SIZE){ throw new WebApplicationException(Response.status(400).entity(new JsonError(400, String.format("Batch size should be less than %s", CalibrationDynamoDB.MAX_PUT_SIZE))).build()); } final Map<String, Optional<Boolean>> putBatchResponse = calibrationDAO.putBatch(calibrations); return UpdateCalibrationResponse.createFromPutBatchResponse(putBatchResponse); }
Source:
<code>public DeleteByQueryResultAssessor(JestAPIFormatter formatter) { <START> super(); <END> this.formatter = formatter; this.delegate = DefaultBackendRequestResultAssessor.builder( formatter ) .ignoreErrorStatuses( NOT_FOUNT_HTTP_STATUS_CODE ).build(); }</code><technical_language>need for super() here</technical_language>

Target:
public DeleteByQueryResultAssessor(JestAPIFormatter formatter) { this.formatter = formatter; this.delegate = DefaultBackendRequestResultAssessor.builder( formatter ) .ignoreErrorStatuses( NOT_FOUND_HTTP_STATUS_CODE ).build(); }
Source:
<code>public void testAllScriptsNotContainAPIBinding() throws InvalidScriptException { Script s = scriptWithoutApiBinding(); FlowScript fs = flowScriptWithoutApiBinding(); Mockito.when(it.getPreScript()).thenReturn(s); Mockito.when(it.getPostScript()).thenReturn(s); Mockito.when(sec.getScript()).thenReturn(s); Mockito.when(fe.getEnvScript()).thenReturn(s); Mockito.when(it.getFlowScript()).thenReturn(fs); Boolean result = new CheckEligibleTaskDescriptorScript().isTaskContainsAPIBinding(etd); <START> assertEquals(false, result); <END> }</code><technical_language>assertFalse(result) assertThat(result, is(false)) instead of assertEquals is relevant in this case</technical_language>

Target:
public void testAllScriptsNotContainAPIBinding() throws InvalidScriptException { Script s = scriptWithoutApiBinding(); FlowScript fs = flowScriptWithoutApiBinding(); Mockito.when(it.getPreScript()).thenReturn(s); Mockito.when(it.getPostScript()).thenReturn(s); Mockito.when(sec.getScript()).thenReturn(s); Mockito.when(fe.getEnvScript()).thenReturn(s); Mockito.when(it.getFlowScript()).thenReturn(fs); assertFalse(new CheckEligibleTaskDescriptorScript().isTaskContainsAPIBinding(etd)); }
Source:
<code>private Map<String, ?> getSystemProperties(Map<String, Object> metadata) { if (version.equals(MigrationContextImpl.SYSTEM_PROPERTIES_NOT_EXPORTED_VERSION)) { return AccessUtils.doPrivileged( () -> { <START> ImportMigrationContext platformMigrationContext = <END> contexts.get(MigrationContextImpl.PLATFORM_MIGRATABLE_ID); try { URL systemPropsURL = new URL( null, MigrationURLConnection.SYSTEM_PROPERTIES_URL, new URLStreamHandler() { @Override protected URLConnection openConnection(URL u) throws IOException { return new MigrationURLConnection(u, platformMigrationContext); } }); return PropertiesLoader.loadPropertiesFile(systemPropsURL, true); } catch (Exception e) { throw new MigrationException(Messages.IMPORT_SYSTEM_PROPERTIES_ERROR, e); } }); } return JsonUtils.getMapFrom( metadata, MigrationContextImpl.METADATA_EXPANDED_SYSTEM_PROPERTIES, true); }</code><technical_language>Complex for a lambda. Time move a private method reference here</technical_language>

Target:
private Map<String, ?> getSystemProperties(Map<String, Object> metadata) { if (version.equals(MigrationContextImpl.SYSTEM_PROPERTIES_NOT_EXPORTED_VERSION)) { ImportMigrationContext platformMigrationContext = contexts.get(MigrationContextImpl.PLATFORM_MIGRATABLE_ID); return AccessUtils.doPrivileged( () -> getSystemPropertiesFromContext(platformMigrationContext)); } return JsonUtils.getMapFrom( metadata, MigrationContextImpl.METADATA_EXPANDED_SYSTEM_PROPERTIES, true); }
Source:
<code>protected CreateContainerCmd dockerCommand() { ExposedPort consulHTTPPort = ExposedPort.tcp(ConsulConfig.CONSUL_HTTP_PORT); ExposedPort consulDNSPort = ExposedPort.udp(ConsulConfig.CONSUL_DNS_PORT); Ports portBindings = new Ports(); if (getCluster().isExposedHostPorts()) { portBindings.bind(consulHTTPPort, Ports.Binding(ConsulConfig.CONSUL_HTTP_PORT)); } <START> portBindings.bind(consulDNSPort, Ports.Binding("172.17.0.1", 53)); <END> return dockerClient.createContainerCmd(config.getImageName() + ":" + config.getImageTag()) .withName(getName()) .withPortBindings(portBindings) .withExposedPorts(consulHTTPPort, consulDNSPort); }</code><technical_language>do a docker inspect agent Gateway frank@franktop:~$ docker inspect e65 | grep Gateway "Gateway": "172.17.0.1", "IPv6Gateway": "", "Gateway": "172.17.0.1", "IPv6Gateway": "", In DockerUtil. cache value</technical_language>

Target:
protected CreateContainerCmd dockerCommand() { ExposedPort consulHTTPPort = ExposedPort.tcp(ConsulConfig.CONSUL_HTTP_PORT); ExposedPort consulDNSPort = ExposedPort.udp(ConsulConfig.CONSUL_DNS_PORT); Ports portBindings = new Ports(); if (getCluster().isExposedHostPorts()) { portBindings.bind(consulHTTPPort, Ports.Binding(ConsulConfig.CONSUL_HTTP_PORT)); } String gatewayIpAddress = DockerContainersUtil.getGatewayIpAddress(dockerClient); portBindings.bind(consulDNSPort, Ports.Binding(gatewayIpAddress, DNS_PORT)); return dockerClient.createContainerCmd(config.getImageName() + ":" + config.getImageTag()) .withName(getName()) .withPortBindings(portBindings) .withExposedPorts(consulHTTPPort, consulDNSPort); }
Source:
<code>protected void cleanup(IProgressMonitor monitor, Map<String, IProject> projectMapping) { <START> addProjectsToSession(projectMapping); <END> for (IProject project : projectMapping.values()) activityQueuer.disableQueuing(project); super.cleanup(monitor, projectMapping); }</code><technical_language>is this called in cleanup end of transfer(...) method? basically order (only checkCancellation(...) called instead of beforehand). big difference current implementation, addprojectToSession(...) call is located in finally block, meaning executed incoming project negotiation fails. This is wrong behavior sense add "shared" resources session negotiation/resource sharing failed</technical_language>

Target:
protected void cleanup(IProgressMonitor monitor, Map<String, IProject> projectMapping) { for (IProject project : projectMapping.values()) activityQueuer.disableQueuing(project); super.cleanup(monitor, projectMapping); }
Source:
<code>private void extractDataSourceMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel datasourceClass = getJavaClass(javaTypeReference); String dataSourceName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(dataSourceName)) { dataSourceName = datasourceClass.getClassName(); } String isXaString = getAnnotationLiteralValue(annotationTypeReference, "transactional"); boolean isXa = isXaString == null || Boolean.getBoolean(isXaString); Service<DataSourceModel> dataSourceService = new GraphService<>(event.getGraphContext(), DataSourceModel.class); DataSourceModel dataSourceModel = dataSourceService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); dataSourceModel.setApplications(applications); dataSourceModel.setName(dataSourceName); <START> dataSourceModel.setXa(isXa); <END> }</code><technical_language>dataSourceModel.setJndiLocation(dataSourceName) added _Server Resource Report_ [server.ftl](<LINK_0> shows JNDI location</technical_language>

Target:
private void extractDataSourceMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel datasourceClass = getJavaClass(javaTypeReference); String dataSourceName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(dataSourceName)) { dataSourceName = datasourceClass.getClassName(); } String isXaString = getAnnotationLiteralValue(annotationTypeReference, "transactional"); boolean isXa = isXaString == null || Boolean.getBoolean(isXaString); Service<DataSourceModel> dataSourceService = new GraphService<>(event.getGraphContext(), DataSourceModel.class); DataSourceModel dataSourceModel = dataSourceService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); dataSourceModel.setApplications(applications); dataSourceModel.setName(dataSourceName); dataSourceModel.setXa(isXa); dataSourceModel.setJndiLocation(dataSourceName); }
Source:
<code><START> public ScanStatus getScanStatus() { <END> if (scanStatus == null) { scanStatus = new ScanStatus( new ImageIcon( ExtensionPassiveScan.class.getResource("/resource/icon/16/pscan.png")), Constant.messages.getString("pscan.footer.label")); } return scanStatus; }</code><technical_language>protected. - counter reset session changes (otherwise show outdated number, previous session)</technical_language>

Target:
protected ScanStatus getScanStatus() { if (scanStatus == null) { scanStatus = new ScanStatus( new ImageIcon( ExtensionPassiveScan.class.getResource("/resource/icon/16/pscan.png")), Constant.messages.getString("pscan.footer.label")); } return scanStatus; }
Source:
<code><START> public SamplingDistribution(Operator child, float samplePercentage, <END> SamplingType sampleType, Long randomSeed) { this(child, sampleType, randomSeed); this.isPercentageSample = true; this.samplePercentage = samplePercentage; Preconditions.checkState(samplePercentage >= 0 && samplePercentage <= 100, "Sample Percentage must be >= 0 && <= 100: %s", samplePercentage); }</code><technical_language>Is "percentage" necessarily right interface? more natural implementation perspective a float 0 1, if target audience is scientists, more natural for (just as, say, p-values expressed real number fractions, percentages). Additionally, a "percentage" parameter leaves ambiguous integer values acceptable (though float type obvious, type visible in JSON query plans). Anyway, devil's advocate here, wrong choice</technical_language>

Target:
public SamplingDistribution(Operator child, float samplePercentage, SamplingType sampleType, Long randomSeed) { this(child, sampleType, randomSeed); this.isPercentageSample = true; this.samplePercentage = samplePercentage; Preconditions.checkArgument(samplePercentage >= 0 && samplePercentage <= 100, "Sample Percentage must be >= 0 && <= 100: %s", samplePercentage); }
Source:
<code>public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); refractiveReflectiveFbo = requiresFBO(new FBOConfig(REFRACTIVE_REFLECTIVE, FULL_SCALE, FBO.Type.HDR).useNormalBuffer(), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(REFRACTIVE_REFLECTIVE, displayResolutionDependentFBOs)); <START> readOnlyGBufferFbo = displayResolutionDependentFBOs.get(READONLY_GBUFFER); <END> addDesiredStateChange(new EnableMaterial(CHUNK_SHADER.toString())); chunkShader = getMaterial(CHUNK_SHADER); displayResolutionDependentFBOs.subscribe(this); }</code><technical_language>Do need this line here? readOnlyGBufferFbo in update(), is refetched</technical_language>

Target:
public void initialise() { playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); requiresFBO(new FBOConfig(REFRACTIVE_REFLECTIVE, FULL_SCALE, FBO.Type.HDR).useNormalBuffer(), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(REFRACTIVE_REFLECTIVE, displayResolutionDependentFBOs)); update(); displayResolutionDependentFBOs.subscribe(this); addDesiredStateChange(new EnableMaterial(CHUNK_SHADER.toString())); chunkShader = getMaterial(CHUNK_SHADER); }
Source:
<code>public void shutdownRevisionExecutor() throws InterruptedException { getRevisionExecutor().shutdownNow(); <START> getRevisionExecutor().awaitTermination(0, TimeUnit.SECONDS); <END> }</code><technical_language>Is effective difference awaiting 0 awaiting</technical_language>

Target:
public void shutdownRevisionExecutor() throws InterruptedException { getRevisionExecutor().shutdownNow(); getRevisionExecutor().awaitTermination(getCommandTimeout(), TimeUnit.SECONDS); }
Source:
<code><START> private void testGetInsertion() throws Exception { <END> String url = "/ats/program/" + getSawProgram().getArtId() + "/insertion"; JsonArray array = getAndCheck(url); JsonObject obj = getObjectNamed("JAX Insertion", array); Assert.assertNotNull("Did not find value Jax Insertion", obj); }</code><technical_language>getUuid instead of getArtId,</technical_language>

Target:
private void testGetInsertion() throws Exception { String url = "/ats/program/" + getSawProgram().getUuid() + "/insertion"; JsonArray array = getAndCheck(url); JsonObject obj = getObjectNamed("JAX Insertion", array); Assert.assertNotNull("Did not find value Jax Insertion", obj); }
Source:
<code>public void testFilterSortingMigration() { ResourceSet set = new ResourceSetImpl(); DAnalysis analysis = null; try { analysis = (DAnalysis) ModelUtils.load(URI.createPlatformResourceURI(TEMPORARY_PROJECT_NAME + "/" + SESSION_RESOURCE_NAME, true), set); } catch (IOException e) { failCheckData(); } assertNotNull("Check the representation file test data.", analysis); String version = analysis.getVersion(); assertTrue("Before save, the migration framework will return true even if the migration has been done during load.", RepresentationsFileMigrationService.getInstance().isMigrationNeeded(Version.parseVersion(version))); try { analysis.eResource().save(Collections.emptyMap()); } catch (IOException e) { failCheckData(); } <START> version = <END> analysis.getVersion(); DDiagram diagram = (DDiagram) analysis.getOwnedViews().get(0).getOwnedRepresentationDescriptors().get(0).getRepresentation(); assertEquals("Activated filters have not been sorted.", "ClassFilter", diagram.getActivatedFilters().get(0).getName()); assertEquals("Activated filters have not been sorted.", "ClassFilter2", diagram.getActivatedFilters().get(1).getName()); assertFalse(getErrorLoggersMessage(), doesAnErrorOccurs()); }</code><technical_language>test isMigrationNeeded returns false</technical_language>

Target:
public void testFilterSortingMigration() { ResourceSet set = new ResourceSetImpl(); DAnalysis analysis = null; try { analysis = (DAnalysis) ModelUtils.load(URI.createPlatformResourceURI(TEMPORARY_PROJECT_NAME + "/" + SESSION_RESOURCE_NAME, true), set); } catch (IOException e) { failCheckData(); } assertNotNull("Check the representation file test data.", analysis); String version = analysis.getVersion(); assertTrue("Before save, the migration framework will return true even if the migration has been done during load.", RepresentationsFileMigrationService.getInstance().isMigrationNeeded(Version.parseVersion(version))); try { analysis.eResource().save(Collections.emptyMap()); } catch (IOException e) { failCheckData(); } version = analysis.getVersion(); assertFalse("The version tag should now be set telling that the migration was done.", RepresentationsFileMigrationService.getInstance().isMigrationNeeded(Version.parseVersion(version))); DDiagram diagram = (DDiagram) analysis.getOwnedViews().get(0).getOwnedRepresentationDescriptors().get(0).getRepresentation(); assertEquals("Activated filters have not been sorted.", "ClassFilter", diagram.getActivatedFilters().get(0).getName()); assertEquals("Activated filters have not been sorted.", "ClassFilter2", diagram.getActivatedFilters().get(1).getName()); assertFalse(getErrorLoggersMessage(), doesAnErrorOccurs()); }
Source:
<code>private ChannelPool getDataChannelPool() throws IOException { String host = options.getDataHost(); int channelCount = options.getChannelCount(); <START> if (options.useCachedChannel() && !CredentialOptions.nullCredential().equals(options.getCredentialOptions())) { <END> synchronized (BigtableSession.class) { if (cachedDataChannelPool == null) { cachedDataChannelPool = createChannelPool(host, channelCount); } return cachedDataChannelPool; } } return createManagedPool(host, channelCount); }</code><technical_language>tests fail this option? a good idea fix test cases</technical_language>

Target:
private ChannelPool getDataChannelPool() throws IOException { String host = options.getDataHost(); int channelCount = options.getChannelCount(); if (options.useCachedChannel()) { synchronized (BigtableSession.class) { if (cachedDataChannelPool == null) { cachedDataChannelPool = createChannelPool(host, channelCount); } return cachedDataChannelPool; } } return createManagedPool(host, channelCount); }
Source:
<code>public double getValueByName(String row, String column) { if (!inited) init(); Integer rowIndex = rowMap.get(row); Integer columnIndex = columnMap.get(column); if (rowIndex == null) throw new MolgenisDataException("Unknown row name [" + row + "]"); <START> if (rowIndex == null) throw new MolgenisDataException("Unknown column name [" + column + "]"); <END> return getValueByIndex(rowIndex, columnIndex); }</code><technical_language>Shouldnt this columnIndex == null</technical_language>

Target:
public double getValueByName(String row, String column) { if (!inited) init(); Integer rowIndex = rowMap.get(row); Integer columnIndex = columnMap.get(column); if (rowIndex == null) throw new MolgenisDataException("Unknown row name [" + row + "]"); if (columnIndex == null) throw new MolgenisDataException("Unknown column name [" + column + "]"); return getValueByIndex(rowIndex, columnIndex); }
Source:
<code>private void mkdirsAllWorkingDirs(DefaultInputModule module) { for (DefaultInputModule sub : moduleHierarchy.children(module)) { mkdirsAllWorkingDirs(sub); } try { <START> org.apache.commons.io.FileUtils.forceMkdir(module.getWorkDir().toFile()); <END> } catch (Exception e) { throw new IllegalStateException("Fail to create working dir: " + module.getWorkDir(), e); } }</code><technical_language>Is advantage compared Files.createDirectories</technical_language>

Target:
private void mkdirsAllWorkingDirs(DefaultInputModule module) { for (DefaultInputModule sub : moduleHierarchy.children(module)) { mkdirsAllWorkingDirs(sub); } try { Files.createDirectories(module.getWorkDir()); } catch (Exception e) { throw new IllegalStateException("Fail to create working dir: " + module.getWorkDir(), e); } }
Source:
<code><START> public boolean isStarted() { <END> return isStarted; }</code><technical_language>I isBootstrapped a flag. 'bootstrap' method is a misnomer, called 'refresh' something. meant called multiple times, use, get latest stream state</technical_language>

Target:
boolean isStarted() { return isStarted; }
Source:
<code>private void cleanupChunks(ShardCommitCleanerDao shard, long now, List<TableChunk> chunks, Set<Long> droppedTableIds) { <START> deletedChunksDao.insertDeletedChunks(now, chunks); <END> chunks.stream() .filter(chunk -> !droppedTableIds.contains(chunk.getTableId())) .collect(groupingBy(TableChunk::getTableId)) .forEach((tableId, tableChunks) -> shard.deleteIndexChunks(chunkIndexTable(tableId), toChunkIds(tableChunks))); shard.deleteChunks(toChunkIds(chunks)); }</code><technical_language>unsafe state happen lien 129 line 139. line 129, delete_chunks table content, ChunkStoreCleaner remove data. unsafe state is some metadata is there, data is not. this issue for now, remove states in storage system. If continue adding codes, trigger more unsafe states actual issue. In v1, some delay prevent it, if check shardCleaner.java private static Timestamp maxTimestamp(Duration duration) I v1 logic</technical_language>

Target:
private void cleanupChunks(ShardCommitCleanerDao shard, long now, List<TableChunk> chunks, Set<Long> droppedTableIds) { deletedChunksDao.insertDeletedChunks(now, now, chunks); chunks.stream() .filter(chunk -> !droppedTableIds.contains(chunk.getTableId())) .collect(groupingBy(TableChunk::getTableId)) .forEach((tableId, tableChunks) -> shard.deleteIndexChunks(chunkIndexTable(tableId), toChunkIds(tableChunks))); shard.deleteChunks(toChunkIds(chunks)); }
Source:
<code>public HttpRequest setMethod(HttpMethod method) { ObjectUtil.checkNotNull(method, "method"); <START> this.method = method; <END> return this; }</code><technical_language>nit: merge lines checkNotNull return argument</technical_language>

Target:
public HttpRequest setMethod(HttpMethod method) { this.method = ObjectUtil.checkNotNull(method, "method"); return this; }
Source:
<code><START> private void testGetInsertionFeature() throws Exception { <END> String url = "/ats/program/" + getSawProgram().getArtId() + "/insertion/1234567800/feature"; JsonArray array = getAndCheck(url); Assert.assertEquals(1, array.size()); JsonObject obj = getObjectNamed("JAX Insertion Feature", array); Assert.assertNotNull("Did not find value Jax Insertion Feature", obj); }</code><technical_language>getUuid instead of getArtId,</technical_language>

Target:
private void testGetInsertionFeature() throws Exception { String url = "/ats/program/" + getSawProgram().getUuid() + "/insertion/1234567800/feature"; JsonArray array = getAndCheck(url); Assert.assertEquals(1, array.size()); JsonObject obj = getObjectNamed("JAX Insertion Feature", array); Assert.assertNotNull("Did not find value Jax Insertion Feature", obj); }