auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void createCounter( @Suspended final AsyncResponse asyncResponse, @ApiParam(required = true) MetricDefinition metricDefinition, @Context UriInfo uriInfo ) { <START> if(metricDefinition.getType() != null && metricDefinition.getType() != MetricType.COUNTER) { <END> asyncResponse.resume(badRequest(new ApiError("MetricDefinition type does not match " + MetricType .COUNTER.getText()))); } Metric<Long> metric = new Metric<>(new MetricId<>(tenantId, COUNTER, metricDefinition.getId()), metricDefinition.getTags(), metricDefinition.getDataRetention()); URI location = uriInfo.getBaseUriBuilder().path("/counters/{id}").build(metric.getId().getName()); metricsService.createMetric(metric).subscribe(new MetricCreatedObserver(asyncResponse, location)); }</code><technical_language>Replace if (COUNTER != metricDefinition.getType()) {</technical_language>

Target:
public void createCounter( @Suspended final AsyncResponse asyncResponse, @ApiParam(required = true) MetricDefinition metricDefinition, @Context UriInfo uriInfo ) { if(metricDefinition.getType() != null && MetricType.COUNTER != metricDefinition.getType()) { asyncResponse.resume(badRequest(new ApiError("MetricDefinition type does not match " + MetricType .COUNTER.getText()))); } Metric<Long> metric = new Metric<>(new MetricId<>(tenantId, COUNTER, metricDefinition.getId()), metricDefinition.getTags(), metricDefinition.getDataRetention()); URI location = uriInfo.getBaseUriBuilder().path("/counters/{id}").build(metric.getId().getName()); metricsService.createMetric(metric).subscribe(new MetricCreatedObserver(asyncResponse, location)); }
Source:
<code>public Color getHeaderForeground () { checkWidget (); return headerForeground != null ? headerForeground : <START> defaultForeground(); <END> }</code><technical_language>Compilation error: convert GdkColor Color</technical_language>

Target:
public Color getHeaderForeground () { checkWidget (); return headerForeground != null ? headerForeground : display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); }
Source:
<code>static public Collection<URI[]> getLocations() throws URISyntaxException { URI[] params = new URI[] { new URI("<LINK_1>"), <START> new URI("<LINK_10>"), <END> new URI("<LINK_2>"), new URI("<LINK_7>"), new URI("<LINK_3>"), new URI("<LINK_12>"), new URI("<LINK_0>"), new URI("<LINK_8>"), new URI("<LINK_13>"), new URI("<LINK_4>"), new URI("<LINK_5>"), new URI("<LINK_11>"), new URI("<LINK_3>integration-stack"), new URI("<LINK_6>"), }; List<URI[]> result = new ArrayList<URI[]>(); for (URI uri : params) { result.add(new URI[] { uri} ); } return result; }</code><technical_language>change devstudio.redhat.com? testing /8.0/ /7.0-development/, /integration-stack/ path segment</technical_language>

Target:
static public Collection<String[]> getLocations() throws URISyntaxException, IOException { String[] params = getRootLocations(); Collection<String[]> result = new ArrayList<String[]>(); for (String uri : params) { result.add(new String[] { uri }); } return result; }
Source:
<code>public int hashCode() { int bits = 1; bits = 31 * bits + this.type.ordinal(); bits = 31 * bits + getToX(); bits = 31 * bits + getToY(); bits = 31 * bits + getToZ(); bits = 31 * bits + getFromX(); bits = 31 * bits + getFromY(); bits = 31 * bits + getFromZ(); <START> return bits; <END> }</code><technical_language>b ^ (b >> 31) is missed here</technical_language>

Target:
public int hashCode() { int bits = 1; bits = 31 * bits + this.type.ordinal(); bits = 31 * bits + getToX(); bits = 31 * bits + getToY(); bits = 31 * bits + getToZ(); bits = 31 * bits + getFromX(); bits = 31 * bits + getFromY(); bits = 31 * bits + getFromZ(); return bits ^ (bits >> 31); }
Source:
<code>protected VmNic createNewInterface() { VmNic iface = new VmNic(); iface.setId(Guid.newGuid()); <START> final long from = MacAddressRangeUtils.macToLong("00:1A:4A:01:00:00"); <END> final int MAX_MACS_IN_POOL = 100000; final int rndInt = RandomUtils.instance().nextInt(MAX_MACS_IN_POOL); long macLong = from + rndInt; iface.setMacAddress(MacAddressRangeUtils.macToString(macLong)); return iface; }</code><technical_language>sure, whats rationale here? I test work.</technical_language>

Target:
protected VmNic createNewInterface() { VmNic iface = new VmNic(); iface.setId(Guid.newGuid()); iface.setMacAddress(RandomUtils.instance().nextString(10)); return iface; }
Source:
<code>public void setStashServerBaseUrl(String stashServerBaseUrl) { <START> this.stashServerBaseUrl = stashServerBaseUrl != null && stashServerBaseUrl.endsWith("/") <END> ? stashServerBaseUrl.substring(0, stashServerBaseUrl.length() - 1) : stashServerBaseUrl; }</code><technical_language>[StringUtils#stripEnd](<LINK_0>,%20java.lang.String)) used</technical_language>

Target:
public void setStashServerBaseUrl(String stashServerBaseUrl) { this.stashServerBaseUrl = StringUtils.stripEnd(stashServerBaseUrl, "/"); }
Source:
<code>public void onObjectExplorerEvent(ObjectExplorerEvent event) { <START> Debug.logToRConsole("Responding to object explorer event"); <END> switch (event.getType()) { case NEW: onNew(event.getData()); break; case OPEN_NODE: onOpenNode(event.getData()); break; case CLOSE_NODE: onCloseNode(event.getData()); break; case UNKNOWN: break; } }</code><technical_language>Nit: Debug logging (and elsewhere)</technical_language>

Target:
public void onObjectExplorerEvent(ObjectExplorerEvent event) { switch (event.getType()) { case NEW: onNew(event.getData()); break; case OPEN_NODE: onOpenNode(event.getData()); break; case CLOSE_NODE: onCloseNode(event.getData()); break; case UNKNOWN: break; } }
Source:
<code>long grabLocksAndRun(SweepLocks locks) throws InterruptedException { boolean sweptSuccessfully = false; try { if (isSweepEnabled.get()) { locks.lockOrRefresh(); if (locks.haveLocks()) { sweptSuccessfully = runOnce(); } else { <START> sweepMetrics.unableToAcquirePersistedLock(); <END> log.debug("Skipping sweep because sweep is running elsewhere."); } } else { log.debug("Skipping sweep because it is currently disabled."); } } catch (InsufficientConsistencyException e) { log.warn("Could not sweep because not all nodes of the database are online.", e); } catch (RuntimeException e) { sweepMetrics.sweepError(); if (checkAndRepairTableDrop()) { log.error("The table being swept by the background sweeper was dropped, moving on..."); } else { SweepBatchConfig lastBatchConfig = getAdjustedBatchConfig(); log.error("The background sweep job failed unexpectedly with batch config {}" + ". Attempting to continue with a lower batch size...", lastBatchConfig, e); batchSizeMultiplier = Math.max(batchSizeMultiplier / 2, 1.5 / lastBatchConfig.candidateBatchSize()); } } if (sweptSuccessfully) { batchSizeMultiplier = Math.min(1.0, batchSizeMultiplier * 1.01); return sweepPauseMillis.get(); } else { return 20 * (1000 + sweepPauseMillis.get()); } }</code><technical_language>Careful this method name. SweepLocks PersistentLock (or BackupLock)</technical_language>

Target:
long grabLocksAndRun(SweepLocks locks) throws InterruptedException { boolean sweptSuccessfully = false; try { if (isSweepEnabled.get()) { locks.lockOrRefresh(); if (locks.haveLocks()) { sweptSuccessfully = runOnce(); } else { log.debug("Skipping sweep because sweep is running elsewhere."); } } else { log.debug("Skipping sweep because it is currently disabled."); } } catch (InsufficientConsistencyException e) { log.warn("Could not sweep because not all nodes of the database are online.", e); } catch (RuntimeException e) { sweepMetrics.sweepError(); if (checkAndRepairTableDrop()) { log.error("The table being swept by the background sweeper was dropped, moving on..."); } else { SweepBatchConfig lastBatchConfig = getAdjustedBatchConfig(); log.error("The background sweep job failed unexpectedly with batch config {}" + ". Attempting to continue with a lower batch size...", lastBatchConfig, e); batchSizeMultiplier = Math.max(batchSizeMultiplier / 2, 1.5 / lastBatchConfig.candidateBatchSize()); } } if (sweptSuccessfully) { batchSizeMultiplier = Math.min(1.0, batchSizeMultiplier * 1.01); return sweepPauseMillis.get(); } else { return 20 * (1000 + sweepPauseMillis.get()); } }
Source:
<code>protected void executeVmCommand() { if (getVm().getStatus().isUpOrPaused()) { performPlugCommand(getPlugAction(), disk, oldVmDevice); } final VmDevice device = getVmDeviceDao().get(oldVmDevice.getId()); device.setIsPlugged(!oldVmDevice.getIsPlugged()); final List<VmDevice> devices = VmDeviceUtils.updateBootOrderInVmDevice(getVm().getStaticData()); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getVmStaticDAO().incrementDbGeneration(getVm().getId()); <START> getVmDeviceDao().updateAll("UpdateVmDeviceForHotPlugDisk", Arrays.asList(device)); <END> getVmDeviceDao().updateAll("UpdateVmDeviceBootOrder", devices); return null; } }); setSucceeded(true); }</code><technical_language>getVmDeviceDao().updateHotPlugDisk(device)</technical_language>

Target:
protected void executeVmCommand() { if (getVm().getStatus().isUpOrPaused()) { performPlugCommand(getPlugAction(), getDisk(), oldVmDevice); } final VmDevice device = getVmDeviceDao().get(oldVmDevice.getId()); device.setIsPlugged(!oldVmDevice.getIsPlugged()); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getVmStaticDAO().incrementDbGeneration(getVm().getId()); getVmDeviceDao().updateHotPlugDisk(device); VmDeviceUtils.updateBootOrderInVmDeviceAndStoreToDB(getVm().getStaticData()); return null; } }); setSucceeded(true); }
Source:
<code>public static String getLinkWithFallback(FeedItem item) { String link = null; if (item != null) { link = item.getLink(); if (link == null) { Feed feed = item.getFeed(); if (feed != null) { link = feed.getLink(); } } } <START> return link; <END> }</code><technical_language>I is easier read if nested ifs. for other method. if (item == null) { return null; } else if (item.getLink() != null) { return item.getLink(); } else if (item.getFeed() != null) { return item.getFeed().getLink(); } return null;</technical_language>

Target:
public static String getLinkWithFallback(FeedItem item) { if (item == null) { return null; } else if (item.getLink() != null) { return item.getLink(); } else if (item.getFeed() != null) { return item.getFeed().getLink(); } return null; }
Source:
<code>public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); if (r != null) { <START> return Optional.of(r.map(new GroupMapper())); <END> } return Optional.empty(); }</code><technical_language>Optional.map</technical_language>

Target:
public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map((rec) -> rec.map(new GroupMapper())); }
Source:
<code>public void setBaseballCard(BaseballCard card) { Locale locale = Locale.getDefault(); brand.setText(card.brand); year.setText(String.format(locale, "%d", card.year)); <START> number.setText(String.format(locale, "%s", card.number)); <END> player.setText(card.playerName); }</code><technical_language>String.format() is longer necessary here</technical_language>

Target:
public void setBaseballCard(BaseballCard card) { Locale locale = Locale.getDefault(); brand.setText(card.brand); year.setText(String.format(locale, "%d", card.year)); number.setText(card.number); player.setText(card.playerName); }
Source:
<code><START> public SetContentTypeFilter() { <END> try { mimetypeToExtensionMap = new Properties(); mimetypeToExtensionMap.load(new InputStreamReader(this.getClass().getResourceAsStream( "mimetypeToExtension.txt"))); contentTypeProperties = new Properties(); contentTypeProperties.load(new InputStreamReader(this.getClass().getResourceAsStream( "toContentType.properties"))); } catch (IOException e) { log.error("Failed to load mimetype mappings", e); } }</code><technical_language>this (and i realize this is crappy code), a configuration error for files fail load, want eating putting in log. remove try block this constructor throw IOException, rethrow exception a extra context? prefer</technical_language>

Target:
public SetContentTypeFilter() throws IOException { mimetypeToExtensionMap = new Properties(); mimetypeToExtensionMap.load(new InputStreamReader(this.getClass().getResourceAsStream( "mimetypeToExtension.txt"))); contentTypeProperties = new Properties(); contentTypeProperties.load(new InputStreamReader(this.getClass().getResourceAsStream( "toContentType.properties"))); }
Source:
<code>private static Object[] mapArrayValues(ArrayType arrayType, Object[] values) { Type elementType = arrayType.getElementType(); if (elementType instanceof ArrayType) { return Arrays.stream(values) .map(v -> v == null ? null : newArrayList((Object[]) v)) .toArray(); } if (elementType instanceof RowType) { RowType rowType = (RowType) elementType; return Arrays.stream(values) .map(v -> v == null ? null : newArrayList(mapRowValues(rowType, (Object[]) v))) .toArray(); } if (elementType instanceof CharType) { return Arrays.stream(values) <START> .map(v -> v == null ? null : padEnd((String) v, ((CharType) elementType).getLength(), ' ')) <END> .toArray(); } if (elementType instanceof TimestampType) { return Arrays.stream(values) .map(v -> v == null ? null : ((Timestamp) v).toLocalDateTime()) .toArray(); } return values; }</code><technical_language>nit: consider extracting length variable .map(String.class::cast) for readability: int length = ((CharType) elementType).getLength(); return Arrays.stream(values) .map(String.class::cast) .map(v -> v == null ? null : padEnd(v, length, ' ')) .toArray();</technical_language>

Target:
private static Object[] mapArrayValues(ArrayType arrayType, Object[] values) { Type elementType = arrayType.getElementType(); if (elementType instanceof ArrayType) { return Arrays.stream(values) .map(v -> v == null ? null : newArrayList((Object[]) v)) .toArray(); } if (elementType instanceof RowType) { RowType rowType = (RowType) elementType; return Arrays.stream(values) .map(v -> v == null ? null : newArrayList(mapRowValues(rowType, (Object[]) v))) .toArray(); } if (elementType instanceof CharType) { int length = ((CharType) elementType).getLength(); return Arrays.stream(values) .map(String.class::cast) .map(v -> v == null ? null : padEnd(v, length, ' ')) .toArray(); } if (elementType instanceof TimestampType) { return Arrays.stream(values) .map(v -> v == null ? null : ((Timestamp) v).toLocalDateTime()) .toArray(); } return values; }
Source:
<code>public static void restoreSystemProperties() { System.clearProperty("org.uberfire.nio.git.daemon.enabled"); <START> System.clearProperty("org.uberfire.nio.git.ssh.enabled"); <END> System.clearProperty("org.uberfire.sys.repo.monitor.disabled"); }</code><technical_language>enabled? restore those</technical_language>

Target:
public static void restoreSystemProperties() { System.clearProperty("org.uberfire.sys.repo.monitor.disabled"); System.clearProperty("org.uberfire.nio.git.daemon.enabled"); System.clearProperty("org.uberfire.nio.git.ssh.enabled"); System.clearProperty("org.uberfire.sys.repo.monitor.disabled"); }
Source:
<code>private Object invokeProxy(Method method, Object[] args, Object statement, long time) throws Exception { Object result = null; String name = method.getName(); String sql = null; Constructor<?> constructor = null; if (this.compare("prepareStatement", name)) { sql = (String) args[0]; constructor = this.getConstructor(1, PreparedStatement.class); if (sql != null) { this.prepareStatement(sql, time); } } else if (!this.compare("prepareCall", name)) { return statement; } <START> result = constructor != null ? constructor.newInstance(new StatementProxy(statement, sql)) : null; <END> return result; }</code><technical_language>return assignment</technical_language>

Target:
private Object invokeProxy(Method method, Object[] args, Object statement, long time) throws Exception { String name = method.getName(); String sql = null; Constructor<?> constructor = null; if (this.compare("prepareStatement", name)) { sql = (String) args[0]; constructor = this.getConstructor(1, PreparedStatement.class); if (sql != null) { this.prepareStatement(sql, time); } } else if (!this.compare("prepareCall", name)) { return statement; } if (constructor != null) { return constructor.newInstance(new StatementProxy(statement, sql)); } else { return null; } }
Source:
<code>public static DateTime weekFloor(DateTime dt) { DateTime startOfWeek = dt.minusDays(dt.getDayOfWeek() - 1); return dayFloor(dt).withYear(startOfWeek.getYear()) .withMonthOfYear(startOfWeek.getMonthOfYear()) <START> .withDayOfMonth(startOfWeek.getDayOfMonth()); <END> }</code><technical_language>a hard time this, "return dayFloor(dt.minusDays(dt.getDayOfWeek() -1)"? if dense, I understand reason for withMonth/withDay/withYear code</technical_language>

Target:
public static DateTime weekFloor(DateTime dt) { return dayFloor(dt.minusDays(dt.getDayOfWeek() -1)); }
Source:
<code>protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); if (sslFactory != null) { InetSocketAddress peerAddress = ch.remoteAddress(); pipeline.addLast("sslHandler", new SslHandler( sslFactory.createSSLEngine(peerAddress.getHostName(), peerAddress.getPort(), SSLFactory.Mode.SERVER))); } pipeline <START> .addLast("connectionStatsHandler", connectionStatsHandler) <END> .addLast("codec", new HttpServerCodec(nettyConfig.nettyServerMaxInitialLineLength, nettyConfig.nettyServerMaxHeaderSize, nettyConfig.nettyServerMaxChunkSize)) .addLast("healthCheckHandler", new HealthCheckHandler(restServerState, nettyMetrics)) .addLast("publicAccessLogHandler", new PublicAccessLogHandler(publicAccessLogger, nettyMetrics)) .addLast("idleStateHandler", new IdleStateHandler(0, 0, nettyConfig.nettyServerIdleTimeSeconds)) .addLast("chunker", new ChunkedWriteHandler()) .addLast("processor", new NettyMessageProcessor(nettyMetrics, nettyConfig, requestHandler)); }</code><technical_language>try putting this handler in pipeline</technical_language>

Target:
protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast("connectionStatsHandler", connectionStatsHandler); if (sslFactory != null) { InetSocketAddress peerAddress = ch.remoteAddress(); pipeline.addLast("sslHandler", new SslHandler( sslFactory.createSSLEngine(peerAddress.getHostName(), peerAddress.getPort(), SSLFactory.Mode.SERVER))); } pipeline .addLast("codec", new HttpServerCodec(nettyConfig.nettyServerMaxInitialLineLength, nettyConfig.nettyServerMaxHeaderSize, nettyConfig.nettyServerMaxChunkSize)) .addLast("healthCheckHandler", new HealthCheckHandler(restServerState, nettyMetrics)) .addLast("publicAccessLogHandler", new PublicAccessLogHandler(publicAccessLogger, nettyMetrics)) .addLast("idleStateHandler", new IdleStateHandler(0, 0, nettyConfig.nettyServerIdleTimeSeconds)) .addLast("chunker", new ChunkedWriteHandler()) .addLast("processor", new NettyMessageProcessor(nettyMetrics, nettyConfig, requestHandler)); }
Source:
<code>private boolean isClosed() { <START> return socket.isValid(); <END> }</code><technical_language>!socket.isValid()</technical_language>

Target:
private boolean isClosed() { return !socket.isValid(); }
Source:
<code>public SonarLintProjectSettingsPanel(Project project) { bindPanel = new SonarLintProjectBindPanel(); propsPanel = new SonarLintProjectPropertiesPanel(); exclusionsPanel = new ProjectExclusionsPanel(project); analyzersPanel = new SonarLintProjectAnalyzersPanel(project); root = new JPanel(new BorderLayout()); JBTabbedPane tabs = new JBTabbedPane(); rootBindPane = new JPanel(new BorderLayout()); rootBindPane.add(bindPanel.create(project)); rootPropertiesPane = new JPanel(new BorderLayout()); rootPropertiesPane.add(propsPanel.create(), BorderLayout.CENTER); tabs.insertTab("Bind to SonarQube project", null, rootBindPane, "Configure the binding of modules to a SonarQube server", 0); tabs.insertTab("File Exclusions", null, exclusionsPanel.getComponent(), "Configure which files to exclude from analysis", 1); tabs.insertTab("Analysis properties", null, rootPropertiesPane, "Configure analysis properties", 2); <START> tabs.insertTab("Analyzers Info", null, analyzersPanel.getPanel(), "Check which analyzers are currently loaded", 3); <END> tabs.addChangeListener(e -> { if (tabs.getSelectedComponent() == analyzersPanel.getPanel()) { analyzersPanel.reload(); } }); root.add(tabs, BorderLayout.CENTER); }</code><technical_language>drop "Info", name tab "Analyzers"</technical_language>

Target:
public SonarLintProjectSettingsPanel(Project project) { bindPanel = new SonarLintProjectBindPanel(); propsPanel = new SonarLintProjectPropertiesPanel(); exclusionsPanel = new ProjectExclusionsPanel(project); analyzersPanel = new SonarLintProjectAnalyzersPanel(project); root = new JPanel(new BorderLayout()); JBTabbedPane tabs = new JBTabbedPane(); rootBindPane = new JPanel(new BorderLayout()); rootBindPane.add(bindPanel.create(project)); rootPropertiesPane = new JPanel(new BorderLayout()); rootPropertiesPane.add(propsPanel.create(), BorderLayout.CENTER); tabs.insertTab("Bind to SonarQube project", null, rootBindPane, "Configure the binding of modules to a SonarQube server", 0); tabs.insertTab("File Exclusions", null, exclusionsPanel.getComponent(), "Configure which files to exclude from analysis", 1); tabs.insertTab("Analysis properties", null, rootPropertiesPane, "Configure analysis properties", 2); tabs.insertTab("Analyzers", null, analyzersPanel.getPanel(), "Check which analyzers are currently loaded", 3); tabs.addChangeListener(e -> { if (tabs.getSelectedComponent() == analyzersPanel.getPanel()) { analyzersPanel.reload(); } }); root.add(tabs, BorderLayout.CENTER); }
Source:
<code>public CloudStack(Collection<Group> groups, Network network, Image image, Map<String, String> parameters, Map<String, String> tags, String template, InstanceAuthentication instanceAuthentication, String loginUserName, String publicKey, SpiFileSystem fileSystem) { <START> this(groups, network, image, parameters, tags, template, instanceAuthentication, loginUserName, publicKey, fileSystem, null); <END> }</code><technical_language>**suggestion:** Consider empty List instead of null. prefer semantics of empty List<CloudLoadBalancer> Optional<List<CloudLoadBalancer> well. expect throw a wrench in serialization? other reasons chose Optional empty list</technical_language>

Target:
public CloudStack(Collection<Group> groups, Network network, Image image, Map<String, String> parameters, Map<String, String> tags, String template, InstanceAuthentication instanceAuthentication, String loginUserName, String publicKey, SpiFileSystem fileSystem) { this(groups, network, image, parameters, tags, template, instanceAuthentication, loginUserName, publicKey, fileSystem, Collections.emptyList()); }
Source:
<code>protected void tearDown() throws Exception { super.tearDown(); <START> if (oldFont != null) { changeDefaultFontName(oldFont); } <END> }</code><technical_language>This done super.teadDown() clean variables (included oldFont set null)</technical_language>

Target:
protected void tearDown() throws Exception { if (oldFont != null) { changeDefaultFontName(oldFont); } super.tearDown(); }
Source:
<code>public PlayerCubeMap(ICubicWorldServer worldServer) { super((WorldServer) worldServer); this.cubeCache = (ServerCubeCache) getWorldServer().getChunkProvider(); <START> this.setPlayerViewRadius(CubicChunks.Config.getVerticalCubeLoadDistance()); <END> this.cubeGenerator = worldServer.getCubeGenerator(); }</code><technical_language>vertical view distance vertical</technical_language>

Target:
public PlayerCubeMap(ICubicWorldServer worldServer) { super((WorldServer) worldServer); this.cubeCache = (ServerCubeCache) getWorldServer().getChunkProvider(); this.setPlayerViewDistance(worldServer.getMinecraftServer().getPlayerList().getViewDistance(), CubicChunks.Config.getVerticalCubeLoadDistance()); this.cubeGenerator = worldServer.getCubeGenerator(); }
Source:
<code>public RestClient(Context context) { <START> super(context, REST_API_CLASS, FlickrApi.instance(), REST_URL, REST_CONSUMER_KEY, REST_CONSUMER_SECRET, REST_CALLBACK_URL); <END> }</code><technical_language>This requires API class right changed constructor, I if avoid "FlickrClient" twice</technical_language>

Target:
public RestClient(Context context) { super(context, REST_API_INSTANCE, REST_URL, REST_CONSUMER_KEY, REST_CONSUMER_SECRET, REST_CALLBACK_URL); }
Source:
<code>public void dataCenterDoesntExist() throws Exception { <START> doReturn(null).when(validator).getDataCenter(); <END> assertEquals(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST), validator.dataCenterExists()); }</code><technical_language>I more correct mock DAO return null</technical_language>

Target:
public void dataCenterDoesntExist() throws Exception { when(dataCenterDao.get(any(Guid.class))).thenReturn(null); assertEquals(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST), validator.dataCenterExists()); }
Source:
<code><START> public IdentityClient(String tenantId, String clientId, IdentityClientOptions options) { <END> if (tenantId == null) { tenantId = "common"; } if (options == null) { options = new IdentityClientOptions(); } this.tenantId = tenantId; this.clientId = clientId; this.options = options; if (clientId == null) { this.publicClientApplication = null; } else { String authorityUrl = options.authorityHost().replaceAll("/+$", "") + "/" + tenantId; PublicClientApplication.Builder publicClientApplicationBuilder = PublicClientApplication.builder(clientId); try { publicClientApplicationBuilder = publicClientApplicationBuilder.authority(authorityUrl); } catch (MalformedURLException e) { logger.logAndThrow(new RuntimeException(e)); } if (options.proxyOptions() != null) { publicClientApplicationBuilder.proxy(proxyOptionsToJavaNetProxy(options.proxyOptions())); } this.publicClientApplication = publicClientApplicationBuilder.build(); } }</code><technical_language>IdentityClient follow builder pattern other Java clients</technical_language>

Target:
IdentityClient(String tenantId, String clientId, IdentityClientOptions options) { if (tenantId == null) { tenantId = "common"; } if (options == null) { options = new IdentityClientOptions(); } this.tenantId = tenantId; this.clientId = clientId; this.options = options; if (clientId == null) { this.publicClientApplication = null; } else { String authorityUrl = options.authorityHost().replaceAll("/+$", "") + "/organizations/" + tenantId; PublicClientApplication.Builder publicClientApplicationBuilder = PublicClientApplication.builder(clientId); try { publicClientApplicationBuilder = publicClientApplicationBuilder.authority(authorityUrl); } catch (MalformedURLException e) { LOGGER.logAndThrow(new RuntimeException(e)); } if (options.proxyOptions() != null) { publicClientApplicationBuilder.proxy(proxyOptionsToJavaNetProxy(options.proxyOptions())); } this.publicClientApplication = publicClientApplicationBuilder.build(); } }
Source:
<code>public static void proceed(final List<String> resourcenames, StepContext context, String resourceDescription, final String variable, boolean inversePrecedence) { Run<?, ?> r = null; try { r = context.get(Run.class); context.get(TaskListener.class).getLogger().println("Lock acquired on [" + resourceDescription + "]"); } catch (Exception e) { context.onFailure(e); return; } LOGGER.finest("Lock acquired on [" + resourceDescription + "] by " + r.getExternalizableId()); try { BodyInvoker bodyInvoker = context.newBodyInvoker(). withCallback(new Callback(resourcenames, resourceDescription, inversePrecedence)). withDisplayName(null); if(variable != null && variable.length()>0) bodyInvoker.withContext(EnvironmentExpander.merge(context.get(EnvironmentExpander.class), new EnvironmentExpander() { @Override public void expand(EnvVars env) throws IOException, InterruptedException { <START> final String resources = resourcenames.toString(); <END> final String resourcesString = resources.substring(1, resources.length()-1); LOGGER.finest("Setting [" + variable + "] to [" + resourcesString + "] for the duration of the block"); env.override(variable, resourcesString); } })); bodyInvoker.start(); } catch (IOException | InterruptedException e) { throw new RuntimeException(e); } }</code><technical_language>Iterating list efficient consistent this. List#toString define kind of contract</technical_language>

Target:
public static void proceed(final List<String> resourcenames, StepContext context, String resourceDescription, final String variable, boolean inversePrecedence) { Run<?, ?> r = null; try { r = context.get(Run.class); context.get(TaskListener.class).getLogger().println("Lock acquired on [" + resourceDescription + "]"); } catch (Exception e) { context.onFailure(e); return; } LOGGER.finest("Lock acquired on [" + resourceDescription + "] by " + r.getExternalizableId()); try { BodyInvoker bodyInvoker = context.newBodyInvoker(). withCallback(new Callback(resourcenames, resourceDescription, inversePrecedence)). withDisplayName(null); if(variable != null && variable.length()>0) bodyInvoker.withContext(EnvironmentExpander.merge(context.get(EnvironmentExpander.class), new EnvironmentExpander() { @Override public void expand(EnvVars env) throws IOException, InterruptedException { final String resources = COMMA_JOINER.join(resourcenames); LOGGER.finest("Setting [" + variable + "] to [" + resources + "] for the duration of the block"); env.override(variable, resources); } })); bodyInvoker.start(); } catch (IOException | InterruptedException e) { throw new RuntimeException(e); } }
Source:
<code>public Optional<TaskContext> getTaskContextByTaskId(TaskId taskId) { <START> return taskContexts.stream().filter(context -> context.getTaskId().equals(taskId)).findFirst(); <END> }</code><technical_language>This inevitably is linear. key-ing tasks contexts ID (maybe a separate structure in this class)? persisting returned in UpdateSystemMemory</technical_language>

Target:
public TaskContext getTaskContextByTaskId(TaskId taskId) { TaskContext taskContext = taskContexts.get(taskId); verify(taskContext != null, "task does not exist"); return taskContext; }
Source:
<code>public Void visitValues(ValuesNode node, Void context) { visitPlan(node, context); node.getRows().forEach( <START> rows -> rows.forEach(row -> checkNotOriginalExpression(row))); <END> return null; }</code><technical_language>do rows.forEach(Visitor::checkNotOriginalExpression). other call sites</technical_language>

Target:
public Void visitValues(ValuesNode node, Void context) { visitPlan(node, context); node.getRows().forEach(rows -> rows.forEach(Visitor::checkNotOriginalExpression)); return null; }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View view = inflater.inflate(R.layout.fragment_news, container, false); unbinder = ButterKnife.bind(this, view); ViewUtil.setTopPaddingDp(toolbar, (int) DimenUtil.getTranslucentStatusBarHeight(getContext())); ViewUtil.setBackgroundDrawable(toolbar, GradientUtil.getCubicGradient( ContextCompat.getColor(getContext(), R.color.lead_gradient_start), Gravity.TOP)); getAppCompatActivity().setSupportActionBar(toolbar); getAppCompatActivity().getSupportActionBar().setDisplayHomeAsUpEnabled(true); getAppCompatActivity().getSupportActionBar().setTitle(""); NewsItem item = GsonUnmarshaller.unmarshal(NewsItem.class, getActivity().getIntent().getStringExtra(EXTRA_NEWS_ITEM)); WikiSite wiki = GsonUnmarshaller.unmarshal(WikiSite.class, getActivity().getIntent().getStringExtra(EXTRA_WIKI)); Uri imageUri = item.featureImage(); int height = imageUri == null ? DimenUtil.getContentTopOffsetPx(getContext()) : newsFeatureImageHeightForDevice(); if (imageUri == null) { toolbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.main_toolbar_background)); } DimenUtil.setViewHeight(image, height); <START> image.getHierarchy().setFadeDuration(0); <END> image.loadImage(imageUri); text.setText(stripHtml(item.story())); initRecycler(); links.setAdapter(new RecyclerAdapter(item.linkCards(wiki), new Callback())); return view; }</code><technical_language><sense of order restored></technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View view = inflater.inflate(R.layout.fragment_news, container, false); unbinder = ButterKnife.bind(this, view); ViewUtil.setTopPaddingDp(toolbar, (int) DimenUtil.getTranslucentStatusBarHeight(getContext())); ViewUtil.setBackgroundDrawable(toolbar, GradientUtil.getCubicGradient( ContextCompat.getColor(getContext(), R.color.lead_gradient_start), Gravity.TOP)); getAppCompatActivity().setSupportActionBar(toolbar); getAppCompatActivity().getSupportActionBar().setDisplayHomeAsUpEnabled(true); getAppCompatActivity().getSupportActionBar().setTitle(""); NewsItem item = GsonUnmarshaller.unmarshal(NewsItem.class, getActivity().getIntent().getStringExtra(EXTRA_NEWS_ITEM)); WikiSite wiki = GsonUnmarshaller.unmarshal(WikiSite.class, getActivity().getIntent().getStringExtra(EXTRA_WIKI)); Uri imageUri = item.featureImage(); int height = imageUri == null ? DimenUtil.getContentTopOffsetPx(getContext()) : newsFeatureImageHeightForDevice(); if (imageUri == null) { toolbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.main_toolbar_background)); } DimenUtil.setViewHeight(image, height); image.loadImage(imageUri); text.setText(stripHtml(item.story())); initRecycler(); links.setAdapter(new RecyclerAdapter(item.linkCards(wiki), new Callback())); return view; }
Source:
<code>public void launch() { String pidFile = getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME; entity.setAttribute(ElasticSearchNode.PID_FILE, pidFile); StringBuilder commandBuilder = new StringBuilder() .append(String.format("%s/bin/elasticsearch -d -p %s", getExpandedInstallDir(), pidFile)); if (entity.getConfig(ElasticSearchNode.TEMPLATE_CONFIGURATION_URL) != null) { commandBuilder.append(" -Des.config=" + Os.mergePaths(getRunDir(), getConfigFile())); } <START> appendConfigIfPresent(commandBuilder, ElasticSearchNode.DATA_DIR, "es.path.data", Os.mergePaths(getRunDir(), "data")); <END> appendConfigIfPresent(commandBuilder, ElasticSearchNode.LOG_DIR, "es.path.logs", Os.mergePaths(getRunDir(), "logs")); appendConfigIfPresent(commandBuilder, ElasticSearchNode.NODE_NAME.getConfigKey(), "es.node.name"); appendConfigIfPresent(commandBuilder, ElasticSearchNode.CLUSTER_NAME.getConfigKey(), "es.cluster.name"); appendConfigIfPresent(commandBuilder, ElasticSearchNode.MULTICAST_ENABLED, "es.discovery.zen.ping.multicast.enabled"); appendConfigIfPresent(commandBuilder, ElasticSearchNode.UNICAST_ENABLED, "es.discovery.zen.ping.unicast.enabled"); commandBuilder.append(" > out.log 2> err.log < /dev/null"); newScript(MutableMap.of("usePidFile", false), LAUNCHING) .updateTaskAndFailOnNonZeroResultCode() .body.append(commandBuilder.toString()) .execute(); }</code><technical_language>i done this</technical_language>

Target:
public void launch() { String pidFile = getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME; entity.setAttribute(ElasticSearchNode.PID_FILE, pidFile); StringBuilder commandBuilder = new StringBuilder() .append(String.format("%s/bin/elasticsearch -d -p %s", getExpandedInstallDir(), pidFile)); if (entity.getConfig(ElasticSearchNode.TEMPLATE_CONFIGURATION_URL) != null) { commandBuilder.append(" -Des.config=" + Os.mergePaths(getRunDir(), getConfigFile())); } appendConfigIfPresent(commandBuilder, "es.path.data", ElasticSearchNode.DATA_DIR, Os.mergePaths(getRunDir(), "data")); appendConfigIfPresent(commandBuilder, "es.path.logs", ElasticSearchNode.LOG_DIR, Os.mergePaths(getRunDir(), "logs")); appendConfigIfPresent(commandBuilder, "es.node.name", ElasticSearchNode.NODE_NAME.getConfigKey()); appendConfigIfPresent(commandBuilder, "es.cluster.name", ElasticSearchNode.CLUSTER_NAME.getConfigKey()); appendConfigIfPresent(commandBuilder, "es.discovery.zen.ping.multicast.enabled", ElasticSearchNode.MULTICAST_ENABLED); appendConfigIfPresent(commandBuilder, "es.discovery.zen.ping.unicast.enabled", ElasticSearchNode.UNICAST_ENABLED); commandBuilder.append(" > out.log 2> err.log < /dev/null"); newScript(MutableMap.of("usePidFile", false), LAUNCHING) .updateTaskAndFailOnNonZeroResultCode() .body.append(commandBuilder.toString()) .execute(); }
Source:
<code>public void endMessage() { writeNullForMissingFieldsAtCurrentLevel(); <START> flush(); <END> columns.endRecord(); if (DEBUG) log("< MESSAGE END >"); if (DEBUG) printState(); }</code><technical_language>need run benchmarks effect this performance. @isnotinvain, add some commits delay flushing nulls improve performance? I if this reverts change</technical_language>

Target:
public void endMessage() { writeNullForMissingFieldsAtCurrentLevel(); if (columns.isColumnFlushNeeded()) { flush(); } columns.endRecord(); if (DEBUG) log("< MESSAGE END >"); if (DEBUG) printState(); }
Source:
<code>private String convertPathForAntPathMatcher(Path path, String targetSeparator) { String convertedPath = path.toString().replace("\\", targetSeparator).replace("/", targetSeparator); if (convertedPath.startsWith(targetSeparator)) { <START> convertedPath = convertedPath.substring(1); <END> } return convertedPath; }</code><technical_language>targetSeparator is of length 1? do convertedPath.substring(targetSeparator.length());</technical_language>

Target:
private String convertPathForAntPathMatcher(Path path, String targetSeparator) { String convertedPath = path.toString().replace("\\", targetSeparator).replace("/", targetSeparator); if (convertedPath.startsWith(targetSeparator)) { convertedPath = convertedPath.substring(targetSeparator.length()); } return convertedPath; }
Source:
<code>private void cancelApplication(Application application, Person canceller, Optional<String> comment) { if (canceller.hasRole(OFFICE)) { application.setStatus(ApplicationStatus.CANCELLED); final Application savedApplication = applicationService.save(application); LOG.info("Cancelled application for leave: {}", savedApplication); final ApplicationComment savedComment = commentService.create(savedApplication, CANCELLED, comment, canceller); applicationMailService.sendCancelledByOfficeNotification(savedApplication, savedComment); } else { <START> application.setStatus(ApplicationStatus.ALLOWED_CANCEL_RE); <END> final Application savedApplication = applicationService.save(application); LOG.info("Request cancellation of application for leave: {}", savedApplication); final ApplicationComment createdComment = commentService.create(savedApplication, CANCEL_REQUESTED, comment, canceller); applicationMailService.sendCancellationRequest(savedApplication, createdComment); } }</code><technical_language>ALLOWED_CANCELLATION_REQUESTED ALLOWED_CANCEL_RE</technical_language>

Target:
private void cancelApplication(Application application, Person canceller, Optional<String> comment) { if (canceller.hasRole(OFFICE)) { application.setStatus(ApplicationStatus.CANCELLED); final Application savedApplication = applicationService.save(application); LOG.info("Cancelled application for leave: {}", savedApplication); final ApplicationComment savedComment = commentService.create(savedApplication, CANCELLED, comment, canceller); applicationMailService.sendCancelledByOfficeNotification(savedApplication, savedComment); } else { final Application savedApplication = applicationService.save(application); LOG.info("Request cancellation of application for leave: {}", savedApplication); final ApplicationComment createdComment = commentService.create(savedApplication, CANCEL_REQUESTED, comment, canceller); applicationMailService.sendCancellationRequest(savedApplication, createdComment); } }
Source:
<code>public ListenableFuture<?> execute(SetPath statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters) { <START> throw new PrestoException(GENERIC_INTERNAL_ERROR, format("temporary exception to test set path: %s", statement.getPath())); <END> }</code><technical_language>throw new UnsupportedOperationException("SET PATH implemented yet");</technical_language>

Target:
public ListenableFuture<?> execute(SetPath statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters) { throw new UnsupportedOperationException("SET PATH not implemented yet"); }
Source:
<code>public void validateUnsupportedLanguage_shouldFailValue() { CreatePaymentRequest createPaymentRequest = createPaymentRequestBuilderWithReturnUrl().language("unsupported language").build(); <START> expectedException.expect(PaymentValidationException.class); <END> expectedException.expect(aValidationExceptionContaining("P0102", "Invalid attribute value: language. Must be \"en\" or \"cy\"")); paymentRequestValidator.validate(createPaymentRequest); }</code><technical_language>Do need expectedException.expect( ) lines</technical_language>

Target:
public void validateUnsupportedLanguage_shouldFailValue() { CreatePaymentRequest createPaymentRequest = createPaymentRequestBuilderWithReturnUrl().language("unsupported language").build(); expectedException.expect(aValidationExceptionContaining("P0102", "Invalid attribute value: language. Must be \"en\" or \"cy\"")); paymentRequestValidator.validate(createPaymentRequest); }
Source:
<code>public static List<Concept> conceptListHelper(String descriptor) { List<Concept> ret = new ArrayList<>(); Set<String> duplicates = new HashSet<>(); if (descriptor == null || descriptor.length() == 0) { return ret; } ConceptService cs = Context.getConceptService(); for (StringTokenizer st = new StringTokenizer(descriptor, "|"); st.hasMoreTokens();) { String s = st.nextToken().trim(); if(duplicates.contains(s)) { continue; } else { <START> duplicates.add(s); <END> } boolean isSet = s.startsWith("set:"); if (isSet) { s = s.substring(4).trim(); } Concept c = null; if (s.startsWith("name:")) { String name = s.substring(5).trim(); c = cs.getConceptByName(name); } else { try { c = cs.getConcept(Integer.valueOf(s.trim())); } catch (Exception ex) } if (c != null) { if (isSet) { List<Concept> inSet = cs.getConceptsByConceptSet(c); ret.addAll(inSet); } else { ret.add(c); } } } return ret; }</code><technical_language>* correct this indention? * way, do need need duplicates, do need cache them</technical_language>

Target:
public static List<Concept> conceptListHelper(String descriptor) { List<Concept> ret = new ArrayList<>(); if (descriptor == null || descriptor.length() == 0) { return ret; } ConceptService cs = Context.getConceptService(); for (StringTokenizer st = new StringTokenizer(descriptor, "|"); st.hasMoreTokens();) { String s = st.nextToken().trim(); boolean isSet = s.startsWith("set:"); if (isSet) { s = s.substring(4).trim(); } Concept c = null; if (s.startsWith("name:")) { String name = s.substring(5).trim(); c = cs.getConceptByName(name); } else { try { c = cs.getConcept(Integer.valueOf(s.trim())); } catch (Exception ex) } if (c != null) { if (isSet) { List<Concept> inSet = cs.getConceptsByConceptSet(c); ret.addAll(inSet); } else { ret.add(c); } } } return ret; }
Source:
<code>public Object getHeader(String name, Supplier<Object> defaultValueSupplier) { IllegalArgumentAssertion.assertNotNull(name, "name"); <START> IllegalArgumentAssertion.assertNotNull(defaultValueSupplier, "defaultValueSupplier"); <END> Object answer = getHeaders().get(name); return answer != null ? answer : defaultValueSupplier.get(); }</code><technical_language>In camel is ObjectHelper.notNull(type, name) pretty thing</technical_language>

Target:
public Object getHeader(String name, Supplier<Object> defaultValueSupplier) { ObjectHelper.notNull(name, "name"); ObjectHelper.notNull(defaultValueSupplier, "defaultValueSupplier"); Object answer = getHeaders().get(name); return answer != null ? answer : defaultValueSupplier.get(); }
Source:
<code>private String variableContent(JobVariable jobVariable) { if (jobVariable.getModel() != null && !jobVariable.getModel().trim().isEmpty()) { return String.format(FOUT_SPACES_INDENT + "<%s %s=\"%s\" %s=\"%s\" %s=\"%s\" />", XMLTags.VARIABLE.getXMLName(), XMLAttributes.VARIABLE_NAME, jobVariable.getName(), XMLAttributes.VARIABLE_VALUE, jobVariable.getValue(), XMLAttributes.VARIABLE_MODEL, jobVariable.getModel()); } else { <START> return String.format(FOUT_SPACES_INDENT + "<%s %s=\"%s\" %s=\"%s\" />", <END> XMLTags.VARIABLE.getXMLName(), XMLAttributes.VARIABLE_NAME, jobVariable.getName(), XMLAttributes.VARIABLE_VALUE, jobVariable.getValue()); } }</code><technical_language>this "<%s %s=\"%s\" %s=\"%s\" />" this "<%s %s=\"%s\" %s=\"%s\"/>" same? put a constant</technical_language>

Target:
private String variableContent(JobVariable jobVariable) { if (jobVariable.getModel() != null && !jobVariable.getModel().trim().isEmpty()) { return String.format(FOUR_SPACES_INDENT + TAG_WITH_THREE_ATTRIBUTES, XMLTags.VARIABLE.getXMLName(), XMLAttributes.VARIABLE_NAME, jobVariable.getName(), XMLAttributes.VARIABLE_VALUE, jobVariable.getValue(), XMLAttributes.VARIABLE_MODEL, jobVariable.getModel()); } else { return String.format(FOUR_SPACES_INDENT + TAG_WITH_TWO_ATTRIBUTES, XMLTags.VARIABLE.getXMLName(), XMLAttributes.VARIABLE_NAME, jobVariable.getName(), XMLAttributes.VARIABLE_VALUE, jobVariable.getValue()); } }
Source:
<code>public static DecisionRule duplicateDecisionRule(final int index, final DecisionTable dtable) { final DecisionRule rule = new DecisionRule(); final DecisionRule source = dtable.getRule().get(index); for (UnaryTests ie : source.getInputEntry()) { final UnaryTests ut = new UnaryTests(); <START> ut.getText().setValue(ie.getText().getValue()); <END> rule.getInputEntry().add(ut); ut.setParent(rule); } for (LiteralExpression oe : source.getOutputEntry()) { final LiteralExpression le = new LiteralExpression(); le.getText().setValue(oe.getText().getValue()); rule.getOutputEntry().add(le); le.setParent(rule); } final Description d = new Description(); d.setValue(source.getDescription().getValue()); rule.setDescription(d); rule.setParent(dtable); return rule; }</code><technical_language>Question, duplicate constraint type? java ut.setConstraintType(ie.getConstraintType()); need update DecisionRuleFactoryTest: java @Test public void testDuplicateDecisionRule() { inputEntries.get(0).setConstraintType(ConstraintType.RANGE); //... assertThat(duplicateInputEntries.get(0).getConstraintType()).isEqualTo(ConstraintType.RANGE); // ..</technical_language>

Target:
public static DecisionRule duplicateDecisionRule(final int index, final DecisionTable dtable) { final DecisionRule rule = new DecisionRule(); final DecisionRule source = dtable.getRule().get(index); for (UnaryTests ie : source.getInputEntry()) { final UnaryTests ut = new UnaryTests(); ut.getText().setValue(ie.getText().getValue()); ut.setConstraintType(ie.getConstraintType()); rule.getInputEntry().add(ut); ut.setParent(rule); } for (LiteralExpression oe : source.getOutputEntry()) { final LiteralExpression le = new LiteralExpression(); le.getText().setValue(oe.getText().getValue()); rule.getOutputEntry().add(le); le.setParent(rule); } final Description d = new Description(); d.setValue(source.getDescription().getValue()); rule.setDescription(d); rule.setParent(dtable); return rule; }