auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void execute() { String columnGroup = model.getColumns().get(columnIndex).getHeaderMetaData().get(1).getColumnGroup(); int columnPosition = isRight ? columnIndex + 1 : columnIndex; <START> String columnTitle = columnGroup.toUpperCase() + "-" + (model.getGroupSize(columnGroup) +1); <END> model.insertNewColumn(columnPosition, getScenarioGridColumn(columnId, columnTitle, columnGroup, scenarioGridPanel, scenarioGridLayer)); }</code><technical_language>Replace "placeholder" generator</technical_language>

Target:
public void execute() { String columnGroup = model.getColumns().get(columnIndex).getHeaderMetaData().get(1).getColumnGroup(); int columnPosition = isRight ? columnIndex + 1 : columnIndex; FactMappingType factMappingType = FactMappingType.valueOf(columnGroup.toUpperCase()); String columnTitle = FactMapping.getPlaceHolder(factMappingType, (int) (model.getGroupSize(columnGroup) + 1)); model.insertNewColumn(columnPosition, getScenarioGridColumn(columnId, columnTitle, columnGroup, scenarioGridPanel, scenarioGridLayer)); }
Source:
<code>private String getDirectoryInclusionExclusionSelection() { String selection; String includeSelection = getDirectoryInclusionSelection(); String excludeSelection = getDirectoryExclusionSelection(); if (includeSelection != null && excludeSelection != null) { selection = "((" + includeSelection + ") AND (" + excludeSelection + "))"; } else if (includeSelection != null) { selection = "(" + includeSelection + ")"; } else if (excludeSelection != null) { <START> selection = "(" + excludeSelection + ")"; <END> } else { selection = null; } return selection; }</code><technical_language>Instead of adding of parenthesis here, change return statement to: java return "(" + selection + ")";</technical_language>

Target:
private String getDirectoryInclusionExclusionSelection() { String selection; String includeSelection = getDirectoryInclusionSelection(); String excludeSelection = getDirectoryExclusionSelection(); if (includeSelection != null && excludeSelection != null) { selection = "(" + includeSelection + ") AND (" + excludeSelection + ")"; } else if (includeSelection != null) { selection = includeSelection; } else if (excludeSelection != null) { selection = excludeSelection; } else { return null; } return "(" + selection + ")"; }
Source:
<code>private void enableHaReservationCheck() { if (Config.<Boolean>getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start HA Reservation check"); Integer interval = Config.<Integer> getValue(ConfigValues.VdsHaReservationIntervalInMinutes); <START> executor.scheduleWithFixedDelay(() -> performHaResevationCheck(), <END> interval, interval, TimeUnit.MINUTES); log.info("Finished HA Reservation check"); } }</code><technical_language>same, method reference</technical_language>

Target:
private void enableHaReservationCheck() { if (Config.<Boolean>getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start HA Reservation check"); Integer interval = Config.<Integer> getValue(ConfigValues.VdsHaReservationIntervalInMinutes); executor.scheduleWithFixedDelay(this::performHaResevationCheck, interval, interval, TimeUnit.MINUTES); log.info("Finished HA Reservation check"); } }
Source:
<code>private void initMetrics() { SpawnBalancer.makeGauge("minDiskPercentUsedDiff", () -> minDiskPercentUsedDiff); SpawnBalancer.makeGauge("maxDiskPercentUsedDiff", () -> maxDiskPercentUsedDiff); SpawnBalancer.makeGauge("avgDiskPercentUsedDiff", () -> avgDiskPercentUsedDiff); SpawnBalancer.makeGauge("minTaskPercentDiff", () -> minTaskPercentDiff); SpawnBalancer.makeGauge("minTaskPercentDiff", () -> minTaskPercentDiff); <START> SpawnBalancer.makeGauge("minTaskPercentDiff", () -> minTaskPercentDiff); <END> }</code><technical_language>copy pasta error</technical_language>

Target:
private void initMetrics() { SpawnBalancer.makeGauge("minDiskPercentUsedDiff", () -> minDiskPercentUsedDiff); SpawnBalancer.makeGauge("maxDiskPercentUsedDiff", () -> maxDiskPercentUsedDiff); SpawnBalancer.makeGauge("avgDiskPercentUsedDiff", () -> avgDiskPercentUsedDiff); SpawnBalancer.makeGauge("minTaskPercentDiff", () -> minTaskPercentDiff); SpawnBalancer.makeGauge("maxTaskPercentDiff", () -> maxTaskPercentDiff); SpawnBalancer.makeGauge("avgTaskPercentDiff", () -> avgTaskPercentDiff); }
Source:
<code>public MetadataInfo(String id, URL url, long bytes, String type, int pixelsHeight, int pixelsWidth) { this.id = id; this.url = url; <START> this.bytes = bytes; <END> this.type = type; if (pixelsHeight < 0 || pixelsHeight > MAX_HEIGHT) { throw new IllegalArgumentException("Image height value must be between 0 and 65536."); } if (pixelsWidth < 0 || pixelsWidth > MAX_HEIGHT) { throw new IllegalArgumentException("Image width value must be between 0 and 65536."); } this.height = pixelsHeight; this.width = pixelsWidth; }</code><technical_language>enforced required (as XEP)</technical_language>

Target:
public MetadataInfo(String id, URL url, long bytes, String type, int pixelsHeight, int pixelsWidth) { this.id = StringUtils.requireNotNullNorEmpty(id, "ID is required."); this.url = url; if (bytes <= 0) { throw new IllegalArgumentException("Number of bytes MUST be greater than 0."); } this.bytes = UInt32.from(bytes); this.type = StringUtils.requireNotNullNorEmpty(type, "Content Type is required."); if (pixelsHeight < 0 || pixelsHeight > MAX_HEIGHT) { throw new IllegalArgumentException("Image height value must be between 0 and 65536."); } if (pixelsWidth < 0 || pixelsWidth > MAX_WIDTH) { throw new IllegalArgumentException("Image width value must be between 0 and 65536."); } this.height = UInt16.from(pixelsHeight); this.width = UInt16.from(pixelsWidth); }
Source:
<code>public void testRequestInterceptorsThroughBuilder() throws Exception { InterceptorCallCounter interceptorCallCounter = new InterceptorCallCounter(); TestReplicationListener listener = new TestReplicationListener(); ReplicatorBuilder replicatorBuilder = ReplicatorBuilder.pull() .to(this.datastore) .from(this.remoteDb.couchClient.getRootUri()) .addRequestInterceptors(interceptorCallCounter) .addResponseInterceptors(interceptorCallCounter); if (TestOptions.COOKIE_AUTH) { <START> CookieInterceptor ci = new CookieInterceptor(this.remoteDb.couchClient.getRootUri().toString(), TestOptions.COUCH_USERNAME, TestOptions.COUCH_PASSWORD); <END> replicatorBuilder.addRequestInterceptors(ci); replicatorBuilder.addResponseInterceptors(ci); } Replicator replicator = replicatorBuilder.build(); replicator.getEventBus().register(listener); replicator.start(); while(replicator.getState() != Replicator.State.COMPLETE && replicator.getState() != Replicator.State.ERROR) { Thread.sleep(50); } Assert.assertEquals(Replicator.State.COMPLETE, replicator.getState()); listener.assertReplicationCompletedOrThrow(); Assert.assertTrue(interceptorCallCounter.interceptorResponseTimesCalled >= 1); Assert.assertTrue(interceptorCallCounter.interceptorRequestTimesCalled >= 1); }</code><technical_language>In other places URL parameter is last, first</technical_language>

Target:
public void testRequestInterceptorsThroughBuilder() throws Exception { InterceptorCallCounter interceptorCallCounter = new InterceptorCallCounter(); TestReplicationListener listener = new TestReplicationListener(); ReplicatorBuilder replicatorBuilder = ReplicatorBuilder.pull() .to(this.datastore) .from(this.remoteDb.couchClient.getRootUri()) .addRequestInterceptors(interceptorCallCounter) .addResponseInterceptors(interceptorCallCounter); if (TestOptions.COOKIE_AUTH) { CookieInterceptor ci = new CookieInterceptor(TestOptions.COUCH_USERNAME, TestOptions.COUCH_PASSWORD, this.remoteDb.couchClient.getRootUri().toString()); replicatorBuilder.addRequestInterceptors(ci); replicatorBuilder.addResponseInterceptors(ci); } Replicator replicator = replicatorBuilder.build(); replicator.getEventBus().register(listener); replicator.start(); while(replicator.getState() != Replicator.State.COMPLETE && replicator.getState() != Replicator.State.ERROR) { Thread.sleep(50); } Assert.assertEquals(Replicator.State.COMPLETE, replicator.getState()); listener.assertReplicationCompletedOrThrow(); Assert.assertTrue(interceptorCallCounter.interceptorResponseTimesCalled >= 1); Assert.assertTrue(interceptorCallCounter.interceptorRequestTimesCalled >= 1); }
Source:
<code>public static String of(String type, String body){ return new ParsedNotificationsInfos(type, body).toJSON(); <START> } <END></code><technical_language>StringUtils.isEmptry(XXX) if</technical_language>

Target:
public static NotificationValue of(String type, String body) { return new ParsedNotificationsInfos(type, body).notification; }
Source:
<code>public void testFindDuplicateProperties() { initService(); List<DataSetPropertyDTO> input = getDatasetPropertiesDTO(); DataSetPropertyDTO duplicateProperty = input.get(0); input.add(duplicateProperty); List<DataSetPropertyDTO> properties = datasetService.findDuplicateProperties(input); Assert.assertFalse(properties.isEmpty()); <START> Assert.assertEquals(properties.get(0), duplicateProperty); <END> }</code><technical_language>minor nit: I static imports just: suggestion assertEquals(properties.get(0), duplicateProperty);</technical_language>

Target:
public void testFindDuplicateProperties() { initService(); List<DataSetPropertyDTO> input = getDatasetPropertiesDTO(); DataSetPropertyDTO duplicateProperty = input.get(0); input.add(duplicateProperty); List<DataSetPropertyDTO> properties = datasetService.findDuplicateProperties(input); assertFalse(properties.isEmpty()); assertEquals(properties.get(0), duplicateProperty); }
Source:
<code>protected Invocation buildClientRequest(String url, Collection<WebServiceCredential> creds) throws URISyntaxException { <START> if (StringUtils.equals(url, <END> "<LINK_0>")) { return allowClientToFailWithPoorlyFormatedUrl(url); } else { return super.buildClientRequest(url, creds); } }</code><technical_language>Jay I chatted changing override a boolean instead of checking specific URL</technical_language>

Target:
protected Invocation buildClientRequest(String url, Collection<WebServiceCredential> creds) throws URISyntaxException { if (forceUseOfRealClientToTestAttachmentUrls) { return buildClienRequesttWithRealClientObject(url); } else { return super.buildClientRequest(url, creds); } }
Source:
<code>public ChefClient chefClientload(String chefClientName, String token) throws ChefClientExecutionException, EntityNotFoundException { ChefClient chefClient = new ChefClient(); try { chefClient = chefClientDao.getChefClient(chefClientName, token); } catch (EntityNotFoundException e) { String men = "The node is not in the chef-server: " + chefClientName + " : " + e.getMessage(); <START> log.warn ("The node is not in the chef-server."); <END> throw new EntityNotFoundException(ChefClient.class, men, chefClientName); } catch (Exception e) { String message = " An error ocurred invoing the Chef server to load ChefClient named " + chefClientName; log.info(message); throw new ChefClientExecutionException(message, e); } return chefClient; }</code><technical_language>do do log.warn( men )</technical_language>

Target:
public ChefClient chefClientload(String chefClientName, String token) throws ChefClientExecutionException, EntityNotFoundException { ChefClient chefClient = new ChefClient(); try { chefClient = chefClientDao.getChefClient(chefClientName, token); } catch (EntityNotFoundException e) { String men = "The node is not in the chef-server: " + chefClientName + " : " + e.getMessage(); log.warn (men); throw new EntityNotFoundException(ChefClient.class, men, chefClientName); } catch (Exception e) { String message = " An error ocurred invoing the Chef server to load ChefClient named " + chefClientName; log.info(message); throw new ChefClientExecutionException(message, e); } return chefClient; }
Source:
<code>public void testZookeeperSessionExpiry() throws InterruptedException { String testCluster = "testDeleteTaskWithPrefix"; String connectorType = "connectorType"; Duration timeout = Duration.ofMinutes(1); ZkClientInterceptingAdapter adapter = createInterceptingZkAdapter(testCluster, 5000); adapter.connect(); DatastreamTaskImpl task = new DatastreamTaskImpl(); task.setId("3"); task.setConnectorType(connectorType); task.setZkAdapter(adapter); List<DatastreamTask> tasks = new ArrayList<>(); tasks.add(task); updateInstanceAssignment(adapter, adapter.getInstanceName(), tasks); LOG.info("Acquire from instance1 should succeed"); Assert.assertTrue(expectException(() -> task.acquire(timeout), false)); simulateSessionExpiration(adapter); Thread.sleep(5000); <START> Assert.assertTrue(adapter.getZkStateChangeListener().sessionExpired); <END> }</code><technical_language>helpful validate exitOnSessionExpiryOrEstablishmentError() is called session expiry</technical_language>

Target:
public void testZookeeperSessionExpiry() throws InterruptedException { String testCluster = "testDeleteTaskWithPrefix"; String connectorType = "connectorType"; Duration timeout = Duration.ofMinutes(1); ZkClientInterceptingAdapter adapter = createInterceptingZkAdapter(testCluster, 5000); adapter.connect(); DatastreamTaskImpl task = new DatastreamTaskImpl(); task.setId("3"); task.setConnectorType(connectorType); task.setZkAdapter(adapter); List<DatastreamTask> tasks = Collections.singletonList(task); updateInstanceAssignment(adapter, adapter.getInstanceName(), tasks); LOG.info("Acquire from instance1 should succeed"); Assert.assertTrue(expectException(() -> task.acquire(timeout), false)); simulateSessionExpiration(adapter); Thread.sleep(5000); Mockito.verify(adapter, Mockito.times(1)).onSessionExpired(); }
Source:
<code>public SolUiSlider(Rectangle sliderRectangle, String text, float startingValue, int trimAt) { rectangle = sliderRectangle; this.text = text; <START> if (startingValue > 1.0f) { <END> value = 1.0f; } else if (startingValue < 0.0f) { value = 0.0f; } else { value = startingValue; } this.trimAt = trimAt; }</code><technical_language>I Math.min()/Math.max() provide more readibility in lines</technical_language>

Target:
public SolUiSlider(Rectangle sliderRectangle, String text, float startingValue, int trimAt) { rectangle = sliderRectangle; value = SolMath.clamp(value); this.text = text; this.trimAt = trimAt; }
Source:
<code>public static Message ofLocalized(@Nonnull final String id, @Nonnull final String... parameters) { <START> return Message.of(MessagePart.of(id, parameters)); <END> }</code><technical_language>Is this a bug? read Message.of(MessagePart.ofLocalized(id, parameters)); is a hover text. renaming of Method for hover avoided this error, MessagePart.of(Message.Translateable(id,parameters))</technical_language>

Target:
public static Message ofLocalized(@Nonnull final String id, @Nonnull final String... parameters) { return Message.of(MessagePart.ofLocalized(id, parameters)); }
Source:
<code>private void runFafReplayFile(Path path) throws IOException { byte[] rawReplayBytes = replayFileReader.readRawReplayData(path); Path tempSupComReplayFile = preferencesService.getCacheDirectory().resolve(TEMP_SCFA_REPLAY_FILE_NAME); createDirectories(tempSupComReplayFile.getParent()); Files.copy(new ByteArrayInputStream(rawReplayBytes), tempSupComReplayFile, StandardCopyOption.REPLACE_EXISTING); LocalReplayInfo replayInfo = replayFileReader.parseMetaData(path); String gameType = replayInfo.getFeaturedMod(); Integer replayId = replayInfo.getUid(); Map<String, Integer> modVersions = replayInfo.getFeaturedModVersions(); String mapName = replayInfo.getMapname(); <START> if (gameType.equals("coop")) { <END> mapName = parseMapFolderName(rawReplayBytes); } if (StringUtils.equalsIgnoreCase(mapName, "None")) { String maybeMapGen = parseMapFolderName(rawReplayBytes); if (mapGeneratorService.isGeneratedMap(maybeMapGen)) { mapName = maybeMapGen; } } Set<String> simMods = replayInfo.getSimMods() != null ? replayInfo.getSimMods().keySet() : emptySet(); Integer version = parseSupComVersion(rawReplayBytes); gameService.runWithReplay(tempSupComReplayFile, replayId, gameType, version, modVersions, simMods, mapName); }</code><technical_language>KnowFeaturedMod Enum</technical_language>

Target:
private void runFafReplayFile(Path path) throws IOException { byte[] rawReplayBytes = replayFileReader.readRawReplayData(path); Path tempSupComReplayFile = preferencesService.getCacheDirectory().resolve(TEMP_SCFA_REPLAY_FILE_NAME); createDirectories(tempSupComReplayFile.getParent()); Files.copy(new ByteArrayInputStream(rawReplayBytes), tempSupComReplayFile, StandardCopyOption.REPLACE_EXISTING); LocalReplayInfo replayInfo = replayFileReader.parseMetaData(path); String gameType = replayInfo.getFeaturedMod(); Integer replayId = replayInfo.getUid(); Map<String, Integer> modVersions = replayInfo.getFeaturedModVersions(); String mapName = parseMapFolderName(rawReplayBytes); Set<String> simMods = replayInfo.getSimMods() != null ? replayInfo.getSimMods().keySet() : emptySet(); Integer version = parseSupComVersion(rawReplayBytes); gameService.runWithReplay(tempSupComReplayFile, replayId, gameType, version, modVersions, simMods, mapName); }
Source:
<code>public void dependentProcessSucceeded() throws Exception { bundles[0].setProcessValidity("2014-06-01T04:00Z","2014-06-01T04:02Z"); bundles[0].submitAndScheduleAllFeeds(); bundles[0].submitAndScheduleProcess(); InstanceUtil.waitTillInstancesAreCreated(cluster1, bundles[0].getProcessData(), 0); OozieUtil.createMissingDependencies(cluster1, ENTITY_TYPE.PROCESS, bundles[0].getProcessName(), 0, 0); InstanceUtil.waitForBundleToReachState(cluster1, bundles[0].getProcessName(), Job.Status.SUCCEEDED, 20); FeedMerlin feed = new FeedMerlin(bundles[0].getDataSets().get(0)); feed.addProperty("someProp","someVal"); AssertUtil.assertSucceeded(prism.getFeedHelper().update(feed.toString(), feed.toString())); Assert.assertEquals(OozieUtil.getNumberOfBundle(prism, ENTITY_TYPE.FEED, <START> Util.readEntityName(feed <END> .toString() )),2); }</code><technical_language>feed.getName()</technical_language>

Target:
public void dependentProcessSucceeded() throws Exception { bundles[0].setProcessValidity("2014-06-01T04:00Z","2014-06-01T04:02Z"); bundles[0].submitAndScheduleAllFeeds(); bundles[0].submitAndScheduleProcess(); InstanceUtil.waitTillInstancesAreCreated(cluster1, bundles[0].getProcessData(), 0); OozieUtil.createMissingDependencies(cluster1, ENTITY_TYPE.PROCESS, bundles[0].getProcessName(), 0, 0); InstanceUtil.waitForBundleToReachState(cluster1, bundles[0].getProcessName(), Job.Status.SUCCEEDED, 20); FeedMerlin feed = new FeedMerlin(bundles[0].getDataSets().get(0)); feed.addProperty("someProp","someVal"); AssertUtil.assertSucceeded(prism.getFeedHelper().update(feed.toString(), feed.toString())); Assert.assertEquals(OozieUtil.getNumberOfBundle(prism, ENTITY_TYPE.FEED, feed.getName()),2); }
Source:
<code><START> private C getConf(C conf) { <END> Preconditions.checkNotNull(auths, "Authorizations cannot be null"); conf.setInfer(useInference); conf.setTablePrefix(prefix); conf.setInt("sc.cloudbase.numPartitions", 3); conf.set(RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, auths); if (visibilities != null) { conf.set(RdfCloudTripleStoreConfiguration.CONF_CV, visibilities); } conf.setDisplayQueryPlan(displayPlan); return conf; }</code><technical_language>This method name reflect method does. call "applyBuildersValues(conf)" something</technical_language>

Target:
private C getConf(C conf) { conf.setInfer(useInference); conf.setTablePrefix(prefix); conf.setInt("sc.cloudbase.numPartitions", 3); conf.setAuths(auths); if (visibilities != null) { conf.setCv(visibilities); } conf.setDisplayQueryPlan(displayPlan); return conf; }
Source:
<code>private <T extends SectionBreakpoint> void saveBreakpoint(final T bId, final Map<FullSourceCoordinate, BreakpointEnabling<T>> breakpoints) { FullSourceCoordinate coord = bId.getCoordinate(); BreakpointEnabling<T> existingBP = breakpoints.get(coord); if (existingBP == null) { <START> WebDebugger.log("SetSectionBreakpoint: " + bId); <END> existingBP = new BreakpointEnabling<T>(bId); breakpoints.put(coord, existingBP); } else { existingBP.setEnabled(bId.isEnabled()); } }</code><technical_language>Please include debug output in commits</technical_language>

Target:
private <T extends SectionBreakpoint> void saveBreakpoint(final T bId, final Map<FullSourceCoordinate, BreakpointEnabling<T>> breakpoints) { FullSourceCoordinate coord = bId.getCoordinate(); BreakpointEnabling<T> existingBP = breakpoints.get(coord); if (existingBP == null) { existingBP = new BreakpointEnabling<T>(bId); breakpoints.put(coord, existingBP); } else { existingBP.setEnabled(bId.isEnabled()); } }
Source:
<code>private String parseToken(InputStream inputStream) throws IOException { if (identityPoolCredentialSource.credentialFormatType == CredentialFormatType.TEXT) { <START> BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); <END> StringBuilder token = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { token.append(line); } return token.toString(); } JsonFactory jsonFactory = OAuth2Utils.JSON_FACTORY; JsonObjectParser parser = new JsonObjectParser(jsonFactory); GenericJson fileContents = parser.parseAndClose(inputStream, OAuth2Utils.UTF_8, GenericJson.class); if (!fileContents.containsKey(identityPoolCredentialSource.subjectTokenFieldName)) { throw new IOException("Invalid subject token field name. No subject token was found."); } return (String) fileContents.get(identityPoolCredentialSource.subjectTokenFieldName); }</code><technical_language>needs a character set</technical_language>

Target:
private String parseToken(InputStream inputStream) throws IOException { if (identityPoolCredentialSource.credentialFormatType == CredentialFormatType.TEXT) { BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); return CharStreams.toString(reader); } JsonFactory jsonFactory = OAuth2Utils.JSON_FACTORY; JsonObjectParser parser = new JsonObjectParser(jsonFactory); GenericJson fileContents = parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); if (!fileContents.containsKey(identityPoolCredentialSource.subjectTokenFieldName)) { throw new IOException("Invalid subject token field name. No subject token was found."); } return (String) fileContents.get(identityPoolCredentialSource.subjectTokenFieldName); }
Source:
<code>public void testTextType() throws Exception { Session s = openSession(); <START> s.beginTransaction(); <END> SearchEntity entity = new SearchEntity(); entity.key = Integer.valueOf( 1 ); entity.t = "TEST TEXT"; entity.c = "TEST STRING"; s.persist( entity ); s.flush(); s.getTransaction().commit(); s.clear(); Query<Object[]> legacyQuery = s.createQuery( "select b, snippets(t), highlighted(t), score() from " + ENTITY_NAME + " b where contains(b.t, 'text') = contains_rhs()", Object[].class); Object[] result = legacyQuery.getSingleResult(); SearchEntity retrievedEntity = (SearchEntity) result[0]; assertEquals(4, result.length); assertEquals( Integer.valueOf( 1 ), retrievedEntity.key ); assertEquals( "TEST TEXT", retrievedEntity.t ); assertEquals( "TEST STRING", retrievedEntity.c ); assertEquals("TEST <b>TEXT</b>", result[1]); assertEquals("TEST <b>TEXT</b>", result[2]); assertEquals(0.75d, result[3]); }</code><technical_language>doInHibernate() pattern for tests proper? try generalize it</technical_language>

Target:
public void testTextType() throws Exception { doInHibernate( this::sessionFactory, s -> { SearchEntity entity = new SearchEntity(); entity.key = Integer.valueOf( 1 ); entity.t = "TEST TEXT"; entity.c = "TEST STRING"; s.persist( entity ); s.flush(); Query<Object[]> legacyQuery = s.createQuery( "select b, snippets(t), highlighted(t), score() from " + ENTITY_NAME + " b where contains(b.t, 'text') = contains_rhs()", Object[].class ); Object[] result = legacyQuery.getSingleResult(); SearchEntity retrievedEntity = (SearchEntity) result[0]; assertEquals( 4, result.length ); assertEquals( Integer.valueOf( 1 ), retrievedEntity.key ); assertEquals( "TEST TEXT", retrievedEntity.t ); assertEquals( "TEST STRING", retrievedEntity.c ); assertEquals( "TEST <b>TEXT</b>", result[1] ); assertEquals( "TEST <b>TEXT</b>", result[2] ); assertEquals( 0.75d, result[3] ); } ); }
Source:
<code>private void updateAffinities(InvocationRequest invocationRequest, Map<String, Object> attachments, EJBLocator<?> ejbLocator, ComponentView componentView) { Affinity legacyAffinity = null; Affinity weakAffinity = null; Affinity strongAffinity = null; <START> Affinity clusterAffinity = getClusterAffinity(); <END> if (ejbLocator.isStateful() && componentView.getComponent() instanceof StatefulSessionComponent) { final StatefulSessionComponent statefulSessionComponent = (StatefulSessionComponent) componentView.getComponent(); strongAffinity = getStrongAffinity(statefulSessionComponent); weakAffinity = legacyAffinity = getWeakAffinity(statefulSessionComponent, ejbLocator.asStateful()); } else if (componentView.getComponent() instanceof StatelessSessionComponent) { legacyAffinity = clusterAffinity; strongAffinity = clusterAffinity; } if (strongAffinity != null && !(strongAffinity instanceof NodeAffinity)) { invocationRequest.updateStrongAffinity(strongAffinity); } if (weakAffinity != null && !weakAffinity.equals(Affinity.NONE)) { invocationRequest.updateWeakAffinity(weakAffinity); } if (legacyAffinity != null && !legacyAffinity.equals(Affinity.NONE)) { attachments.put(Affinity.WEAK_AFFINITY_CONTEXT_KEY, legacyAffinity); } EjbLogger.EJB3_INVOCATION_LOGGER.debugf("Called receiveInvocationRequest ( bean = %s ): strong affinity = %s, weak affinity = %s \n", componentView.getComponent().getClass().getName(), strongAffinity, weakAffinity); }</code><technical_language>Remove this line. need discourage people thinking "cluster affinity" is a proper affinity type. Affinity types weak strong, it</technical_language>

Target:
private void updateAffinities(InvocationRequest invocationRequest, Map<String, Object> attachments, EJBLocator<?> ejbLocator, ComponentView componentView) { Affinity legacyAffinity = null; Affinity weakAffinity = null; Affinity strongAffinity = null; if (ejbLocator.isStateful() && componentView.getComponent() instanceof StatefulSessionComponent) { final StatefulSessionComponent statefulSessionComponent = (StatefulSessionComponent) componentView.getComponent(); strongAffinity = getStrongAffinity(statefulSessionComponent); weakAffinity = legacyAffinity = getWeakAffinity(statefulSessionComponent, ejbLocator.asStateful()); } else if (componentView.getComponent() instanceof StatelessSessionComponent) { strongAffinity = legacyAffinity = this.getStatelessAffinity(); } if (strongAffinity != null && !(strongAffinity instanceof NodeAffinity)) { invocationRequest.updateStrongAffinity(strongAffinity); } if (weakAffinity != null && !weakAffinity.equals(Affinity.NONE)) { invocationRequest.updateWeakAffinity(weakAffinity); } if (legacyAffinity != null && !legacyAffinity.equals(Affinity.NONE)) { attachments.put(Affinity.WEAK_AFFINITY_CONTEXT_KEY, legacyAffinity); } EjbLogger.EJB3_INVOCATION_LOGGER.debugf("Called receiveInvocationRequest ( bean = %s ): strong affinity = %s, weak affinity = %s \n", componentView.getComponent().getClass().getName(), strongAffinity, weakAffinity); }
Source:
<code>default ColumnValueSelector<Long> makeColumnValueSelector(ReadableOffset offset, ImmutableBitmap nullValueBitmap) { final boolean hasNulls = !nullValueBitmap.isEmpty(); <START> class HistoricalLongColumnSelector implements LongColumnSelector, HistoricalColumnSelector<Long> <END> { @Override public long getLong() { return ColumnarLongs.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { return ColumnarLongs.this.get(offset); } @Override public boolean isNull() { return hasNulls && nullValueBitmap.get(offset.getOffset()); } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarLongs.this); inspector.visit("offset", offset); } } return new HistoricalLongColumnSelector(); }</code><technical_language>Align logic method order double float</technical_language>

Target:
default ColumnValueSelector<Long> makeColumnValueSelector(ReadableOffset offset, ImmutableBitmap nullValueBitmap) { if (nullValueBitmap.isEmpty()) { class HistoricalLongColumnSelector implements LongColumnSelector, HistoricalColumnSelector<Long> { @Override public boolean isNull() { return false; } @Override public long getLong() { return ColumnarLongs.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { return ColumnarLongs.this.get(offset); } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarLongs.this); inspector.visit("offset", offset); } } return new HistoricalLongColumnSelector(); } else { class HistoricalLongColumnSelectorWithNulls implements LongColumnSelector, HistoricalColumnSelector<Long> { @Override public boolean isNull() { return nullValueBitmap.get(offset.getOffset()); } @Override public long getLong() { assert NullHandling.replaceWithDefault() || !isNull(); return ColumnarLongs.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { assert NullHandling.replaceWithDefault() || !nullValueBitmap.get(offset); return ColumnarLongs.this.get(offset); } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarLongs.this); inspector.visit("offset", offset); inspector.visit("nullValueBitmap", nullValueBitmap); } } return new HistoricalLongColumnSelectorWithNulls(); } }
Source:
<code>private void invokeOnComplete(final IoCallback callback) { sendThread = null; inCall = Thread.currentThread(); try { callback.onComplete(exchange, this); } finally { inCall = null; } if (Thread.currentThread() != sendThread) { return; } while (next != null || pendingFile != null) { ByteBuffer[] next = this.next; IoCallback queuedCallback = this.queuedCallback; FileChannel file = this.pendingFile; this.next = null; this.queuedCallback = null; this.pendingFile = null; if (next != null) { for (ByteBuffer buffer : next) { writeBuffer(buffer, queuedCallback); } } else if (file != null) { performTransfer(file, queuedCallback); } sendThread = null; inCall = Thread.currentThread(); try { <START> callback.onComplete(exchange, this); <END> } finally { inCall = null; } if (Thread.currentThread() != sendThread) { return; } } }</code><technical_language>@stuartwdouglas next != null invoked callback, t this line queuedCallback</technical_language>

Target:
private void invokeOnComplete(final IoCallback callback) { sendThread = null; inCall = Thread.currentThread(); try { callback.onComplete(exchange, this); } finally { inCall = null; } if (Thread.currentThread() != sendThread) { return; } while (next != null || pendingFile != null) { ByteBuffer[] next = this.next; IoCallback queuedCallback = this.queuedCallback; FileChannel file = this.pendingFile; this.next = null; this.queuedCallback = null; this.pendingFile = null; if (next != null) { for (ByteBuffer buffer : next) { writeBuffer(buffer, queuedCallback); } } else if (file != null) { performTransfer(file, queuedCallback); } sendThread = null; inCall = Thread.currentThread(); try { queuedCallback.onComplete(exchange, this); } finally { inCall = null; } if (Thread.currentThread() != sendThread) { return; } } }
Source:
<code>public static TimeUnit valueOfTimeUnit(String timeUnitString) { Preconditions.checkNotNull(timeUnitString, "timeUnitString is null"); TimeUnit timeUnit; switch (timeUnitString) { case "ns": <START> timeUnit = TimeUnit.NANOSECONDS; <END> break; case "us": timeUnit = TimeUnit.MICROSECONDS; break; case "ms": timeUnit = TimeUnit.MILLISECONDS; break; case "s": timeUnit = TimeUnit.SECONDS; break; case "m": timeUnit = TimeUnit.MINUTES; break; case "h": timeUnit = TimeUnit.HOURS; break; case "d": timeUnit = TimeUnit.DAYS; break; default: throw new IllegalArgumentException("Unknown time unit: " + timeUnitString); } return timeUnit; }</code><technical_language>Return</technical_language>

Target:
public static TimeUnit valueOfTimeUnit(String timeUnitString) { Preconditions.checkNotNull(timeUnitString, "timeUnitString is null"); switch (timeUnitString) { case "ns": return NANOSECONDS; case "us": return MICROSECONDS; case "ms": return MILLISECONDS; case "s": return SECONDS; case "m": return MINUTES; case "h": return HOURS; case "d": return DAYS; default: throw new IllegalArgumentException("Unknown time unit: " + timeUnitString); } }
Source:
<code>public void start(StartContext context) throws StartException { ServiceTarget target = context.getChildTarget(); this.primaryController = target.addService(this.serviceName.append("primary"), this.primaryService).setInitialMode(ServiceController.Mode.NEVER).install(); <START> this.backupController = target.addService(this.serviceName.append("backup"), this.backupService.orElse(new PrimaryProxyService<>(this))).setInitialMode(ServiceController.Mode.PASSIVE).install(); <END> this.dispatcher = this.dispatcherFactory.getValue().<SingletonContext<T>>createCommandDispatcher(this.serviceName, this); this.registration = this.registry.getValue().register(this.serviceName, this); this.started = true; }</code><technical_language>Tangentially, install backup service ACTIVE, toggles instead of ON_DEMAND well</technical_language>

Target:
public void start(StartContext context) throws StartException { ServiceTarget target = context.getChildTarget(); this.primaryController = target.addService(this.serviceName.append("primary"), this.primaryService).setInitialMode(ServiceController.Mode.NEVER).install(); this.backupController = target.addService(this.serviceName.append("backup"), this.backupService.orElse(new PrimaryProxyService<>(this))).setInitialMode(ServiceController.Mode.ACTIVE).install(); this.dispatcher = this.dispatcherFactory.getValue().<SingletonContext<T>>createCommandDispatcher(this.serviceName, this); this.registration = this.registry.getValue().register(this.serviceName, this); this.started = true; }
Source:
<code>public Block getResult() { <START> verify(result != null, "result has not been generated"); <END> return result; }</code><technical_language>checkState</technical_language>

Target:
public Block getResult() { checkState(result != null, "result has not been generated"); return result; }
Source:
<code>public AnyValue mapRelationship( VirtualRelationshipValue value ) { <START> if ( value instanceof RelationshipValue ) <END> { return value; } needsConversion = true; return value; }</code><technical_language>{ needsConversion = !needsConversion && instanceof RelationshipReference; return value; }</technical_language>

Target:
public AnyValue mapRelationship( VirtualRelationshipValue value ) { if ( !needsConversion ) { needsConversion = value instanceof RelationshipReference; } return value; }
Source:
<code>public ProjectRecord[] getValidProjects() { List<ProjectRecord> validProjects = new ArrayList<ProjectRecord>(); for (int i = 0; i < selectedProjects.length; i++) { if (!isProjectInWorkspace(selectedProjects[i].getProjectName())) { selectedProjects[i].hasConflicts = false; validProjects.add(selectedProjects[i]); <START> } else { <END> selectedProjects[i].hasConflicts = true; } } return validProjects.toArray(new ProjectRecord[validProjects.size()]); }</code><technical_language>I drop else clause smth like: boolean hasConflicts = isProjectInWorkspace(selectedProjects[i].getProjectName()); selectedProjects[i].hasConflicts = hasConflicts; if(!hasConflicts) { validProjects.add(selectedProjects[i]); }</technical_language>

Target:
public ProjectRecord[] getValidProjects() { List<ProjectRecord> validProjects = new ArrayList<ProjectRecord>(); for (int i = 0; i < selectedProjects.length; i++) { if (!isProjectInWorkspace(selectedProjects[i].getProjectName())) { selectedProjects[i].setHasConflicts(false); validProjects.add(selectedProjects[i]); } else { selectedProjects[i].setHasConflicts(true); } } return validProjects.toArray(new ProjectRecord[validProjects.size()]); }
Source:
<code>public LongUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxLongSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Long, NumericLongTextBox, TextBoxDOMElement<Long, NumericLongTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Long value, final GridBodyCellRenderContext context ) { <START> t.setText( value.toString() ); <END> } }, width, isResizable, isVisible, access, factory ); }</code><technical_language>value.toString() vs. factory.convert(..) a bit lower, line 63,</technical_language>

Target:
public LongUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxLongSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Long, NumericLongTextBox, TextBoxDOMElement<Long, NumericLongTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Long value, final GridBodyCellRenderContext context ) { t.setText( ( (TextBoxLongSingletonDOMElementFactory) factory ).convert( value ) ); } }, width, isResizable, isVisible, access, factory ); }
Source:
<code>public static boolean containsMatchingProperty(Set<IConfigurationProperty> existingProperties, String name, String os, String arch) { boolean result = false; for (IConfigurationProperty property : existingProperties) { if (name.equals(property.getName().trim())) { String propOs = property.getOs().trim(); <START> if (propOs.length() == 0 || os.length() == 0) { <END> result = true; break; } else if (os.equals(propOs)) { String propArch = property.getArch(); if (arch.length() == 0 || propArch.length() == 0) { result = true; break; } } else { continue; } } } return result; }</code><technical_language>This is implicit, do some explicit check ALL_OS.equials()</technical_language>

Target:
public static boolean containsMatchingProperty(Set<IConfigurationProperty> existingProperties, String name, String os, String arch) { for (IConfigurationProperty property : existingProperties) { if (name.equals(property.getName().trim())) { String propOs = property.getOs().trim(); if (ALL_OS.equals(propOs) || ALL_OS.equals(os)) { return true; } else if (os.equals(propOs)) { String propArch = property.getArch(); if (ALL_ARCH.equals(arch) || ALL_ARCH.equals(propArch)) { return true; } } } } return false; }
Source:
<code><START> public ResultSet<Contact> getContactByEmail(String email) throws ConstantContactServiceException, UnsupportedEncodingException { <END> return contactService.getContactByEmail(this.getAccessToken(), URLEncoder.encode(email, "UTF-8")); }</code><technical_language>expose UnsupportedEncodingException changes API definition a fatal error. If UTF-8 is unsupported, is really, messed up. I personally wrap in IllegalStateException, is unchecked. Also, rev version # in pom.xml 2.1.1</technical_language>

Target:
public ResultSet<Contact> getContactByEmail(String email) throws ConstantContactServiceException { String encodedEmail = null; try { encodedEmail = URLEncoder.encode(email, "UTF-8"); } catch(UnsupportedEncodingException ex) { throw new IllegalStateException(ex); } return contactService.getContactByEmail(this.getAccessToken(), encodedEmail); }
Source:
<code>private void collectMembers(Set<Item> allMembers, Set<Item> members) { for (Item member : members) { if (allMembers.contains(member)) { <START> return; <END> } if (member instanceof GroupItem) { collectMembers(allMembers, ((GroupItem) member).members); allMembers.add(member); } else { allMembers.add(member); } } }</code><technical_language>continue instead of return</technical_language>

Target:
private void collectMembers(Set<Item> allMembers, Set<Item> members) { for (Item member : members) { if (allMembers.contains(member)) { continue; } allMembers.add(member); if (member instanceof GroupItem) { collectMembers(allMembers, ((GroupItem) member).members); } } }
Source:
<code>public void testFederateGetHits() throws Exception { List<String> sourceIds = ImmutableList.of("1"); QueryRequest fedQueryRequest = new QueryRequestImpl(mockQuery, false, sourceIds, properties); Source mockSource = getMockSource(); List<Source> sourceList = ImmutableList.of(mockSource, mockSource, mockSource); when(mockResponse.getHits()).thenReturn((long) sourceList.size()); QueryResponse federateResponse = federateStrategy.federate(sourceList, fedQueryRequest); <START> assertThat(federateResponse.getHits(), is((long) sourceList.size() * sourceList.size())); <END> }</code><technical_language>asserting hits == sourceList.size()^2</technical_language>

Target:
public void testFederateGetHits() throws Exception { QueryRequest fedQueryRequest = new QueryRequestImpl(mockQuery, true, null, null); Source mockSource1 = getMockSource(); Source mockSource2 = getMockSource(); Source mockSource3 = getMockSource(); List<Source> sourceList = ImmutableList.of(mockSource1, mockSource2, mockSource3); long numHits = 2; when(mockResponse.getHits()).thenReturn(numHits); QueryResponse federateResponse = federateStrategy.federate(sourceList, fedQueryRequest); assertThat(federateResponse.getHits(), is(numHits * sourceList.size())); }
Source:
<code>public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.SEPARATOR) != 0) return; if (image == null || !IMAGE_AND_TEXT) { updateStyleBits(true); <START> } <END> if (string.equals (text)) return; text = string; string = Display.withCrLf (string); TCHAR buffer = new TCHAR (getCodePage (), string, true); OS.SetWindowText (handle, buffer); if ((state & HAS_AUTO_DIRECTION) != 0) { updateTextDirection (AUTO_TEXT_DIRECTION); } }</code><technical_language>proposed change: updateStyleBits(true), unconditional, text null</technical_language>

Target:
public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.SEPARATOR) != 0) return; updateStyleBits(true); if (string.equals (text)) return; text = string; string = Display.withCrLf (string); TCHAR buffer = new TCHAR (getCodePage (), string, true); OS.SetWindowText (handle, buffer); if ((state & HAS_AUTO_DIRECTION) != 0) { updateTextDirection (AUTO_TEXT_DIRECTION); } }
Source:
<code>private void uploadObject() throws IOException { try { log.debug("Starting upload for host: %s, key: %s, file: %s, size: %s", host, key, tempFile, tempFile.length()); STATS.uploadStarted(); PutObjectRequest request = new PutObjectRequest(host, key, tempFile); if (sseEnabled) { switch (sseType) { case KMS: if (sseKmsKeyId != null) { request.withSSEAwsKeyManagementParams(new SSEAwsKeyManagementParams(sseKmsKeyId)); } else { request.withSSEAwsKeyManagementParams(new SSEAwsKeyManagementParams()); } break; case S3: ObjectMetadata metadata = new ObjectMetadata(); metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); request.setMetadata(metadata); break; } } <START> request.withCannedAcl(this.aclType); <END> Upload upload = transferManager.upload(request); if (log.isDebugEnabled()) { upload.addProgressListener(createProgressListener(upload)); } upload.waitForCompletion(); STATS.uploadSuccessful(); log.debug("Completed upload for host: %s, key: %s", host, key); } catch (AmazonClientException e) { STATS.uploadFailed(); throw new IOException(e); } catch (InterruptedException e) { STATS.uploadFailed(); Thread.currentThread().interrupt(); throw new InterruptedIOException(); } }</code><technical_language>remove this. consistent other field accesses</technical_language>

Target:
private void uploadObject() throws IOException { try { log.debug("Starting upload for host: %s, key: %s, file: %s, size: %s", host, key, tempFile, tempFile.length()); STATS.uploadStarted(); PutObjectRequest request = new PutObjectRequest(host, key, tempFile); if (sseEnabled) { switch (sseType) { case KMS: if (sseKmsKeyId != null) { request.withSSEAwsKeyManagementParams(new SSEAwsKeyManagementParams(sseKmsKeyId)); } else { request.withSSEAwsKeyManagementParams(new SSEAwsKeyManagementParams()); } break; case S3: ObjectMetadata metadata = new ObjectMetadata(); metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); request.setMetadata(metadata); break; } } request.withCannedAcl(aclType); Upload upload = transferManager.upload(request); if (log.isDebugEnabled()) { upload.addProgressListener(createProgressListener(upload)); } upload.waitForCompletion(); STATS.uploadSuccessful(); log.debug("Completed upload for host: %s, key: %s", host, key); } catch (AmazonClientException e) { STATS.uploadFailed(); throw new IOException(e); } catch (InterruptedException e) { STATS.uploadFailed(); Thread.currentThread().interrupt(); throw new InterruptedIOException(); } }
Source:
<code>public boolean canExecute(ITmfTrace trace) { <START> return !Iterables.isEmpty(getDependentAnalyses()); <END> }</code><technical_language>replace true moment, discussed Genevieve</technical_language>

Target:
public boolean canExecute(ITmfTrace trace) { return true; }
Source:
<code>private void processWarningSnapshot(RangeHighlighter[] highlighters) { if (highlighters.length == 0) { return; } final List<Warning<String>> warnings = Arrays.stream(highlighters) .filter(RangeHighlighterEx.class::isInstance) .map(RangeHighlighterEx.class::cast) <START> <END> .filter(IntelliJMarkupModelListener::isWarningRangeHighlighter) .map(rangeHighlighter -> createWarningFromRangeHighlighter(rangeHighlighter, null)) .map(IntelliJMarkupModelListener::classifyWarning) .collect(Collectors.toList()); this.trackingEventManager.addEvent(new FileWarningSnapshotEvent(this.document.prepareDocument(), warnings)); }</code><technical_language>remove blank line</technical_language>

Target:
private void processWarningSnapshot(RangeHighlighter[] highlighters) { if (highlighters.length == 0) { return; } final Stream<RangeHighlighterEx> rangeHighlighters = Arrays.stream(highlighters) .filter(RangeHighlighterEx.class::isInstance) .map(RangeHighlighterEx.class::cast); final List<Warning<String>> warnings = rangeHighlighters .filter(IntelliJMarkupModelListener::isWarningRangeHighlighter) .map(rangeHighlighter -> createWarningFromRangeHighlighter(rangeHighlighter, null)) .map(IntelliJMarkupModelListener::classifyWarning) .collect(Collectors.toList()); this.trackingEventManager.addEvent(new FileWarningSnapshotEvent(this.document.prepareDocument(), warnings)); }
Source:
<code>public boolean clickEditInstructorLink(int instrNum) { getEditInstructorLink(instrNum).click(); WebElement saveButton = browser.driver.findElement(By.id("btnSaveInstructor" + instrNum)); waitForElementVisibility(saveButton); WebElement editInstructorNameTextBox = browser.driver.findElement(By.id("instructorname" + instrNum)); WebElement editInstructorEmailTextBox = browser.driver.findElement(By.id("instructoremail" + instrNum)); boolean isEditable = editInstructorNameTextBox.isEnabled() && editInstructorEmailTextBox.isEnabled() <START> && saveButton.isDisplayed(); <END> return isEditable; }</code><technical_language>I align && [e]ditInstructorName..</technical_language>

Target:
public boolean clickEditInstructorLink(int instrNum) { getEditInstructorLink(instrNum).click(); WebElement saveButton = getSaveInstructorButton(instrNum); waitForElementVisibility(saveButton); WebElement editInstructorNameTextBox = getNameField(instrNum); WebElement editInstructorEmailTextBox = getEmailField(instrNum); boolean isEditable = editInstructorNameTextBox.isEnabled() && editInstructorEmailTextBox.isEnabled() && saveButton.isDisplayed(); return isEditable; }