auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private FeedbackSubmissionEditQuestion createQuestion(FeedbackQuestionAttributes questionAttributes, int qnIndx) { boolean isModeratedQuestion = String.valueOf(questionAttributes.questionNumber).equals(getModeratedQuestion()); return new FeedbackSubmissionEditQuestion(questionAttributes.courseId, questionAttributes.questionNumber, <START> qnIndx, questionAttributes.getId(), questionAttributes.getQuestionDetails().questionText, <END> questionAttributes.getVisibilityMessage(), questionAttributes.questionType, questionAttributes.numberOfEntitiesToGiveFeedbackTo, isModeratedQuestion, questionAttributes.isRecipientNameHidden()); }</code><technical_language>Is determine if real question number shown not, pass constructor here? For example, int trueQuestionId = isShowRealQuestionNumber ? qAttributes.qNo : qIdx & ${question.trueQuestionId}. break anything? If works, need store isShowRealQuestionNumber clean tags slightly too</technical_language>

Target:
private FeedbackSubmissionEditQuestion createQuestion(FeedbackQuestionAttributes questionAttributes, int qnIndx) { boolean isModeratedQuestion = String.valueOf(questionAttributes.questionNumber).equals(getModeratedQuestion()); return new FeedbackSubmissionEditQuestion(questionAttributes, qnIndx, isModeratedQuestion); }
Source:
<code>public void run() { m_pinActive = !m_pinActive; if (m_pinActive) { m_visualizer.pin(); } else { m_visualizer.unpin(); } <START> m_visualizer.setSelection(m_visualizer.getSelection()); <END> }</code><technical_language>Instead of a hack this, need (or have) "update()" "refresh()" method called do this kind of thing, useful elsewhere, good centralized standardized</technical_language>

Target:
public void run() { m_pinActive = !m_pinActive; if (m_pinActive) { m_visualizer.pin(); } else { m_visualizer.unpin(); } m_visualizer.updateUI(); }
Source:
<code>public void handleGet(RestRequestInfo restRequestInfo) throws RestServiceException { RestRequestMetadata restRequestMetadata = restRequestInfo.getRestRequestMetadata(); logger.trace("Handling GET request - {}", restRequestMetadata.getUri()); try { String operationInUri = getOperationFromRequestUri(restRequestMetadata); logger.trace("GET operation requested - {}", operationInUri); AdminOperationType operationType = AdminOperationType.getAdminOperationType(operationInUri); switch (operationType) { case echo: EchoHandler.handleRequest(restRequestInfo, adminMetrics); break; case getReplicasForBlobId: GetReplicasForBlobIdHandler.handleRequest(restRequestInfo, clusterMap, adminMetrics); break; default: <START> logger.debug("While trying to perform GET: Unsupported operation type - {}", operationType); <END> adminMetrics.unsupportedGetOperation.inc(); throw new RestServiceException("Unsupported operation (" + operationInUri + ") for Admin service", RestServiceErrorCode.UnsupportedOperation); } } finally { if (restRequestInfo.isFirstPart()) { adminMetrics.getOperationRate.mark(); } } }</code><technical_language>"Unsupported operation type GET"</technical_language>

Target:
public void handleGet(RestRequestInfo restRequestInfo) throws RestServiceException { RestRequestMetadata restRequestMetadata = restRequestInfo.getRestRequestMetadata(); logger.trace("Handling GET request - {}", restRequestMetadata.getUri()); try { String operationInUri = getOperationFromRequestUri(restRequestMetadata); logger.trace("GET operation requested - {}", operationInUri); AdminOperationType operationType = AdminOperationType.getAdminOperationType(operationInUri); switch (operationType) { case echo: EchoHandler.handleRequest(restRequestInfo, adminMetrics); break; case getReplicasForBlobId: GetReplicasForBlobIdHandler.handleRequest(restRequestInfo, clusterMap, adminMetrics); break; default: adminMetrics.unsupportedGetOperationError.inc(); throw new RestServiceException("Unsupported operation during GET (" + operationInUri + ") for Admin service", RestServiceErrorCode.UnsupportedOperation); } } finally { if (restRequestInfo.isFirstPart()) { adminMetrics.getOperationRate.mark(); } } }
Source:
<code>public void testSecondIndexUsedWhenExecutingJoinQuery() throws Exception { locator = clusterRule.startLocatorVM(0); server = clusterRule.startServerVM(1, locator.getPort()); server.invoke(() -> createServerRegionsAndIndexes()); client = clusterRule.startClientVM(2, c -> c.withLocatorConnection(locator.getPort())); client.invoke(() -> createClientRegions()); <START> int numProducts = 1000, numInstruments = 100; <END> client.invoke(() -> loadRegions(numProducts, numInstruments)); long deserializationsBeforeQuery = server.invoke(() -> getDeserializations()); client.invoke(() -> executeQuery(numInstruments)); long deserializationsAfterQuery = server.invoke(() -> getDeserializations()); assertThat(deserializationsAfterQuery - deserializationsBeforeQuery) .isEqualTo((numInstruments * 2) + 1); }</code><technical_language>some discussion dev channel avoid single line multiple variable declarations. Maybe, split suggestion int numProducts = 1000; int numInstruments = 100;</technical_language>

Target:
public void testSecondIndexUsedWhenExecutingJoinQuery() throws Exception { locator = clusterRule.startLocatorVM(0); server = clusterRule.startServerVM(1, locator.getPort()); server.invoke(() -> createServerRegionsAndIndexes()); client = clusterRule.startClientVM(2, c -> c.withLocatorConnection(locator.getPort())); client.invoke(() -> createClientRegions()); int numProducts = 1000; int numInstruments = 100; client.invoke(() -> loadRegions(numProducts, numInstruments)); long deserializationsBeforeQuery = server.invoke(() -> getDeserializations()); client.invoke(() -> executeQuery(numInstruments)); long deserializationsAfterQuery = server.invoke(() -> getDeserializations()); assertThat(deserializationsAfterQuery - deserializationsBeforeQuery) .isEqualTo((numInstruments * 2) + 1); }
Source:
<code>private boolean propertiesTableExists(Connection conn) { try { DatabaseMetaData md = conn.getMetaData(); ResultSet tables = md.getTables(null, null, "PROPERTIES", null); if (tables.next()) { <START> return true; <END> } return false; } catch (SQLException e) { e.printStackTrace(); } return false; }</code><technical_language>Tabs/spaces insufficiently indented</technical_language>

Target:
private boolean propertiesTableExists(Connection conn) { try { DatabaseMetaData md = conn.getMetaData(); ResultSet tables = md.getTables(null, null, "PROPERTIES", null); if (tables.next()) { return true; } return false; } catch (SQLException e) { log.warn("Ran into problems when checking to see if the PROPERTIES table existed."); log.warn(e.toString()); e.printStackTrace(); } return false; }
Source:
<code>public AkimTheSoaringWind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(3); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); <START> this.addAbility(new AkimTheSoaringTokenAbility(), new AkimTheSoaringWindWatcher()); <END> this.addAbility(new SimpleActivatedAbility( new GainAbilityControlledEffect( DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, filter, false), new ManaCostsImpl("{3}{U}{R}{W}")) ); }</code><technical_language>If add condition hint card improve card's usability for users. Search for example: * .addHint(new ConditionHint(LudevicNecroAlchemistCondition.instance, "Player other lost life this turn"))); add: 1. Extract checkTrigger code Condition object; 2. condition in checkTrigger; 3. Add condition hint ability. condition hints in another PR (#6430)</technical_language>

Target:
public AkimTheSoaringWind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(3); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); this.addAbility( new AkimTheSoaringTokenAbility() .addHint(new ConditionHint(AkimTheSoaringWindCondition.instance, "You create one or more tokens for the first time each turn")), new AkimTheSoaringWindWatcher() ); this.addAbility(new SimpleActivatedAbility( new GainAbilityControlledEffect( DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, filter, false), new ManaCostsImpl("{3}{U}{R}{W}")) ); }
Source:
<code>private void updateInputPartitionsAndResume(final Task task, final Set<TopicPartition> topicPartitions) { final boolean requiresUpdate = !task.inputPartitions().equals(topicPartitions); if (requiresUpdate) { <START> log.trace("update inputPartitions {}", task, topicPartitions); <END> task.setProcessorTopology(builder.buildSubtopology(task.id().topicGroupId)); for (final TopicPartition inputPartition : task.inputPartitions()) { partitionToTask.remove(inputPartition); } for (final TopicPartition topicPartition : topicPartitions) { partitionToTask.put(topicPartition, task); } task.setInputPartitions(topicPartitions); } task.resume(requiresUpdate); }</code><technical_language>log more context here, for example: log.trace("Update task inputPartitions: current {}, new {}", task, task. inputPartitions(), topicPartitions);</technical_language>

Target:
private void updateInputPartitionsAndResume(final Task task, final Set<TopicPartition> topicPartitions) { final boolean requiresUpdate = !task.inputPartitions().equals(topicPartitions); if (requiresUpdate) { log.trace("Update task inputPartitions: current {}, new {}", task, task.inputPartitions(), topicPartitions); for (final TopicPartition inputPartition : task.inputPartitions()) { partitionToTask.remove(inputPartition); } for (final TopicPartition topicPartition : topicPartitions) { partitionToTask.put(topicPartition, task); } task.update(topicPartitions, builder.buildSubtopology(task.id().topicGroupId)); } task.resume(); }
Source:
<code>public Date getCreated() { return created; <START> } <END></code><technical_language>if Job is meant immutable, this method breaks that, Date altered</technical_language>

Target:
public Long getCreated() { return created; }
Source:
<code><START> protected void updateAsync(KeyValPair<byte[], byte[]> tuple) <END> { if (taskQueue.size() > taskBarrier) { try { logger.info("Queue Size: {}, wait time(milli-seconds): {}", taskQueue.size(), taskQueue.size() / taskBarrier); Thread.sleep(taskQueue.size() / taskBarrier); } catch (Exception e) { } } { Slice key = new Slice(tuple.getKey()); Future<Slice> task = store.getAsync(bucketId, key); taskQueue.add(task); taskToPair.put(task, tuple); } while (!taskQueue.isEmpty()) { if (!taskQueue.peek().isDone()) { break; } Future<Slice> task = taskQueue.poll(); insertValueToStore(taskToPair.remove(task)); } }</code><technical_language>is blocking, is called "async"</technical_language>

Target:
protected void updateAsync(KeyValPair<byte[], byte[]> tuple) { if (taskQueue.size() > taskBarrier) { try { logger.info("Queue Size: {}, wait time(milli-seconds): {}", taskQueue.size(), taskQueue.size() / taskBarrier); Thread.sleep(taskQueue.size() / taskBarrier); } catch (Exception e) { } } { Slice key = new Slice(tuple.getKey()); Future<Slice> task = store.getAsync(getTimeByKey(tuple.getKey()), key); taskQueue.add(task); taskToPair.put(task, tuple); } while (!taskQueue.isEmpty()) { if (!taskQueue.peek().isDone()) { break; } Future<Slice> task = taskQueue.poll(); insertValueToStore(taskToPair.remove(task)); } }
Source:
<code>public void putIdsOnQueue(List<String> idList) { var success = send(session -> session.createObjectMessage((ArrayList<String>) idList)); if (success) { <START> idList.forEach(this::addToProcessed); <END> } }</code><technical_language>Thinking this perform. Of this is relative small amount of time considering creating actual events for certificate, add up. Googled a bit this interesting question answers ideas/options: <LINK_0></technical_language>

Target:
public void putIdsOnQueue(List<String> idList) { var success = send(session -> session.createObjectMessage((ArrayList<String>) idList)); if (success) { processedRepository.saveBatch(idList); } }
Source:
<code>private void removeOldAndCleanedTasks() { Set<Guid> poolsOfClearedAndOldTasks = removeClearedAndOldTasks(); for (Guid storagePoolID : poolsOfClearedAndOldTasks) { log.infoFormat("AsyncTaskManager::RemoveOldAndCleanedTasks: Cleared all tasks of pool {0}.", storagePoolID); storage_pool storagePool = DbFacade.getInstance().getStoragePoolDAO().get(storagePoolID); if (storagePool != null && storagePool.getspm_vds_id() != null) { VDS vds = DbFacade.getInstance().getVdsDAO().get(storagePool.getspm_vds_id()); if (vds != null && vds.getstatus() == VDSStatus.NonOperational) { log.infoFormat( "AsyncTaskManager::RemoveOldAndCleanedTasks: vds {0} is spm and non-operational, calling SetNonOperationalVds", vds.getvds_name()); SetNonOperationalVdsParameters tempVar = new SetNonOperationalVdsParameters(vds.getId(), <START> NonOperationalReason.GENERAL, null); <END> tempVar.setSaveToDb(true); tempVar.setShouldBeLogged(false); Backend.getInstance().runInternalAction(VdcActionType.SetNonOperationalVds, tempVar); } else { log.info("AsyncTaskManager::RemoveOldAndCleanedTasks: could not find vds that is spm and non-operational."); } } } }</code><technical_language>overload 2 params added null already</technical_language>

Target:
private void removeOldAndCleanedTasks() { Set<Guid> poolsOfClearedAndOldTasks = removeClearedAndOldTasks(); for (Guid storagePoolID : poolsOfClearedAndOldTasks) { log.infoFormat("AsyncTaskManager::RemoveOldAndCleanedTasks: Cleared all tasks of pool {0}.", storagePoolID); storage_pool storagePool = DbFacade.getInstance().getStoragePoolDAO().get(storagePoolID); if (storagePool != null && storagePool.getspm_vds_id() != null) { VDS vds = DbFacade.getInstance().getVdsDAO().get(storagePool.getspm_vds_id()); if (vds != null && vds.getstatus() == VDSStatus.NonOperational) { log.infoFormat( "AsyncTaskManager::RemoveOldAndCleanedTasks: vds {0} is spm and non-operational, calling SetNonOperationalVds", vds.getvds_name()); SetNonOperationalVdsParameters tempVar = new SetNonOperationalVdsParameters(vds.getId(), NonOperationalReason.GENERAL); tempVar.setSaveToDb(true); tempVar.setShouldBeLogged(false); Backend.getInstance().runInternalAction(VdcActionType.SetNonOperationalVds, tempVar); } else { log.info("AsyncTaskManager::RemoveOldAndCleanedTasks: could not find vds that is spm and non-operational."); } } } }
Source:
<code>private Iterable<ConfigKey<?>> validateAll() { <START> List<ConfigKey<?>> violating = Lists.newArrayList(); <END> BrooklynObjectInternal.ConfigurationSupportInternal configInternal = getConfigurationSupportInternal(); Iterable<ConfigKey<?>> configKeys = getBrooklynObjectTypeConfigKeys(); LOG.trace("Checking config keys on {}: {}", getBrooklynObject(), configKeys); for (ConfigKey<?> configKey : configKeys) { Object value = configInternal.getRaw(configKey).or(configKey.getDefaultValue()); if (value == null || value.getClass().isAssignableFrom(configKey.getType())) { try { Predicate<Object> po = (Predicate<Object>) configKey.getConstraint(); boolean isValid; if (po instanceof BrooklynObjectPredicate) { isValid = BrooklynObjectPredicate.class.cast(po).apply(value, brooklynObject); } else { isValid = po.apply(value); } if (!isValid) { violating.add(configKey); } } catch (Exception e) { LOG.debug("Error checking constraint on ", configKey.getName(), e); } } } return violating; }</code><technical_language>Trivial, a LinkedList of unknown size iterated on</technical_language>

Target:
private Iterable<ConfigKey<?>> validateAll() { List<ConfigKey<?>> violating = Lists.newLinkedList(); Iterable<ConfigKey<?>> configKeys = getBrooklynObjectTypeConfigKeys(); LOG.trace("Checking config keys on {}: {}", getBrooklynObject(), configKeys); for (ConfigKey<?> configKey : configKeys) { BrooklynObjectInternal.ConfigurationSupportInternal configInternal = getConfigurationSupportInternal(); Maybe<?> maybeValue = configInternal.getNonBlocking(configKey); if (maybeValue.isPresent()) { ConfigKey<Object> ck = (ConfigKey<Object>) configKey; if (!isValueValid(ck, maybeValue.get())) { violating.add(configKey); } } } return violating; }
Source:
<code>private String generatePreviewSentence() { String outOfSyncPreviewSentence = constants.hostOutOfSyncPreviewSentence(); <START> outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll("Host", "<strong>Host</strong>"); END> outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll("DC", "<strong>DC</strong>"); final String output = "<p>" + outOfSyncPreviewSentence + "</p>"; return output; }</code><technical_language>please extract CommonApplicationTemplates. E.g. @Template("<strong>{0}</strong>") SafeHtml strongText(String text);</technical_language>

Target:
private String generatePreviewSentence() { String outOfSyncPreviewSentence = constants.hostOutOfSyncPreviewSentence(); outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll("Host", templates.strongText("Host").asString()); outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll("DC", templates.strongText("DC").asString()); return outOfSyncPreviewSentence; }
Source:
<code>protected void registerPartitions() throws InterruptedException, ParseException { if (!Conduit.isHCatEnabled()) { return; } HCatClient hcatClient = getHCatClient(); if (hcatClient == null) { LOG.warn("Did not get hcat client hence not rgistering partitions"); for (String stream : streamsToProcess) { ConduitMetrics.updateSWGuage(getServiceType(), FAILED_TO_GET_HCAT_CLIENT_COUNT, stream, 1); } return; } try { for (String stream : streamsToProcess) { String tableName = getTableName(stream); preparePartitionsTobeRegistered(stream); if (lastAddedPartitionMap.get(tableName) == FAILED_GET_PARTITIONS) { <START> continue; <END> } List<Path> partitionsTobeRegistered = pathsToBeregisteredPerTable.get(tableName); while (partitionsTobeRegistered.size() > 1) { Path path = partitionsTobeRegistered.get(0); Date date = getTimeStampFromHCatPartition(path.toString(), stream); LOG.info("Adding the partition " + path.toString() + " in " + tableName + " table"); if (addPartition(path.toString(), stream, date.getTime(), tableName, hcatClient)) { partitionsTobeRegistered.remove(0); updateLastAddedPartitionMap(tableName, date.getTime()); } else { break; } } } } finally { addToPool(hcatClient); } }</code><technical_language>put a log line.."didn't get partitions for stream server registering new partiotions"</technical_language>

Target:
protected void registerPartitions() throws InterruptedException, ParseException { if (!Conduit.isHCatEnabled()) { return; } HCatClient hcatClient = getHCatClient(); if (hcatClient == null) { LOG.warn("Did not get hcat client hence not rgistering partitions"); for (String stream : streamsToProcess) { ConduitMetrics.updateSWGuage(getServiceType(), FAILED_TO_GET_HCAT_CLIENT_COUNT, stream, 1); } return; } try { for (String stream : streamsToProcess) { String tableName = getTableName(stream); preparePartitionsTobeRegistered(stream); if (lastAddedPartitionMap.get(tableName) == FAILED_GET_PARTITIONS) { LOG.warn("Failed to get partitions for stream from server hence" + " not registering new partiotions"); continue; } List<Path> partitionsTobeRegistered = pathsToBeregisteredPerTable.get(tableName); while (partitionsTobeRegistered.size() > 1) { Path path = partitionsTobeRegistered.get(0); Date date = getTimeStampFromHCatPartition(path.toString(), stream); LOG.info("Adding the partition " + path.toString() + " in " + tableName + " table"); if (addPartition(path.toString(), stream, date.getTime(), tableName, hcatClient)) { partitionsTobeRegistered.remove(0); updateLastAddedPartitionMap(tableName, date.getTime()); } else { break; } } } } finally { addToPool(hcatClient); } }
Source:
<code>public static void main(String[] args) { <START> String path = "C:\\Users\\nsleheen\\DATA\\6smoker_lab_csv_data\\"; <END> for (int i = 1; i < 7; i++) { String person = "p" + String.format("%02d", i); for (int sid : sIds[i]) { doProcess(person, sid); } } System.setOut(System.out); System.out.println("total puff "+puffcount); }</code><technical_language>Do hardcode paths</technical_language>

Target:
public static void main(String[] args) { String path = args[0]; String pathToPuffMarkerModelFile = args[1]; for (int i = 1; i < 7; i++) { String person = "p" + String.format("%02d", i); for (int sid : sIds[i]) { doProcess(person, sid, path, pathToPuffMarkerModelFile); } } }
Source:
<code>private void runTasksInPendingAcquisitionQueue() { ensureInEventLoop(); this.ensureInEventLoop(); int channelsAvailable = this.availableChannels.size(); do { final AcquireTask task = this.pendingAcquisitions.poll(); if (task == null) { break; } final ScheduledFuture<?> timeoutFuture = task.timeoutFuture; if (timeoutFuture != null) { timeoutFuture.cancel(false); } task.acquired(true); this.acquire(task.promise); <START> } while (--channelsAvailable> 0); <END> }</code><technical_language>Is move do-while for readability</technical_language>

Target:
private void runTasksInPendingAcquisitionQueue() { this.ensureInEventLoop(); int channelsAvailable = this.availableChannels.size(); do { final AcquireTask task = this.pendingAcquisitions.poll(); if (task == null) { break; } task.acquired(true); this.acquire(task.promise); } while (--channelsAvailable > 0); }
Source:
<code>public BaragonGroup(@JsonProperty("name") String name, @JsonProperty("domain") Optional<String> domain, @JsonProperty("trafficSources") Set<TrafficSource> trafficSources, @JsonProperty("sources") Set<String> sources, @JsonProperty("defaultDomain") Optional<String> defaultDomain, @JsonProperty("domains") Set<String> domains) { this.name = name; this.domain = domain; this.defaultDomain = defaultDomain; this.domains = MoreObjects.firstNonNull(domains, Collections.<String>emptySet()); <START> if (sources == null) { <END> setTrafficSources(MoreObjects.firstNonNull(trafficSources, Collections.<TrafficSource>emptySet())); } else if (trafficSources == null) { setSources(sources); } else { setTrafficSources(trafficSources); } }</code><technical_language>I a bit more clear is here, a bit hard reason this way. this? java this.sources = MoreObjects.firstNonNull(sources, Collections.<String>emptySet()); if (trafficSources == null) { this.trafficSources = sources.forEach((source) -> new TrafficSource(source, TrafficSourceType.CLASSIC)); } else { this.trafficSources = trafficSources; } stuff is merged in java8 bits, cleaner/easier read static methods</technical_language>

Target:
public BaragonGroup(@JsonProperty("name") String name, @JsonProperty("domain") Optional<String> domain, @JsonProperty("trafficSources") Set<TrafficSource> trafficSources, @JsonProperty("sources") Set<String> sources, @JsonProperty("defaultDomain") Optional<String> defaultDomain, @JsonProperty("domains") Set<String> domains) { this.name = name; this.domain = domain; this.defaultDomain = defaultDomain; this.domains = MoreObjects.firstNonNull(domains, Collections.<String>emptySet()); this.sources = Collections.emptySet(); if (trafficSources == null && sources != null) { this.trafficSources = sources.stream() .map(source -> new TrafficSource(source, TrafficSourceType.CLASSIC)) .collect(Collectors.<TrafficSource>toSet()); } else { this.trafficSources = MoreObjects.<Set<TrafficSource>>firstNonNull(trafficSources, Collections.<TrafficSource>emptySet()); } }
Source:
<code>public boolean isEnabled() { <START> return selectionMapsToSingleRepository(); <END> }</code><technical_language>This action longer work multiple repositories. prefer regress here</technical_language>

Target:
public boolean isEnabled() { return true; }
Source:
<code>@Override public void registerMaterializationRules(List<UnifyRule> rules) { <START> materializationRules = rules; <END> }</code><technical_language>materializationRules immutable, ImmutableList.copyOf here? And, test case for this PR</technical_language>

Target:
@Override public void registerMaterializationRules(List<UnifyRule> rules) { materializationRules = ImmutableList.copyOf(rules); }
Source:
<code>public void cosmosAsyncClient() { TracerProvider tracer = Mockito.spy(new TracerProvider(ServiceLoader.load(Tracer.class))); ReflectionUtils.setTracerProvider(client, tracer); <START> client.createDatabaseIfNotExists(cosmosAsyncDatabase.getId()).block(); <END> Mockito.verify(tracer, Mockito.times(1)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); client.readAllDatabases(new FeedOptions()).byPage().single().block(); Mockito.verify(tracer, Mockito.times(2)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); String query = "select * from c where c.id = '" + cosmosAsyncDatabase.getId() + "'"; client.queryDatabases(query, new FeedOptions()).byPage().single().block(); Mockito.verify(tracer, Mockito.times(3)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); }</code><technical_language>StepVerifier instead of block for testing async calls</technical_language>

Target:
public void cosmosAsyncClient() { TracerProvider tracer = Mockito.spy(new TracerProvider(ServiceLoader.load(Tracer.class))); ReflectionUtils.setTracerProvider(client, tracer); client.createDatabaseIfNotExists(cosmosAsyncDatabase.getId()).block(); Mockito.verify(tracer, Mockito.times(1)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); client.readAllDatabases(new CosmosQueryRequestOptions()).byPage().single().block(); Mockito.verify(tracer, Mockito.times(2)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); String query = "select * from c where c.id = '" + cosmosAsyncDatabase.getId() + "'"; client.queryDatabases(query, new CosmosQueryRequestOptions()).byPage().single().block(); Mockito.verify(tracer, Mockito.times(3)).startSpan(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Context.class)); }
Source:
<code>public void testNormalizeBySampleAverageWithweightingNoTargetIntervals(final ReadCountCollectionInfo info) { <START> org.broadinstitute.hellbender.utils.Utils.validateArg(info.intervals == null, "this instance given by the DataProvider has intervals and is thus irrelevant"); <END> final boolean weightByTargetSize = true; final ReadCountCollection counts = info.newInstance(); final ReadCountCollection normalizedCounts = counts.normalizeByColumnAverages(weightByTargetSize); }</code><technical_language>import Utils</technical_language>

Target:
public void testNormalizeBySampleAverageWithweightingNoTargetIntervals(final ReadCountCollectionInfo info) { Utils.validateArg(info.intervals == null, "this instance given by the DataProvider has intervals and is thus irrelevant"); final boolean weightByTargetSize = true; final ReadCountCollection counts = info.newInstance(); final ReadCountCollection normalizedCounts = counts.normalizeByColumnAverages(weightByTargetSize); }
Source:
<code>public static float evaluateOceanHeightAtPosition(Vector3f position, float days) { float height = 0.0f; float size = RefractiveReflectiveBlocksNode.waveSize; <START> float intens = RefractiveReflectiveBlocksNode.waveIntens; <END> float timeFactor = RefractiveReflectiveBlocksNode.waveSpeed; for (int i = 0; i < OCEAN_OCTAVES; ++i) { height += (smoothTriangleWave(timeToTick(days, timeFactor) + position.x * OCEAN_WAVE_DIRECTIONS[i].x * size + position.z * OCEAN_WAVE_DIRECTIONS[i].y * size) * 2.0 - 1.0) * intens; size *= RefractiveReflectiveBlocksNode.waveSizeFalloff; intens *= RefractiveReflectiveBlocksNode.waveIntensFalloff; timeFactor *= RefractiveReflectiveBlocksNode.waveSpeedFalloff; } height /= OCEAN_OCTAVES; return height + RefractiveReflectiveBlocksNode.waterOffsetY; }</code><technical_language>Please replace "intens" strings "intensity". rename size intensity waveSize waveIntensity for time being. Finally, add: // TODO: rename more meaningful/precise variable names, i.e. waveAmplitude waveHeight</technical_language>

Target:
public static float evaluateOceanHeightAtPosition(Vector3f position, float days) { float height = 0.0f; float waveSize = RefractiveReflectiveBlocksNode.waveSize; float waveIntensity = RefractiveReflectiveBlocksNode.waveIntensity; float timeFactor = RefractiveReflectiveBlocksNode.waveSpeed; for (int i = 0; i < OCEAN_OCTAVES; ++i) { height += (smoothTriangleWave(timeToTick(days, timeFactor) + position.x * OCEAN_WAVE_DIRECTIONS[i].x * waveSize + position.z * OCEAN_WAVE_DIRECTIONS[i].y * waveSize) * 2.0 - 1.0) * waveIntensity; waveSize *= RefractiveReflectiveBlocksNode.waveSizeFalloff; waveIntensity *= RefractiveReflectiveBlocksNode.waveIntensityFalloff; timeFactor *= RefractiveReflectiveBlocksNode.waveSpeedFalloff; } height /= OCEAN_OCTAVES; return height + RefractiveReflectiveBlocksNode.waterOffsetY; }
Source:
<code>public <T> LazyOptional<T> getCapability(Capability<T> cap, @Nullable EnumFacing side) { for (ICapabilityProvider c : caps) { LazyOptional<T> ret = c.getCapability(cap, side); if (ret == null) { throw new RuntimeException( String.format( <START> "Provider %s.getCapability() returned null; this is not allowed!", <END> c.getClass().getTypeName() ) ); } if (ret.isPresent()) { return ret; } } return LazyOptional.empty(); }</code><technical_language>recommend adding "return LazyOptional.empty() instead" existing error message</technical_language>

Target:
public <T> LazyOptional<T> getCapability(Capability<T> cap, @Nullable EnumFacing side) { for (ICapabilityProvider c : caps) { LazyOptional<T> ret = c.getCapability(cap, side); if (ret == null) { throw new RuntimeException( String.format( "Provider %s.getCapability() returned null; return LazyOptional.empty() instead!", c.getClass().getTypeName() ) ); } if (ret.isPresent()) { return ret; } } return LazyOptional.empty(); }
Source:
<code>public void test8() { DynamicGraph<Node> dg = new DynamicGraph<>(); Node a1 = new Node("a1"); Node a2 = new Node("a2"); Node b1 = new Node("b1"); Node b2 = new Node("b2"); Node c1 = new Node("c1"); dg.addNode(a1); dg.addNode(a2); dg.addNode(b1); dg.addNode(b2); dg.addNode(c1); dg.addEdge(1, b1, a1, a2); dg.addEdge(1, b2, a1, a2); dg.addEdge(1, c1, b1, b2); dg.addEdge(0, a2, a1, b1, c1); dg.addEdge(0, b2, a1, b1, c1); Node x = new Node("x"); Node y = new Node("y"); dg.addNode(x); dg.addNode(y); dg.addEdge(0, a1, x, y); dg.addEdge(0, b1, x, y); dg.addEdge(0, c1, x, y); assertFreeNodesEquals(dg, y, x); <START> dg.setStatus( dg.getFreeNodes(), Status.FINISHED); <END> assertFreeNodesEquals(dg, a1); dg.setStatus(a1, Status.FINISHED); assertFreeNodesEquals(dg); dg.setStatus(a2, Status.FINISHED); assertFreeNodesEquals(dg, b1); dg.setStatus(b1, Status.FINISHED); assertFreeNodesEquals(dg, b2); dg.setStatus(b2, Status.FINISHED); assertFreeNodesEquals(dg, c1); }</code><technical_language>RUNNING steps update checks. add FINISHED steps checks. more complete, it</technical_language>

Target:
public void test8() { DynamicGraph<Node> dg = new DynamicGraph<>(); Node a1 = new Node("a1"); Node a2 = new Node("a2"); Node b1 = new Node("b1"); Node b2 = new Node("b2"); Node c1 = new Node("c1"); dg.addNode(a1); dg.addNode(a2); dg.addNode(b1); dg.addNode(b2); dg.addNode(c1); dg.addEdge(1, b1, a1, a2); dg.addEdge(1, b2, a1, a2); dg.addEdge(1, c1, b1, b2); dg.addEdge(0, a2, a1, b1, c1); dg.addEdge(0, b2, a1, b1, c1); Node x = new Node("x"); Node y = new Node("y"); dg.addNode(x); dg.addNode(y); dg.addEdge(0, a1, x, y); dg.addEdge(0, b1, x, y); dg.addEdge(0, c1, x, y); assertFreeNodesEquals(dg, y, x); dg.setStatus(dg.getFreeNodes(), Status.RUNNING); assertFreeNodesEquals(dg); dg.setStatus(x, Status.FINISHED); dg.setStatus(y, Status.FINISHED); assertFreeNodesEquals(dg, a1); dg.setStatus(a1, Status.RUNNING); assertFreeNodesEquals(dg); dg.setStatus(a1, Status.FINISHED); assertFreeNodesEquals(dg, a2); dg.setStatus(a2, Status.RUNNING); assertFreeNodesEquals(dg); dg.setStatus(a2, Status.FINISHED); assertFreeNodesEquals(dg, b1); dg.setStatus(b1, Status.RUNNING); assertFreeNodesEquals(dg); dg.setStatus(b1, Status.FINISHED); assertFreeNodesEquals(dg, b2); dg.setStatus(b2, Status.RUNNING); assertFreeNodesEquals(dg); dg.setStatus(b2, Status.FINISHED); assertFreeNodesEquals(dg, c1); }
Source:
<code><START> public String toString() { <END> return this.getClass().getSimpleName() + " { " + getPayload() + " }"; }</code><technical_language>Recommend ToStringBuilder</technical_language>

Target:
public String toString() { return new ToStringBuilder(this) .append("myPayload", myPayload) .toString(); }
Source:
<code>public void prepareForEdit(StorageDomain storage) { getOverride().setIsChangable(isEditable(storage)); <START> super.prepareForEdit(storage); <END> }</code><technical_language>super called first</technical_language>

Target:
public void prepareForEdit(StorageDomain storage) { super.prepareForEdit(storage); getOverride().setIsChangable(isEditable(storage)); }
Source:
<code>public static File getMissingTestDefinitionTestBundleFile(TemporaryFolder temporaryFolder) throws IOException { ZipEntrySource[] addedEntries = new ZipEntrySource[] { new FileSource(TestFiles.getTestDeploymentDescriptorFile().getName(), TestFiles.getTestDeploymentDescriptorFile()), <START> new FileSource("models/" + TestFiles.getModelsFolderFile().listFiles()[0].getName(), <END> TestFiles.getModelsFolderFile().listFiles()[0]), new FileSource("models/" + TestFiles.getModelsFolderFile().listFiles()[1].getName(), TestFiles.getModelsFolderFile().listFiles()[1]),}; File zipFile = temporaryFolder.newFile(new BigInteger(130, new SecureRandom()).toString(32) + ".zip"); ZipUtil.pack(addedEntries, zipFile); return zipFile; }</code><technical_language>fixed in new commit</technical_language>

Target:
public static File getMissingTestDefinitionTestBundleFile(TemporaryFolder temporaryFolder) throws IOException { ZipEntrySource[] addedEntries = new ZipEntrySource[] {new FileSource(TestFiles.getTestDeploymentDescriptorFile().getName(), TestFiles.getTestDeploymentDescriptorFile())}; File zipFile = temporaryFolder.newFile(new BigInteger(130, new SecureRandom()).toString(32) + ".zip"); ZipUtil.pack(addedEntries, zipFile); addModelsToZipFile(zipFile); return zipFile; }
Source:
<code>public ListenableFuture<Integer> call() throws Exception { switch (taskTracker.getNextAttemptStatus()) { case SUCCESS: return toListenableFuture(CompletableFuture.completedFuture(RESULT)); case SYNC_FAILURE: throw new SyncException("Failed on call " + taskTracker.totalAttemptsMade()); case ASYNC_FAILURE: CompletableFuture<Integer> result = new CompletableFuture<>(); result.completeExceptionally(new AsyncException("Failed on call " + taskTracker.totalAttemptsMade())); <START> return toListenableFuture(result); <END> default: throw new RuntimeException("Unexpected exception type"); } }</code><technical_language>immediateFailedFuture</technical_language>

Target:
public ListenableFuture<Integer> call() throws Exception { switch (taskTracker.getNextAttemptStatus()) { case SUCCESS: return immediateFuture(RESULT); case SYNC_FAILURE: throw new SyncException("Failed on call " + taskTracker.totalAttemptsMade()); case ASYNC_FAILURE: return immediateFailedFuture(new AsyncException("Failed on call " + taskTracker.totalAttemptsMade())); default: throw new RuntimeException("Unexpected exception type"); } }
Source:
<code>private void verify() { final AbstractTransactionalContext parentCtx = TransactionalContext.getCurrentContext(); if (parentCtx != null) { if (parentCtx.getTransaction().getRuntime() != this.runtime) { throw new IllegalStateException( "Attempting to nest transactions from different clients!"); } if (type != parentCtx.getTransaction().getType()) { throw new IllegalArgumentException( <START> "Attempting to nest transactions with a different transaction type!"); <END> } Token parentTimestamp = parentCtx.getSnapshotTimestamp(); if (!this.snapshot.equals(Token.UNINITIALIZED) && !this.snapshot.equals(parentTimestamp)) { String msg = String.format("Attempting to nest transactions with" + " different timestamps, parent ts=%s, user defined ts=%s", parentCtx.getSnapshotTimestamp(), this.snapshot); throw new IllegalArgumentException(msg); } } }</code><technical_language>add info types mismatched</technical_language>

Target:
private void verify() { final AbstractTransactionalContext parentCtx = TransactionalContext.getCurrentContext(); if (parentCtx != null) { if (parentCtx.getTransaction().getRuntime() != this.runtime) { throw new IllegalStateException( "Attempting to nest transactions from different clients!"); } if (type != parentCtx.getTransaction().getType()) { String msg = String.format("Attempting to nest transactions with a " + "different transaction type, parent type=%s, nested type=%s", parentCtx.getTransaction().getType(), this.getType()); throw new IllegalArgumentException(msg); } Token parentTimestamp = parentCtx.getSnapshotTimestamp(); if (!this.snapshot.equals(Token.UNINITIALIZED) && !this.snapshot.equals(parentTimestamp)) { String msg = String.format("Attempting to nest transactions with" + " different timestamps, parent ts=%s, user defined ts=%s", parentCtx.getSnapshotTimestamp(), this.snapshot); throw new IllegalArgumentException(msg); } } }
Source:
<code>private static String getWidget(Attribute attr) { if (attr.getType() == null) { return "type = null"; } if (attr.getType().equals("java.util.LinkedHashMap")) { return generateMap(attr.getValueAsMap(), attr.isWritable()); } else if (attr.getType().equals("java.lang.Integer")) { return generateNumberBox(attr.getValue(), attr.isWritable()); } else if (attr.getType().equals("java.lang.Boolean")) { return generateCheckBox(attr.getValue(), attr.isWritable()); <START> } else if (attr.getType().equals("java.util.ArrayList") || attr.getType().equals("java.util.LargeArrayList")) { <END> return generateList(attr.getValueAsJsArray(), attr.isWritable()); } return generateTextBox(attr.getValue(), attr.isWritable()); }</code><technical_language>I prefer constant there</technical_language>

Target:
private static String getWidget(Attribute attr) { if (attr.getType() == null) { return "type = null"; } if (attr.getType().equals("java.util.LinkedHashMap")) { return generateMap(attr.getValueAsMap(), attr.isWritable()); } else if (attr.getType().equals("java.lang.Integer")) { return generateNumberBox(attr.getValue(), attr.isWritable()); } else if (attr.getType().equals("java.lang.Boolean")) { return generateCheckBox(attr.getValue(), attr.isWritable()); } else if (attr.getType().equals("java.util.ArrayList") || attr.getType().equals(Utils.largeArrayListClassName)) { return generateList(attr.getValueAsJsArray(), attr.isWritable()); } return generateTextBox(attr.getValue(), attr.isWritable()); }
Source:
<code><START> public void validate(String authenticationMethod) { <END> if (authenticationMethod.equalsIgnoreCase("Access Credentials")) { if (!containsMacro("accessID") && (accessID == null || accessID.isEmpty())) { throw new IllegalArgumentException("The Access ID must be specified if " + "authentication method is Access Credentials."); } if (!containsMacro("accessKey") && (accessKey == null || accessKey.isEmpty())) { throw new IllegalArgumentException("The Access Key must be specified if " + "authentication method is Access Credentials."); } } }</code><technical_language>Add validation of s3a:// IAMRoles</technical_language>

Target:
public void validate(String authenticationMethod) { if (authenticationMethod.equalsIgnoreCase(ACCESS_CREDENTIALS)) { if (!containsMacro("accessID") && (accessID == null || accessID.isEmpty())) { throw new IllegalArgumentException("The Access ID must be specified if " + "authentication method is Access Credentials."); } if (!containsMacro("accessKey") && (accessKey == null || accessKey.isEmpty())) { throw new IllegalArgumentException("The Access Key must be specified if " + "authentication method is Access Credentials."); } } else if (authenticationMethod.equalsIgnoreCase(IAM)) { if (!basePath.startsWith("s3a://")) { throw new IllegalArgumentException("Path must start with s3a:// for IAM based authentication."); } } }
Source:
<code>public void processConfigFile(File dir) { if (dir.isDirectory() && dir.exists()) { File[] files = dir.listFiles(); Arrays.sort(files, new Comparator<File>() { @Override public int compare(File left, File right) { return Long.valueOf(left.lastModified()).compareTo(right.lastModified()); } }); for (File file : files) { <START> processConfigFile(file); <END> } } else { try { internalProcessConfigFile(dir); } catch (IOException e) { logger.warn("Could not process config file '{}': {}", dir.getName(), e.getMessage()); } } processOrphanExclusivePIDs(); storeCurrentExclusivePIDList(); }</code><technical_language>This recursively process subdirectories services. Is this intended? call internalProcessConfigFile restore original behaviour</technical_language>

Target:
public void processConfigFile(File dir) { if (dir.isDirectory() && dir.exists()) { File[] files = dir.listFiles(); Arrays.sort(files, new Comparator<File>() { @Override public int compare(File left, File right) { return Long.valueOf(left.lastModified()).compareTo(right.lastModified()); } }); for (File file : files) { try { internalProcessConfigFile(file); } catch (IOException e) { logger.warn("Could not process config file '{}': {}", file.getName(), e.getMessage()); } } } else { try { internalProcessConfigFile(dir); } catch (IOException e) { logger.warn("Could not process config file '{}': {}", dir.getName(), e.getMessage()); } } processOrphanExclusivePIDs(); storeCurrentExclusivePIDList(); }
Source:
<code>private static boolean isValueBasedType(Type type) { if (type.isUnknown() || type.is(JAVA_TIME_CLOCK)) { return false; } if (VALUE_BASED_TYPES.stream().anyMatch(type::is)) { return true; } String fullyQualifiedName = type.fullyQualifiedName(); <START> return fullyQualifiedName.startsWith(JAVA_TIME_PACKAGE) <END> && fullyQualifiedName.split("\\.").length == 3; }</code><technical_language>I a regexp java\.time\.[^\.] startWith a regexp. This allow a simpler code : return anyMatch... && pattern.matcher(type.fqn()).matches();</technical_language>

Target:
private static boolean isValueBasedType(Type type) { if (type.isUnknown() || type.is(JAVA_TIME_CLOCK)) { return false; } return VALUE_BASED_TYPES.stream().anyMatch(type::is) || JAVA_TIME_PACKAGE_PATTERN.matcher(type.fullyQualifiedName()).matches(); }
Source:
<code>public void updateContent(B blob, @Nullable String filename, File file) { String nextPhysicalId = keyGenerator.generateId(); try { getPhysicalSpace().upload(nextPhysicalId, file); Optional<String> previousPhysicalId = updateBlob(blob, nextPhysicalId, file.length(), filename); if (previousPhysicalId.isPresent()) { blob.fetchVariants().forEach(BlobVariant::delete); getPhysicalSpace().delete(previousPhysicalId.get()); } <START> blobByPathCache.clear(); <END> } catch (Exception e) { try { getPhysicalSpace().delete(nextPhysicalId); } catch (Exception ex) { Exceptions.ignore(ex); } throw Exceptions.handle() .to(StorageUtils.LOG) .error(e) .withSystemErrorMessage("Layer 2: Cannot update the contents of %s in %s: %s (%s)", blob.getBlobKey(), spaceName) .handle(); } }</code><technical_language>if name changes</technical_language>

Target:
public void updateContent(B blob, @Nullable String filename, File file) { String nextPhysicalId = keyGenerator.generateId(); try { getPhysicalSpace().upload(nextPhysicalId, file); Optional<String> previousPhysicalId = updateBlob(blob, nextPhysicalId, file.length(), filename); if (previousPhysicalId.isPresent()) { blob.fetchVariants().forEach(BlobVariant::delete); getPhysicalSpace().delete(previousPhysicalId.get()); } if (Strings.isFilled(filename)) { blobByPathCache.clear(); } } catch (Exception e) { try { getPhysicalSpace().delete(nextPhysicalId); } catch (Exception ex) { Exceptions.ignore(ex); } throw Exceptions.handle() .to(StorageUtils.LOG) .error(e) .withSystemErrorMessage("Layer 2: Cannot update the contents of %s in %s: %s (%s)", blob.getBlobKey(), spaceName) .handle(); } }
Source:
<code>private void checkBinary(ExecutableSequence s, ObjectContract c, Set<Integer> values, ErrorRevealingChecks checks) { for (Integer i : values) { for (Integer j : values) { ExecutionOutcome result1 = s.getResult(i); ExecutionOutcome result2 = s.getResult(j); if (! (result1 instanceof NormalExecution) <START> && ! (result2 instanceof NormalExecution)) { <END> throw new Error("Abnormal execution in sequence: " + s); } if (Log.isLoggingOn()) Log.logLine("Checking contract " + c.getClass() + " on " + i + ", " + j); ExecutionOutcome exprOutcome = ObjectContractUtils.execute(c, ((NormalExecution) result1).getRuntimeValue(), ((NormalExecution) result2).getRuntimeValue()); Check obs = null; if (exprOutcome instanceof NormalExecution) { NormalExecution e = (NormalExecution)exprOutcome; if (e.getRuntimeValue().equals(true)) { if (Log.isLoggingOn()) Log.logLine("Contract returned true."); continue; } else { if (Log.isLoggingOn()) Log.logLine("Contract returned false. Will add ExpressionEqFalse check"); obs = new ObjectCheck(c, i, s.sequence.getVariable(i), s.sequence.getVariable(j)); checks.add(obs); } } else if (exprOutcome instanceof ExceptionalExecution){ Throwable e = ((ExceptionalExecution)exprOutcome).getException(); if (Log.isLoggingOn()) Log.logLine("Contract threw exception: " + e.getMessage()); if (e instanceof BugInRandoopException) { throw new BugInRandoopException(e); } } else { throw new Error("Contract failed to execute during evaluation"); } } } }</code><technical_language>is this "and" "or"? (I write "(! ( ... and))" negations.)</technical_language>

Target:
private void checkBinary(ExecutableSequence s, ObjectContract c, Set<Integer> values, ErrorRevealingChecks checks) { for (Integer i : values) { for (Integer j : values) { ExecutionOutcome result1 = s.getResult(i); ExecutionOutcome result2 = s.getResult(j); if (! ((result1 instanceof NormalExecution) && (result2 instanceof NormalExecution))) { throw new Error("Abnormal execution in sequence: " + s); } if (Log.isLoggingOn()) Log.logLine("Checking contract " + c.getClass() + " on " + i + ", " + j); ExecutionOutcome exprOutcome = ObjectContractUtils.execute(c, ((NormalExecution) result1).getRuntimeValue(), ((NormalExecution) result2).getRuntimeValue()); Check obs = null; if (exprOutcome instanceof NormalExecution) { NormalExecution e = (NormalExecution)exprOutcome; if (e.getRuntimeValue().equals(true)) { if (Log.isLoggingOn()) Log.logLine("Contract returned true."); continue; } else { if (Log.isLoggingOn()) Log.logLine("Contract returned false. Will add ExpressionEqFalse check"); obs = new ObjectCheck(c, i, s.sequence.getVariable(i), s.sequence.getVariable(j)); checks.add(obs); } } else if (exprOutcome instanceof ExceptionalExecution){ Throwable e = ((ExceptionalExecution)exprOutcome).getException(); if (Log.isLoggingOn()) Log.logLine("Contract threw exception: " + e.getMessage()); if (e instanceof BugInRandoopException) { throw new BugInRandoopException(e); } } else { throw new Error("Contract failed to execute during evaluation"); } } } }