auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> default void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { <END> getParameterizedJobMixIn().doBuild(req, rsp, delay); }</code><technical_language>So, Restricted/RequirePOST annotations here? I is safe offer default impl. , I miss something</technical_language>

Target:
public final void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { if (delay == null) { delay = new TimeDuration(asJob().getQuietPeriod()); } if (!asJob().isBuildable()) { throw HttpResponses.error(SC_CONFLICT, new IOException(asJob().getFullName() + " is not buildable")); } ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); if (pp != null && !req.getMethod().equals("POST")) { req.getView(pp, "index.jelly").forward(req, rsp); return; } hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp); if (pp != null) { pp._doBuild(req, rsp, delay); return; } Queue.Item item = Jenkins.getInstance().getQueue().schedule2(asJob(), delay.getTime(), getBuildCause(asJob(), req)).getItem(); if (item != null) { rsp.sendRedirect(SC_CREATED, req.getContextPath() + '/' + item.getUrl()); } else { rsp.sendRedirect("."); } }
Source:
<code>private void primaryAction() { switch (getPrimaryAction()) { case UPDATE: showUpdateConfirmationDialogAndUploadPost(); return; case PUBLISH_NOW: if (AppPrefs.isAsyncPromoRequired()) { showAsyncPromoDialog(mPost.isPage(), false); } else { showPublishConfirmationDialogAndPublishPost(); } return; case SCHEDULE: if (AppPrefs.isAsyncPromoRequired()) { showAsyncPromoDialog(mPost.isPage(), true); } else { uploadPost(false); } return; case SUBMIT_FOR_REVIEW: case SAVE: <START> uploadPost(false); <END> } }</code><technical_language>consider adding "break" (perhaps replace "returns" in other cases breaks). easy miss statement a break someones add a new case. Wdyt</technical_language>

Target:
private void primaryAction() { switch (getPrimaryAction()) { case UPDATE: showUpdateConfirmationDialogAndUploadPost(); return; case PUBLISH_NOW: if (AppPrefs.isAsyncPromoRequired()) { showAsyncPromoDialog(mPost.isPage(), false); } else { showPublishConfirmationDialogAndPublishPost(); } return; case SCHEDULE: if (AppPrefs.isAsyncPromoRequired()) { showAsyncPromoDialog(mPost.isPage(), true); } else { uploadPost(false); } return; case SUBMIT_FOR_REVIEW: case SAVE: uploadPost(false); break; } }
Source:
<code>private String <START> getToolTipText(boolean attachKeybinding) { <END> String text = getModel().getLocalizedTooltip(); if (!attachKeybinding) { return text; } ParameterizedCommand parmCmd = getModel().getWbCommand(); if (parmCmd == null) { generateCommand(); parmCmd = getModel().getWbCommand(); } if (parmCmd != null && text == null) { try { text = parmCmd.getName(); } catch (NotDefinedException e) { return null; } } TriggerSequence sequence = bindingService.getBestSequenceFor(parmCmd); if (sequence != null) { text = text + " (" + sequence.format() + ')'; } return text; }</code><technical_language>I understand command parameters do key bindings. implement skip adding of parameter values tooltip of menu items. Also, is necessary distinguish menu item tool item tooltip</technical_language>

Target:
private String getToolTipText(boolean attachKeybinding) { String text = getModel().getLocalizedTooltip(); ParameterizedCommand parmCmd = getModel().getWbCommand(); if (parmCmd == null) { generateCommand(); parmCmd = getModel().getWbCommand(); } if (parmCmd != null && text == null) { try { text = parmCmd.getName(); } catch (NotDefinedException e) { return null; } } TriggerSequence sequence = bindingService.getBestSequenceFor(parmCmd); if (attachKeybinding && sequence != null) { text = text + " (" + sequence.format() + ')'; } return text; }
Source:
<code>private boolean compatible(Alloc pred, Alloc succ) { return pred != null && pred.getObs().getInstrumentString().equals(succ.getObs().getInstrumentString()) && <START> pred.getObs().getCoords(pred.getMiddlePoint()).equals(succ.getMiddlePoint()); <END> }</code><technical_language>For a non-sidereal target in theory this equals, means need setup for non-sidereal observations if "same" target? I answer this one</technical_language>

Target:
private boolean compatible(Alloc pred, Alloc succ) { return pred != null && pred.getObs().getInstrumentString().equals(succ.getObs().getInstrumentString()) && pred.getObs().getCoords(pred.getEnd()).equals(succ.getObs().getCoords((pred.getEnd()))); }
Source:
<code>protected void onEvent(GHEvent event, String payload) { try { GitHub gh = GitHub.connectAnonymously(); PullRequestInfo info = extractPullRequestInfo(event, payload, gh); for (AbstractProject job : getJobs(info.getRepo())) { GitHubPRTrigger trigger = triggerFrom(job, GitHubPRTrigger.class); GitHubPRTriggerMode triggerMode = trigger.getTriggerMode(); switch (triggerMode) { case HEAVY_HOOKS_CRON: <START> case HEAVY_HOOKS: { <END> LOGGER.debug("Queued check for (PR #{}) after heavy hook", job.getName(), info.getNum()); trigger.queueRun(job, info.getNum()); break; } case LIGHT_HOOKS: { LOGGER.warn("Unsupported LIGHT_HOOKS trigger mode"); break; } default: break; } } } catch (Exception e) { LOGGER.error("Can't process hook", event, e); } }</code><technical_language>![MINOR](<LINK_1> this line start column 25. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
protected void onEvent(GHEvent event, String payload) { try { GitHub gh = GitHub.connectAnonymously(); PullRequestInfo info = extractPullRequestInfo(event, payload, gh); for (Job job : getJobs(info.getRepo())) { GitHubPRTrigger trigger = triggerFrom(job, GitHubPRTrigger.class); GitHubPRTriggerMode triggerMode = trigger.getTriggerMode(); switch (triggerMode) { case HEAVY_HOOKS_CRON: case HEAVY_HOOKS: { LOGGER.debug("Queued check for (PR #{}) after heavy hook", job.getName(), info.getNum()); trigger.queueRun(job, info.getNum()); break; } case LIGHT_HOOKS: { LOGGER.warn("Unsupported LIGHT_HOOKS trigger mode"); break; } default: break; } } } catch (Exception e) { LOGGER.error("Can't process hook", event, e); } }
Source:
<code>public static <R> R parsePemContent(CodePointIterator pemContent, BiFunction<String, ByteIterator, R> contentFunction) throws IllegalArgumentException { Assert.checkNotNullParam("pemContent", pemContent); Assert.checkNotNullParam("contentFunction", contentFunction); if (! pemContent.limitedTo(11).contentEquals("-----BEGIN ")) { throw log.malformedPemContent(pemContent.offset()); } String type = pemContent.delimitedBy('-').drainToString().trim(); final Matcher matcher = VALID_LABEL.matcher(type); if (matcher.find()) { throw log.malformedPemContent(matcher.start() + 11); } if (! pemContent.limitedTo(5).contentEquals("-----")) { throw log.malformedPemContent(pemContent.offset()); } String encodedKey = pemContent.delimitedBy('-').drainToString(); encodedKey = encodedKey.replaceAll("\r\n", ""); encodedKey = encodedKey.replaceAll("\n", ""); encodedKey = encodedKey.trim(); <START> final ByteIterator byteIterator = ByteIterator.ofBytes(encodedKey.getBytes()).base64Decode(); <END> final R result = contentFunction.apply(type, byteIterator); if (! pemContent.limitedTo(9).contentEquals("-----END ")) { throw log.malformedPemContent(pemContent.offset()); } if (! pemContent.limitedTo(type.length()).contentEquals(type)) { throw log.malformedPemContent(pemContent.offset()); } if (! pemContent.limitedTo(5).contentEquals("-----")) { throw log.malformedPemContent(pemContent.offset()); } return result; }</code><technical_language>Hmm excited this one. need do following: final ByteIterator byteIterator = pemContent.skipSpaces().delimitedBy('-').base64Decode(); ...and add a skipSpaces() method CodePointIterator? If trouble change line: final ByteIterator byteIterator = CodePointIterator.ofString(encodedKey).base64Decode(); avoid byte array creation, that, a one-pass regular expression key: encodedKey = encodedKey.replaceAll("\\s+", "");</technical_language>

Target:
public static <R> R parsePemContent(CodePointIterator pemContent, BiFunction<String, ByteIterator, R> contentFunction) throws IllegalArgumentException { Assert.checkNotNullParam("pemContent", pemContent); Assert.checkNotNullParam("contentFunction", contentFunction); pemContent = pemContent.skipCrLf(); if (! pemContent.limitedTo(11).contentEquals("-----BEGIN ")) { throw log.malformedPemContent(pemContent.offset()); } String type = pemContent.delimitedBy('-').drainToString().trim(); final Matcher matcher = VALID_LABEL.matcher(type); if (matcher.find()) { throw log.malformedPemContent(matcher.start() + 11); } if (! pemContent.limitedTo(5).contentEquals("-----")) { throw log.malformedPemContent(pemContent.offset()); } final ByteIterator byteIterator = pemContent.delimitedBy('-').base64Decode(); final R result = contentFunction.apply(type, byteIterator); if (! pemContent.limitedTo(9).contentEquals("-----END ")) { throw log.malformedPemContent(pemContent.offset()); } if (! pemContent.limitedTo(type.length()).contentEquals(type)) { throw log.malformedPemContent(pemContent.offset()); } if (! pemContent.limitedTo(5).contentEquals("-----")) { throw log.malformedPemContent(pemContent.offset()); } return result; }
Source:
<code>private static void loadIdentity(final JSch sch, final File priv) { if (priv.isFile()) { try { sch.addIdentity(priv.getAbsolutePath()); <START> } catch (final JSchException e) { <END> } } }</code><technical_language>Style-nit: reason add final</technical_language>

Target:
private static void loadIdentity(final JSch sch, final File priv) { if (priv.isFile()) { try { sch.addIdentity(priv.getAbsolutePath()); } catch (JSchException e) { } } }
Source:
<code><START> public Optional<Serde> getKeySerde() { <END> return keySerdeOptional; }</code><technical_language>I need return optional here. caller of this method do a null check (i.e. serde == null serdeOptional.isPresent()). I thought Optional is descriptor allow optional user setup. If Optional replace internal impl's nullable variables, a big task code base consistent I prefer include in this scope</technical_language>

Target:
public Serde getKeySerde() { return keySerde; }
Source:
<code>private void getTimeToFistByteData(String series, LineGraph lineGraph) { for (Map.Entry<Integer, SummaryStatistics> entry : mTimeToFirstByte.entrySet()) { lineGraph.addDataSeries( <START> series + ", thread " + entry.getKey(), entry.getValue().computeTimeData()); <END> } }</code><technical_language>suggestion series + ", thread: " + entry.getKey(), entry.getValue().computeTimeData());</technical_language>

Target:
private void getTimeToFistByteData(String series, LineGraph lineGraph) { for (Map.Entry<Integer, SummaryStatistics> entry : mTimeToFirstByte.entrySet()) { lineGraph.addDataSeries( series + ", thread: " + entry.getKey(), entry.getValue().computeTimeData()); } }
Source:
<code>public Block readBlock(Type type, int batchSize) <START> throws IOException <END> { checkArgument(type == DOUBLE); BlockBuilder builder = type.createBlockBuilder(null, batchSize); for (int i = 0; i < batchSize; ++i) { type.writeDouble(builder, valueSelector.getDouble()); } return builder.build(); }</code><technical_language>needed; for other readers</technical_language>

Target:
public Block readBlock(Type type, int batchSize) { checkArgument(type == DOUBLE); BlockBuilder builder = type.createBlockBuilder(null, batchSize); for (int i = 0; i < batchSize; i++) { type.writeDouble(builder, valueSelector.getDouble()); } return builder.build(); }
Source:
<code>public void setCorrelatedSubqueryExpression() { BlazeCriteriaBuilder cb = BlazeCriteria.get(cbf); BlazeCriteriaUpdate<Document> query = cb.createCriteriaUpdate(Document.class, "d"); BlazeRoot<Document> root = query.getRoot(); BlazeSubquery<Integer> subquery = query.subquery(Integer.class); BlazeRoot<Document> subqueryRoot = subquery.correlate(root); BlazeJoin<Document, Person> owner = subqueryRoot.join(Document_.owner, "owner"); subquery.select(cb.count(owner).as(Integer.class)); query.set(Document_.idx, cb.sum(subquery, 1)); UpdateCriteriaBuilder<Document> criteriaBuilder = query.createCriteriaBuilder(em); assertEquals("UPDATE Document d SET d.idx = (SELECT " + function("CAST_INTEGER", "COUNT(owner)") + " FROM d.owner owner) + 1", criteriaBuilder.getQueryString()); <START> criteriaBuilder.getQuery().executeUpdate(); <END> }</code><technical_language>Check tests if this works, I I do DataNucleus 4 support this</technical_language>

Target:
public void setCorrelatedSubqueryExpression() { BlazeCriteriaBuilder cb = BlazeCriteria.get(cbf); BlazeCriteriaUpdate<Document> query = cb.createCriteriaUpdate(Document.class, "d"); BlazeRoot<Document> root = query.getRoot(); BlazeSubquery<Integer> subquery = query.subquery(Integer.class); BlazeRoot<Document> subqueryRoot = subquery.correlate(root); BlazeJoin<Document, Person> owner = subqueryRoot.join(Document_.owner, "owner"); subquery.select(cb.count(owner).as(Integer.class)); query.set(Document_.idx, cb.sum(subquery, 1)); UpdateCriteriaBuilder<Document> criteriaBuilder = query.createCriteriaBuilder(em); assertEquals("UPDATE Document d SET d.idx = (SELECT " + function("CAST_INTEGER", "COUNT(owner)") + " FROM d.owner owner) + 1", criteriaBuilder.getQueryString()); criteriaBuilder.getQuery(); }
Source:
<code>public URL getTileUrl(final Tile tile) throws MalformedURLException { <START> return new URL("https", this.getHostName(), this.port, "/cycle/" + tile.zoomLevel + '/' + tile.tileX + '/' + tile.tileY + ".png?apikey=d6866308a6e24783822338c9a49ceb6c"); <END> }</code><technical_language>if @mucek4 is unavailable I do it. :)</technical_language>

Target:
public URL getTileUrl(final Tile tile) throws MalformedURLException { return new URL("https", this.getHostName(), this.port, "/cycle/" + tile.zoomLevel + '/' + tile.tileX + '/' + tile.tileY + ".png?apikey=" + apiKey); }
Source:
<code>private synchronized void resetSequenceForPartition(TopicPartition topicPartition) { <START> topicPartitionBookkeeper.topicPartitionBookkeeping.remove(topicPartition); <END> this.partitionsWithUnresolvedSequences.remove(topicPartition); }</code><technical_language>nit: this patch, topicPartitionBookkeeper.topicPartitionBookkeeping is annoying. rename field partitions</technical_language>

Target:
private void resetSequenceForPartition(TopicPartition topicPartition) { topicPartitionBookkeeper.topicPartitions.remove(topicPartition); this.partitionsWithUnresolvedSequences.remove(topicPartition); }
Source:
<code>public boolean selectChange(final int flag) { contentProvider.runWhenReady(IN_UI_ASYNC, new Runnable() { public void run() { TreeItem[] selection = viewer.getTree().getSelection(); <START> TreeItem firstSelectedItem = selection.length > 0 ? selection[0] : null; <END> Object newSelection = calculateNextSelection(firstSelectedItem, flag); if (newSelection != null) { fireOpen(newSelection); } } }); return false; }</code><technical_language>Ternary expressions discouraged EMF Compare checkstyle config. Checkstyle is disabled for this project for some reason (and I this ;)), nevertheless, stick common if expression consistent</technical_language>

Target:
public boolean selectChange(final int flag) { contentProvider.runWhenReady(IN_UI_ASYNC, new Runnable() { public void run() { TreeItem[] selection = viewer.getTree().getSelection(); TreeItem firstSelectedItem = firstOrNull(selection); Object newSelection = calculateNextSelection(firstSelectedItem, flag); if (newSelection != null) { fireOpen(newSelection); } } }); return false; }
Source:
<code>public ItemBoundTool(String name, float damage, Set<Block> effectiveBlocks) { super(damage, 1, RegistrarBloodMagicItems.BOUND_TOOL_MATERIAL, effectiveBlocks); setUnlocalizedName(BloodMagic.MODID + ".bound." + name); setCreativeTab(BloodMagic.TAB_BM); setHarvestLevel(name, 4); <START> addPropertyOverride(new ResourceLocation("bloodmagic", "activated"), new IItemPropertyGetter() <END> { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return getActivated(stack) ? 1F : 0F; } }); addPropertyOverride(new ResourceLocation("bloodmagic", "charge"), new IItemPropertyGetter() { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return entityIn != null && getActivated(stack) && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? MathHelper.clamp((float)Math.min(getCharge(stack), MAX_CHARGE_TIME) / (float)MAX_CHARGE_TIME, 0.0F, 1.0F) : 0; } }); this.name = name; this.tooltipBase = "tooltip.bloodmagic.bound." + name + "."; }</code><technical_language>BloodMagic.MODID</technical_language>

Target:
public ItemBoundTool(String name, float damage, Set<Block> effectiveBlocks) { super(damage, 1, RegistrarBloodMagicItems.BOUND_TOOL_MATERIAL, effectiveBlocks); setUnlocalizedName(BloodMagic.MODID + ".bound." + name); setCreativeTab(BloodMagic.TAB_BM); setHarvestLevel(name, 4); addPropertyOverride(new ResourceLocation(BloodMagic.MODID, "activated"), new IItemPropertyGetter() { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return getActivated(stack) ? 1F : 0F; } }); addPropertyOverride(new ResourceLocation(BloodMagic.MODID, "charge"), new IItemPropertyGetter() { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return entityIn != null && getActivated(stack) && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? MathHelper.clamp((float)Math.min(getCharge(stack), MAX_CHARGE_TIME) / (float)MAX_CHARGE_TIME, 0.0F, 1.0F) : 0; } }); this.name = name; this.tooltipBase = "tooltip.bloodmagic.bound." + name + "."; }
Source:
<code>@Override public void onBindViewHolder(ViewHolderImpl holder) { holder.title.setText(extra.getTitle()); holder.desc.setText(extra.getCardDesc()); holder.icon.setImageResource(extra.getIcon()); int color = ContextCompat.getColor(holder.card.getContext(), extra.getColor()); holder.card.setCardBackgroundColor(color); holder.run.setTextColor(color); holder.run.setOnClickListener(onClickListener); holder.itemView.setOnClickListener(onClickListener); holder.run.setTag(extra); holder.itemView.setTag(extra); Integer runTime = extra.getRuntime(pm); if (runTime.equals(PreferenceManager.MAX_RUNTIME_DISABLED)) runTime = 3600; <START> holder.runtime.setText(holder.runtime.getContext().getString(R.string.Dashboard_Card_Seconds, runTime.toString())); <END> }</code><technical_language>factor this duplicate code</technical_language>

Target:
@Override public void onBindViewHolder(ViewHolderImpl holder) { holder.title.setText(extra.getTitle()); holder.desc.setText(extra.getCardDesc()); holder.icon.setImageResource(extra.getIcon()); int color = ContextCompat.getColor(holder.card.getContext(), extra.getColor()); holder.card.setCardBackgroundColor(color); holder.run.setTextColor(color); holder.run.setOnClickListener(onClickListener); holder.itemView.setOnClickListener(onClickListener); holder.run.setTag(extra); holder.itemView.setTag(extra); holder.runtime.setText(holder.runtime.getContext().getString(R.string.Dashboard_Card_Seconds, extra.getRuntime(pm).toString())); }
Source:
<code>public synchronized void deleteFile() { closeFile(); File historyTreeFile = fConfig.getStateFile(); try { if (!historyTreeFile.delete()) { Activator.getDefault().logError("Failed to delete" + historyTreeFile.getName()); } <START> } catch (SecurityException e) { <END> Activator.getDefault().logError(e.getMessage(), e); } }</code><technical_language>is this a RuntimeException? In case want catch it</technical_language>

Target:
public synchronized void deleteFile() { closeFile(); File historyTreeFile = fConfig.getStateFile(); if (!historyTreeFile.delete()) { Activator.getDefault().logError("Failed to delete" + historyTreeFile.getName()); } }
Source:
<code>private static void checkEntries(LedgerEntries entries, byte[] data) throws InterruptedException, BKException { <START> Iterator<LedgerEntry> iterator = entries.retainIterator(); <END> while(iterator.hasNext()) { LedgerEntry entry = iterator.next(); assertArrayEquals(data, entry.getEntry()); } }</code><technical_language>I need retainIterator here</technical_language>

Target:
private static void checkEntries(LedgerEntries entries, byte[] data) throws InterruptedException, BKException { Iterator<LedgerEntry> iterator = entries.iterator(); while(iterator.hasNext()) { LedgerEntry entry = iterator.next(); assertArrayEquals(data, entry.getEntryBytes()); } }
Source:
<code>public void sendDeleteEvent(final boolean ignoreUnmanaged) { final Event event = getContext().createEvent(EventConstants.DELETE_SERVICE_EVENT_UEI, getNodeId(), getAddress(), getSvcName(), new Date(), getStatus().getReason()); if (ignoreUnmanaged) { final Parm parm = new Parm(); <START> parm.setParmName("ignoreUnmanaged"); <END> parm.setValue(null); event.addParm(new Parm("ignoreUnmanaged", "true")); } getContext().sendEvent(event); }</code><technical_language>a constant for this too. org.opennms.netmgt.events.api.EventConstants a good place put it</technical_language>

Target:
public void sendDeleteEvent(final boolean ignoreUnmanaged) { final Event event = getContext().createEvent(EventConstants.DELETE_SERVICE_EVENT_UEI, getNodeId(), getAddress(), getSvcName(), new Date(), getStatus().getReason()); if (ignoreUnmanaged) { final Parm parm = new Parm(); parm.setParmName(EventConstants.PARM_IGNORE_UNMANAGED); parm.setValue(null); event.addParm(new Parm(EventConstants.PARM_IGNORE_UNMANAGED, "true")); } getContext().sendEvent(event); }
Source:
<code>public void openErrorView(final String id){ final PlaceRequest request = new DefaultPlaceRequest(EXECUTION_ERRORS); if(TASK_TYPE.equals(type)) { request.addParameter(SEARCH_PARAMETER_TASK_ID, id); } else { request.addParameter(SEARCH_PARAMETER_PROCESS_INSTANCE_ID, <START> id); <END> } request.addParameter(SEARCH_PARAMETER_IS_ERROR_ACK, Boolean.toString(false)); viewPresenter.openView(request); }</code><technical_language>@mcivantos-tribalyte failing benefits of increased complexity here. checking error type is clear form DB query error type exclusively interested in is task one: "errInfo.error_type=\'Task\'" This means error count specific task show number of Task type errors. This is information want show task admins, right? click number, Execution errors view needs match number in order maintain consistency error count displayed in admin task list number of errors listed in Execution errors view. achieve this, parameters added request match DB query in _DataSetDefsBootstrap_ I missing some case scenario</technical_language>

Target:
public void openErrorView(final String id){ viewPresenter.openErrorView(id); }
Source:
<code>public void afterRefreshTreatment(boolean succeeded) { if (!succeeded) { lockManager.releaseLock(monitoringLock); return; } try { synchronized (this) { unrespondedAttempts.set(0); setLastUpdate(); Guid storagePoolId = null; ArrayList<VDSDomainsData> domainsList = null; try { hostMonitoring.afterRefreshTreatment(); if (cachedVds != null && cachedVds.getStatus() != VDSStatus.Maintenance) { storagePoolId = cachedVds.getStoragePoolId(); domainsList = cachedVds.getDomains(); } hostMonitoring = null; } catch (IRSErrorException ex) { logAfterRefreshFailureMessage(ex); if (log.isDebugEnabled()) { logException(ex); } } catch (RuntimeException ex) { logAfterRefreshFailureMessage(ex); logException(ex); } if (domainsList != null) { updateVdsDomainsData(cachedVds, storagePoolId, domainsList); <START> setDomains(cachedVds.getDomains()); <END> } } } catch (Exception e) { log.error("Timer update runtime info failed. Exception:", ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception:", e); } finally { lockManager.releaseLock(monitoringLock); } }</code><technical_language>note this part is extracted out of synchronized block soon [1] - matter? a bit awkward - domainsList is set chachedVds.getDomains (#337). domainsList a class member simply remove domainsList altogether refer cachedVds.getDomains instead? [1] <LINK_0></technical_language>

Target:
public void afterRefreshTreatment(boolean succeeded) { if (!succeeded) { lockManager.releaseLock(monitoringLock); return; } try { synchronized (this) { unrespondedAttempts.set(0); setLastUpdate(); Guid storagePoolId = null; try { hostMonitoring.afterRefreshTreatment(); if (cachedVds != null && cachedVds.getStatus() != VDSStatus.Maintenance) { storagePoolId = cachedVds.getStoragePoolId(); setDomains(cachedVds.getDomains()); } hostMonitoring = null; } catch (IRSErrorException ex) { logAfterRefreshFailureMessage(ex); if (log.isDebugEnabled()) { logException(ex); } } catch (RuntimeException ex) { logAfterRefreshFailureMessage(ex); logException(ex); } if (getDomains() != null) { updateVdsDomainsData(cachedVds, storagePoolId, getDomains()); } } } catch (Exception e) { log.error("Timer update runtime info failed. Exception:", ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception:", e); } finally { lockManager.releaseLock(monitoringLock); } }
Source:
<code>public void unregister(NotificationHandler handler, ID listenerID) throws NotificationServiceException { if (listenerID instanceof InstanceID) { try { InstanceID instanceID = (InstanceID) listenerID; SortedMap<Integer, ExecutionInstance> instances = executorAwaitedInstances.get(instanceID .getEntityClusterID()); <START> synchronized (instances) { <END> instances.remove(STATE_STORE.getExecutionInstance(instanceID) .getInstance().getInstanceSequence()); } } catch (Exception e) { throw new NotificationServiceException(e); } } }</code><technical_language>Instances null empty in case of instances in ready. Null check empty check is required right</technical_language>

Target:
public void unregister(NotificationHandler handler, ID listenerID) throws NotificationServiceException { if (listenerID instanceof InstanceID) { try { InstanceID instanceID = (InstanceID) listenerID; SortedMap<Integer, ExecutionInstance> instances = executorAwaitedInstances.get(instanceID .getEntityClusterID()); if (instances != null && !instances.isEmpty()) { synchronized (instances) { instances.remove(STATE_STORE.getExecutionInstance(instanceID) .getInstance().getInstanceSequence()); } } } catch (Exception e) { throw new NotificationServiceException(e); } } }
Source:
<code>private String generateURL(String url, HashMap<String, String> properties) { if (properties.isEmpty()) return url; String encodedUrl = url + "?"; for (Map.Entry<String, String> map : properties.entrySet()) { try { encodedUrl += URLEncoder.encode(map.getKey(), ("utf-8")) + "=" + URLEncoder.encode(map.getValue(), "utf-8") + "&"; } catch (UnsupportedEncodingException e) { ZLog.logException(e); } } <START> return encodedUrl.substring(0, encodedUrl.length() - 1); <END> }</code><technical_language>a safer remove character if &</technical_language>

Target:
private String generateURL(String url, HashMap<String, String> properties) { if (properties.isEmpty()) return url; String encodedUrl = url + "?"; for (Map.Entry<String, String> map : properties.entrySet()) { try { encodedUrl += URLEncoder.encode(map.getKey(), ("utf-8")) + "=" + URLEncoder.encode(map.getValue(), "utf-8") + "&"; } catch (UnsupportedEncodingException e) { ZLog.logException(e); } } StringUtils.removeEnd(encodedUrl, "&"); return encodedUrl; }
Source:
<code>public String toString() { return new ToStringBuilder(this) .append("enclosingClassNames", getEnclosingClassNames()) .append("nestedClassName", getNestedClassName()) .append("methodName", getMethodName()) <START> .toString(); <END> }</code><technical_language>Please add methodParameterTypes</technical_language>

Target:
public String toString() { return new ToStringBuilder(this) .append("enclosingClassNames", getEnclosingClassNames()) .append("nestedClassName", getNestedClassName()) .append("methodName", getMethodName()) .append("methodParameterTypes", getMethodParameterTypes()) .toString(); }
Source:
<code>public <START> Object getSpmHost(String <END> spUUID){ return this.spmMap.get(spUUID); }</code><technical_language>is Host. please proper type</technical_language>

Target:
public Host getSpmHost(String spUUID){ return this.spmMap.get(spUUID); }
Source:
<code>protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException { Query<Boolean> connectQuery = new Query<Boolean>() { @Override public void execute(final DataRequestMonitor<Boolean> rm) { connect(new DataRequestMonitor<Boolean>(ImmediateExecutor.getInstance(), rm) { @Override @ConfinedToDsfExecutor("fExecutor") protected void handleCompleted() { super.handleCompleted(); updateEnablement(); } }); } }; try { fExecutor.execute(connectQuery); <START> connectQuery.get(); <END> } catch (InterruptedException e) { } catch (ExecutionException e) { } catch (CancellationException e) { } catch (RejectedExecutionException e) { } }</code><technical_language>I thought this before, easier call updateEnablement() instead</technical_language>

Target:
protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException { Query<Boolean> connectQuery = new Query<Boolean>() { @Override public void execute(DataRequestMonitor<Boolean> rm) { connect(rm); } }; try { fExecutor.execute(connectQuery); connectQuery.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { } catch (CancellationException e) { } catch (RejectedExecutionException e) { } finally { updateEnablement(); } }
Source:
<code>public ListImagesCmd withImageNameFilter(String imageNameFilter) { <START> checkNotNull(imageNameFilter, "image name filter has not been specified"); <END> this.imageNameFilter = imageNameFilter; return this; }</code><technical_language>shorter image name filter</technical_language>

Target:
public ListImagesCmd withImageNameFilter(String imageNameFilter) { checkNotNull(imageNameFilter, "image name filter not specified"); this.imageNameFilter = imageNameFilter; return this; }
Source:
<code>public static Integer compareGenesByKeyword(Gene g1, Gene g2, String keyword) { if (g1 == null) { return 1; } if (g2 == null) { return -1; } String s1 = ""; String s2 = ""; Integer i1 = -1; Integer i2 = -1; if (StringUtils.isNumeric(keyword)) { s1 = Integer.toString(g1.getEntrezGeneId()); s2 = Integer.toString(g2.getEntrezGeneId()); } else { s1 = g1.getHugoSymbol().toLowerCase(); s2 = g2.getHugoSymbol().toLowerCase(); } if (s1.equals(keyword)) { return -1; } if (s2.equals(keyword)) { return 1; } i1 = s1.indexOf(keyword); i2 = s2.indexOf(keyword); if (i1.equals(i2) && i1.equals(-1)) { Integer i1Alias = 100; Integer i2Alias = 100; Integer index = -1; for (String geneAlias : g1.getGeneAliases()) { index = geneAlias.toLowerCase().indexOf(keyword); if (index > -1 && index < i1Alias) { i1Alias = index; } } index = -1; for (String geneAlias : g2.getGeneAliases()) { index = geneAlias.toLowerCase().indexOf(keyword); if (index > -1 && index < i2Alias) { i2Alias = index; } } if (i1Alias.equals(-1)) return 1; if (i2Alias.equals(-1)) return -1; <START> return -1; <END> } else { if (i1.equals(-1)) return 1; if (i2.equals(-1)) return -1; if (i1.equals(i2)) { Integer result = s1.compareTo(s2); if (result == 0) { return -1; } else { return result; } } else { return i1 - i2; } } }</code><technical_language>return i2Alias - i1Alias</technical_language>

Target:
public static Integer compareGenesByKeyword(Gene g1, Gene g2, String keyword) { if (g1 == null) { return 1; } if (g2 == null) { return -1; } String s1 = ""; String s2 = ""; Integer i1 = -1; Integer i2 = -1; if (StringUtils.isNumeric(keyword)) { s1 = Integer.toString(g1.getEntrezGeneId()); s2 = Integer.toString(g2.getEntrezGeneId()); } else { s1 = g1.getHugoSymbol().toLowerCase(); s2 = g2.getHugoSymbol().toLowerCase(); } if (s1.equals(keyword)) { return -1; } if (s2.equals(keyword)) { return 1; } i1 = s1.indexOf(keyword); i2 = s2.indexOf(keyword); if (i1.equals(i2) && i1.equals(-1)) { Integer i1Alias = 100; Integer i2Alias = 100; Integer index = -1; for (String geneAlias : g1.getGeneAliases()) { index = geneAlias.toLowerCase().indexOf(keyword); if (index > -1 && index < i1Alias) { i1Alias = index; } } index = -1; for (String geneAlias : g2.getGeneAliases()) { index = geneAlias.toLowerCase().indexOf(keyword); if (index > -1 && index < i2Alias) { i2Alias = index; } } if (i1Alias.equals(-1)) return 1; if (i2Alias.equals(-1)) return -1; return i1Alias - i2Alias; } else { if (i1.equals(-1)) return 1; if (i2.equals(-1)) return -1; if (i1.equals(i2)) { Integer result = s1.compareTo(s2); if (result == 0) { return -1; } else { return result; } } else { return i1 - i2; } } }
Source:
<code>XDRAcknowledgementType processDocSubmissionRequest(ProvideAndRegisterDocumentSetRequestType body, AssertionType assertion) { XDRAcknowledgementType response = null; String localHCID = getLocalHCID(); if (isPolicyValid(body, assertion, localHCID)) { try { LOG.debug("Policy Check Succeeded"); getDocSubmissionUtils().convertDataToFileLocationIfEnabled(body); response = sendToAdapter(body, assertion); } catch (LargePayloadException lpe) { <START> LOG.error("Failed to retrieve payload document.", lpe); <END> response = MessageGeneratorUtils.getInstance().createXDRAckWithRegistryErrorResponse(); } } else { LOG.error("Policy Check Failed"); response = sendErrorToAdapter(body, assertion, "Policy Check Failed"); } return response; }</code><technical_language>modified this file, mind adjusting match standard exception logging format? LOG.error("msg: " + lpe.getLocalizedMessage(), lpe);</technical_language>

Target:
XDRAcknowledgementType processDocSubmissionRequest(ProvideAndRegisterDocumentSetRequestType body, AssertionType assertion) { XDRAcknowledgementType response = null; String localHCID = getLocalHCID(); if (isPolicyValid(body, assertion, localHCID)) { try { LOG.debug("Policy Check Succeeded"); getDocSubmissionUtils().convertDataToFileLocationIfEnabled(body); response = sendToAdapter(body, assertion); } catch (LargePayloadException lpe) { LOG.error("Failed to retrieve payload document. " + lpe.getLocalizedMessage(), lpe); response = MessageGeneratorUtils.getInstance().createXDRAckWithRegistryErrorResponse(); } } else { LOG.error("Policy Check Failed"); response = sendErrorToAdapter(body, assertion, "Policy Check Failed"); } return response; }
Source:
<code>public void initialise(FBOConfig inputFboConfig, FBOConfig outputFboConfig, BaseFBOsManager fboManager, float aRadius, String aLabel) { this.fboManager = fboManager; this.blurRadius = aRadius; this.performanceMonitorLabel = aLabel; this.inputFboUrn = inputFboConfig.getName(); this.outputFboUrn = outputFboConfig.getName(); inputFbo = requiresFBO(inputFboConfig, fboManager); outputFbo = requiresFBO(outputFboConfig, fboManager); addDesiredStateChange(new BindFBO(outputFboUrn, fboManager)); addDesiredStateChange(new SetViewportToSizeOf(outputFboUrn, fboManager)); setupConditions(); addDesiredStateChange(new EnableMaterial("engine:prog.blur")); this.blurMaterial = getMaterial(new ResourceUrn("engine:prog.blur")); <START> fboManager.subscribe(this); <END> }</code><technical_language>move this line FBO-related state change. double-check if needs before/after setupConditions();</technical_language>

Target:
public void initialise(FBOConfig inputFboConfig, FBOConfig outputFboConfig, BaseFBOsManager fboManager, float aRadius, String aLabel) { this.fboManager = fboManager; this.blurRadius = aRadius; this.performanceMonitorLabel = aLabel; this.inputFboUrn = inputFboConfig.getName(); this.outputFboUrn = outputFboConfig.getName(); setupConditions(); requiresFBO(inputFboConfig, fboManager); requiresFBO(outputFboConfig, fboManager); addDesiredStateChange(new BindFBO(outputFboUrn, fboManager)); addDesiredStateChange(new SetViewportToSizeOf(outputFboUrn, fboManager)); update(); fboManager.subscribe(this); addDesiredStateChange(new EnableMaterial("engine:prog.blur")); this.blurMaterial = getMaterial(new ResourceUrn("engine:prog.blur")); }
Source:
<code>InstallIDProvider providesInstallIDProvider(Context context) { <START> SharedPreferences preferences = context.getSharedPreferences("meta", Context.MODE_PRIVATE); <END> return new SharedPreferencesInstallIDProvider(preferences, KEY_INSTALL_ID); }</code><technical_language>I this is good concerned get lost forgotten. marking KEYS_WE_SHOULD_NOT_RESET deprecated describing this strategy? meta a constant somewhere</technical_language>

Target:
InstallIDProvider providesInstallIDProvider(Context context) { SharedPreferences prefs = new MetaSharedPreferencesProvider(context).getMetaSharedPreferences(); return new SharedPreferencesInstallIDProvider(prefs, KEY_INSTALL_ID); }
Source:
<code>public void verifyCreateAPageEditor(Editor expectedEditor, String articleName) { switch (expectedEditor) { case VE: VisualEditorPageObject ve = createArticleInVEUsingDropdown(articleName); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); break; case CK: VisualEditModePageObject ck = createArticleInCKUsingDropdown(articleName); <START> ck.isContentLoaded(); <END> ck.clickPublishButton(); break; case SRC: SourceEditModePageObject src = createArticleInSrcUsingDropdown(articleName); src.verifySourceOnlyMode(); src.clickPublishButton(); break; } }</code><technical_language>add asserts</technical_language>

Target:
public void verifyCreateAPageEditor(Editor expectedEditor, String articleName) { switch (expectedEditor) { case VE: VisualEditorPageObject ve = createArticleInVEUsingDropdown(articleName); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); break; case CK: VisualEditModePageObject ck = createArticleInCKUsingDropdown(articleName); Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded"); ck.clickPublishButton(); break; case SRC: SourceEditModePageObject src = createArticleInSrcUsingDropdown(articleName); src.verifySourceOnlyMode(); src.clickPublishButton(); break; } }
Source:
<code>public void testConflictingSnapshotVersionUpdate() throws Exception { accountService = mockHelixAccountServiceFactory.getAccountService(); writeAccountsForConflictTest(); Account expectedAccount = accountService.getAccountById((short) 1); for (int snapshotVersion : new int[]{-1, 0, 2}) { Collection<Account> conflictAccounts = Collections.singleton( new AccountBuilder((short) 1, "a", AccountStatus.INACTIVE).snapshotVersion(snapshotVersion).build()); assertFalse("Wrong return value from update operation.", accountService.updateAccounts(conflictAccounts)); assertEquals("Wrong account number in HelixAccountService", 2, accountService.getAllAccounts().size()); <START> assertEquals("Account should not have been updated", expectedAccount, accountService.getAccountById((short) 1)); <END> } Collection<Account> validAccounts = Collections.singleton(new AccountBuilder((short) 1, "a", AccountStatus.INACTIVE).snapshotVersion(1).build()); updateAccountsAndAssertAccountExistence(validAccounts, 2, true); }</code><technical_language>missing sense try rename this account "c" creating conflictAccounts line 518? Right now, if update through, props new ones, equals fail, right</technical_language>

Target:
public void testConflictingSnapshotVersionUpdate() throws Exception { accountService = mockHelixAccountServiceFactory.getAccountService(); writeAccountsForConflictTest(); Account expectedAccount = accountService.getAccountById((short) 1); int currentSnapshotVersion = expectedAccount.getSnapshotVersion(); for (int snapshotVersionOffset : new int[]{-2, -1, 1}) { int snapshotVersionToUse = currentSnapshotVersion + snapshotVersionOffset; Collection<Account> conflictAccounts = Collections.singleton( new AccountBuilder((short) 1, "c", AccountStatus.INACTIVE).snapshotVersion(snapshotVersionToUse).build()); assertFalse("Wrong return value from update operation.", accountService.updateAccounts(conflictAccounts)); assertEquals("Wrong account number in HelixAccountService", 2, accountService.getAllAccounts().size()); Account account = accountService.getAccountById((short) 1); assertEquals("Account should not have been updated", expectedAccount, account); assertEquals("Snapshot version should not have been updated", currentSnapshotVersion, account.getSnapshotVersion()); } Collection<Account> validAccounts = Collections.singleton( new AccountBuilder((short) 1, "c", AccountStatus.INACTIVE).snapshotVersion(currentSnapshotVersion).build()); updateAccountsAndAssertAccountExistence(validAccounts, 2, true); }
Source:
<code>public void testEmptyBaseUrl() throws Exception { String clientUuid = KeycloakModelUtils.generateId(); ClientRepresentation emptyBaseclient = ClientBuilder.create() .clientId("empty-baseurl-client") .id(clientUuid) .enabled(true) .baseUrl("") <START> .addRedirectUri("http://localhost:8180/auth/realms/master/app/auth/*") .addRedirectUri("https://localhost:8543/auth/realms/master/app/auth/*") <END> .secret("password") .build(); testRealm().clients().create(emptyBaseclient); getCleanup().addClientUuid(clientUuid); oauth.clientId("empty-baseurl-client"); oauth.openLoginForm(); loginPage.assertCurrent(); loginPage.login("login-test", "password"); updatePasswordPage.assertCurrent(); String tab1Url = driver.getCurrentUrl(); oauth.openLoginForm(); loginPage.assertCurrent(); loginPage.login("login-test", "password"); updatePasswordPage.assertCurrent(); updatePasswordPage.changePassword("password", "password"); updateProfilePage.update("John", "Doe3", "john@doe3.com"); appPage.assertCurrent(); driver.navigate().to(tab1Url); infoPage.assertCurrent(); Assert.assertEquals("You are already logged in.", infoPage.getInfo()); try { infoPage.clickBackToApplicationLink(); fail(); } catch (NoSuchElementException ex) }</code><technical_language>a small nitpick. I single .addRedirectUri("*")</technical_language>

Target:
public void testEmptyBaseUrl() throws Exception { String clientUuid = KeycloakModelUtils.generateId(); ClientRepresentation emptyBaseclient = ClientBuilder.create() .clientId("empty-baseurl-client") .id(clientUuid) .enabled(true) .baseUrl("") .addRedirectUri("*") .secret("password") .build(); testRealm().clients().create(emptyBaseclient); getCleanup().addClientUuid(clientUuid); oauth.clientId("empty-baseurl-client"); oauth.openLoginForm(); loginPage.assertCurrent(); loginPage.login("login-test", "password"); updatePasswordPage.assertCurrent(); String tab1Url = driver.getCurrentUrl(); oauth.openLoginForm(); loginPage.assertCurrent(); loginPage.login("login-test", "password"); updatePasswordPage.assertCurrent(); updatePasswordPage.changePassword("password", "password"); updateProfilePage.update("John", "Doe3", "john@doe3.com"); appPage.assertCurrent(); driver.navigate().to(tab1Url); infoPage.assertCurrent(); Assert.assertEquals("You are already logged in.", infoPage.getInfo()); try { infoPage.clickBackToApplicationLink(); fail(); } catch (NoSuchElementException ex) }
Source:
<code>private MethodHandle toMethodHandle(Method method) { if(isMethodDecorated(method)) { return getDecoratedMethodHandle(lookup, method, arity); <START> }else{ <END> try { MethodHandle target = lookup.unreflect(method); if (target.isVarargsCollector() && isLastArgumentAnArray(arity, args)) { return target.asFixedArity().asType(type); } else { return target.asType(type); } } catch (IllegalAccessException e) { return null; } } }</code><technical_language>add spaces else if :smile:</technical_language>

Target:
private MethodHandle toMethodHandle(Method method) { try { MethodHandle target = null; if (isMethodDecorated(method)) { target = getDecoratedMethodHandle(lookup, method, arity); } else { target = lookup.unreflect(method); if (argumentNames.length > 1) { target = FunctionCallSupport.reorderArguments(method, target, argumentNames); } if (target.isVarargsCollector() && isLastArgumentAnArray(arity, args)) { target = target.asFixedArity().asType(type); } else { target = target.asType(type); } } return target; } catch (IllegalAccessException e) { return null; } }
Source:
<code>public ModelAndView membershipDetail(@PathVariable long membershipGiveId) { ModelAndView modelAndView = new ModelAndView("/membership-give-edit"); modelAndView.addObject("userGroups", MembershipUserGroup.values()); <START> modelAndView.addObject("membershipLevels", Lists.newArrayList(0, 1, 2, 3, 4, 5)); <END> MembershipGiveDto membershipGiveDto = membershipGiveService.getMembershipGiveDtoById(membershipGiveId); modelAndView.addObject("membershipGiveId", membershipGiveDto.getId()); modelAndView.addObject("originMembershipLevel", membershipGiveDto.getMembershipLevel()); modelAndView.addObject("validPeriod", membershipGiveDto.getValidPeriod()); modelAndView.addObject("receiveStartTime", membershipGiveDto.getReceiveStartTime()); modelAndView.addObject("receiveEndTime", membershipGiveDto.getReceiveEndTime()); modelAndView.addObject("originUserGroup", membershipGiveDto.getUserGroup()); modelAndView.addObject("smsNotify", membershipGiveDto.isSmsNotify()); return modelAndView; }</code><technical_language>db find</technical_language>

Target:
public ModelAndView membershipDetail(@PathVariable long membershipGiveId) { ModelAndView modelAndView = new ModelAndView("/membership-give-edit"); MembershipGiveDto membershipGiveDto = membershipGiveService.getMembershipGiveDtoById(membershipGiveId); modelAndView.addObject("membershipGiveDto", membershipGiveDto); modelAndView.addObject("userGroups", MembershipUserGroup.values()); modelAndView.addObject("membershipLevels", Lists.newArrayList(userMembershipService.getAllLevels())); return modelAndView; }
Source:
<code><START> public List<HostNetworkQos> <END> getAll() { return hostNetworkQosDao.getAll(); }</code><technical_language>public required</technical_language>

Target:
List<HostNetworkQos> getAll() { return hostNetworkQosDao.getAll(); }
Source:
<code>protected void restoreSnapshot() { <START> relapseTime = System.currentTimeMillis() - snapshot.getSnapshotTime(); <END> for (ClockModel clock : getClockModels()) { clock.restoreSnapshot(snapshot.getClockSnapshot(clock.getId())); } for (TeamModel team : getTeamModels()) { team.restoreSnapshot(snapshot.getTeamSnapshot(team.getId())); } setTimeoutOwner(snapshot.getTimeoutOwner()); setOfficialReview(snapshot.isOfficialReview()); setInOvertime(snapshot.inOvertime()); setInPeriod(snapshot.inPeriod()); snapshot = null; }</code><technical_language>unittesting this System.currentTimeMillis stubbed out</technical_language>

Target:
protected long restoreSnapshot() { long relapseTime = DefaultClockModel.updateClockTimerTask.getCurrentTime() - snapshot.getSnapshotTime(); for (ClockModel clock : getClockModels()) { clock.restoreSnapshot(snapshot.getClockSnapshot(clock.getId())); } for (TeamModel team : getTeamModels()) { team.restoreSnapshot(snapshot.getTeamSnapshot(team.getId())); } setTimeoutOwner(snapshot.getTimeoutOwner()); setOfficialReview(snapshot.isOfficialReview()); setInOvertime(snapshot.inOvertime()); setInPeriod(snapshot.inPeriod()); snapshot = null; return relapseTime; }
Source:
<code>public ProcessProperty() { <START> this.container = new Integer(0); <END> this.value = ""; this.possibleValues = new ArrayList<String>(); this.projects = new ArrayList<String>(); this.showStepConditions = new ArrayList<ShowStepCondition>(); this.prozesseigenschaft = new Prozesseigenschaft(); }</code><technical_language>IntelliJ IDEA tolds remove this unnecessary boxing</technical_language>

Target:
public ProcessProperty() { this.container = 0; this.value = ""; this.possibleValues = new ArrayList<String>(); this.projects = new ArrayList<String>(); this.showStepConditions = new ArrayList<ShowStepCondition>(); this.prozesseigenschaft = new Prozesseigenschaft(); }
Source:
<code>public void getMrrtReportTemplate_shouldReturnNullIfNoMatchWasFound() throws Exception { <START> assertNull(mrrtReportTemplateService.getMrrtReportTemplate(23)); <END> }</code><technical_language>@ivange94 please constant do for existing id</technical_language>

Target:
public void getMrrtReportTemplate_shouldReturnNullIfNoMatchWasFound() throws Exception { assertNull(mrrtReportTemplateService.getMrrtReportTemplate(NON_EXISTING_TEMPLATE_ID)); }
Source:
<code><START> private NacosConfigListener createTargetListener(String key, String group) { <END> return new NacosConfigListener(); }</code><technical_language>input parameters used. Is necessary it</technical_language>

Target:
private NacosConfigListener createTargetListener(String key, String group) { NacosConfigListener configListener = new NacosConfigListener(); configListener.fillContext(key, group); return configListener; }