auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void shouldStagePartialChangeInCompareEditor() throws Exception { resetRepositoryToCreateInitialTag(); changeFilesInProject(); launchSynchronization(HEAD, HEAD, true); setGitChangeSetPresentationModel(); getCompareEditorForFileInGitChangeSet(FILE1, true).bot(); Display.getDefault().syncExec(new Runnable() { public void run() { CommonUtils.runCommand("org.eclipse.compare.copyLeftToRight", null); } }); bot.activeEditor().save(); FileRepository repo = lookupRepository(repositoryFile); Status status = new Git(repo).status().call(); <START> assertThat(status.getChanged().size(), is(1)); <END> assertThat(status.getChanged().iterator().next(), is(PROJ1 + "/" + FOLDER + "/" + FILE1)); }</code><technical_language>I get a boxing warning</technical_language>

Target:
public void shouldStagePartialChangeInCompareEditor() throws Exception { resetRepositoryToCreateInitialTag(); changeFilesInProject(); launchSynchronization(HEAD, HEAD, true); setGitChangeSetPresentationModel(); getCompareEditorForFileInGitChangeSet(FILE1, true).bot(); Display.getDefault().syncExec(new Runnable() { public void run() { CommonUtils.runCommand("org.eclipse.compare.copyLeftToRight", null); } }); bot.activeEditor().save(); FileRepository repo = lookupRepository(repositoryFile); Status status = new Git(repo).status().call(); assertThat(Long.valueOf(status.getChanged().size()), is(Long.valueOf(1L))); assertThat(status.getChanged().iterator().next(), is(PROJ1 + "/" + FOLDER + "/" + FILE1)); }
Source:
<code>public void setup() { try { uri = new URI(broadcastURI); } catch (URISyntaxException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>log this entire exception, instead of printing stack trace</technical_language>

Target:
public void setup() { try { uri = new URI(broadcastURI); } catch (URISyntaxException e) { LOGGER.error(e.getMessage()); } }
Source:
<code>private void onNewTemplate() { UserPortalItemModel selectedItem = (UserPortalItemModel) getSelectedItem(); if (selectedItem == null) { cancel(); return; } UnitVmModel model = (UnitVmModel) getWindow(); if (!model.validate(false)) { model.setIsValid(false); } else if (model.getIsSubTemplate().getEntity()) { postNameUniqueCheck(this); } else { model.startProgress(null); String name = model.getName().getEntity(); AsyncDataProvider.getInstance().isTemplateNameUnique(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UserPortalListModel userPortalListModel = (UserPortalListModel) target; boolean isNameUnique = (Boolean) returnValue; if (!isNameUnique) { UnitVmModel vmModel = (UnitVmModel) userPortalListModel.getWindow(); vmModel.getName().getInvalidityReasons().clear(); vmModel .getName() .getInvalidityReasons() .add(ConstantsManager.getInstance() .getConstants() .nameMustBeUniqueInvalidReason()); vmModel.getName().setIsValid(false); vmModel.setIsValid(false); stopProgress(target); } else { userPortalListModel.postNameUniqueCheck(userPortalListModel); } } }), <START> name, model.getDataCenterWithClustersList().getSelectedItem().getDataCenter().getId()); <END> } }</code><technical_language>simplify this model.getSelectedDataCenter().getId()</technical_language>

Target:
private void onNewTemplate() { UserPortalItemModel selectedItem = (UserPortalItemModel) getSelectedItem(); if (selectedItem == null) { cancel(); return; } UnitVmModel model = (UnitVmModel) getWindow(); if (!model.validate(false)) { model.setIsValid(false); } else if (model.getIsSubTemplate().getEntity()) { postNameUniqueCheck(this); } else { model.startProgress(null); String name = model.getName().getEntity(); AsyncDataProvider.getInstance().isTemplateNameUnique(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UserPortalListModel userPortalListModel = (UserPortalListModel) target; boolean isNameUnique = (Boolean) returnValue; if (!isNameUnique) { UnitVmModel vmModel = (UnitVmModel) userPortalListModel.getWindow(); vmModel.getName().getInvalidityReasons().clear(); vmModel .getName() .getInvalidityReasons() .add(ConstantsManager.getInstance() .getConstants() .nameMustBeUniqueInvalidReason()); vmModel.getName().setIsValid(false); vmModel.setIsValid(false); stopProgress(target); } else { userPortalListModel.postNameUniqueCheck(userPortalListModel); } } }), name, model.getSelectedDataCenter().getId()); } }
Source:
<code>private void generateFieldHashCode(FieldSpec field) { if (field.type() instanceof FieldType.BoolFieldType) { buffer.printf("hashCode = 31 * hashCode + (%s ? 1231 : 1237);%n", field.camelCaseName()); } else if ((field.type() instanceof FieldType.Int8FieldType) || (field.type() instanceof FieldType.Int16FieldType) || (field.type() instanceof FieldType.Int32FieldType)) { buffer.printf("hashCode = 31 * hashCode + %s;%n", field.camelCaseName()); } else if (field.type() instanceof FieldType.Int64FieldType) { buffer.printf("hashCode = 31 * hashCode + ((int) (%s >> 32) ^ (int) %s);%n", field.camelCaseName(), field.camelCaseName()); <START> } else if (field.type() instanceof FieldType.UUIDFieldType) { <END> buffer.printf("hashCode = 31 * hashCode + (%s == null ? 0 : %s.hashCode());%n", field.camelCaseName(), field.camelCaseName()); } else if (field.type().isString()) { buffer.printf("hashCode = 31 * hashCode + (%s == null ? 0 : %s.hashCode());%n", field.camelCaseName(), field.camelCaseName()); } else if (field.type().isBytes()) { headerGenerator.addImport(MessageGenerator.ARRAYS_CLASS); buffer.printf("hashCode = 31 * hashCode + Arrays.hashCode(%s);%n", field.camelCaseName()); } else if (field.type().isStruct() || field.type().isArray()) { buffer.printf("hashCode = 31 * hashCode + (%s == null ? 0 : %s.hashCode());%n", field.camelCaseName(), field.camelCaseName()); } else { throw new RuntimeException("Unsupported field type " + field.type()); } }</code><technical_language>This is isStruct / isArray case merged clause</technical_language>

Target:
private void generateFieldHashCode(FieldSpec field) { if (field.type() instanceof FieldType.BoolFieldType) { buffer.printf("hashCode = 31 * hashCode + (%s ? 1231 : 1237);%n", field.camelCaseName()); } else if ((field.type() instanceof FieldType.Int8FieldType) || (field.type() instanceof FieldType.Int16FieldType) || (field.type() instanceof FieldType.Int32FieldType)) { buffer.printf("hashCode = 31 * hashCode + %s;%n", field.camelCaseName()); } else if (field.type() instanceof FieldType.Int64FieldType) { buffer.printf("hashCode = 31 * hashCode + ((int) (%s >> 32) ^ (int) %s);%n", field.camelCaseName(), field.camelCaseName()); } else if (field.type().isBytes()) { headerGenerator.addImport(MessageGenerator.ARRAYS_CLASS); buffer.printf("hashCode = 31 * hashCode + Arrays.hashCode(%s);%n", field.camelCaseName()); } else if (field.type().isStruct() || field.type().isArray() || field.type().isString() || field.type() instanceof FieldType.UUIDFieldType ) { buffer.printf("hashCode = 31 * hashCode + (%s == null ? 0 : %s.hashCode());%n", field.camelCaseName(), field.camelCaseName()); } else { throw new RuntimeException("Unsupported field type " + field.type()); } }
Source:
<code>public void onDestroyView() { <START> if (!subscription.isUnsubscribed()) { <END> subscription.unsubscribe(); } super.onDestroyView(); }</code><technical_language>redundant, could've called forceUnsubscribe()</technical_language>

Target:
public void onDestroyView() { forceUnsubscribe(); super.onDestroyView(); }
Source:
<code>@Test void testSimplifyInValues() { RexNode a = vIntNotNull(1); RexNode literal1 = literal(1); RexNode literal2 = literal(2); RexNode literal3 = literal(3); RexNode literal4 = literal(4); RexNode literal5 = literal(5); RexNode literal6 = literal(6); RexNode expr = in(a, literal1, literal2, literal3, literal4, literal5); RexNode expected = and(ge(a, literal1), le(a, literal5)); RexNode simplifiedExpr = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); <START> assertThat(simplifiedExpr, is(expected)); <END> expr = in(a, literal2, literal3, literal5, literal4, literal1); simplifiedExpr = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); assertThat(simplifiedExpr, is(expected)); expr = in(a, literal1, literal2, literal4, literal5); expected = or(eq(a, literal1), eq(a, literal2), eq(a, literal4), eq(a, literal5)); simplifiedExpr = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); assertThat(simplifiedExpr, is(expected)); expr = in(a, literal1, literal2, literal4, literal5, literal6); expected = or(and(ge(a, literal1), le(a, literal2)), and(ge(a, literal4), le(a, literal6))); simplifiedExpr = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); assertThat(simplifiedExpr, is(expected)); RexNode b = vDecimalNotNull(1); expr = in(b, literal1, literal2, literal3, literal4, literal5); expected = or( eq(b, literal1), eq(b, literal2), eq(b, literal3), eq(b, literal4), eq(b, literal5)); simplifiedExpr = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); assertThat(simplifiedExpr, is(expected)); }</code><technical_language>Please checkSimplify(...) functions simple assertThat. issue assertThat is produces hard understand error, fails include original (before simplify) expression message</technical_language>

Target:
@Test void testSimplifyInValues() { RexNode a = vIntNotNull(1); RexNode n1 = literal(1); RexNode n2 = literal(2); RexNode n3 = literal(3); RexNode n4 = literal(4); RexNode n5 = literal(5); RexNode n6 = literal(6); checkSimplify(in(a, n1, n2, n3, n4, n5), "AND(>=(?0.notNullInt1, 1), <=(?0.notNullInt1, 5))"); checkSimplify(in(a, n2, n3, n5, n4, n1), "AND(>=(?0.notNullInt1, 1), <=(?0.notNullInt1, 5))"); checkSimplify(in(a, n1, n2, n4, n5), "OR(=(?0.notNullInt1, 1), =(?0.notNullInt1, 2), " + "=(?0.notNullInt1, 4), =(?0.notNullInt1, 5))"); checkSimplify(in(a, n1, n2, n4, n5, n6), "OR(AND(>=(?0.notNullInt1, 1), <=(?0.notNullInt1, 2)), " + "AND(>=(?0.notNullInt1, 4), <=(?0.notNullInt1, 6)))"); RexNode b = vDecimalNotNull(1); checkSimplify(in(b, n1, n2, n3, n4, n5), "OR(=(?0.notNullDecimal1, 1), =(?0.notNullDecimal1, 2), " + "=(?0.notNullDecimal1, 3), =(?0.notNullDecimal1, 4), =(?0.notNullDecimal1, 5))"); }
Source:
<code>public static boolean isConnectedInside(Port port) { <START> UMLRTPort rt = (port == null) ? null : UMLRTPort.getInstance(port); <END> return (rt != null) && rt.isConnectedInside(); }</code><technical_language>consider a null Port is a valid RTPort? This avoid null tests (that performed in getFacade() operation)</technical_language>

Target:
public static boolean isConnectedInside(Port port) { UMLRTPort rt = UMLRTPort.getInstance(port); return (rt != null) && rt.isConnectedInside(); }
Source:
<code>private void compareListOfBlobContent(String blobId, Map<ReplicaId, ServerResponse> replicaIdBlobContentMap) { Iterator<ReplicaId> replicaIdIterator = replicaIdBlobContentMap.keySet().iterator(); ReplicaId replicaId1 = replicaIdIterator.next(); ServerResponse replica1ServerResponse = replicaIdBlobContentMap.get(replicaId1); while (replicaIdIterator.hasNext()) { ReplicaId replicaId2 = replicaIdIterator.next(); ServerResponse replica2ServerResponse = replicaIdBlobContentMap.get(replicaId2); if (!replica1ServerResponse.equals(replica2ServerResponse)) { <START> logger.error( <END> "ServerResponse mismatch for " + blobId + " from " + replicaId1 + " and " + replicaId2 + " mismatch" + ". " + replicaId1 + " Content " + replica1ServerResponse + ", " + replicaId2 + " Content " + replica2ServerResponse); } } }</code><technical_language>please formats - easier read</technical_language>

Target:
private void compareListOfBlobContent(String blobId, Map<ReplicaId, ServerResponse> replicaIdBlobContentMap) { Iterator<ReplicaId> replicaIdIterator = replicaIdBlobContentMap.keySet().iterator(); ReplicaId replicaId1 = replicaIdIterator.next(); ServerResponse replica1ServerResponse = replicaIdBlobContentMap.get(replicaId1); while (replicaIdIterator.hasNext()) { ReplicaId replicaId2 = replicaIdIterator.next(); ServerResponse replica2ServerResponse = replicaIdBlobContentMap.get(replicaId2); if (!replica1ServerResponse.equals(replica2ServerResponse)) { logger.error("ServerResponse mismatch for from and {}. Response from : {}, Response from : {}", blobId, replicaId1, replicaId2, replicaId1, replica1ServerResponse, replicaId2, replica2ServerResponse); } } }
Source:
<code>public Map<String, List<String>> getInfrasToPoliciesMapping(@HeaderParam("sessionid") String sessionId) throws NotConnectedException { ResourceManager rm = checkAccess(sessionId); Map<String, List<String>> result = rm.getInfrasToPoliciesMapping(); Collection<PluginDescriptor> supportedInfrastructures = rm.getSupportedNodeSourceInfrastructures(); Collection<PluginDescriptor> supportedPolicies = rm.getSupportedNodeSourcePolicies(); Iterator<Map.Entry<String, List<String>>> iterator = result.entrySet().iterator(); <START> while (iterator.hasNext()) { <END> Map.Entry<String, List<String>> entry = iterator.next(); boolean found = false; for (PluginDescriptor supportedInfrastructure : supportedInfrastructures) { if (supportedInfrastructure.getPluginName().equals(entry.getKey())) { found = true; break; } } if (!found) { iterator.remove(); } } return result.entrySet().stream().map(entry -> { List<String> policies = entry.getValue().stream().filter(policy -> { for (PluginDescriptor supportedPolicy : supportedPolicies) { if (supportedPolicy.getPluginName().equals(policy)) { return true; } } return false; }).collect(Collectors.toList()); ; return new AbstractMap.SimpleEntry<>(entry.getKey(), policies); }).collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); }</code><technical_language>Converting result a stream filter() method a more concise method consider here</technical_language>

Target:
public Map<String, List<String>> getInfrasToPoliciesMapping(@HeaderParam("sessionid") String sessionId) throws NotConnectedException { ResourceManager rm = checkAccess(sessionId); Collection<PluginDescriptor> supportedInfrastructures = rm.getSupportedNodeSourceInfrastructures(); Collection<PluginDescriptor> supportedPolicies = rm.getSupportedNodeSourcePolicies(); Map<String, List<String>> result = rm.getInfrasToPoliciesMapping().entrySet().stream().filter(entry -> { for (PluginDescriptor supportedInfrastructure : supportedInfrastructures) { if (supportedInfrastructure.getPluginName().equals(entry.getKey())) { return true; } } return false; }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); return result.entrySet().stream().map(entry -> { List<String> policies = entry.getValue() .stream() .filter(policy -> containsPlugin(policy, supportedPolicies)) .collect(Collectors.toList()); return new AbstractMap.SimpleEntry<>(entry.getKey(), policies); }).collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); }
Source:
<code>private void processDataOrChildChange(WatchedEvent event, long notificationTime) { final String path = event.getPath(); final boolean pathExists = event.getType() != EventType.NodeDeleted; if (EventType.NodeDeleted == event.getType()) { <START> LOG.info("event delelete:" + event.getPath()); <END> } if (event.getType() == EventType.NodeChildrenChanged || event.getType() == EventType.NodeCreated || event.getType() == EventType.NodeDeleted) { Set<IZkChildListener> childListeners = _childListener.get(path); if (childListeners != null && !childListeners.isEmpty()) { fireChildChangedEvents(path, childListeners, pathExists); } } if (event.getType() == EventType.NodeDataChanged || event.getType() == EventType.NodeDeleted || event.getType() == EventType.NodeCreated) { Set<IZkDataListenerEntry> listeners = _dataListener.get(path); if (listeners != null && !listeners.isEmpty()) { fireDataChangedEvents(event.getPath(), listeners, OptionalLong.of(notificationTime), pathExists); } } }</code><technical_language>Is this log necessary? pollute logs</technical_language>

Target:
private void processDataOrChildChange(WatchedEvent event, long notificationTime) { final String path = event.getPath(); final boolean pathExists = event.getType() != EventType.NodeDeleted; if (EventType.NodeDeleted == event.getType()) { LOG.debug("Event NodeDeleted: {}", event.getPath()); } if (event.getType() == EventType.NodeChildrenChanged || event.getType() == EventType.NodeCreated || event.getType() == EventType.NodeDeleted) { Set<IZkChildListener> childListeners = _childListener.get(path); if (childListeners != null && !childListeners.isEmpty()) { fireChildChangedEvents(path, childListeners, pathExists); } } if (event.getType() == EventType.NodeDataChanged || event.getType() == EventType.NodeDeleted || event.getType() == EventType.NodeCreated) { Set<IZkDataListenerEntry> listeners = _dataListener.get(path); if (listeners != null && !listeners.isEmpty()) { fireDataChangedEvents(event.getPath(), listeners, OptionalLong.of(notificationTime), pathExists); } } }
Source:
<code>public ByteStreamSplitValuesWriter(int elementSizeInBytes, int initialCapacity, int pageSize, ByteBufferAllocator allocator) { <START> this.numStreams = elementSizeInBytes; <END> this.elementSizeInBytes = elementSizeInBytes; this.byteStreams = new CapacityByteArrayOutputStream[elementSizeInBytes]; final int capacityPerStream = (pageSize + this.numStreams - 1) / this.numStreams; final int initialCapacityPerStream = (initialCapacity + this.numStreams - 1) / this.numStreams; for (int i = 0; i < this.numStreams; ++i) { this.byteStreams[i] = new CapacityByteArrayOutputStream( initialCapacityPerStream, capacityPerStream, allocator); } }</code><technical_language>Please throw exception if elementSizeInBytes == 0 divide</technical_language>

Target:
public ByteStreamSplitValuesWriter(int elementSizeInBytes, int initialCapacity, int pageSize, ByteBufferAllocator allocator) { if (elementSizeInBytes <= 0) { throw new ParquetEncodingException(String.format("Element byte size is invalid: %d", elementSizeInBytes)); } this.numStreams = elementSizeInBytes; this.elementSizeInBytes = elementSizeInBytes; this.byteStreams = new CapacityByteArrayOutputStream[elementSizeInBytes]; final int capacityPerStream = (pageSize + this.numStreams - 1) / this.numStreams; final int initialCapacityPerStream = (initialCapacity + this.numStreams - 1) / this.numStreams; for (int i = 0; i < this.numStreams; ++i) { this.byteStreams[i] = new CapacityByteArrayOutputStream( initialCapacityPerStream, capacityPerStream, allocator); } }
Source:
<code><START> public static void setSchemaClass(Job job, Class clazz) { <END> SchemaUtils.setSchemaClass(SchemaUtils.Type.Input, job, clazz); }</code><technical_language>type parameter Class? applies Map, List, Classes, etc</technical_language>

Target:
public static void setSchemaClass(Job job, Class clazz) { SchemaUtils.setSchemaClass(PojoType.Input, job, clazz); }
Source:
<code>public void updated(Dictionary<String, ?> config) throws ConfigurationException { logger.debug("Plex binding updated"); if (config != null) { PlexConnection connection = new PlexConnection(); Enumeration<String> keys = config.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); if ("service.pid".equals(key)) continue; String value = ((String) config.get(key)).trim(); if ("host".equals(key)) connection.setHost(value); else if ("port".equals(key)) connection.setPort(Integer.valueOf(value)); else if ("refresh".equals(key)) if (StringUtils.isNumeric(value)) refreshInterval = Integer.valueOf(value); else logger.warn("Non-numeric refresh interval {}, using default {}", value, refreshInterval); } logger.debug("Plex config, server at {}:{}", connection.getHost(), connection.getPort()); if (!StringUtils.isEmpty(connection.getHost())) { <START> connector = new PlexConnector(connection, new PlexUpdateReceivedCallback() { <END> @Override public void updateReceived(PlexSession session) { processUpdateRecevied(session); } @Override public void serverListUpdated(MediaContainer container) { processServerList(container); } }); connector.start(); setInitialState(); setProperlyConfigured(true); } else { logger.warn("No host IP configured for Plex binding"); } } }</code><technical_language>suggest extract code establish connection method. This implement a reconnection feature duplicating code</technical_language>

Target:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { logger.debug("Plex binding updated"); if (config != null) { PlexConnectionProperties connectionProperties = new PlexConnectionProperties(); Enumeration<String> keys = config.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); if ("service.pid".equals(key)) continue; String value = ((String) config.get(key)).trim(); if ("host".equals(key)) connectionProperties.setHost(value); else if ("port".equals(key)) connectionProperties.setPort(Integer.valueOf(value)); else if ("refresh".equals(key)) if (StringUtils.isNumeric(value)) refreshInterval = Integer.valueOf(value); else logger.warn("Non-numeric refresh interval {}, using default {}", value, refreshInterval); } logger.debug("Plex config, server at {}:{}", connectionProperties.getHost(), connectionProperties.getPort()); if (!StringUtils.isEmpty(connectionProperties.getHost())) { connect(connectionProperties); setProperlyConfigured(true); } else { logger.warn("No host IP configured for Plex binding"); } } }
Source:
<code>public void testRuntime() throws Exception { setProperty(); <START> KernelServicesBuilder builder = createKernelServicesBuilder(UndertowSubsystem100TestCase.RUNTIME) <END> .setSubsystemXml(getSubsystemXml()); KernelServices mainServices = builder.build(); testRuntime(mainServices, virtualHostName, flag); testRuntimeOther(mainServices); }</code><technical_language>Reference static properties directly. i.e. AbstractUndertowSubsystemTestCase.RUNTIME</technical_language>

Target:
public void testRuntime() throws Exception { setProperty(); KernelServicesBuilder builder = createKernelServicesBuilder(AbstractUndertowSubsystemTestCase.RUNTIME) .setSubsystemXml(getSubsystemXml()); KernelServices mainServices = builder.build(); testRuntime(mainServices, virtualHostName, flag); testRuntimeOther(mainServices); }
Source:
<code>void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { String lockName = CLEAR_OPERATION + partitionedRegion.getName(); long clearStartTime = 0; try { acquireDistributedClearLock(lockName); clearStartTime = System.nanoTime(); assignAllPrimaryBuckets(); if (cacheWrite) { invokeCacheWriter(regionEvent); } boolean acquireClearLockForNotification = (partitionedRegion.hasAnyClientsInterested() || partitionedRegion.hasListener()); if (acquireClearLockForNotification) { obtainLockForClear(regionEvent); } try { Set<Integer> bucketsCleared = clearRegion(regionEvent); if (partitionedRegion.getTotalNumberOfBuckets() != bucketsCleared.size()) { String message = "Unable to clear all the buckets from the partitioned region " + partitionedRegion.getName() + ", either data (buckets) moved or member departed."; logger.warn(message + " expected to clear number of buckets: " + partitionedRegion.getTotalNumberOfBuckets() + " actual cleared: " + bucketsCleared.size()); throw new PartitionedRegionPartialClearException(message); } } finally { if (acquireClearLockForNotification) { releaseLockForClear(regionEvent); } } } finally { releaseDistributedClearLock(lockName); <START> if (partitionedRegion.getCachePerfStats() != null) { <END> CachePerfStats stats = partitionedRegion.getRegionCachePerfStats(); if (stats != null) { partitionedRegion.getRegionCachePerfStats() .incPartitionedRegionClearTotalDuration(System.nanoTime() - clearStartTime); } } } }</code><technical_language>I null check partitionedRegion.getCachePerfStats() is longer necessary this change, updating</technical_language>

Target:
void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { String lockName = CLEAR_OPERATION + partitionedRegion.getName(); long clearStartTime = 0; try { acquireDistributedClearLock(lockName); clearStartTime = System.nanoTime(); assignAllPrimaryBuckets(); if (cacheWrite) { invokeCacheWriter(regionEvent); } boolean acquireClearLockForNotification = (partitionedRegion.hasAnyClientsInterested() || partitionedRegion.hasListener()); if (acquireClearLockForNotification) { obtainLockForClear(regionEvent); } try { Set<Integer> bucketsCleared = clearRegion(regionEvent); if (partitionedRegion.getTotalNumberOfBuckets() != bucketsCleared.size()) { String message = "Unable to clear all the buckets from the partitioned region " + partitionedRegion.getName() + ", either data (buckets) moved or member departed."; logger.warn(message + " expected to clear number of buckets: " + partitionedRegion.getTotalNumberOfBuckets() + " actual cleared: " + bucketsCleared.size()); throw new PartitionedRegionPartialClearException(message); } } finally { if (acquireClearLockForNotification) { releaseLockForClear(regionEvent); } } } finally { releaseDistributedClearLock(lockName); CachePerfStats stats = partitionedRegion.getRegionCachePerfStats(); if (stats != null) { partitionedRegion.getRegionCachePerfStats() .incPartitionedRegionClearTotalDuration(System.nanoTime() - clearStartTime); } } }
Source:
<code>public static void testMergeLocalUserModifiedCoordsAndServerSideModified() { final Geocache stored = new Geocache(); stored.setGeocode("GC12345"); stored.setUserModifiedCoords(true); stored.setCoords(new Geopoint(40.0, 8.0)); final Waypoint originalStored = new Waypoint("ORIGINAL", WaypointType.ORIGINAL, false); originalStored.setCoords(new Geopoint(42.0, 10.0)); stored.addOrChangeWaypoint(originalStored, false); saveFreshCacheToDB(stored); final Geocache download = new Geocache(); download.setGeocode("GC12345"); download.setCoords(new Geopoint(41.0, 9.0)); final Waypoint originalDownloaded = new Waypoint("ORIGINAL", WaypointType.ORIGINAL, false); originalDownloaded.setCoords(new Geopoint(43.0, 11.0)); download.addOrChangeWaypoint(originalDownloaded, false); download.setUserModifiedCoords(true); download.gatherMissingFrom(stored); assertThat(download.hasUserModifiedCoords()).as("merged user modified").isEqualTo(true); assertThat(download.getCoords()).as("merged coordinates").isEqualTo(new Geopoint(41.0, 9.0)); <START> assertThat(download.getWaypoints()).as("merged waypoints size").hasSize(1); <END> assertThat(download.getOriginalWaypoint().getCoords()).as("merged original wp").isEqualTo(new Geopoint(43.0, 11.0)); }</code><technical_language>suggestion assertThat(download.getWaypoints()).as("merged waypoints").hasSize(1);</technical_language>

Target:
public static void testMergeLocalUserModifiedCoordsAndServerSideModified() { final Geocache stored = new Geocache(); stored.setGeocode("GC12345"); stored.setUserModifiedCoords(true); stored.setCoords(new Geopoint(40.0, 8.0)); final Waypoint originalStored = new Waypoint("ORIGINAL", WaypointType.ORIGINAL, false); originalStored.setCoords(new Geopoint(42.0, 10.0)); stored.addOrChangeWaypoint(originalStored, false); saveFreshCacheToDB(stored); final Geocache download = new Geocache(); download.setGeocode("GC12345"); download.setCoords(new Geopoint(41.0, 9.0)); final Waypoint originalDownloaded = new Waypoint("ORIGINAL", WaypointType.ORIGINAL, false); originalDownloaded.setCoords(new Geopoint(43.0, 11.0)); download.addOrChangeWaypoint(originalDownloaded, false); download.setUserModifiedCoords(true); download.gatherMissingFrom(stored); assertThat(download.hasUserModifiedCoords()).as("merged user modified").isEqualTo(true); assertThat(download.getCoords()).as("merged coordinates").isEqualTo(new Geopoint(41.0, 9.0)); assertThat(download.getWaypoints()).as("merged waypoints").hasSize(1); assertThat(download.getOriginalWaypoint().getCoords()).as("merged original wp").isEqualTo(new Geopoint(43.0, 11.0)); }
Source:
<code>public Expr visitAlterTable(Context context, Stack<Expr> stack, AlterTable expr) throws TajoException { if (expr.getAlterTableOpType() == AlterTableOpType.ADD_PARTITION) { <START> context.state.addVerification(new UnsupportedException("ADD PARTITION")); <END> } return expr; }</code><technical_language>UnimplementedException. UnsupportedException means is plan support this feature</technical_language>

Target:
public Expr visitAlterTable(Context context, Stack<Expr> stack, AlterTable expr) throws TajoException { if (expr.getAlterTableOpType() == AlterTableOpType.ADD_PARTITION) { context.state.addVerification(new NotImplementedException("ADD PARTITION")); } return expr; }
Source:
<code>MetaParamsInternalMetadata(NumericVersion numericVersion, SimpleClusteredVersion clusteredVersion, long created, long lastUsed, long lifespan, long maxIdle) { this.params = new MetaParams(MetaParams.EMPTY_ARRAY, 0); this.params.add(new MetaEntryVersion(numericVersion == null ? clusteredVersion : numericVersion)); if (created > -1) params.add(new MetaCreated(created)); if (lastUsed > -1) params.add(new MetaLastUsed(lastUsed)); <START> if (lifespan > -1) params.add(new MetaLifespan(lifespan)); <END> if (maxIdle > -1) params.add(new MetaMaxIdle(maxIdle)); }</code><technical_language>Intellij tells nicer if method refs in created() lastUsed()</technical_language>

Target:
MetaParamsInternalMetadata(NumericVersion numericVersion, SimpleClusteredVersion clusteredVersion, long created, long lastUsed, long lifespan, long maxIdle) { this.params = new MetaParams(MetaParams.EMPTY_ARRAY, 0); if (numericVersion != null || clusteredVersion != null) { this.params.add(new MetaEntryVersion(numericVersion == null ? clusteredVersion : numericVersion)); } if (created > -1) params.add(new MetaCreated(created)); if (lastUsed > -1) params.add(new MetaLastUsed(lastUsed)); if (lifespan > -1) params.add(new MetaLifespan(lifespan)); if (maxIdle > -1) params.add(new MetaMaxIdle(maxIdle)); }
Source:
<code>void savePOMFile() { String projectPath = ((genProject.getLocation()).toFile()).getAbsolutePath(); try { <START> File file = new File(projectPath + "\\pom.xml"); <END> FileWriter pomFileWriter= new FileWriter(file); new MavenXpp3Writer().write(pomFileWriter, pomFileModel ); pomFileWriter.close(); } catch (IOException e) { e.printStackTrace(); } }</code><technical_language>/ instead</technical_language>

Target:
void savePOMFile() { String projectPath = ((genProject.getLocation()).toFile()).getAbsolutePath(); try { File file = new File(projectPath + "/pom.xml"); FileWriter pomFileWriter = new FileWriter(file); new MavenXpp3Writer().write(pomFileWriter, pomFileModel); pomFileWriter.close(); } catch (IOException e) { e.printStackTrace(); } }
Source:
<code><START> public void setUp() throws Exception { <END> if (Display.getCurrent() != null) { log.warn("SWTBot test needs to run in a non-UI thread.\n" + "Make sure that \"Run in UI thread\" is unchecked in your launch configuration or that useUIThread is set to false in the pom.xml"); } }</code><technical_language>way, this setUp method introduced in previous version, right? case add @since annotation</technical_language>

Target:
protected void setUp() throws Exception { if (Display.getCurrent() != null) { fail("SWTBot test needs to run in a non-UI thread.\n" + "Make sure that \"Run in UI thread\" is unchecked in your launch configuration or that useUIThread is set to false in the pom.xml"); } }
Source:
<code>public void setLinkedId(final String linkedId) { <START> if (this.linkedId != null) { <END> CommonHelper.assertNotNull("linkedId", linkedId); } this.linkedId = linkedId; }</code><technical_language>If want remove a link account, allow set null. remove CommonHelper.assertNotNull test</technical_language>

Target:
public void setLinkedId(final String linkedId) { this.linkedId = linkedId; }
Source:
<code>public void afterPropertiesSet() throws Exception { Matcher matcher = NO_SYNCHRONIZATION_PATTERN.matcher(root); if (matcher.matches()) { registry = new ResourceModuleRegistry(root, true); ((ResourceModuleRegistry)registry).afterPropertiesSet(); logger.info("Custom modules will be written directly to {}", root); <START> } else { <END> String localRoot = "file:" + Files.createTempDirectory("spring-xd-custom-modules"); ResourceModuleRegistry local = new ResourceModuleRegistry(localRoot, true); local.afterPropertiesSet(); ResourceModuleRegistry remote = new ResourceModuleRegistry(root, true); remote.afterPropertiesSet(); registry = new SynchronizingModuleRegistry(remote, local); logger.info("Custom modules will be written at and kept in synch locally at {}", root, localRoot); } }</code><technical_language>a newline for else</technical_language>

Target:
public void afterPropertiesSet() throws Exception { Matcher matcher = NO_SYNCHRONIZATION_PATTERN.matcher(root); if (matcher.matches()) { registry = new WritableResourceModuleRegistry(root); ((WritableResourceModuleRegistry)registry).afterPropertiesSet(); logger.info("Custom modules will be written directly to {}", root); } else { String localRoot = "file:" + Files.createTempDirectory("spring-xd-custom-modules"); WritableResourceModuleRegistry local = new WritableResourceModuleRegistry(localRoot); local.afterPropertiesSet(); WritableResourceModuleRegistry remote = new WritableResourceModuleRegistry(root); remote.afterPropertiesSet(); registry = new SynchronizingModuleRegistry(remote, local); logger.info("Custom modules will be written at and kept in synch locally at {}", root, localRoot); } }
Source:
<code>private String convertQuakemlToString(Quakeml message) throws Exception{ <START> return formatConverter.getString(message,validate); <END> }</code><technical_language>This needs call fixRawQuakeml returned string..</technical_language>

Target:
private String convertQuakemlToString(Quakeml message) throws Exception{ return fixRawQuakeml(formatConverter.getString(message,validate)); }
Source:
<code>public Optional<PlanNodeStatsEstimate> doCalculate(FilterNode node, StatsProvider statsProvider, Lookup lookup, Session session, TypeProvider types) { PlanNodeStatsEstimate sourceStats = statsProvider.getStats(node.getSource()); PlanNodeStatsEstimate estimate = filterStatsCalculator.filterStats(sourceStats, node.getPredicate(), session, types); <START> if (isDefaultFilterFactorEnabled(session) && estimate.isOutputRowCountUnknown()) { <END> estimate = estimate.mapOutputRowCount(unknownRowCount -> sourceStats.getOutputRowCount() * UNKNOWN_FILTER_COEFFICIENT); } return Optional.of(estimate); }</code><technical_language>I address CBO factors holistically instead of specialized session properties. do if create a dedicated configuration factors, e.g: public class CboConfig { // cost weights private double cpuCostWeight = 75; private double memoryCostWeight = 10; private double networkCostWeight = 15; // filtering coefficients private double joinUnknownFilterCoefficient = 0.9 private double defaultUnknownFilterCoefficient = 0.9 ... more coefficients ... // TODO: normalization factors (derived in <LINK_0> private double joinCpuCostNormalizationFactor = ... private double joinMemoryCostNormalizationFactor = ... private double aggregationCpuCostNormalizationFactor = ... private double aggregationMemoryCostNormalizationFactor = ... ... } do think</technical_language>

Target:
public Optional<PlanNodeStatsEstimate> doCalculate(FilterNode node, StatsProvider statsProvider, Lookup lookup, Session session, TypeProvider types) { PlanNodeStatsEstimate sourceStats = statsProvider.getStats(node.getSource()); PlanNodeStatsEstimate estimate = filterStatsCalculator.filterStats(sourceStats, node.getPredicate(), session, types); if (isDefaultFilterFactorEnabled(session) && estimate.isOutputRowCountUnknown()) { estimate = sourceStats.mapOutputRowCount(sourceRowCount -> sourceStats.getOutputRowCount() * UNKNOWN_FILTER_COEFFICIENT); } return Optional.of(estimate); }
Source:
<code>public DilutionDto updateDilution(@PathVariable Long dilutionId, @RequestBody DilutionDto dilutionDto) throws IOException { if (dilutionDto == null) { log.error( "Received null dilutionDto from front end; cannot convert to Dilution. Something likely went wrong in the JS DTO conversion."); throw new RestException("Cannot convert null to Dilution", Status.BAD_REQUEST); } LibraryDilution dilution = Dtos.to(dilutionDto); <START> dilution.setCreator(securityStore.getUserByFullName(dilutionDto.getDilutionUserName())); <END> dilution.setId(dilutionId); dilutionService.update(dilution); return getDilution(dilutionId); }</code><technical_language>creator modifiable, need loaded database for update. (It'll fully loaded in managed dilution [here](<LINK_0> )</technical_language>

Target:
public DilutionDto updateDilution(@PathVariable Long dilutionId, @RequestBody DilutionDto dilutionDto) throws IOException { if (dilutionDto == null) { log.error( "Received null dilutionDto from front end; cannot convert to Dilution. Something likely went wrong in the JS DTO conversion."); throw new RestException("Cannot convert null to Dilution", Status.BAD_REQUEST); } LibraryDilution dilution = Dtos.to(dilutionDto); dilution.setId(dilutionId); dilutionService.update(dilution); return getDilution(dilutionId); }
Source:
<code>public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) { <START> KeycloakTransaction tx = Resteasy.getContextData(KeycloakTransaction.class); <END> if (tx != null && tx.isActive()) { if (tx.getRollbackOnly()) { tx.rollback(); } else { if (!(containerResponseContext.getEntity() instanceof java.util.stream.Stream)) { tx.commit(); } else if (tx instanceof SupportsPostponedCommit) { ((SupportsPostponedCommit) tx).postponeCommit(); } else { throw new RuntimeException(tx.getClass() + " doesn't support postponed commit."); } } } }</code><technical_language>suggestion KeycloakTransaction tx = Resteasy.getContextData(KeycloakTransaction.class);</technical_language>

Target:
public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) { KeycloakTransaction tx = Resteasy.getContextData(KeycloakTransaction.class); if (tx != null && tx.isActive()) { if (tx.getRollbackOnly()) { tx.rollback(); } else if ((containerResponseContext.getEntity() instanceof java.util.stream.Stream) && tx instanceof SupportsPostponedCommit) { ((SupportsPostponedCommit) tx).postponeCommit(); } else { tx.commit(); } } }
Source:
<code>public boolean init( StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface ) { boolean init = super.init( stepMetaInterface, stepDataInterface ); Preconditions.checkNotNull( stepMetaInterface ); mqttConsumerMeta = (MQTTConsumerMeta) stepMetaInterface; RowMeta rowMeta = new RowMeta(); try { mqttConsumerMeta.getFields( rowMeta, getStepname(), null, null, this, repository, metaStore ); } catch ( KettleStepException e ) { logger.error( getString( PKG, "MQTTInput.Error.FailureGettingFields" ), e ); } window = new FixedTimeStreamWindow<>( subtransExecutor, rowMeta, getDuration(), getBatchSize() ); try { source = new MQTTStreamSource( environmentSubstitute( mqttConsumerMeta.getMqttServer() ), <START> Arrays.asList( environmentSubstitute( mqttConsumerMeta.getTopics().toArray( new String[]{} ) ) ), <END> Integer.parseInt( environmentSubstitute( mqttConsumerMeta.getQos() ) ), this ); } catch ( NumberFormatException e ) { log.logError( BaseMessages.getString( PKG, "MQTT.Error.QOS", environmentSubstitute( mqttConsumerMeta.getQos() ) ) ); return false; } return init; }</code><technical_language>give array of exact size</technical_language>

Target:
public boolean init( StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface ) { boolean init = super.init( stepMetaInterface, stepDataInterface ); Preconditions.checkNotNull( stepMetaInterface ); mqttConsumerMeta = (MQTTConsumerMeta) stepMetaInterface; RowMeta rowMeta = new RowMeta(); try { mqttConsumerMeta.getFields( rowMeta, getStepname(), null, null, this, repository, metaStore ); } catch ( KettleStepException e ) { logger.error( getString( PKG, "MQTTInput.Error.FailureGettingFields" ), e ); } window = new FixedTimeStreamWindow<>( subtransExecutor, rowMeta, getDuration(), getBatchSize() ); try { final List<String> topics = mqttConsumerMeta.getTopics(); source = new MQTTStreamSource( environmentSubstitute( mqttConsumerMeta.getMqttServer() ), Arrays.asList( environmentSubstitute( topics.toArray( new String[ topics.size() ] ) ) ), Integer.parseInt( environmentSubstitute( mqttConsumerMeta.getQos() ) ), this ); } catch ( NumberFormatException e ) { log.logError( BaseMessages.getString( PKG, "MQTT.Error.QOS", environmentSubstitute( mqttConsumerMeta.getQos() ) ) ); return false; } return init; }
Source:
<code>protected String getColorByProgress(int progress) { <START> return progress < 70 ? "#669966" : progress < 95 ? "#FF9900" : "#FF0000"; END> }</code><technical_language>I double ternary operator a bit confusing, simply if-else statement instead: if (progress < 70) { return "#669966"; } else if (progress < 95) { return "#FF9900"; } else { return "#FF0000"; } please consider extracting colors public static final fields, i.e. OneColorPercentColumn ProgressBarColumn.GREEN similar constant</technical_language>

Target:
protected String getColorByProgress(int progress) { if (progress < 70) { return ProgressBarColors.GREEN.asCode(); } else if (progress < 95) { return ProgressBarColors.ORANGE.asCode(); } else { return ProgressBarColors.RED.asCode(); } }
Source:
<code>public List<String> imageSearch(String searchText) { List<String> resultUrls = new ArrayList<String>(); try { <START> String url = "<LINK_0>search?lr=lang_" + Runtime.getInstance().getLocaleTag() + "&site=imghp&tbm=isch&source=hp&q=" + searchText + "&gws_rd=cr"; <END> String filename = URLEncoder.encode(searchText, StandardCharsets.UTF_8.toString()); Document doc = Jsoup.connect(url).userAgent(USER_AGENT).referrer("<LINK_0>").get(); String html = doc.toString(); resultUrls = extractImageRefs(html); System.out.println("number of results: " + resultUrls.size()); for (String imageUrl : resultUrls) { invoke("publishImage", imageUrl); } invoke("publishImages", resultUrls); } catch (Exception e) { error("parsing image threw", e); } return resultUrls; }</code><technical_language>this runtime.. this locale of google search service. able search in french if current runtime locale is english</technical_language>

Target:
public List<String> imageSearch(String searchText) { List<String> resultUrls = new ArrayList<String>(); try { String url = "<LINK_0>search?lr=lang_" + locale.getTag() + "&site=imghp&tbm=isch&source=hp&q=" + searchText + "&gws_rd=cr"; String filename = URLEncoder.encode(searchText, StandardCharsets.UTF_8.toString()); Document doc = Jsoup.connect(url).userAgent(USER_AGENT).referrer("<LINK_0>").get(); String html = doc.toString(); resultUrls = extractImageRefs(html); System.out.println("number of results: " + resultUrls.size()); for (String imageUrl : resultUrls) { invoke("publishImage", imageUrl); } invoke("publishImages", resultUrls); } catch (Exception e) { error("parsing image threw", e); } return resultUrls; }
Source:
<code>private void joinAll() throws InterruptedException { <START> if (!threads.isEmpty()) { <END> for (Thread thread : threads) { thread.join(); } } }</code><technical_language>Is threads.isEmpty() necessary ? I foreach loop handle case</technical_language>

Target:
private void joinAll() throws InterruptedException { for (Thread thread : threads) { thread.join(); } }
Source:
<code>public synchronized void onWorkerDeleted(final String workerId) { workerClockMap.remove(workerId); if (minimumClockWorkers.contains(workerId)) { minimumClockWorkers.remove(workerId); if (minimumClockWorkers.size() == 0) { <START> globalMinimumClock = workerClockMap.isEmpty() ? 0 : Collections.min(workerClockMap.values()); <END> broadcastGlobalMinimumClock(); } } }</code><technical_language>sense set globalMinimumClock 0 workerClockMap is empty</technical_language>

Target:
public synchronized void onWorkerDeleted(final String workerId) { workerClockMap.remove(workerId); if (minimumClockWorkers.remove(workerId)) { if (minimumClockWorkers.size() == 0) { globalMinimumClock = workerClockMap.isEmpty() ? INITIAL_GLOBAL_MINIMUM_CLOCK : Collections.min(workerClockMap.values()); broadcastGlobalMinimumClock(); } } }
Source:
<code>public void testEntityInfo_VersionDoesNotExist(){ <START> assertFalse(new FakeMetadata().checkVersionExists("fake", "1.0")); <END> }</code><technical_language>Versions follow [our standard](<LINK_1>, is basically [semantic versioning](<LINK_0> quick fix is change 1.0 1.0.0. reason change this is eventually enforce version standards in code</technical_language>

Target:
public void testEntityInfo_VersionDoesNotExist(){ assertFalse(new FakeMetadata().checkVersionExists("fake", "1.0.0")); }
Source:
<code>public SinkFormat<SerializationSchema<RowData>> createSinkFormat( DynamicTableFactory.Context context, ReadableConfig formatOptions) { validateFormatOptions(formatOptions); <START> return new SinkFormat<SerializationSchema<RowData>>() { <END> @Override public SerializationSchema<RowData> createSinkFormat( DynamicTableSink.Context context, DataType consumedDataType) { final RowType rowType = (RowType) consumedDataType.getLogicalType(); final CsvRowDataSerializationSchema.Builder schemaBuilder = new CsvRowDataSerializationSchema.Builder(rowType); configureSerializationSchema(formatOptions, schemaBuilder); return schemaBuilder.build(); } @Override public ChangelogMode getChangelogMode() { return ChangelogMode.insertOnly(); } }; }</code><technical_language>Add a empty line this</technical_language>

Target:
public SinkFormat<SerializationSchema<RowData>> createSinkFormat( DynamicTableFactory.Context context, ReadableConfig formatOptions) { FactoryUtil.validateFactoryOptions(this, formatOptions); validateFormatOptions(formatOptions); return new SinkFormat<SerializationSchema<RowData>>() { @Override public SerializationSchema<RowData> createSinkFormat( DynamicTableSink.Context context, DataType consumedDataType) { final RowType rowType = (RowType) consumedDataType.getLogicalType(); final CsvRowDataSerializationSchema.Builder schemaBuilder = new CsvRowDataSerializationSchema.Builder(rowType); configureSerializationSchema(formatOptions, schemaBuilder); return schemaBuilder.build(); } @Override public ChangelogMode getChangelogMode() { return ChangelogMode.insertOnly(); } }; }
Source:
<code><START> private String tagsToString(final Set<String> tags) { <END> final StringBuilder stringBuilder = new StringBuilder(); if (!tags.isEmpty()) { final ArrayList<String> sortedTags = new ArrayList<>(tags); sortedTags.sort(Comparator.naturalOrder()); for (int i = 0; i < sortedTags.size(); i++) { stringBuilder.append(sortedTags.get(i)); if (i < sortedTags.size() - 1) { stringBuilder.append(','); } } } return stringBuilder.toString(); }</code><technical_language>Get rid of this method. [this](<LINK_0> try bash escape existing commas</technical_language>

Target:
String tagsToString(final Set<String> tags) { final ArrayList<String> sortedTags = new ArrayList<>(tags == null ? Collections.emptySet() : tags); sortedTags.sort(Comparator.naturalOrder()); final String joinedString = StringUtils.join(sortedTags, ','); return StringUtils.replaceAll(StringUtils.replaceAll(joinedString, "\'", "\\\'"), "\"", "\\\""); }
Source:
<code>public ClientProcess() throws RemoteException { super(); this.isAlive = true; <START> this.serverAlive = true; <END> this.logger = Logger.getLogger(ClientProcess.class.getName()); logger.log(Level.INFO, "Starting client"); }</code><technical_language>I this boolean initialized false is connected server this point</technical_language>

Target:
public ClientProcess() throws RemoteException { super(); this.isAlive = true; this.serverAlive = false; this.logger = Logger.getLogger(ClientProcess.class.getName()); logger.log(Level.INFO, "Starting client"); }
Source:
<code>public void setNameExpression(Expression nameExpression) { <START> System.out.println("Setting2 " + nameExpression); <END> this.nameExpression = nameExpression; }</code><technical_language>system.out meant removed</technical_language>

Target:
public void setNameExpression(Expression nameExpression) { this.nameExpression = nameExpression; }