auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setBreakpointMark( final Breakpoint breakpoint, final boolean active, final LineChangeAction action) { if (hasGutter != null) { BreakpointConfiguration breakpointConfiguration = breakpoint.getBreakpointConfiguration(); int lineNumber = breakpoint.getLocation().getLineNumber() - 1; boolean hasCondition = !Strings.isNullOrEmpty(breakpointConfiguration.getCondition()) || breakpointConfiguration.getHitCount() != 0; Element newElement = active ? (hasCondition ? activeConditionBreakpointMark : activeBreakpointMark) : (hasCondition ? inactiveConditionBreakpointMark : inactiveBreakpointMark); if (hasCondition) { <START> newElement.setTitle( <END> "Condition: " + breakpointConfiguration.getCondition() + ", hit count: " + breakpointConfiguration.getCondition()); } Element existedElement = hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER); if (existedElement != null) { hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, newElement); } else { hasGutter.addGutterItem( lineNumber, BREAKPOINTS_GUTTER, newElement, (fromLine, linesRemoved, linesAdded) -> action.onLineChange(document.getFile(), fromLine, linesAdded, linesRemoved)); } } }</code><technical_language>Hit count if greater 0, condition if is null</technical_language>

Target:
public void setBreakpointMark( final Breakpoint breakpoint, final boolean active, final LineChangeAction action) { if (hasGutter != null) { int lineNumber = breakpoint.getLocation().getLineNumber() - 1; boolean hasCondition = !Strings.isNullOrEmpty(breakpoint.getCondition()); Element newElement = active ? (hasCondition ? activeConditionBreakpointMark : activeBreakpointMark) : (hasCondition ? inactiveConditionBreakpointMark : inactiveBreakpointMark); if (hasCondition) { newElement.setTitle("Condition: " + breakpoint.getCondition()); } Element existedElement = hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER); if (existedElement != null) { hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, newElement); } else { hasGutter.addGutterItem( lineNumber, BREAKPOINTS_GUTTER, newElement, (fromLine, linesRemoved, linesAdded) -> action.onLineChange(document.getFile(), fromLine, linesAdded, linesRemoved)); } } }
Source:
<code>public boolean isAvailable(@RcsImsCapabilities.RcsImsCapabilityFlag int capability) throws ImsException { try { int currentStatus = mRcsFeatureConnection.queryCapabilityStatus(); return <START> (capability == currentStatus) ? <END> true : false; } catch (RemoteException e) { loge("isAvailable error: ", e); throw new ImsException("is RCS available", e, ImsReasonInfo.CODE_LOCAL_INTERNAL_ERROR); } }</code><technical_language>This is a bitfield, this "new RcsImsCapabilities(currentStatus).isCapable(capability)"</technical_language>

Target:
public boolean isAvailable(@RcsImsCapabilities.RcsImsCapabilityFlag int capability) throws ImsException { try { int currentStatus = mRcsFeatureConnection.queryCapabilityStatus(); return new RcsImsCapabilities(currentStatus).isCapable(capability); } catch (RemoteException e) { loge("isAvailable error: ", e); throw new ImsException("is RCS available", e, ImsReasonInfo.CODE_LOCAL_INTERNAL_ERROR); } }
Source:
<code>public void updateCredential(UserCredentialModel cred) { if (cred.getType().equals(UserCredentialModel.PASSWORD)) { <START> updatePasswordCredential(cred); <END> } else { CredentialEntity credentialEntity = getCredentialEntity(user, cred.getType()); if (credentialEntity == null) { credentialEntity = setCredentials(user, cred); credentialEntity.setValue(cred.getValue()); user.getCredentials().add(credentialEntity); } else { credentialEntity.setValue(cred.getValue()); } } getMongoStore().updateEntity(user, invocationContext); }</code><technical_language>duplicating updatePasswordCredential method in stores rename CredentialValidation CredentialUtils add a static method</technical_language>

Target:
public void updateCredential(UserCredentialModel cred) { CredentialEntity credentialEntity = getCredentialEntity(user, cred.getType()); if (credentialEntity == null) { credentialEntity = new CredentialEntity(); credentialEntity.setType(cred.getType()); credentialEntity.setDevice(cred.getDevice()); user.getCredentials().add(credentialEntity); } if (cred.getType().equals(UserCredentialModel.PASSWORD)) { byte[] salt = Pbkdf2PasswordEncoder.getSalt(); int hashIterations = 1; PasswordPolicy policy = realm.getPasswordPolicy(); if (policy != null) { hashIterations = policy.getHashIterations(); if (hashIterations == -1) hashIterations = 1; } credentialEntity.setValue(new Pbkdf2PasswordEncoder(salt).encode(cred.getValue(), hashIterations)); credentialEntity.setSalt(salt); credentialEntity.setHashIterations(hashIterations); } else { credentialEntity.setValue(cred.getValue()); } credentialEntity.setDevice(cred.getDevice()); getMongoStore().updateEntity(user, invocationContext); }
Source:
<code>public void dataReadForUnknownStreamThatCouldntExistFail() throws Exception { when(connection.streamMayHaveExisted(STREAM_ID)).thenReturn(false); when(connection.stream(STREAM_ID)).thenReturn(null); final ByteBuf data = dummyData(); int padding = 10; int processedBytes = data.readableBytes() + padding; try { decode().onDataRead(ctx, STREAM_ID, data, padding, true); } catch (Http2Exception ex) { <START> assertFalse(ex instanceof Http2Exception.StreamException); <END> throw ex; } finally { try { verify(localFlow) .receiveFlowControlledFrame(eq((Http2Stream) null), eq(data), eq(padding), eq(true)); verify(localFlow).consumeBytes(eq((Http2Stream) null), eq(processedBytes)); verify(localFlow).frameWriter(any(Http2FrameWriter.class)); verifyNoMoreInteractions(localFlow); verify(listener, never()).onDataRead(eq(ctx), anyInt(), any(ByteBuf.class), anyInt(), anyBoolean()); } finally { data.release(); } } }</code><technical_language>nit: consider assertThat(ex, not(instanceOf(Http2Exception.StreamException.class)));</technical_language>

Target:
public void dataReadForUnknownStreamThatCouldntExistFail() throws Exception { when(connection.streamMayHaveExisted(STREAM_ID)).thenReturn(false); when(connection.stream(STREAM_ID)).thenReturn(null); final ByteBuf data = dummyData(); int padding = 10; int processedBytes = data.readableBytes() + padding; try { decode().onDataRead(ctx, STREAM_ID, data, padding, true); } catch (Http2Exception ex) { assertThat(ex, not(instanceOf(Http2Exception.StreamException.class))); throw ex; } finally { try { verify(localFlow) .receiveFlowControlledFrame(eq((Http2Stream) null), eq(data), eq(padding), eq(true)); verify(localFlow).consumeBytes(eq((Http2Stream) null), eq(processedBytes)); verify(localFlow).frameWriter(any(Http2FrameWriter.class)); verifyNoMoreInteractions(localFlow); verify(listener, never()).onDataRead(eq(ctx), anyInt(), any(ByteBuf.class), anyInt(), anyBoolean()); } finally { data.release(); } } }
Source:
<code>public ItemCanteen() { this.addPropertyOverride(new ResourceLocation("filled"), new IItemPropertyGetter() { @Override @SideOnly(Side.CLIENT) public float apply(ItemStack stack, World world, EntityLivingBase entity) { WaterType waterType = getWaterType(stack); if (waterType == null) { return 0.0F; } else { return 1.0F; } <START> } <END> }); this.maxStackSize = 1; this.setNoRepair(); }</code><technical_language>Unnecessary style changes</technical_language>

Target:
public ItemCanteen() { this.addPropertyOverride(new ResourceLocation("filled"), new IItemPropertyGetter() { @Override @SideOnly(Side.CLIENT) public float apply(ItemStack stack, World world, EntityLivingBase entity) { WaterType waterType = getWaterType(stack); if (waterType == null) return 0.0F; else return 1.0F; } }); this.maxStackSize = 1; this.setNoRepair(); }
Source:
<code><START> protected void onLowMemory() { <END> super.onResume(); swrve.onLowMemory(this); }</code><technical_language>onLowMemory is public, protected</technical_language>

Target:
public void onLowMemory() { super.onResume(); swrve.onLowMemory(); }
Source:
<code>public List<Diagnosis> getActiveDiagnoses(Patient patient) { Query query = sessionFactory.getCurrentSession().createQuery( "from Diagnosis d where d.patient.patientId = :patientId and d.voided = false " <START> + "by d.dateCreated desc"); <END> query.setInteger("patientId", patient.getId()); return query.list(); }</code><technical_language>imagine HQL figure out needs compare database ids d.patient = :patient work</technical_language>

Target:
public List<Diagnosis> getActiveDiagnoses(Patient patient) { Query query = sessionFactory.getCurrentSession().createQuery( "from Diagnosis c where c.patient.patientId = :patientId and c.voided = false order " + "by c.onsetDate desc"); query.setInteger("patientId", patient.getId()); return query.list(); }
Source:
<code>public void disconnect() { <START> synchronized (partitions) { synchronized (pendingPartitions) { <END> pendingPartitions.notifyAll(); } trimJob.cancel(); queueJob.cancel(); lld = null; document = null; inputPartitions = null; pendingPartitions.clear(); pendingSize = 0; partitions.clear(); } }</code><technical_language>worrying locks acquired here. acquire pending partitions, notify acquire partitions</technical_language>

Target:
public void disconnect() { synchronized (pendingPartitions) { pendingPartitions.clear(); pendingSize = 0; pendingPartitions.notifyAll(); } synchronized (partitions) { trimJob.cancel(); queueJob.cancel(); lld = null; document = null; inputPartitions = null; partitions.clear(); } }
Source:
<code>public Map<String, Object> action(Map<String, Object> moreInfo) throws Exception { try { System.out.println("Executing Blue Ocean and Declarative Pipeline compile hook"); PluginCompatTesterConfig config = (PluginCompatTesterConfig) moreInfo.get("config"); MavenCoordinates core = (MavenCoordinates) moreInfo.get("core"); runner = config.getExternalMaven() == null ? new InternalMavenRunner() : new ExternalMavenRunner(config.getExternalMaven()); mavenConfig = getMavenConfig(config); File pluginDir = (File) moreInfo.get("pluginDir"); <START> if (pluginDir.exists()) <END> Path pluginSourcesDir = config.getLocalCheckoutDir().toPath(); if (pluginSourcesDir != null) { boolean isMultipleLocalPlugins = config.getIncludePlugins() != null && config.getIncludePlugins().size() > 1; if (!isMultipleLocalPlugins) { pluginSourcesDir = pluginSourcesDir.getParent(); } Files.walk(pluginSourcesDir, 1) .filter(file -> isEslintFile(file)) .forEach(eslintrc -> copy(eslintrc, pluginDir)); } boolean ranCompile = moreInfo.containsKey(OVERRIDE_DEFAULT_COMPILE) ? (boolean) moreInfo.get(OVERRIDE_DEFAULT_COMPILE) : false; if (!ranCompile) { compile(mavenConfig, pluginDir); moreInfo.put(OVERRIDE_DEFAULT_COMPILE, true); } System.out.println("Executed Blue Ocean and Declarative Pipeline compile hook"); return moreInfo; } catch (Exception e) { System.out.println("Exception executing hook"); System.out.println(e); throw e; } }</code><technical_language>I this belong here, causing build fail</technical_language>

Target:
public Map<String, Object> action(Map<String, Object> moreInfo) throws Exception { try { System.out.println("Executing Blue Ocean and Declarative Pipeline compile hook"); PluginCompatTesterConfig config = (PluginCompatTesterConfig) moreInfo.get("config"); MavenCoordinates core = (MavenCoordinates) moreInfo.get("core"); runner = config.getExternalMaven() == null ? new InternalMavenRunner() : new ExternalMavenRunner(config.getExternalMaven()); mavenConfig = getMavenConfig(config); File pluginDir = (File) moreInfo.get("pluginDir"); Path pluginSourcesDir = config.getLocalCheckoutDir().toPath(); if (pluginSourcesDir != null) { boolean isMultipleLocalPlugins = config.getIncludePlugins() != null && config.getIncludePlugins().size() > 1; if (!isMultipleLocalPlugins) { pluginSourcesDir = pluginSourcesDir.getParent(); } Files.walk(pluginSourcesDir, 1) .filter(file -> isEslintFile(file)) .forEach(eslintrc -> copy(eslintrc, pluginDir)); } boolean ranCompile = moreInfo.containsKey(OVERRIDE_DEFAULT_COMPILE) ? (boolean) moreInfo.get(OVERRIDE_DEFAULT_COMPILE) : false; if (!ranCompile) { compile(mavenConfig, pluginDir); moreInfo.put(OVERRIDE_DEFAULT_COMPILE, true); } System.out.println("Executed Blue Ocean and Declarative Pipeline compile hook"); return moreInfo; } catch (Exception e) { System.out.println("Exception executing hook"); System.out.println(e); throw e; } }
Source:
<code>private void trackScreenView() { <START> final String screenName = Analytics.Screens.FORUM_VIEW_TOPIC_THREADS; <END> final String actionItem; Map<String, String> values = new HashMap<>(); String topicId = discussionTopic.getIdentifier(); if (DiscussionTopic.ALL_TOPICS_ID.equals(topicId)) { topicId = actionItem = Analytics.Values.POSTS_ALL; } else if (DiscussionTopic.FOLLOWING_TOPICS_ID.equals(topicId)) { topicId = actionItem = Analytics.Values.POSTS_FOLLOWING; } else { actionItem = discussionTopic.getName(); } values.put(Analytics.Keys.TOPIC_ID, topicId); environment.getAnalyticsRegistry().trackScreenView(screenName, courseData.getCourse().getId(), actionItem, values); }</code><technical_language>need define a variable for it</technical_language>

Target:
private void trackScreenView() { final String actionItem; final Map<String, String> values = new HashMap<>(); String topicId = discussionTopic.getIdentifier(); if (DiscussionTopic.ALL_TOPICS_ID.equals(topicId)) { topicId = actionItem = Analytics.Values.POSTS_ALL; } else if (DiscussionTopic.FOLLOWING_TOPICS_ID.equals(topicId)) { topicId = actionItem = Analytics.Values.POSTS_FOLLOWING; } else { actionItem = discussionTopic.getName(); } values.put(Analytics.Keys.TOPIC_ID, topicId); environment.getAnalyticsRegistry().trackScreenView(Analytics.Screens.FORUM_VIEW_TOPIC_THREADS, courseData.getCourse().getId(), actionItem, values); }
Source:
<code>public PTableKey(PName tenantId, String name) { Preconditions.checkNotNull(name); this.tenantId = tenantId; <START> this.name = !name.contains(QueryConstants.NAMESPACE_SEPARATOR) ? name <END> : name.replace(QueryConstants.NAMESPACE_SEPARATOR, QueryConstants.NAME_SEPARATOR); }</code><technical_language>I potentially mask some bug fail if do this. remove this check altogether</technical_language>

Target:
public PTableKey(PName tenantId, String name) { Preconditions.checkNotNull(name); this.tenantId = tenantId; this.name = name; }
Source:
<code>public void sensitiveInfoInURLParamName() throws HttpMalformedHeaderException, URIException { String testURI = URI + "foo?bar=whodat&UserName=Jonathon&what=up"; <START> HttpMessage msg = createHttpMessageWithRespBody(BODY); <END> msg.getRequestHeader().setURI(new URI(testURI, false)); rule.scanHttpRequestSend(msg, -1); assertEquals(1, alertsRaised.size()); }</code><technical_language>worth passing setting testURI instead of in test method</technical_language>

Target:
public void sensitiveInfoInURLParamName() throws HttpMalformedHeaderException, URIException { String sensitiveParamName = "UserName"; String sensitiveValue = "Jonathon"; String testURI = URI + "foo?bar=whodat&" + sensitiveParamName + "=" + sensitiveValue + "&what=up"; HttpMessage msg = createHttpMessageWithRespBody(testURI); rule.scanHttpRequestSend(msg, -1); assertEquals(1, alertsRaised.size()); assertEquals(sensitiveParamName, alertsRaised.get(0).getParam()); assertEquals(sensitiveValue, alertsRaised.get(0).getEvidence()); assertEquals( Constant.messages.getString( InformationDisclosureInURL.MESSAGE_PREFIX + "otherinfo.sensitiveinfo"), alertsRaised.get(0).getOtherInfo()); }
Source:
<code>public String nextColumnOrNull() { String v = nextColumn(); <START> if (v == null) { <END> return null; } else if (v.isEmpty() && nullStringOrNull == null) { if (wasQuotedColumn) { return ""; } else { return null; } } else if (v.equals(nullStringOrNull)) { return null; } else { return v; } }</code><technical_language>minor: this v == null check is unnecessary</technical_language>

Target:
public String nextColumnOrNull() { String v = nextColumn(); if (nullStringOrNull == null) { if (v.isEmpty()) { if (wasQuotedColumn) { return ""; } else { return null; } } else { return v; } } else { if (v.equals(nullStringOrNull)) { return null; } else { return v; } } }
Source:
<code>public static void registerCommand(ICommand command, String node, RegisteredPermValue permLevel) { <START> if (permMap.containsKey(command)) <END> { FMLLog.warning("Command %s tried to register a duplicate permission!", command); return; } permMap.put(command.getCommandName(), node); PermissionsManager.registerPermission(node, permLevel); CommandHandler ch = (CommandHandler) MinecraftServer.getServer().getCommandManager(); ch.registerCommand(command); }</code><technical_language>This replaced code, allow overwriting permissions. commands registered a point able replace permission node. (Found this out while implementing API, this point is confirmed) if (permMap.containsKey(command.getCommandName())) { FMLLog.warning("Command %s registerd a duplicate permission!", command.getCommandName()); }</technical_language>

Target:
public static void registerCommand(ICommand command, String node, RegisteredPermValue permLevel) { if (permMap.containsKey(command.getCommandName())) { FMLLog.warning("Command %s registered a duplicate permission!", command); } permMap.put(command.getCommandName(), node); PermissionsManager.registerPermission(node, permLevel); CommandHandler ch = (CommandHandler) MinecraftServer.getServer().getCommandManager(); ch.registerCommand(command); }
Source:
<code>public void onCatch(Throwable caught) { if (caught instanceof IOException) { Utils.crossFade(loadProgress, networkError); <START> } <END> }</code><technical_language>log re-throw other surprise exceptions</technical_language>

Target:
public void onCatch(Throwable caught) { Utils.crossFade(loadProgress, networkError); }
Source:
<code>public GeoEntry queryById(String id) throws GeoEntryQueryException { <START> LOGGER.debug("Suggestion query not implemented."); <END> return null; }</code><technical_language>message "Query ID implemented"</technical_language>

Target:
public GeoEntry queryById(String id) throws GeoEntryQueryException { LOGGER.debug("Query by ID not query not implemented."); return null; }
Source:
<code>public void testGetAuthorizedClients() { Long userId = BOOTSTRAP_PRINCIPAL.THE_ADMIN_USER.getPrincipalId(); String client1 = createSectorIdentifierAndClient(); String client2 = createSectorIdentifierAndClient(SECOND_SECTOR_IDENTIFIER, userId, "App 2"); OAuthRefreshTokenInformation token1 = createRefreshToken(client1, userId.toString(), new Date()); OAuthRefreshTokenInformation token2 = createRefreshToken(client1, userId.toString(), new Date(System.currentTimeMillis() - TWO_YEARS_MILLIS)); OAuthRefreshTokenInformation token3 = createRefreshToken(client2, userId.toString(), new Date(System.currentTimeMillis() - TWO_YEARS_MILLIS)); OAuthClientAuthorizationHistoryList results = oauthClientDao.getAuthorizedClientHistory(userId.toString(), null, 365L); long FIVE_MINUTES_AGO = System.currentTimeMillis() - FIVE_MINUTES_MILLIS; assertEquals(1, results.getResults().size()); assertEquals( client1,results.getResults().get(0).getClient().getClient_id()); <START> assertTrue(FIVE_MINUTES_AGO < results.getResults().get(0).getAuthorizedOn().getTime()); <END> assertTrue(FIVE_MINUTES_AGO < results.getResults().get(0).getLastUsed().getTime()); assertNull(results.getNextPageToken()); }</code><technical_language>while this is fine classes autowire Clock mock in tests allow precise dates</technical_language>

Target:
public void testGetAuthorizedClients() { Long userId = BOOTSTRAP_PRINCIPAL.THE_ADMIN_USER.getPrincipalId(); String client1 = createSectorIdentifierAndClient(); String client2 = createSectorIdentifierAndClient(SECOND_SECTOR_IDENTIFIER, userId, "App 2"); final Date client1ExpectedAuthzOn = new Date(System.currentTimeMillis() - ONE_YEAR_MILLIS * 5); final Date client1ExpectedLastUsed = new Date(System.currentTimeMillis() + ONE_YEAR_MILLIS * 5); createRefreshToken(client1, userId.toString(), client1ExpectedAuthzOn, new Date()); createRefreshToken(client1, userId.toString(), new Date(), new Date()); createRefreshToken(client1, userId.toString(), new Date(), client1ExpectedLastUsed); createRefreshToken(client1, userId.toString(), new Date(System.currentTimeMillis() - ONE_YEAR_MILLIS * 10), new Date(System.currentTimeMillis() - TWO_YEARS_MILLIS)); final Date client2ExpectedAuthzOn = new Date(System.currentTimeMillis() - 542326L); final Date client2ExpectedLastUsed = new Date(System.currentTimeMillis() - 54232L); createRefreshToken(client2, userId.toString(), client2ExpectedAuthzOn, client2ExpectedLastUsed); OAuthClientAuthorizationHistoryList results = oauthClientDao.getAuthorizedClientHistory(userId.toString(), null, ONE_YEAR_DAYS); assertEquals(2, results.getResults().size()); for (OAuthClientAuthorizationHistory result : results.getResults()) { if (result.getClient().getClient_id().equals(client1)) { assertEquals(client1ExpectedAuthzOn, result.getAuthorizedOn()); assertEquals(client1ExpectedLastUsed, result.getLastUsed()); } if (result.getClient().getClient_id().equals(client2)) { assertEquals(client2ExpectedAuthzOn, result.getAuthorizedOn()); assertEquals(client2ExpectedLastUsed, result.getLastUsed()); } } assertNull(results.getNextPageToken()); }
Source:
<code>public static void refreshVisuals(final AbstractDiagramElementContainerEditPart self) { final DDiagramElement diagElement = self.resolveDiagramElement(); if (diagElement instanceof DDiagramElementContainer) { final DDiagramElementContainer ddec = (DDiagramElementContainer) diagElement; if (self.getBackgroundFigure() instanceof IWorkspaceImageFigure && ddec.getOwnedStyle() != null) { ((IWorkspaceImageFigure) self.getBackgroundFigure()).refreshFigure(ddec.getOwnedStyle()); } final ContainerStyle style = ddec.getOwnedStyle(); if (DiagramContainerEditPartOperation.isPrimaryShapeChanging(self, style)) { self.reInitFigure(); } ViewNodeContainerFigureDesc primaryShape = self.getPrimaryShape(); refreshBorder(self, primaryShape, style); if (primaryShape instanceof GradientRoundedRectangle) { refreshGradient(style, (GradientRoundedRectangle) primaryShape); } if (primaryShape instanceof RoundedRectangle) { refreshCorners(self, diagElement, (RoundedRectangle) primaryShape); } <START> DiagramNodeEditPartOperation.refreshLabelAlignment(self.getContentPane(), <END> ddec.getOwnedStyle()); } if (diagElement != null) { self.setTooltipText(diagElement.getTooltipText()); } }</code><technical_language>A container is a node. Move this AbstractDiagramNodeEditPartOperation DiagramElementEditPartOperation DiagramNameEditPartOperation</technical_language>

Target:
public static void refreshVisuals(final AbstractDiagramElementContainerEditPart self) { final DDiagramElement diagElement = self.resolveDiagramElement(); if (diagElement instanceof DDiagramElementContainer) { final DDiagramElementContainer ddec = (DDiagramElementContainer) diagElement; if (self.getBackgroundFigure() instanceof IWorkspaceImageFigure && ddec.getOwnedStyle() != null) { ((IWorkspaceImageFigure) self.getBackgroundFigure()).refreshFigure(ddec.getOwnedStyle()); } final ContainerStyle style = ddec.getOwnedStyle(); if (DiagramContainerEditPartOperation.isPrimaryShapeChanging(self, style)) { self.reInitFigure(); } ViewNodeContainerFigureDesc primaryShape = self.getPrimaryShape(); refreshBorder(self, primaryShape, style); if (primaryShape instanceof GradientRoundedRectangle) { refreshGradient(style, (GradientRoundedRectangle) primaryShape); } if (primaryShape instanceof RoundedRectangle) { refreshCorners(self, diagElement, (RoundedRectangle) primaryShape); } DiagramElementEditPartOperation.refreshLabelAlignment(self.getContentPane(), ddec.getOwnedStyle()); } if (diagElement != null) { self.setTooltipText(diagElement.getTooltipText()); } }
Source:
<code>private void readQueryParameters(HttpServerExchange exchange) { code = getQueryParameterIfPresent(exchange, OAuth2Constants.CODE); error = getQueryParameterIfPresent(exchange, OAuth2Constants.ERROR); <START> errorDescription = getQueryParameterIfPresent(exchange, "error-description"); <END> state = getQueryParameterIfPresent(exchange, OAuth2Constants.STATE); }</code><technical_language>org.keycloak.OAuth2Constants#ERROR_DESCRIPTION. server return OAuth2Constants#ERROR_DESCRIPTION "error-description"</technical_language>

Target:
private void readQueryParameters(HttpServerExchange exchange) { code = getQueryParameterIfPresent(exchange, OAuth2Constants.CODE); error = getQueryParameterIfPresent(exchange, OAuth2Constants.ERROR); errorDescription = getQueryParameterIfPresent(exchange, OAuth2Constants.ERROR_DESCRIPTION); state = getQueryParameterIfPresent(exchange, OAuth2Constants.STATE); }
Source:
<code>private static PlanNodeStatsEstimate compute( PlanNodeStatsEstimate sourceStats, PlanNodeStatsEstimate filteringSourceStats, Symbol sourceJoinSymbol, Symbol filteringSourceJoinSymbol, BiFunction<SymbolStatsEstimate, SymbolStatsEstimate, Double> retainedNdvProvider) { SymbolStatsEstimate sourceJoinSymbolStats = sourceStats.getSymbolStatistics(sourceJoinSymbol); SymbolStatsEstimate filteringSourceJoinSymbolStats = filteringSourceStats.getSymbolStatistics(filteringSourceJoinSymbol); double retainedNdv = retainedNdvProvider.apply(sourceJoinSymbolStats, filteringSourceJoinSymbolStats); double sourceDistinctValuesCount = sourceJoinSymbolStats.getDistinctValuesCount(); <START> double filterFactor = sourceDistinctValuesCount == 0 ? 0 : (sourceJoinSymbolStats.getValuesFraction() * retainedNdv / sourceDistinctValuesCount); <END> SymbolStatsEstimate newSourceJoinSymbolStats = SymbolStatsEstimate.buildFrom(sourceJoinSymbolStats) .setNullsFraction(0) .setDistinctValuesCount(retainedNdv) .build(); PlanNodeStatsEstimate outputStats = PlanNodeStatsEstimate.buildFrom(sourceStats) .addSymbolStatistics(sourceJoinSymbol, newSourceJoinSymbolStats) .setOutputRowCount(sourceStats.getOutputRowCount() * filterFactor) .build(); return outputStats; }</code><technical_language>more clear write this as: if (sourceDistinctValuesCount == 0) { return ... } ... normal code path</technical_language>

Target:
private static PlanNodeStatsEstimate compute( PlanNodeStatsEstimate sourceStats, PlanNodeStatsEstimate filteringSourceStats, Symbol sourceJoinSymbol, Symbol filteringSourceJoinSymbol, BiFunction<SymbolStatsEstimate, SymbolStatsEstimate, Double> retainedNdvProvider) { SymbolStatsEstimate sourceJoinSymbolStats = sourceStats.getSymbolStatistics(sourceJoinSymbol); SymbolStatsEstimate filteringSourceJoinSymbolStats = filteringSourceStats.getSymbolStatistics(filteringSourceJoinSymbol); double retainedNdv = retainedNdvProvider.apply(sourceJoinSymbolStats, filteringSourceJoinSymbolStats); SymbolStatsEstimate newSourceJoinSymbolStats = SymbolStatsEstimate.buildFrom(sourceJoinSymbolStats) .setNullsFraction(0) .setDistinctValuesCount(retainedNdv) .build(); double sourceDistinctValuesCount = sourceJoinSymbolStats.getDistinctValuesCount(); if (sourceDistinctValuesCount == 0) { return PlanNodeStatsEstimate.buildFrom(sourceStats) .addSymbolStatistics(sourceJoinSymbol, newSourceJoinSymbolStats) .setOutputRowCount(0) .build(); } double filterFactor = sourceJoinSymbolStats.getValuesFraction() * retainedNdv / sourceDistinctValuesCount; double outputRowCount = sourceStats.getOutputRowCount() * filterFactor; return PlanNodeStatsEstimate.buildFrom(sourceStats) .addSymbolStatistics(sourceJoinSymbol, newSourceJoinSymbolStats) .setOutputRowCount(outputRowCount) .build(); }
Source:
<code>private List<OrderEntry> createSortOrder(IndexDefinition.IndexingRule rule) { if (sortOrder == null) { return Collections.emptyList(); } List<OrderEntry> orderEntries = newArrayListWithCapacity(sortOrder.size()); for (OrderEntry o : sortOrder) { PropertyDefinition pd = rule.getConfig(o.getPropertyName()); if (pd != null && pd.ordered && o.getPropertyType() != null && !o.getPropertyType().isArray()) { orderEntries.add(o); result.sortedProperties.add(pd); } else if (o.getPropertyName().equals(IndexDefinition.NATIVE_SORT_ORDER.getPropertyName())) { orderEntries.add(IndexDefinition.NATIVE_SORT_ORDER); } for (PropertyDefinition functionIndex : rule.getFunctionRestrictions()) { <START> if (o.getPropertyName().equals(functionIndex.function) && functionIndex.ordered) { <END> orderEntries.add(o); result.sortedProperties.add(functionIndex); } } } return orderEntries; }</code><technical_language>Ah, is this a bugfix? I reverse order of condition: functionIndex.ordered && o.getPropertyName().equals(functionIndex.function) testing a boolean is faster comparison, of readability of code... check if property is ordered in index, test if matches</technical_language>

Target:
private List<OrderEntry> createSortOrder(IndexDefinition.IndexingRule rule) { if (sortOrder == null) { return Collections.emptyList(); } List<OrderEntry> orderEntries = newArrayListWithCapacity(sortOrder.size()); for (OrderEntry o : sortOrder) { PropertyDefinition pd = rule.getConfig(o.getPropertyName()); if (pd != null && pd.ordered && o.getPropertyType() != null && !o.getPropertyType().isArray()) { orderEntries.add(o); result.sortedProperties.add(pd); } else if (o.getPropertyName().equals(IndexDefinition.NATIVE_SORT_ORDER.getPropertyName())) { orderEntries.add(IndexDefinition.NATIVE_SORT_ORDER); } for (PropertyDefinition functionIndex : rule.getFunctionRestrictions()) { if (functionIndex.ordered && o.getPropertyName().equals(functionIndex.function)) { orderEntries.add(o); result.sortedProperties.add(functionIndex); } } } return orderEntries; }
Source:
<code>public void startTask(UUID resultId, UUID taskId) throws IllegalArgumentException { Result result = resultRepository.findOneWithChallenge(resultId); Task task = taskRepository.findOne(taskId); <START> <END> TaskResult taskResult = taskResultRepository.findOneByTaskAndResult(taskId, resultId); if (taskResult != null) { return; } TaskResultKey key = new TaskResultKey(); key.setTask(task); key.setResult(result); taskResult = new TaskResult(); taskResult.setKey(key); taskResult.setStartTime(ZonedDateTime.now()); taskResultRepository.save(taskResult); }</code><technical_language>remove this..i a pr fix</technical_language>

Target:
public void startTask(UUID resultId, UUID taskId) throws IllegalArgumentException { Result result = resultRepository.findOneWithChallenge(resultId); if (result == null) { throw new AccessDeniedException("result.invalid"); } Task task = taskRepository.findOne(taskId); if (task == null) { throw new AccessDeniedException("task.invalid"); } TaskResult taskResult = taskResultRepository.findOneByTaskAndResult(taskId, resultId); if (taskResult != null) { if (taskResult.getStartTime() != null) { throw new AccessDeniedException("task.denied"); } return; } TaskResultKey key = new TaskResultKey(); key.setTask(task); key.setResult(result); taskResult = new TaskResult(); taskResult.setKey(key); taskResult.setStartTime(ZonedDateTime.now()); taskResultRepository.save(taskResult); }
Source:
<code>public BaseDto<ExtraLoanRateRuleDto> findExtraLoanRateRuleByNameAndProductType(String loanName, ProductType productType) { ExtraLoanRateRuleDto extraLoanRateRuleDto = new ExtraLoanRateRuleDto(); BaseDto<ExtraLoanRateRuleDto> baseDto = new BaseDto<>(extraLoanRateRuleDto); <START> loanName = (loanName.indexOf("1") >= 0 || loanName.indexOf("2") >= 0) ? loanName.substring(0, loanName.length() - 5) : loanName; <END> List<ExtraLoanRateRuleModel> extraLoanRateRuleModels = extraLoanRateRuleMapper.findExtraLoanRateRuleByNameAndProductType(loanName, productType); extraLoanRateRuleDto.setStatus(true); extraLoanRateRuleDto.setExtraLoanRateRuleModels(extraLoanRateRuleModels); return baseDto; }</code><technical_language>substring(0,5)</technical_language>

Target:
public BaseDto<ExtraLoanRateRuleDto> findExtraLoanRateRuleByNameAndProductType(String loanName, ProductType productType) { ExtraLoanRateRuleDto extraLoanRateRuleDto = new ExtraLoanRateRuleDto(); BaseDto<ExtraLoanRateRuleDto> baseDto = new BaseDto<>(extraLoanRateRuleDto); List<ExtraLoanRateRuleModel> extraLoanRateRuleModels = extraLoanRateRuleMapper.findExtraLoanRateRuleByNameAndProductType(loanName, productType); extraLoanRateRuleDto.setStatus(true); extraLoanRateRuleDto.setExtraLoanRateRuleModels(extraLoanRateRuleModels); return baseDto; }
Source:
<code><START> public String toString() { <END> String mapper = declaringMapper != null ? declaringMapper.getType().getName().toString() : ""; String argument = getAssignment() != null ? getAssignment().toString() : getSourceReference(); List<String> arguments = sourceParameters.stream() .map( p -> p.isMappingContext() || p.isMappingTarget() || p.isTargetType() ? p.getName() : argument ) .collect( Collectors.toList() ); return returnType.getName() + " " + mapper + "#" + name + "(" + Strings.join( arguments, "," ) + ")"; }</code><technical_language>I if toString is correct. Is returnType non-null? code is that</technical_language>

Target:
public String toString() { String mapper = declaringMapper != null ? declaringMapper.getType().getName().toString() : ""; String argument = getAssignment() != null ? getAssignment().toString() : getSourceReference(); String returnTypeAsString = returnType != null ? returnType.toString() : ""; List<String> arguments = sourceParameters.stream() .map( p -> p.isMappingContext() || p.isMappingTarget() || p.isTargetType() ? p.getName() : argument ) .collect( Collectors.toList() ); return returnTypeAsString + " " + mapper + "#" + name + "(" + Strings.join( arguments, "," ) + ")"; }
Source:
<code>private File getFile(String path, boolean create) throws IOException { File f = new File(getRepository().getWorkTree(), path); if (create) <START> f.createNewFile(); <END> return f; }</code><technical_language>FileUtils.createNewFile() instead in order check return</technical_language>

Target:
private File getFile(String path, boolean create) throws PatchApplyException { File f = new File(getRepository().getWorkTree(), path); if (create) try { FileUtils.createNewFile(f); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().createNewFileFailed, f), e); } return f; }
Source:
<code>public List<String> listAll() { if (!basePath.toFile().exists() || !basePath.toFile().isDirectory()) { throw new IllegalArgumentException("Invalid base path: " + basePath); <START> } <END> return Arrays.asList(basePath.toFile().list((dir, name) -> new File(dir, name).isDirectory())); }</code><technical_language>Leverage Files#exists Files#isDirectory</technical_language>

Target:
public List<String> listAll() { try { return Files.list(basePath).filter(Files::isDirectory).map(Path::getFileName).map(Path::toString).collect( Collectors.toList()); } catch (IOException e) { throw new IllegalArgumentException("Invalid base path: " + basePath, e); } }
Source:
<code>private Injector createInjector(InjectorConfig config) { List<Module> modules = new ArrayList<Module>(); InjectorConfig current = config; do { modules.addAll(current.getModules()); InjectorConfig parent = null; if (current.hasParent()) { String parentName = current.getParentName(); parent = configByName.get(parentName); if (parent == null) { LOG.info("Can't create as its ancestor can't be found", new Object[] { config.getName(), parentName }); return null; } } current = parent; } while (current != null); try { Injector injector = Guice.createInjector(modules); for (InjectorLifecycleListener listener : listeners) { listener.injectorCreated(injector, config); } <START> return injector; <END> } catch (CreationException e) { config.getListener().creationFailed(); return null; } }</code><technical_language>Restore this LOG. lose information injector created</technical_language>

Target:
private Injector createInjector(InjectorConfig config) { List<Module> modules = new ArrayList<Module>(); InjectorConfig current = config; do { modules.addAll(current.getModules()); InjectorConfig parent = null; if (current.hasParent()) { String parentName = current.getParentName(); parent = configByName.get(parentName); if (parent == null) { LOG.info("Can't create as its ancestor can't be found", new Object[] { config.getName(), parentName }); return null; } } current = parent; } while (current != null); try { Injector injector = Guice.createInjector(modules); for (InjectorLifecycleListener listener : listeners) { listener.injectorCreated(injector, config); } return injector; } catch (CreationException e) { LOG.error("Can't create injector " + config.getName(), e); config.getListener().creationFailed(); return null; } }
Source:
<code>private HostnameVerifier chooseHostnameVerifier() { HostnameVerifier hostnameVerifier; if (configuration.isVerifyHostname()) { <START> if (verifier == null) { <END> hostnameVerifier = SSLConnectionSocketFactory.getDefaultHostnameVerifier(); } else { hostnameVerifier = verifier; } } else { hostnameVerifier = new NoopHostnameVerifier(); } return hostnameVerifier; }</code><technical_language>do reducing size of this method ternary operator returns? that: java if (configuration.isVerifyHostname()) { return verifier != null ? verifier : SSLConnectionSocketFactory.getDefaultHostnameVerifier(); } else { return new NoopHostnameVerifier(); }</technical_language>

Target:
private HostnameVerifier chooseHostnameVerifier() { if (configuration.isVerifyHostname()) { return verifier != null ? verifier : SSLConnectionSocketFactory.getDefaultHostnameVerifier(); } else { return new NoopHostnameVerifier(); } }
Source:
<code>public void setUp() throws Exception { super.setUp(); assumeTrue(TestUtil.haveMinimumServerVersion(con, ServerVersion.v8_3)); <START> assumeTrue("Server have been complied --with-libxml",isXmlEnabled(con)); <END> Statement stmt = con.createStatement(); stmt.execute("CREATE TEMP TABLE xmltest(id int primary key, val xml)"); stmt.execute("INSERT INTO xmltest VALUES (1, '" + _xmlDocument + "')"); stmt.execute("INSERT INTO xmltest VALUES (2, '" + _xmlFragment + "')"); stmt.close(); }</code><technical_language>s/have/has/</technical_language>

Target:
public void setUp() throws Exception { super.setUp(); assumeMinimumServerVersion(ServerVersion.v8_3); assumeTrue("Server has been compiled --with-libxml", isXmlEnabled(con)); Statement stmt = con.createStatement(); stmt.execute("CREATE TEMP TABLE xmltest(id int primary key, val xml)"); stmt.execute("INSERT INTO xmltest VALUES (1, '" + _xmlDocument + "')"); stmt.execute("INSERT INTO xmltest VALUES (2, '" + _xmlFragment + "')"); stmt.close(); }
Source:
<code>public void onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder) { String template = liveStreamTranscoder.getTemplateName(); logger.info("Template name is "+template); IMediaStream stream = liveStreamTranscoder.getStream(); WMSProperties props = stream.getProperties(); AMFDataObj obj; synchronized (props) { obj = (AMFDataObj) props.getProperty(AMFSETDATAFRAME); } if (obj == null){ logger.info("Cant find property AMFDataObj for stream " + stream.getName()); return; } for (String streamParam: streamParams) { if (obj.containsKey(streamParam)){ <START> template = updateTemplate(obj, streamParam, template); <END> } } liveStreamTranscoder.setTemplateName(template); logger.info("New Template name is "+liveStreamTranscoder.getTemplateName()); }</code><technical_language>do need a function here?, line here..</technical_language>

Target:
public void onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder) { String template = liveStreamTranscoder.getTemplateName(); IMediaStream stream = liveStreamTranscoder.getStream(); logger.info("[" + stream.getName() +" ] Template name is "+template); WMSProperties props = stream.getProperties(); AMFDataObj obj; synchronized (props) { obj = (AMFDataObj) props.getProperty(AMFSETDATAFRAME); } if (obj == null){ logger.info("[" + stream.getName() +" ] Cant find property AMFDataObj for stream " + stream.getName()); return; } for (String streamParam: streamParams) { if (obj.containsKey(streamParam)){ template += '/' + streamParam + '/' + obj.getString(streamParam); } } liveStreamTranscoder.setTemplateName(template); logger.info("[" + stream.getName() +" ] New Template name is "+liveStreamTranscoder.getTemplateName()); }
Source:
<code>public int run(String[] args) { for (Map.Entry<String, Command> entry : commands.entrySet()) { jc.addCommand(entry.getKey(), entry.getValue()); } try { jc.parse(args); } catch (Exception e) { LOGGER.error("Failed to parse parameters. " + e.getMessage() + "\n"); printUsage(null); return RC_ERR; } if (jc.getParameters().get(0).isAssigned()) { printUsage(null); return RC_OK; } if (jc.getParsedCommand() == null) { MesosCluster cluster = ClusterRepository.loadCluster(); if (cluster != null) { cluster.printServiceUrls(output); return RC_OK; } else { printUsage(null); return RC_ERR; } } Command parsedCommand = commands.get(jc.getParsedCommand()); if (parsedCommand == null) { <START> LOGGER.error("No such command: " + jc.getParsedCommand()); <END> return RC_ERR; } else if (CommandHelp.CLINAME.equals(parsedCommand.getName())) { printUsage(null); } else { if (parsedCommand.validateParameters()) { parsedCommand.execute(); } else { printUsage(jc.getParsedCommand()); return RC_ERR; } } return RC_OK; }</code><technical_language>jc.getParsedCommands() is checked for null twice</technical_language>

Target:
public int run(String[] args) { for (Map.Entry<String, Command> entry : commands.entrySet()) { jc.addCommand(entry.getKey(), entry.getValue()); } try { jc.parse(args); } catch (Exception e) { LOGGER.error("Failed to parse parameters. " + e.getMessage() + "\n"); printUsage(null); return EXIT_CODE_ERR; } if (jc.getParameters().get(0).isAssigned()) { printUsage(null); return EXIT_CODE_OK; } if (jc.getParsedCommand() == null) { MesosCluster cluster = ClusterRepository.loadCluster(); if (cluster != null) { cluster.printServiceUrls(output); return EXIT_CODE_OK; } else { printUsage(null); return EXIT_CODE_ERR; } } Command parsedCommand = commands.get(jc.getParsedCommand()); if (parsedCommand == null) { LOGGER.error("No such command: " + jc.getParsedCommand()); return EXIT_CODE_ERR; } else if (CommandHelp.CLINAME.equals(parsedCommand.getName())) { printUsage(null); } else { if (parsedCommand.validateParameters()) { parsedCommand.execute(); } else { printUsage(jc.getParsedCommand()); return EXIT_CODE_ERR; } } return EXIT_CODE_OK; }
Source:
<code>public void contextInitialized(ServletContextEvent event) { context = event.getServletContext(); context.setAttribute(Bootstrap.class.getName(),this); try { final FileAndDescription describedHomeDir = getHomeDir(event); home = describedHomeDir.file.getAbsoluteFile(); home.mkdirs(); System.out.println("Jenkins home directory: "+ home +" found at: "+describedHomeDir.description); <START> if (!home.exists()) <END> throw new Error("Invalid JENKINS_HOME: "+ home); recordBootAttempt(home); coreClassLoader = buildCoreClassLoader(); Thread.currentThread().setContextClassLoader(coreClassLoader); bootLogics = loadBootLogics(coreClassLoader); for (BootLogic b : bootLogics) { b.contextInitialized(event); } } catch (Error | RuntimeException e) { LOGGER.log(SEVERE, "Failed to initialize Jenkins",e); throw e; } catch (Exception e) { LOGGER.log(SEVERE, "Failed to initialize Jenkins",e); throw new Error(e); } }</code><technical_language>Files method instead of mkdirs() preferable</technical_language>

Target:
public void contextInitialized(ServletContextEvent event) { context = event.getServletContext(); context.setAttribute(Bootstrap.class.getName(),this); try { final FileAndDescription describedHomeDir = getHomeDir(event); home = describedHomeDir.file.getAbsoluteFile(); home.mkdirs(); System.out.println("Jenkins home directory: "+ home +" found at: "+describedHomeDir.description); if (!home.exists()) throw new Error("Invalid JENKINS_HOME: "+ home); recordBootAttempt(home); coreClassLoader = buildCoreClassLoader(); Thread.currentThread().setContextClassLoader(coreClassLoader); bootLogics = loadBootLogics(coreClassLoader); for (BootLogic b : bootLogics) { b.contextInitialized(event); } } catch (IOException e) { LOGGER.log(SEVERE, "Failed to initialize Jenkins",e); throw new Error(e); } catch (final Throwable e) { LOGGER.log(SEVERE, "Failed to initialize Jenkins",e); throw e; } }
Source:
<code>private void addFeatureRemoveTemplateFromSD(Features features) { Feature feature = new Feature(); feature.setName("Remove Template From Specific Storage-Domain"); feature.setDescription("Ability to remove template images from a specific storage-domain: DELETE .../api/storagedomains/{storagedomain:id}/templates/{template:id}"); <START> features.getFeature().add(feature); <END> }</code><technical_language>this is correct, removing template's disk, template SD, i.e DELETE /api/templates/xxx/disks/yyy <action> <storage_domain id=zzz/> </action></technical_language>

Target:
private void addFeatureRemoveTemplateFromSD(Features features) { Feature feature = new Feature(); feature.setName("Remove Template Disks From Specified Storage-Domain"); feature.setDescription("Ability to remove template images from a specific storage-domain: DELETE .../api/templates/{template:id}/disks/{disk:id}, supplying <action><storage_domain id=\"xxx\"</storage_domain></action>"); features.getFeature().add(feature); }
Source:
<code>public static void update(IJavaProject javaProject, OmniEclipseProject project, SubMonitor progress) throws JavaModelException { <START> if (Platform.getBundle("org.eclipse.wst.common.core") != null) { <END> List<OmniExternalDependency> dependencies = project.getExternalDependencies(); String deploymentPath = getDeploymentPath(dependencies); if (deploymentPath != null) { updateDeploymentPath(javaProject, deploymentPath, progress); } else if (hasNonDeploymentAttributes(dependencies)) { markAsNonDeployed(javaProject, progress); } } }</code><technical_language>move check WorkspaceOperations.isWtpInstalled() method in order testable</technical_language>

Target:
public static void update(IJavaProject javaProject, OmniEclipseProject project, SubMonitor progress) throws JavaModelException { if (CorePlugin.workspaceOperations().isWtpInstalled()) { List<OmniExternalDependency> dependencies = project.getExternalDependencies(); String deploymentPath = getDeploymentPath(dependencies); if (deploymentPath != null) { updateDeploymentPath(javaProject, deploymentPath, progress); } else if (hasNonDeploymentAttributes(dependencies)) { markAsNonDeployed(javaProject, progress); } } }
Source:
<code>void setMarker(TextMarker marker, int length) { this.marker = marker; numSkipLines = length; if (checkAndUpdateArrows()) { upArrow.setHTML(PatchUtil.M.expandBefore(NUM_ROWS_TO_EXPAND)); downArrow.setHTML(PatchUtil.M.expandAfter(NUM_ROWS_TO_EXPAND)); } <START> skipNum.setText(PatchUtil.C.patchSkipRegion(Integer <END> .toString(length))); }</code><technical_language>PatchUtil.M</technical_language>

Target:
void setMarker(TextMarker marker, int length) { this.marker = marker; numSkipLines = length; if (checkAndUpdateArrows()) { upArrow.setHTML(PatchUtil.M.expandBefore(NUM_ROWS_TO_EXPAND)); downArrow.setHTML(PatchUtil.M.expandAfter(NUM_ROWS_TO_EXPAND)); } skipNum.setText(PatchUtil.M.patchSkipRegion(Integer .toString(length))); }