auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public CreateKeyOptions setEnabled(Boolean enabled) { <END> super.setEnabled(enabled); return this; }</code><technical_language>returning wrong type - return CreateEcKeyOptions</technical_language>

Target:
public CreateEcKeyOptions setEnabled(Boolean enabled) { super.setEnabled(enabled); return this; }
Source:
<code>private void puppetDelete(String vdc, String nodeName, String token) throws NodeExecutionException { puppetLog.info("deleting node " + nodeName + " from puppet master"); String deleteUrl = null; try { <START> deleteUrl = openStackRegion.getPuppetWrapperEndPoint(token) + "v2/node/" + nodeName; <END> } catch (OpenStackException e2) { puppetLog.warn(e2.getMessage()); } if (deleteUrl != null) { Map<String, String> headers = new HashMap<String, String>(); headers.put(HttpsClient.HEADER_AUTH, token); headers.put(HttpsClient.HEADER_TENNANT, vdc); try { int statusCode; statusCode = httpsClient.doHttpsDelete(deleteUrl, "", headers); if (statusCode == 200 || statusCode == 404) { log.info("Node deleted"); } else { String msg = format("[puppet delete node] response code was: {0}", statusCode); puppetLog.info(msg); throw new NodeExecutionException(msg); } puppetLog.info("Node succesfully deleted from pupper master"); } catch (IOException e) { puppetLog.info(e.getMessage()); throw new NodeExecutionException(e); } catch (IllegalStateException e1) { puppetLog.info(e1.getMessage()); throw new NodeExecutionException(e1); } catch (KeyManagementException | NoSuchAlgorithmException e2) { puppetLog.info(e2.getMessage()); throw new NodeExecutionException(e2); } } }</code><technical_language>is puppet instance region. Is correct? is for Chef</technical_language>

Target:
private void puppetDelete(String vdc, String nodeName, String token) throws NodeExecutionException { puppetLog.info("deleting node " + nodeName + " from puppet master"); String deleteUrl = null; try { deleteUrl = openStackRegion.getPuppetWrapperEndPoint(token) + "v2/node/" + nodeName; } catch (OpenStackException e2) { puppetLog.warn(e2.getMessage()); } if (deleteUrl != null) { Map<String, String> headers = new HashMap<String, String>(); headers.put(HttpsClient.HEADER_AUTH, token); headers.put(HttpsClient.HEADER_TENNANT, vdc); try { int statusCode; statusCode = httpsClient.doHttps(HttpMethod.DELETE, deleteUrl, "", headers); if (statusCode == 200 || statusCode == 404) { log.info("Node deleted"); } else { String msg = format("[puppet delete node] response code was: {0}", statusCode); puppetLog.info(msg); throw new NodeExecutionException(msg); } puppetLog.info("Node succesfully deleted from pupper master"); } catch (IOException e) { puppetLog.info(e.getMessage()); throw new NodeExecutionException(e); } catch (IllegalStateException e1) { puppetLog.info(e1.getMessage()); throw new NodeExecutionException(e1); } catch (KeyManagementException | NoSuchAlgorithmException e2) { puppetLog.info(e2.getMessage()); throw new NodeExecutionException(e2); } } }
Source:
<code>public void setTimeZone(String zoneId) { <START> this.timeZone = zoneId.equalsIgnoreCase("system") ? TimeZone.getDefault() : <END> TimeZone.getTimeZone(zoneId); }</code><technical_language>In case zoneId is null, put "system".equalsIgnoreCase(zoneId)</technical_language>

Target:
public void setTimeZone(String zoneId) { this.timeZone = nullToEmpty(zoneId).equalsIgnoreCase("system") ? TimeZone.getDefault() : TimeZone.getTimeZone(zoneId); }
Source:
<code>private <T> T resolveArgument(Message<I> message) { <START> logger.debug("Resolving input argument from message: " + message); <END> T result = this.shouldConvertFromMessage(message) ? (T) this.messageConverter.fromMessage(message, this.inputClass) : (T) message; if (result == message && !this.inputClass.isAssignableFrom(message.getClass())) { result = (T) message.getPayload(); } return result; }</code><technical_language>DITTO isDebugEnabled()</technical_language>

Target:
private <T> T resolveArgument(Message<I> message) { if (logger.isDebugEnabled()) { logger.debug("Resolving input argument from message: " + message); } T result = this.shouldConvertFromMessage(message) ? (T) this.messageConverter.fromMessage(message, this.inputClass) : (T) message; return result; }
Source:
<code>public void testOperatorSerialization() { Kryo kryo = new Kryo(); <START> ByteArrayOutputStream baos = new ByteArrayOutputStream(); <END> Output output = new Output(baos); kryo.writeObject(output, this.operator); output.close(); Input input = new Input(baos.toByteArray()); JsonFormatter jsonFormatter = kryo.readObject(input, JsonFormatter.class); Assert.assertNotNull("Json Formatter not null", jsonFormatter); }</code><technical_language>KryoCloneUtils</technical_language>

Target:
public void testOperatorSerialization() { Assert.assertNotNull("Serialization", KryoCloneUtils.cloneObject(this.operator)); }
Source:
<code>private boolean shouldLoad(InvocationContext ctx, AbstractDataWriteCommand command, DistributionInfo info) { if (!command.hasAnyFlag(FlagBitSets.SKIP_REMOTE_LOOKUP)) { VisitableCommand.LoadType loadType = command.loadType(); switch (loadType) { case DONT_LOAD: return false; case OWNER: <START> return info.isPrimary() || info.isWriteOwner() && !ctx.isOriginLocal(); <END> case PRIMARY: return info.isPrimary(); default: throw new IllegalStateException(); } } else { return false; } }</code><technical_language>Please parentheses combining || && improve readability</technical_language>

Target:
private boolean shouldLoad(InvocationContext ctx, AbstractDataWriteCommand command, DistributionInfo info) { if (!command.hasAnyFlag(FlagBitSets.SKIP_REMOTE_LOOKUP)) { VisitableCommand.LoadType loadType = command.loadType(); switch (loadType) { case DONT_LOAD: return false; case OWNER: return info.isPrimary() || (info.isWriteOwner() && !ctx.isOriginLocal()); case PRIMARY: return info.isPrimary(); default: throw new IllegalStateException(); } } else { return false; } }
Source:
<code>private void start() { if (getSelectedItems() == null) { return; } ArrayList<VdcActionParametersBase> downList = new ArrayList<VdcActionParametersBase>(); ArrayList<String> volumesForForceStartWarning = new ArrayList<>(); for (Object item : getSelectedItems()) { GlusterVolumeEntity volume = (GlusterVolumeEntity) item; VolumeStatus status = GlusterVolumeUtils.getVolumeStatus(volume); if (status == VolumeStatus.DOWN) { downList.add(new GlusterVolumeActionParameters(volume.getId(), false)); } else if (status == VolumeStatus.ALL_BRICKS_DOWN || status == VolumeStatus.SOME_BRICKS_DOWN) { volumesForForceStartWarning.add(volume.getName()); } } <START> if (!downList.isEmpty()) { onStartVolume(downList); } <END> if (!volumesForForceStartWarning.isEmpty()) { ConfirmationModel cModel = new ConfirmationModel(); cModel.setHelpTag(HelpTag.volume_start); cModel.setHashName("volume_start"); setConfirmWindow(cModel); cModel.setMessage(ConstantsManager.getInstance().getConstants().startForceVolumeMessage()); cModel.setTitle(ConstantsManager.getInstance().getConstants().confirmStartVolume()); cModel.setForceLabel(ConstantsManager.getInstance().getConstants().startForceLabel()); cModel.setItems(volumesForForceStartWarning); cModel.getForce().setIsAvailable(true); cModel.getCommands().add(UICommand.createDefaultOkUiCommand("startVolumeWithForceOption", this)); cModel.getCommands().add(UICommand.createCancelUiCommand("closeConfirmationWindow", this)); } }</code><technical_language>confusing if do this user is waiting in confirmation pop for started volume. start volumes(with force)after confirmation for force(if is case for force) in a single call</technical_language>

Target:
private void start() { if (getSelectedItems() == null) { return; } ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>(); ArrayList<String> volumesForForceStartWarning = new ArrayList<>(); for (Object item : getSelectedItems()) { GlusterVolumeEntity volume = (GlusterVolumeEntity) item; VolumeStatus status = GlusterVolumeUtils.getVolumeStatus(volume); } for (Object item : getSelectedItems()) { GlusterVolumeEntity volume = (GlusterVolumeEntity) item; VolumeStatus status = GlusterVolumeUtils.getVolumeStatus(volume); if (status == VolumeStatus.ALL_BRICKS_DOWN || status == VolumeStatus.SOME_BRICKS_DOWN) { volumesForForceStartWarning.add(volume.getName()); } } if (!volumesForForceStartWarning.isEmpty()) { ConfirmationModel cModel = new ConfirmationModel(); cModel.setHelpTag(HelpTag.volume_start); cModel.setHashName("volume_start"); setConfirmWindow(cModel); cModel.setMessage(ConstantsManager.getInstance().getConstants().startForceVolumeMessage()); cModel.setTitle(ConstantsManager.getInstance().getConstants().confirmStartVolume()); cModel.setForceLabel(ConstantsManager.getInstance().getConstants().startForceLabel()); cModel.setItems(volumesForForceStartWarning); cModel.getForce().setIsAvailable(true); cModel.getCommands().add(UICommand.createDefaultOkUiCommand("startVolumeWithForceOption", this)); cModel.getCommands().add(UICommand.createCancelUiCommand("closeConfirmationWindow", this)); } else { prepareForStartVolume(); } }
Source:
<code>public Response welcomeUser(OsuApiUser apiUser, long inactiveTime) { String username = apiUser.getUserName(); String greeting = ""; if (inactiveTime < 4 * 60 * 1000) { greeting = welcomeUserShortShuffler.get( "Was soll das hier sein, das Kuckuckspiel?", "Das waren nicht mal fünf Minuten...", <START> "Heute hat " + username + "an seinem Verschwindungszauber geübt." <END> ); } else if (inactiveTime < 4l * 24 * 60 * 60 * 1000) { greeting = welcomeUserShuffler.get( "Wieder da? Ich bin nur hier weil ich nix zu tun hab! Nichts weiter!", "H-hey...", "♫ Zuhause, zuhause, lalalalala ♫ .... Was?", "Stell dir vor! Ich habe endlich deine Bestimmung gefunden. Sie gehört allerdings nicht zu der Art von Dingen, die ich gerne teile!", "Du hast doch nicht etwa mit anderen Chatbots geredet, oder?", "Huch? Was machst du denn hier!?", "Mach was dummes " + username + ", damit ich dich dafür bestrafen kann." ); } else { greeting = welcomeUserLongShuffler.get( "Wo warst du " + username + "!? N-nicht das ich dich vermisst hätte oder so...", "Wie war dein Urlaub " + username + "?", "Ugh! Weißt du wie lang " + inactiveTime + " Millisekunden ist!?" ); } if (inactiveTime > 4 * 60 * 60 * 1000) { recentRecommendations = 0; recentHugs = 0; } setChanged(true); return new Message(greeting); }</code><technical_language>Verschwindungszauber This feel correct term</technical_language>

Target:
public Response welcomeUser(OsuApiUser apiUser, long inactiveTime) { String username = apiUser.getUserName(); String greeting = ""; if (inactiveTime < 4 * 60 * 1000) { greeting = welcomeUserShortShuffler.get( "Das waren nicht mal fünf Minuten...", username + " hat heute seinen Verschwindibuszauber perfektioniert." ); } else if (inactiveTime < 4l * 24 * 60 * 60 * 1000) { greeting = welcomeUserShuffler.get( "Wieder da? Ich bin nur hier weil ich nix zu tun hab! Nichts weiter!", "H-hey...", "♫ Home again, home again, jiggety-jig ♫ .... Was?", "Stell dir vor! Ich habe endlich deine Bestimmung gefunden. Sie gehört allerdings nicht zu der Art von Dingen, die ich gerne teile!", "Du hast doch nicht etwa mit anderen Chatbots geredet, oder?", "Huch? Was machst du denn hier!?", "Mach was dummes, " + username + ", damit ich dich dafür bestrafen kann." ); } else { greeting = welcomeUserLongShuffler.get( "Wo warst du, " + username + "!? N-nicht das ich dich vermisst hätte oder so...", "Wie war dein Urlaub, " + username + "?", "Ugh! Weißt du, wie lang " + inactiveTime + " Millisekunden sind!?" ); } if (inactiveTime > 4 * 60 * 60 * 1000) { recentRecommendations = 0; recentHugs = 0; } setChanged(true); return new Message(greeting); }
Source:
<code>public ListBoxModel doFillJobCredentialIdItems(@QueryParameter String siteName) { JiraSite site = getSiteByName(siteName); <START> URL url = null != site ? site.getUrl() : null; <END> if(null == url) { return new StandardUsernameListBoxModel() .includeEmptyValue(); } return new StandardUsernameListBoxModel() .includeEmptyValue() .includeMatchingAs(ACL.SYSTEM, Jenkins.getInstance(), StandardUsernamePasswordCredentials.class, URIRequirementBuilder.fromUri(url.toString()).build(), CredentialsMatchers.instanceOf(StandardUsernamePasswordCredentials.class)); }</code><technical_language>simplified to: if (site == null) { return new StandardUsernameListBoxModel().includeEmptyValue(); } else { URL url = site.getUrl(); ... }</technical_language>

Target:
public ListBoxModel doFillJobCredentialIdItems(@QueryParameter String siteName) { JiraSite site = JiraSite.get(siteName); if(site == null) { return new StandardUsernameListBoxModel() .includeEmptyValue(); } URL url = site.getUrl(); return new StandardUsernameListBoxModel() .includeEmptyValue() .includeMatchingAs(ACL.SYSTEM, Jenkins.getInstance(), StandardUsernamePasswordCredentials.class, URIRequirementBuilder.fromUri(url.toString()).build(), CredentialsMatchers.instanceOf(StandardUsernamePasswordCredentials.class)); }
Source:
<code>public boolean accepts(Class<?> extensionType) { if (GetHandle.class.isAssignableFrom(extensionType) || Transactional.class.isAssignableFrom(extensionType)) { return true; } MemberResolver mr = new MemberResolver(typeResolver); ResolvedType extension_type = typeResolver.resolve(extensionType); ResolvedTypeWithMembers d = mr.resolve(extension_type, null, null); for (ResolvedMethod method : d.getMemberMethods()) { Method rawMethod = method.getRawMember(); <START> if (rawMethod.isAnnotationPresent(SqlQuery.class) <END> || rawMethod.isAnnotationPresent(SqlUpdate.class) || rawMethod.isAnnotationPresent(SqlBatch.class) || rawMethod.isAnnotationPresent(SqlCall.class) || rawMethod.isAnnotationPresent(CreateSqlObject.class) || rawMethod.isAnnotationPresent(Transaction.class)) { return true; } } return false; }</code><technical_language>This hardcoded list sucks. a meta-annotation? java @SqlObjectAnnotation public @interface SqlQuery { ... }</technical_language>

Target:
public boolean accepts(Class<?> extensionType) { if (GetHandle.class.isAssignableFrom(extensionType) || Transactional.class.isAssignableFrom(extensionType)) { return true; } MemberResolver mr = new MemberResolver(typeResolver); ResolvedType extension_type = typeResolver.resolve(extensionType); ResolvedTypeWithMembers d = mr.resolve(extension_type, null, null); return Stream.of(d.getMemberMethods()) .flatMap(m -> Stream.of(m.getRawMember().getAnnotations())) .anyMatch(a -> a.annotationType().isAnnotationPresent(SqlMethodAnnotation.class)); }
Source:
<code>private void validateRequiredInputs(Map<String, Schema> inputSchemas, FailureCollector collector) { for (String requiredInput : conf.getInputs()) { <START> if (!inputSchemas.isEmpty() && !inputSchemas.containsKey(requiredInput)) { <END> collector.addFailure(String.format("Provided input '%s' must be an input stage name.", requiredInput), null) .withConfigElement(JoinerConfig.REQUIRED_INPUTS, requiredInput); } } }</code><technical_language>!inputSchemas.isEmpty() - this is check inputSchemasAvailable right</technical_language>

Target:
private void validateRequiredInputs(Map<String, Schema> inputSchemas, FailureCollector collector) { for (String requiredInput : conf.getInputs()) { if (conf.inputSchemasAvailable(inputSchemas) && !inputSchemas.containsKey(requiredInput)) { collector.addFailure(String.format("Provided input '%s' must be an input stage name.", requiredInput), null) .withConfigElement(JoinerConfig.REQUIRED_INPUTS, requiredInput); } } }
Source:
<code>private boolean inLandscapeFormEntry(Activity a) { <START> return (a instanceof FormEntryActivity) && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; <END> }</code><technical_language>This function static if call getResources()... a argument</technical_language>

Target:
private static boolean inLandscapeFormEntry(Activity a) { return (a instanceof FormEntryActivity) && a.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { TeeHttpServletResponse resp = new TeeHttpServletResponse( (HttpServletResponse) response); chain.doFilter(request, resp); if (resp.getStatus() >= 200 && resp.getStatus() < 300) { eventSinkProvider.get().sendEvents(); } else { if (log.isDebugEnabled()) { log.debug("Request failed, skipping event sending, status=" + resp.getStatus()); <START> } <END> } }</code><technical_language>I rewrite this java import javax.ws.rs.core.Response.Status; ... chain.doFilter(request, resp); Status status = Status.fromStatusCode(resp.getStatus()); if (status.getFamily() == Status.Family.SUCCESSFUL) { eventSinkProvider.get().sendEvents(); } else { log.debug("Request failed, skipping event sending, status={}", status); } (It's do == Enums equals() if desired) if want stick integers, store status integer if isDebugEnabled() block</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { TeeHttpServletResponse resp = new TeeHttpServletResponse( (HttpServletResponse) response); chain.doFilter(request, resp); Status status = Status.fromStatusCode(resp.getStatus()); if (status.getFamily() == Status.Family.SUCCESSFUL) { eventSinkProvider.get().sendEvents(); } else { log.debug("Request failed, skipping event sending, status={}", status); } }
Source:
<code><START> public void enable() { <END> ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstanceFor(connection()); if (disco.includesFeature(NAMESPACE)) { return; } disco.addFeature(NAMESPACE); connection().addPacketInterceptor(stanzaListener, OUTGOING_FILTER); }</code><technical_language>Please enable() disable() synchronized remove shortcuts</technical_language>

Target:
public synchronized void enable() { ServiceDiscoveryManager.getInstanceFor(connection()).addFeature(NAMESPACE); StanzaFilter filter = new AndFilter(OUTGOING_FILTER, new NotFilter(OUTGOING_FILTER)); connection().addPacketInterceptor(stanzaListener, filter); }
Source:
<code>public final void wrapsIndexOutOfBoundsExceptionFromSubList() throws Exception { <START> final int frmidx = 2; <END> final int toidx = 5; final Exception cause = new IndexOutOfBoundsException(); Mockito.doThrow(cause).when(this.origin).subList(frmidx, toidx); this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage(MSG); this.thrown.expectCause(Matchers.is(cause)); this.list.subList(frmidx, toidx); }</code><technical_language>@Happy-Neko call this from, [avoid compound names](<LINK_0></technical_language>

Target:
public final void wrapsIndexOutOfBoundsExceptionFromSubList() throws Exception { final int from = 2; final int toidx = 5; final Exception cause = new IndexOutOfBoundsException(); Mockito.doThrow(cause).when(this.origin).subList(from, toidx); this.thrown.expect(IndexOutOfBoundsException.class); this.thrown.expectMessage(MSG); this.thrown.expectCause(Matchers.is(cause)); this.list.subList(from, toidx); }
Source:
<code>protected void moveOrCopyAllImageGroups(Guid containerID, Iterable<DiskImage> disks) { for (DiskImage disk : disks) { ActionReturnValue vdcRetValue = runInternalActionWithTasksContext( ActionType.CopyImageGroup, buildMoveOrCopyImageGroupParametersForDisk(disk, containerID)); if (!vdcRetValue.getSucceeded()) { throw new EngineException(vdcRetValue.getFault().getError(), "Failed to copy disk!"); } <START> getReturnValue().getVdsmTaskIdList().addAll(vdcRetValue.getInternalVdsmTaskIdList()); <END> } }</code><technical_language>I assume behavior ExportVmCommand. Do need this</technical_language>

Target:
protected void moveOrCopyAllImageGroups(Guid containerID, Iterable<DiskImage> disks) { for (DiskImage disk : disks) { ActionReturnValue vdcRetValue = runInternalActionWithTasksContext( ActionType.CopyImageGroup, buildMoveOrCopyImageGroupParametersForDisk(disk, containerID)); if (!vdcRetValue.getSucceeded()) { throw new EngineException(vdcRetValue.getFault().getError(), "Failed to copy disk!"); } getTaskIdList().addAll(vdcRetValue.getVdsmTaskIdList()); } }
Source:
<code>void peekBatchMessagesFromSequence() { final String messageId = UUID.randomUUID().toString(); final String contents = "Some-contents"; final ServiceBusMessage message = TestUtils.getServiceBusMessage(contents, messageId, 0); int maxMessages = 2; int fromSequenceNumber = 1; <START> StepVerifier.create(sender.send(message) <END> .then(sender.send(message)) .thenMany(receiver.peekBatch(maxMessages, fromSequenceNumber))) .expectNextCount(maxMessages) .verifyComplete(); }</code><technical_language>Try Mono.when(sender.send(message), sender.send(message))</technical_language>

Target:
void peekBatchMessagesFromSequence() { final String messageId = UUID.randomUUID().toString(); final String contents = "Some-contents"; final ServiceBusMessage message = TestUtils.getServiceBusMessage(contents, messageId, 0); int maxMessages = 2; int fromSequenceNumber = 1; StepVerifier.create(Mono.when(sender.send(message), sender.send(message)) .thenMany(receiver.peekBatch(maxMessages, fromSequenceNumber))) .expectNextCount(maxMessages) .verifyComplete(); }
Source:
<code>private void initializeEnvironment(String workspaceId, String envName, Environment env, String networkId, MessageConsumer<MachineLogMessage> messageConsumer) throws ServerException, ConflictException { ComposeEnvironmentImpl composeEnvironment = environmentParser.parse(env); <START> for (Map.Entry<String, ComposeServiceImpl> entry : composeEnvironment.getServices().entrySet()) { <END> String machineName = entry.getKey(); ComposeServiceImpl composeService = entry.getValue(); List<String> agents = env.getMachines().get(machineName).getAgents(); try { agentConfigApplier.modify(composeService, agents); } catch (AgentException e) { throw new MachineException("Can't apply agent config", e); } } normalizeEnvironment(composeEnvironment); List<String> servicesOrder = startStrategy.order(composeEnvironment); EnvironmentHolder environmentHolder = new EnvironmentHolder(servicesOrder, composeEnvironment, messageConsumer, EnvStatus.STARTING, envName, networkId); try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { if (environments.putIfAbsent(workspaceId, environmentHolder) != null) { throw new ConflictException(format("Environment of workspace '%s' already exists", workspaceId)); } } }</code><technical_language>Please this method simple moving added logic in separate method</technical_language>

Target:
private void initializeEnvironment(String workspaceId, String envName, Environment env, String networkId, MessageConsumer<MachineLogMessage> messageConsumer) throws ServerException, ConflictException { ComposeEnvironmentImpl composeEnvironment = environmentParser.parse(env); applyAgents(env, composeEnvironment); normalizeEnvironment(composeEnvironment); List<String> servicesOrder = startStrategy.order(composeEnvironment); EnvironmentHolder environmentHolder = new EnvironmentHolder(servicesOrder, composeEnvironment, messageConsumer, EnvStatus.STARTING, envName, networkId); try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { if (environments.putIfAbsent(workspaceId, environmentHolder) != null) { throw new ConflictException(format("Environment of workspace '%s' already exists", workspaceId)); } } }
Source:
<code>private List<Blob> getPreviewBlobs(DocumentBlobHolder bh, boolean blobPostProcessing) { DocumentModel doc = bh.getDocument(); String xpath = bh.getXpath(); HtmlPreviewAdapter preview; try { if (isBlobTarget() && !isBlobHolder(doc, xpath)) { preview = PreviewHelper.getBlobPreviewAdapter(doc); return preview.getFilePreviewBlobs(xpath, blobPostProcessing); } preview = doc.getAdapter(HtmlPreviewAdapter.class); if (preview == null) { return null; } return preview.getFilePreviewBlobs(blobPostProcessing); } catch (PreviewException e) { <START> throw new WebResourceNotFoundException("Preview not available"); <END> } }</code><technical_language>Is purpose give exception WebResourceNotFoundException</technical_language>

Target:
private List<Blob> getPreviewBlobs(DocumentBlobHolder bh, boolean blobPostProcessing) { DocumentModel doc = bh.getDocument(); String xpath = bh.getXpath(); HtmlPreviewAdapter preview; try { if (isBlobTarget() && !isBlobHolder(doc, xpath)) { preview = PreviewHelper.getBlobPreviewAdapter(doc); return preview.getFilePreviewBlobs(xpath, blobPostProcessing); } preview = doc.getAdapter(HtmlPreviewAdapter.class); if (preview == null) { return null; } return preview.getFilePreviewBlobs(blobPostProcessing); } catch (PreviewException e) { throw new WebResourceNotFoundException("Preview not available", e); } }
Source:
<code>public static IntegrationTestInitService getInstance() { if (service == null) { service = new IntegrationTestInitService(); <START> } <END> return service; }</code><technical_language>is a thread safe implement a singleton. explain point: <LINK_0></technical_language>

Target:
public static IntegrationTestInitService getInstance() { return service; }
Source:
<code>public void updateConfigSetLastUpdateDownloadStatus_getValueByReflection_correctValue() { UpdateConfig updateConfig = new UpdateConfig(); try { Class<?> updateConfigClass = updateConfig.getClass(); Field lastUpdateDownloadStatusField = updateConfigClass.getDeclaredField("lastUpdateDownloadStatus"); lastUpdateDownloadStatusField.setAccessible(true); updateConfig.setLastUpdateDownloadStatus(true); assertTrue((boolean) lastUpdateDownloadStatusField.get(updateConfig)); updateConfig.setLastUpdateDownloadStatus(false); assertFalse((boolean) lastUpdateDownloadStatusField.get(updateConfig)); <START> } catch (NoSuchFieldException e) { <END> fail("No field lastUpdateDownloadStatus."); } catch (IllegalAccessException e) { fail("Can't access field lastUpdateDownloadStatus"); } }</code><technical_language>exceptions method signature I think. Removes some clutter</technical_language>

Target:
public void updateConfigSetLastUpdateDownloadStatus_getValueByReflection_correctValue() throws NoSuchFieldException, IllegalAccessException { UpdateConfig updateConfig = new UpdateConfig(); Class<?> updateConfigClass = updateConfig.getClass(); Field isLastAppUpdateDownloadSuccessfulField = updateConfigClass.getDeclaredField("isLastAppUpdateDownloadSuccessful"); isLastAppUpdateDownloadSuccessfulField.setAccessible(true); updateConfig.setLastAppUpdateDownloadSuccessful(true); assertTrue((boolean) isLastAppUpdateDownloadSuccessfulField.get(updateConfig)); updateConfig.setLastAppUpdateDownloadSuccessful(false); assertFalse((boolean) isLastAppUpdateDownloadSuccessfulField.get(updateConfig)); }
Source:
<code>public OkPacket(Buffer buffer, long clientCapabilities) { <START> buffer.skipByte(); END> affectedRows = buffer.getLengthEncodedNumeric(); insertId = buffer.getLengthEncodedNumeric(); if ((clientCapabilities & MariaDbServerCapabilities.CLIENT_PROTOCOL_41) !=0) { statusFlags = buffer.readShort(); warnings = buffer.readShort(); } else if ((clientCapabilities & MariaDbServerCapabilities.TRANSACTIONS) !=0) { statusFlags = buffer.readShort(); warnings = 0; } else { statusFlags = 0; warnings = 0; } String message = ""; String sessionStateMessage = ""; if (buffer.remaining() > 0) { if ((clientCapabilities & MariaDbServerCapabilities.CLIENT_SESSION_TRACK) !=0) { message = buffer.readStringLengthEncoded(StandardCharsets.UTF_8); if ((statusFlags & MariaDbServerCapabilities.SERVER_SESSION_STATE_CHANGED) !=0) { sessionStateMessage = buffer.readStringLengthEncoded(StandardCharsets.UTF_8); } } else { message = buffer.readStringNullEnd(StandardCharsets.UTF_8); } } info = message; sessionStateInfo = sessionStateMessage; }</code><technical_language>suggestion buffer.skipByte(); // OkPacket Header this need checked ensure 0x00 (or 0xFE for EOF payload functioning OK payload?) assume correct</technical_language>

Target:
public OkPacket(Buffer buffer, long clientCapabilities) { buffer.skipByte(); affectedRows = buffer.getLengthEncodedNumeric(); insertId = buffer.getLengthEncodedNumeric(); statusFlags = buffer.readShort(); warnings = buffer.readShort(); String message = ""; String sessionStateMessage = ""; if (buffer.remaining() > 0) { if ((clientCapabilities & MariaDbServerCapabilities.CLIENT_SESSION_TRACK) !=0) { message = buffer.readStringLengthEncoded(StandardCharsets.UTF_8); if ((statusFlags & ServerStatus.SERVER_SESSION_STATE_CHANGED) !=0 && buffer.remaining() > 0) { sessionStateMessage = buffer.readStringLengthEncoded(StandardCharsets.UTF_8); } } else { message = buffer.readStringNullEnd(StandardCharsets.UTF_8); } } info = message; sessionStateInfo = sessionStateMessage; }
Source:
<code>private void logError(String msg, @Nullable Throwable e) { if (e != null) { if (X.hasCause(e, NodeStoppingException.class)) { if (log.isDebugEnabled()) <START> U.error(log, msg, e); <END> } else U.error(log, msg, e); } }</code><technical_language>I understand check debug level log error,</technical_language>

Target:
private void logError(String msg, @Nullable Throwable e) { if (e != null && (log.isDebugEnabled() || !X.hasCause(e, NodeStoppingException.class))) U.error(log, msg, e); }
Source:
<code>public DynamicUrlContentTabProxy create( Type<RequestTabsHandler> requestTabsEventType, Type<ChangeTabHandler> changeTabEventType, Type<RevealContentHandler<?>> slot, String label, float priority, String historyToken, boolean isMainTab, String contentUrl, Align align, String searchPrefix) { if (isMainTab) { if (searchPrefix == null) { <START> searchPrefix = label; <END> } commonModelProvider.get().addUiPluginListModel(searchPrefix, historyToken); } return new DynamicUrlContentTabProxy( placeManager, eventBus, gatekeeper, requestTabsEventType, changeTabEventType, slot, viewProvider, label, priority, historyToken, isMainTab, contentUrl, align, commonModelProvider); }</code><technical_language>avoid habit of re-writing method parameter values. about: if (isMainTab) { commonModelProvider.get().addPluginModel( searchPrefix != null ? searchPrefix : label, historyToken); }</technical_language>

Target:
public DynamicUrlContentTabProxy create( Type<RequestTabsHandler> requestTabsEventType, Type<ChangeTabHandler> changeTabEventType, Type<RevealContentHandler<?>> slot, String label, float priority, String historyToken, boolean isMainTab, String contentUrl, Align align, String searchPrefix) { if (isMainTab) { commonModelProvider.get().addPluginModel(historyToken, searchPrefix != null ? searchPrefix : historyToken); } return new DynamicUrlContentTabProxy( placeManager, eventBus, gatekeeper, requestTabsEventType, changeTabEventType, slot, viewProvider, label, priority, historyToken, isMainTab, contentUrl, align, commonModelProvider); }
Source:
<code>private String getSequenceNumberInternal(StreamPartition<String> partition, ShardIteratorType iteratorEnum) { String shardIterator = null; try { shardIterator = kinesis.getShardIterator( partition.getStream(), partition.getPartitionId(), iteratorEnum.toString() ).getShardIterator(); } catch (ResourceNotFoundException e) { <START> log.warn("Caught ResourceNotFoundException: %s", e.getMessage()); <END> } return getSequenceNumberInternal(partition, shardIterator); }</code><technical_language>Please include exception instance instead of message</technical_language>

Target:
private String getSequenceNumberInternal(StreamPartition<String> partition, ShardIteratorType iteratorEnum) { String shardIterator = null; try { shardIterator = kinesis.getShardIterator( partition.getStream(), partition.getPartitionId(), iteratorEnum.toString() ).getShardIterator(); } catch (ResourceNotFoundException e) { log.warn(e, "Caught ResourceNotFoundException while getting shardIterator"); } return getSequenceNumberInternal(partition, shardIterator); }
Source:
<code>public BackgroundHiveSplitLoader( String connectorId, Table table, Iterable<HivePartitionMetadata> partitions, Optional<HiveBucketHandle> bucketHandle, List<HiveBucket> buckets, ConnectorSession session, HdfsEnvironment hdfsEnvironment, NamenodeStats namenodeStats, DirectoryLister directoryLister, Executor executor, int maxPartitionBatchSize, int maxInitialSplits, boolean recursiveDirWalkerEnabled) { this.connectorId = connectorId; this.table = table; this.bucketHandle = bucketHandle; this.buckets = buckets; this.maxSplitSize = getMaxSplitSize(session); this.maxPartitionBatchSize = maxPartitionBatchSize; this.session = session; this.hdfsEnvironment = hdfsEnvironment; this.namenodeStats = namenodeStats; this.directoryLister = directoryLister; this.maxInitialSplitSize = getMaxInitialSplitSize(session); this.remainingInitialSplits = new AtomicInteger(maxInitialSplits); this.recursiveDirWalkerEnabled = recursiveDirWalkerEnabled; this.executor = executor; this.partitions = new ConcurrentLazyQueue<>(partitions); <START> hdfsContext = new HdfsContext(session, table.getDatabaseName(), table.getTableName()); <END> }</code><technical_language>Add this consistent</technical_language>

Target:
public BackgroundHiveSplitLoader( String connectorId, Table table, Iterable<HivePartitionMetadata> partitions, Optional<HiveBucketHandle> bucketHandle, List<HiveBucket> buckets, ConnectorSession session, HdfsEnvironment hdfsEnvironment, NamenodeStats namenodeStats, DirectoryLister directoryLister, Executor executor, int maxPartitionBatchSize, int maxInitialSplits, boolean recursiveDirWalkerEnabled) { this.connectorId = connectorId; this.table = table; this.bucketHandle = bucketHandle; this.buckets = buckets; this.maxSplitSize = getMaxSplitSize(session); this.maxPartitionBatchSize = maxPartitionBatchSize; this.session = session; this.hdfsEnvironment = hdfsEnvironment; this.namenodeStats = namenodeStats; this.directoryLister = directoryLister; this.maxInitialSplitSize = getMaxInitialSplitSize(session); this.remainingInitialSplits = new AtomicInteger(maxInitialSplits); this.recursiveDirWalkerEnabled = recursiveDirWalkerEnabled; this.executor = executor; this.partitions = new ConcurrentLazyQueue<>(partitions); this.hdfsContext = new HdfsContext(session, table.getDatabaseName(), table.getTableName()); }
Source:
<code>public static <T> Map<String, T> loadAllFilesInPath(Path path, Class<T> clazz) throws IOException { Map<String, T> fileContents = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); Stream<Path> paths = Files.walk(path); paths .filter(filePath -> filePath.toFile().getName().endsWith(".json")) .forEach(filePath -> { try { Stream<String> lines = Files.lines(filePath); String fileAsString = lines.collect(Collectors.joining()); lines.close(); if (clazz == String.class) { fileContents.put(getFileNameFromPath(filePath), (T) cleanupJsonString(fileAsString)); <START> } <END> else { fileContents.put(getFileNameFromPath(filePath), mapper.readValue(cleanupJsonString(fileAsString), clazz)); } } catch (IOException e) { e.printStackTrace(); } }); return fileContents; }</code><technical_language>Confused Java. } else { (all line)</technical_language>

Target:
public static <T> Map<String, T> loadAllFilesInPath(Path path, Class<T> clazz) throws IOException { Map<String, T> fileContents = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); Stream<Path> paths = Files.walk(path); paths .filter(filePath -> filePath.toFile().getName().endsWith(".json")) .forEach(filePath -> { try { Stream<String> lines = Files.lines(filePath); String fileAsString = lines.collect(Collectors.joining()); lines.close(); if (clazz == String.class) { String cleanedJsonString = cleanupJsonString(fileAsString); T c = (T) cleanedJsonString; fileContents.put(getFileNameFromPath(filePath), c); } else { fileContents.put(getFileNameFromPath(filePath), mapper.readValue(cleanupJsonString(fileAsString), clazz)); } } catch (IOException e) { e.printStackTrace(); } }); return fileContents; }
Source:
<code>private Ref getRef(PlotCommit commit, Repository repository, String currentBranch) { int count = commit.getRefCount(); if (count == 0) return new ObjectIdRef.Unpeeled(Storage.LOOSE, commit.getName(), commit); else if (count == 1) return commit.getRef(0); else { BranchConfig branchConfig = new BranchConfig(repository.getConfig(), currentBranch); <START> String trackingBranch = branchConfig.getRemoteTrackingBranch(); <END> Ref remoteRef = null; for (int i = 0; i < count; i++) { Ref ref = commit.getRef(i); if (trackingBranch != null && trackingBranch.equals(ref.getName())) return ref; if (ref.getName().startsWith(Constants.R_REMOTES)) remoteRef = ref; } if (remoteRef != null) return remoteRef; else return commit.getRef(0); } }</code><technical_language>change I74e932d5eacd74dbf6b0dffcfc65ba3222a8250e this getTrackingBranch(), this work if tracked branch is a local</technical_language>

Target:
private Ref getRef(PlotCommit commit, Repository repository, String currentBranch) { int count = commit.getRefCount(); if (count == 0) return new ObjectIdRef.Unpeeled(Storage.LOOSE, commit.getName(), commit); else if (count == 1) return commit.getRef(0); else { BranchConfig branchConfig = new BranchConfig(repository.getConfig(), currentBranch); String trackingBranch = branchConfig.getTrackingBranch(); Ref remoteRef = null; for (int i = 0; i < count; i++) { Ref ref = commit.getRef(i); if (trackingBranch != null && trackingBranch.equals(ref.getName())) return ref; if (ref.getName().startsWith(Constants.R_REMOTES)) remoteRef = ref; } if (remoteRef != null) return remoteRef; else return commit.getRef(0); } }
Source:
<code>public boolean next() throws IOException { try { boolean opNotEOF = true; if (!initialized) { opNotEOF = Utilities.skipHeader(sourceReader, skipFooterCnt, key, value); if (opNotEOF && skipFooterCnt > 0) { footerBuffer = new FooterBuffer(); opNotEOF = footerBuffer.initializeBuffer(jobConf, sourceReader, skipFooterCnt, (WritableComparable) key, value); } this.initialized = true; } if (opNotEOF && footerBuffer == null) { opNotEOF = sourceReader.next(key, value); } if (opNotEOF && footerBuffer != null) { opNotEOF = footerBuffer.updateBuffer(jobConf, sourceReader, (WritableComparable) key, value); } if (opNotEOF) { return true; } else { <START> close(); <END> return false; } } catch (Exception e) { throw new IOException(e); } }</code><technical_language>close calls in this method before. closing file responsibility of this class now</technical_language>

Target:
public boolean next() throws IOException { try { boolean opNotEOF = true; if (!initialized) { opNotEOF = Utilities.skipHeader(sourceReader, skipFooterCnt, key, value); if (opNotEOF && skipFooterCnt > 0) { footerBuffer = new FooterBuffer(); opNotEOF = footerBuffer.initializeBuffer(jobConf, sourceReader, skipFooterCnt, (WritableComparable) key, value); } this.initialized = true; } if (opNotEOF && footerBuffer == null) { opNotEOF = sourceReader.next(key, value); } if (opNotEOF && footerBuffer != null) { opNotEOF = footerBuffer.updateBuffer(jobConf, sourceReader, (WritableComparable) key, value); } if (opNotEOF) { return true; } else { return false; } } catch (Exception e) { throw new IOException(e); } }
Source:
<code>public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); Resource resource = context.getOriginalRootResource(); for (final PathElement element : address) { resource = resource.getChild(element); } byte[] contentHash = resource.getModel().get(CONTENT).asBytes(); try { TypedInputStream inputStream = contentRepository.readContent(contentHash, ""); String uuid = context.attachResultStream(inputStream.getContentType(), inputStream); context.getResult().get(UUID).set(uuid); } catch (ExplodedContentException ex) { <START> throw new OperationFailedException(ex.getMessage(), ex); <END> } }</code><technical_language>this a RuntimeException? OFE a client mistake of some form. Server faults runtime exceptions get logged in server</technical_language>

Target:
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); Resource resource = context.getOriginalRootResource(); for (final PathElement element : address) { resource = resource.getChild(element); } byte[] contentHash = resource.getModel().get(CONTENT).asBytes(); try { TypedInputStream inputStream = contentRepository.readContent(contentHash, ""); String uuid = context.attachResultStream(inputStream.getContentType(), inputStream); context.getResult().get(UUID).set(uuid); } catch (ExplodedContentException ex) { throw new RuntimeException(ex.getMessage(), ex); } }
Source:
<code>public HelixTaskExecutor(ParticipantStatusMonitor participantStatusMonitor, MessageQueueMonitor messageQueueMonitor) { _monitor = participantStatusMonitor; _messageQueueMonitor = messageQueueMonitor; _taskMap = new ConcurrentHashMap<>(); _hdlrFtyRegistry = new ConcurrentHashMap<>(); _executorMap = new ConcurrentHashMap<>(); _messageTaskMap = new ConcurrentHashMap<>(); _knownMessageIds = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>()); _batchMessageExecutorService = Executors.newCachedThreadPool(); _monitor.createExecutorMonitor("BatchMessageExecutor", _batchMessageExecutorService); _resourcesThreadpoolChecked = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>()); _transitionTypeThreadpoolChecked = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>()); _lock = new Object(); _statusUpdateUtil = new StatusUpdateUtil(); <START> _timer = new Timer("HelixTaskExecutor_Timer", true); END> _isShuttingDown = false; startMonitorThread(); }</code><technical_language>difference of this line? try minimize diff for reviewing</technical_language>

Target:
public HelixTaskExecutor(ParticipantStatusMonitor participantStatusMonitor, MessageQueueMonitor messageQueueMonitor) { _monitor = participantStatusMonitor; _messageQueueMonitor = messageQueueMonitor; _taskMap = new ConcurrentHashMap<>(); _hdlrFtyRegistry = new ConcurrentHashMap<>(); _executorMap = new ConcurrentHashMap<>(); _messageTaskMap = new ConcurrentHashMap<>(); _knownMessageIds = Collections.newSetFromMap(new ConcurrentHashMap<>()); _batchMessageExecutorService = Executors.newCachedThreadPool(); _monitor.createExecutorMonitor("BatchMessageExecutor", _batchMessageExecutorService); _resourcesThreadpoolChecked = Collections.newSetFromMap(new ConcurrentHashMap<>()); _transitionTypeThreadpoolChecked = Collections.newSetFromMap(new ConcurrentHashMap<>()); _lock = new Object(); _statusUpdateUtil = new StatusUpdateUtil(); _timer = new Timer("HelixTaskExecutor_Timer", true); _isShuttingDown = false; startMonitorThread(); }
Source:
<code>private StudentAttributes getStudent() { if (student == null) { <START> student = logic.getStudentForGoogleId(courseId, account.googleId); <END> } return student; }</code><technical_language>do assignment student return java return logic.getStudentForGoogleId(courseId, account.googleId);</technical_language>

Target:
private StudentAttributes getStudent() { if (student == null) { return logic.getStudentForGoogleId(courseId, account.googleId); } return student; }
Source:
<code>private void setValueExtractors(Set<String> valueExtractorFqcns, ClassLoader externalClassLoader) { for ( String valueExtractorFqcn : valueExtractorFqcns ) { try { @SuppressWarnings("unchecked") Class<? extends ValueExtractor<?>> clazz = (Class<? extends ValueExtractor<?>>) run( LoadClass.action( valueExtractorFqcn, externalClassLoader ) ); ValueExtractor<?> valueExtractor = run( NewInstance.action( clazz, "value extractor class" ) ); <START> log.addingValueExtractor( clazz ); <END> ValueExtractorDescriptor descriptor = new ValueExtractorDescriptor( valueExtractor ); valueExtractors.put( descriptor.getKey(), descriptor ); } catch (ValidationException e) { throw log.getUnableToInstantiateValueExtractorClassException( valueExtractorFqcn, e ); } } }</code><technical_language>Do want INFO here? a debug elsewhere</technical_language>

Target:
private void setValueExtractors(Set<String> valueExtractorFqcns, ClassLoader externalClassLoader) { for ( String valueExtractorFqcn : valueExtractorFqcns ) { ValueExtractor<?> valueExtractor; try { Class<? extends ValueExtractor<?>> clazz = (Class<? extends ValueExtractor<?>>) run( LoadClass.action( valueExtractorFqcn, externalClassLoader ) ); valueExtractor = run( NewInstance.action( clazz, "value extractor class" ) ); } catch (ValidationException e) { throw log.getUnableToInstantiateValueExtractorClassException( valueExtractorFqcn, e ); } ValueExtractorDescriptor descriptor = new ValueExtractorDescriptor( valueExtractor ); ValueExtractorDescriptor previous = valueExtractors.put( descriptor.getKey(), descriptor ); if ( previous != null ) { throw log.getValueExtractorForTypeAndTypeUseAlreadyPresentException( valueExtractor, previous.getValueExtractor() ); } log.addingValueExtractor( (Class<? extends ValueExtractor<?>>) valueExtractor.getClass() ); } }
Source:
<code>public ClassLoaderLease registerClassLoaderLease(JobID jobId) { synchronized (lockObject) { <START> LibraryCacheEntry libraryCacheEntry = cacheEntries.get(jobId); <END> if (libraryCacheEntry == null) { libraryCacheEntry = new LibraryCacheEntry(jobId); cacheEntries.put(jobId, libraryCacheEntry); } return libraryCacheEntry.obtainHandle(); } }</code><technical_language>computeIfAbsent</technical_language>

Target:
public ClassLoaderLease registerClassLoaderLease(JobID jobId) { synchronized (lockObject) { return cacheEntries .computeIfAbsent(jobId, jobID -> new LibraryCacheEntry(jobId)) .obtainLease(); } }
Source:
<code>public MathJaxBackgroundRenderer(MathJax mathjax, DocDisplay docDisplay) { mathjax_ = mathjax; docDisplay_ = docDisplay; renderTimer_ = new Timer() { @Override public void run() { Range range = MathJaxUtil.getLatexRange(docDisplay_); if (range == null) return; mathjax_.renderLatex(range, true); } }; <START> docDisplay_.addFocusHandler(new FocusHandler() <END> { @Override public void onFocus(FocusEvent event) { beginMonitoring(); } }); docDisplay_.addEditorModeChangedHandler(new EditorModeChangedEvent.Handler() { @Override public void onEditorModeChanged(EditorModeChangedEvent event) { beginMonitoring(); } }); docDisplay_.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { endMonitoring(); } }); }</code><technical_language>is lifetime of MathJaxBackroundRenderer object? In cases DocDisplay returns a HandlerRegistration needs manually deregistered (look for "releaseOnDismiss" for examples)</technical_language>

Target:
public MathJaxBackgroundRenderer(MathJax mathjax, DocDisplay docDisplay) { mathjax_ = mathjax; docDisplay_ = docDisplay; handlers_ = new ArrayList<HandlerRegistration>(); renderTimer_ = new Timer() { @Override public void run() { Range range = MathJaxUtil.getLatexRange(docDisplay_); if (range == null) return; mathjax_.renderLatex(range, true); } }; handlers_.add(docDisplay_.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { beginMonitoring(); } })); handlers_.add(docDisplay_.addEditorModeChangedHandler(new EditorModeChangedEvent.Handler() { @Override public void onEditorModeChanged(EditorModeChangedEvent event) { beginMonitoring(); } })); handlers_.add(docDisplay_.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { endMonitoring(); } })); handlers_.add(docDisplay_.addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (!event.isAttached()) resetHandlers(); } })); }
Source:
<code>private FBO getFbo() { <START> return frameBuffersManager.get(fboName); <END> }</code><technical_language>This in update()? is simplified put inline update() then, remove this method</technical_language>

Target:
private FBO getFbo() { return fboManager.get(fboName); }