auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static Map<String, Object> getVariablesPojo(String basePath) throws ProcessingException, IOException { String filePath = basePath + VARIABLE_CONFIG_PATH; File variableFile = new File(filePath); if (variableFile.exists()) { return stringToVariablesPojo(readConfigFile(variableFile)); } else { log.info("Variables config file not found at " + filePath); } <START> return null; <END> }</code><technical_language>return empty map instead</technical_language>

Target:
public static Map<String, Object> getVariablesPojo(String basePath) throws IOException { String filePath = basePath + VARIABLE_CONFIG_PATH; File variableFile = new File(filePath); if (variableFile.exists()) { return stringToVariablesPojo(readConfigFile(variableFile)); } else { log.info("Variables config file not found at " + filePath); } return new HashMap<>(); }
Source:
<code>public static void onBlockPlaced(BlockEvent.EntityPlaceEvent event) { if(event.getEntity() instanceof ServerPlayerEntity) { ServerPlayerEntity player = (ServerPlayerEntity) event.getEntity(); if(getData(player) != null) { EditData data = getData(player); if(event.isCanceled()) { data.sendGivenItemsToEditor(); return; } ItemStack stack = player.getHeldItemMainhand(); SburbConnection c = data.connection; DeployEntry entry = DeployList.getEntryForItem(stack, c, player.world); if(entry != null) { GristSet cost = entry.getCurrentCost(c); c.setHasGivenItem(entry); if(!c.isMain()) SkaianetHandler.get(player.server).giveItems(c.getClientIdentifier()); if(!cost.isEmpty()) { <START> GristHelper.notifyEditPlayer(player.world.getServer(), c.getClientIdentifier(), cost, false); <END> GristHelper.decrease(player.world, c.getClientIdentifier(), cost); } player.inventory.mainInventory.set(player.inventory.currentItem, ItemStack.EMPTY); } else { GristHelper.notifyEditPlayer(player.world.getServer(), data.connection.getClientIdentifier(), GristCostRecipe.findCostForItem(stack, null, false, player.getEntityWorld()), false); GristHelper.decrease(player.world, data.connection.getClientIdentifier(), GristCostRecipe.findCostForItem(stack, null, false, player.getEntityWorld())); } } } }</code><technical_language>decrease happen notify</technical_language>

Target:
public static void onBlockPlaced(BlockEvent.EntityPlaceEvent event) { if(event.getEntity() instanceof ServerPlayerEntity) { ServerPlayerEntity player = (ServerPlayerEntity) event.getEntity(); if(getData(player) != null) { EditData data = getData(player); if(event.isCanceled()) { data.sendGivenItemsToEditor(); return; } ItemStack stack = player.getHeldItemMainhand(); SburbConnection c = data.connection; DeployEntry entry = DeployList.getEntryForItem(stack, c, player.world); if(entry != null) { GristSet cost = entry.getCurrentCost(c); c.setHasGivenItem(entry); if(!c.isMain()) SkaianetHandler.get(player.server).giveItems(c.getClientIdentifier()); if(!cost.isEmpty()) { GristHelper.decrease(player.world, c.getClientIdentifier(), cost); GristHelper.notifyEditPlayer(player.world.getServer(), c.getClientIdentifier(), cost, false); } player.inventory.mainInventory.set(player.inventory.currentItem, ItemStack.EMPTY); } else { GristHelper.decrease(player.world, data.connection.getClientIdentifier(), GristCostRecipe.findCostForItem(stack, null, false, player.getEntityWorld())); GristHelper.notifyEditPlayer(player.world.getServer(), data.connection.getClientIdentifier(), GristCostRecipe.findCostForItem(stack, null, false, player.getEntityWorld()), false); } } } }
Source:
<code>public int hashCode() { if (this.components == null || this.components.size() == 0) { return 0; } int ordinals = new int[this.components.size()]; for (int i = 0; i < this.components.size(); i++) { ordinals[i] = this.components.get(i).GetTypeOrdinal(); } return Objects.hashCode(ordinals); <START> } <END></code><technical_language>introduce more guava dependencies! :-) standard Java APIs for hashcode</technical_language>

Target:
public int hashCode() { return super.hashCode(); }
Source:
<code>public String call() throws IOException { NetworkPeerManager peerManager = NetworkPeerManager.getInstanceOrNull(); AsyncPrettyPrinterSchemaFileManager schemaFileManager <START> = peerManager.getAsyncPrettyPrinterSchemaFileManager(); <END> String cacheSchema = schemaFileManager.readCache(url); if (cacheSchema != null) { return cacheSchema; } else { InputStream urlStream = url.openStream(); String result = Util.readAsUTF8(urlStream); urlStream.close(); OutputStream cacheSchemaOutputStream = schemaFileManager.openNewSchemaCache(url); cacheSchemaOutputStream.write(result.getBytes()); cacheSchemaOutputStream.close(); return result; } }</code><technical_language>if peerManager is null ?</technical_language>

Target:
public String call() throws IOException { HttpURLConnection connection = (HttpURLConnection)url.openConnection(); int statusCode = connection.getResponseCode(); if (statusCode != 200) { throw new IOException("Got status code: " + statusCode + " while downloading " + "schema with url: " + url.toString()); } InputStream urlStream = connection.getInputStream(); try { AsyncPrettyPrinterSchemaManager schemaFileManager = AsyncPrettyPrinterSchemaManager.getInstance(); String result = Util.readAsUTF8(urlStream); schemaFileManager.put(url, result); return result; } finally { urlStream.close(); } }
Source:
<code>public void testNotNotifiedOfExtraTrackedSensorsIfNonDuplicate() throws Exception { TestEntity e1 = createAndManageChildOf(group); RecordingMembershipTrackingPolicy nonDuplicateTrackingPolicy = app.addPolicy(PolicySpec.create(RecordingMembershipTrackingPolicy.class) .configure(AbstractMembershipTrackingPolicy.SENSORS_TO_TRACK, ImmutableSet.<Sensor<?>>of(TestEntity.NAME)) .configure(AbstractMembershipTrackingPolicy.NOTIFY_ON_DUPLICATES, false) <START> .configure("group", group)); <END> e1.setAttribute(TestEntity.NAME, "myname"); assertRecordsEventually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1)); e1.setAttribute(TestEntity.NAME, "myname"); assertRecordsContinually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1)); e1.setAttribute(TestEntity.NAME, "mynewname"); assertRecordsEventually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1), Record.newChanged(e1)); }</code><technical_language>more consistent; ConfigKey<?> String keys in configure(...) calls</technical_language>

Target:
public void testNotNotifiedOfExtraTrackedSensorsIfNonDuplicate() throws Exception { TestEntity e1 = createAndManageChildOf(group); RecordingMembershipTrackingPolicy nonDuplicateTrackingPolicy = app.addPolicy(PolicySpec.create(RecordingMembershipTrackingPolicy.class) .configure(AbstractMembershipTrackingPolicy.SENSORS_TO_TRACK, ImmutableSet.<Sensor<?>>of(TestEntity.NAME)) .configure(AbstractMembershipTrackingPolicy.NOTIFY_ON_DUPLICATES, false) .configure(AbstractMembershipTrackingPolicy.GROUP, group)); e1.setAttribute(TestEntity.NAME, "myname"); assertRecordsEventually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1)); e1.setAttribute(TestEntity.NAME, "myname"); assertRecordsContinually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1)); e1.setAttribute(TestEntity.NAME, "mynewname"); assertRecordsEventually(nonDuplicateTrackingPolicy, Record.newAdded(e1), Record.newChanged(e1), Record.newChanged(e1)); }
Source:
<code>public void testRecoveryAfterBookieCrash() throws Exception { String name = "txnid-after-crash"; DistributedLogConfiguration conf = new DistributedLogConfiguration() .setEnsembleSize(5) .setWriteQuorumSize(5) .setAckQuorumSize(5); long entryId = 0; List<BookieServer> extraBookies = new ArrayList<>(); try { extraBookies.add(startExtraBookie()); extraBookies.add(startExtraBookie()); try (BKDistributedLogManager dlm = (BKDistributedLogManager) createNewDLM(conf, name); BKAsyncLogWriter writer = dlm.startAsyncLogSegmentNonPartitioned()) { writer.write(DLMTestUtil.getLogRecordInstance(1, 100000)).join(); writer.write(DLMTestUtil.getLogRecordInstance(2, 100000)).join(); extraBookies.forEach(b -> b.shutdown()); writer.write(DLMTestUtil.getLogRecordInstance(3, 100000)); <START> Thread.sleep(1000); <END> writer.write(DLMTestUtil.getLogRecordInstance(4, 100000)).join(); Assert.fail("Shouldn't be able to write"); } catch (Exception e) { } extraBookies.add(startExtraBookie()); extraBookies.add(startExtraBookie()); try (BKDistributedLogManager dlm = (BKDistributedLogManager) createNewDLM(conf, name); LogWriter writer = dlm.startLogSegmentNonPartitioned()) { writer.write(DLMTestUtil.getLogRecordInstance(dlm.getLastTxId() + 1, 100000)); writer.commit(); } } finally { extraBookies.forEach(b -> b.shutdown()); } }</code><technical_language>Is safer (not flaky) of waiting</technical_language>

Target:
public void testRecoveryAfterBookieCrash() throws Exception { String name = "txnid-after-crash"; DistributedLogConfiguration conf = new DistributedLogConfiguration() .setEnsembleSize(5) .setWriteQuorumSize(5) .setAckQuorumSize(5) .setLogSegmentRollingIntervalMinutes(0) .setLogSegmentRollingConcurrency(-1) .setMaxLogSegmentBytes(400000); long entryId = 0; List<BookieServer> extraBookies = new ArrayList<>(); try { extraBookies.add(startExtraBookie()); extraBookies.add(startExtraBookie()); try (BKDistributedLogManager dlm = (BKDistributedLogManager) createNewDLM(conf, name); BKAsyncLogWriter writer = dlm.startAsyncLogSegmentNonPartitioned()) { writer.write(DLMTestUtil.getLogRecordInstance(1, 100000)).join(); writer.write(DLMTestUtil.getLogRecordInstance(2, 100000)).join(); extraBookies.forEach(b -> b.shutdown()); try { writer.write(DLMTestUtil.getLogRecordInstance(3, 100000)).join(); Assert.fail("Shouldn't have succeeded"); } catch (Exception e) { } writer.write(DLMTestUtil.getLogRecordInstance(4, 100000)).join(); Assert.fail("Shouldn't be able to write"); } catch (Exception e) { } extraBookies.add(startExtraBookie()); extraBookies.add(startExtraBookie()); try (BKDistributedLogManager dlm = (BKDistributedLogManager) createNewDLM(conf, name); BKAsyncLogWriter writer = dlm.startAsyncLogSegmentNonPartitioned()) { long firstTxid = dlm.getLastTxId() + 1; for (int i = 0; i < 20; i++) { logger.info("Writing entry {}", i); writer.write(DLMTestUtil.getLogRecordInstance(firstTxid + i, 100000)).join(); Thread.sleep(100); } } } finally { extraBookies.forEach(b -> b.shutdown()); } }
Source:
<code>public void testSTIsSimple() { <START> assertFunction("ST_IsSimple(ST_GeometryFromText('POLYGON EMPTY'))", BOOLEAN, true); <END> assertFunction("ST_IsSimple(ST_GeometryFromText('POINT (1.5 2.5)'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('MULTIPOINT (1 2, 2 4, 3 6, 4 8)'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('LINESTRING (8 4, 5 7)'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('LINESTRING (0 0, 1 1, 1 0, 0 1)'))", BOOLEAN, false); assertFunction("ST_IsSimple(ST_GeometryFromText('LINESTRING (0 0, 1 1, 1 0, 0 1)'))", BOOLEAN, false); assertFunction("ST_IsSimple(ST_GeometryFromText('LINESTRING (1 1, 2 2, 1 3, 1 1)'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('MULTILINESTRING ((1 1, 5 1), (2 4, 4 4))'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('MULTILINESTRING ((1 1, 5 1), (2 4, 4 0))'))", BOOLEAN, false); assertFunction("ST_IsSimple(ST_GeometryFromText('POLYGON ((2 0, 2 1, 3 1))'))", BOOLEAN, true); assertFunction("ST_IsSimple(ST_GeometryFromText('MULTIPOLYGON (((1 1, 1 3, 3 3, 3 1)), ((2 4, 2 6, 6 6, 6 4)))'))", BOOLEAN, true); }</code><technical_language>shorten this test, consider introducing helper functions: assertSimpleGeometry assertNotSimpleGeometry. assertSimpleGeometry("POINT EMPTY"); assertNotSimpleGeometry("LINESTRING (0 0, 1 1, 1 0, 0 1)"); For clarity, consider grouping tests geometry type. E.g. test points, multi-points, linestrings, etc</technical_language>

Target:
public void testSTIsSimple() { assertSimpleGeometry("POINT (1.5 2.5)"); assertSimpleGeometry("MULTIPOINT (1 2, 2 4, 3 6, 4 8)"); assertNotSimpleGeometry("MULTIPOINT (1 2, 2 4, 3 6, 1 2)"); assertSimpleGeometry("LINESTRING (8 4, 5 7)"); assertSimpleGeometry("LINESTRING (1 1, 2 2, 1 3, 1 1)"); assertNotSimpleGeometry("LINESTRING (0 0, 1 1, 1 0, 0 1)"); assertSimpleGeometry("MULTILINESTRING ((1 1, 5 1), (2 4, 4 4))"); assertNotSimpleGeometry("MULTILINESTRING ((1 1, 5 1), (2 4, 4 0))"); assertSimpleGeometry("POLYGON EMPTY"); assertSimpleGeometry("POLYGON ((2 0, 2 1, 3 1))"); assertSimpleGeometry("MULTIPOLYGON (((1 1, 1 3, 3 3, 3 1)), ((2 4, 2 6, 6 6, 6 4)))"); }
Source:
<code>public void threadUsageMetrics(){ navigation.selectRow().invoke("View"); Application.waitUntilVisible(); <START> <END> MetricsAreaFragment metricsArea = jvmPage.getThreadUsageMetricsArea(); double expectedUsagePercentage = metricsArea.getPercentage(DAEMON, LIVE); MetricsFragment threadUsageMetrics = metricsArea.getMetricsFragment(DAEMON); assertEquals(expectedUsagePercentage, threadUsageMetrics.getPercentage(), DELTA); }</code><technical_language>Please move this end of before() method</technical_language>

Target:
public void threadUsageMetrics(){ MetricsAreaFragment metricsArea = jvmPage.getThreadUsageMetricsArea(); double expectedUsagePercentage = metricsArea.getPercentage(DAEMON, LIVE); MetricsFragment threadUsageMetrics = metricsArea.getMetricsFragment(DAEMON); assertEquals(expectedUsagePercentage, threadUsageMetrics.getPercentage(), DELTA); }
Source:
<code>public void clickRemoveStudentFromCourse(String courseId) { <START> List<WebElement> instructorRows = <END> studentTable.findElement(By.tagName("tbody")).findElements(By.tagName("tr")); WebElement deleteButton = null; for (WebElement instructorRow : instructorRows) { List<WebElement> cells = instructorRow.findElements(By.tagName("td")); if (cells.get(0).getText().startsWith("[" + courseId + "]")) { deleteButton = cells.get(1).findElement(By.className("btn-danger")); } } if (deleteButton == null) { fail("Student to be deleted is not found"); } click(deleteButton); waitForPageToLoad(true); verifyStatusMessage("Student is successfully deleted from course \"" + courseId + "\""); }</code><technical_language>studentRows here</technical_language>

Target:
public void clickRemoveStudentFromCourse(String courseId) { List<WebElement> studentRows = studentTable.findElement(By.tagName("tbody")).findElements(By.tagName("tr")); WebElement deleteButton = null; for (WebElement studentRow : studentRows) { List<WebElement> cells = studentRow.findElements(By.tagName("td")); if (cells.get(0).getText().startsWith("[" + courseId + "]")) { deleteButton = cells.get(1).findElement(By.className("btn-danger")); } } if (deleteButton == null) { fail("Student to be deleted is not found"); } click(deleteButton); waitForPageToLoad(true); }
Source:
<code>private boolean processInOnly(Exchange exchange, AsyncCallback callback) throws Exception { String exchangeName = getEndpoint().getExchangeName(exchange.getIn()); <START> String key = exchange.getIn().getHeader(RabbitMQConstants.ROUTING_KEY, () -> null, String.class); <END> if (key == null || getEndpoint().isBridgeEndpoint()) { key = getEndpoint().getRoutingKey() == null ? "" : getEndpoint().getRoutingKey(); } if (ObjectHelper.isEmpty(key) && ObjectHelper.isEmpty(exchangeName)) { throw new IllegalArgumentException("ExchangeName and RoutingKey is not provided in the endpoint: " + getEndpoint()); } basicPublish(exchange, exchangeName, key); callback.done(true); return true; }</code><technical_language>replaced in.getHeader(RabbitMQConstants.ROUTING_KEY, String.class)</technical_language>

Target:
private boolean processInOnly(Exchange exchange, AsyncCallback callback) throws Exception { String exchangeName = getEndpoint().getExchangeName(exchange.getIn()); String key = exchange.getIn().getHeader(RabbitMQConstants.ROUTING_KEY, String.class); if (key == null || getEndpoint().isBridgeEndpoint()) { key = getEndpoint().getRoutingKey() == null ? "" : getEndpoint().getRoutingKey(); } if (ObjectHelper.isEmpty(key) && ObjectHelper.isEmpty(exchangeName)) { throw new IllegalArgumentException("ExchangeName and RoutingKey is not provided in the endpoint: " + getEndpoint()); } basicPublish(exchange, exchangeName, key); callback.done(true); return true; }
Source:
<code>@NotNull private static CacheConfiguration<Integer, double[]> createCacheConfiguration() { CacheConfiguration<Integer, double[]> trainingSetCfg = new CacheConfiguration<>(); trainingSetCfg.setName("TRAINING_SET"); <START> trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 1)); <END> return trainingSetCfg; }</code><technical_language>1 partition</technical_language>

Target:
@NotNull private static CacheConfiguration<Integer, double[]> createCacheConfiguration() { CacheConfiguration<Integer, double[]> trainingSetCfg = new CacheConfiguration<>(); trainingSetCfg.setName("TRAINING_SET"); trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10)); return trainingSetCfg; }
Source:
<code>public InputRowListPlusJson transform(@Nullable final InputRowListPlusJson row) { if (row == null) { return null; } final InputRowListPlusJson transformedRow; if (transforms.isEmpty()) { transformedRow = row; } else { <START> transformedRow = InputRowListPlusJson.of(new TransformedInputRow(row.getInputRow(), transforms), row.getRaw()); <END> } if (valueMatcher != null) { rowSupplierForValueMatcher.set(transformedRow.getInputRow()); if (!valueMatcher.matches()) { return null; } } return transformedRow; }</code><technical_language>this transforming list of InputRow TransformedInputRow</technical_language>

Target:
public InputRowListPlusJson transform(@Nullable final InputRowListPlusJson row) { if (row == null) { return null; } final InputRowListPlusJson transformedRow; if (transforms.isEmpty()) { transformedRow = row; } else { final List<InputRow> originalRows = Preconditions.checkNotNull(row.getInputRows(), "rows before transform"); final List<InputRow> transformedRows = new ArrayList<>(originalRows.size()); for (InputRow originalRow : originalRows) { transformedRows.add(new TransformedInputRow(originalRow, transforms)); } transformedRow = InputRowListPlusJson.of(transformedRows, row.getRawJson()); } if (valueMatcher != null) { rowSupplierForValueMatcher.set(transformedRow.getInputRow()); if (!valueMatcher.matches()) { return null; } } return transformedRow; }
Source:
<code>public synchronized @NonNull TmfModelResponse<@NonNull List<@NonNull CriticalPathEntry>> fetchTree( @NonNull TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { TmfGraph graph = fCriticalPathModule.getCriticalPath(); fCriticalPathModule.waitForCompletion(); if (graph == null) { return new TmfModelResponse<>(null, Status.RUNNING, CommonStatusMessage.RUNNING); } IGraphWorker graphWorker = getCurrent(); HorizontalLinksVisitor visitor = <START> fCurrentVisitor; <END> if (visitor == null || !visitor.fCurrentWorker.equals(graphWorker)) { visitor = new HorizontalLinksVisitor(graph, graphWorker); fCurrentVisitor = visitor; fLinks = null; } graph.scanLineTraverse(graph.getHead(), visitor); List<CriticalPathEntry> list = new ArrayList<>(visitor.getHostEntries()); list.addAll(visitor.getWorkers()); return new TmfModelResponse<>(list, Status.COMPLETED, CommonStatusMessage.COMPLETED); }</code><technical_language>_could_ save a map of worker visitor, avoid recompute switch entry previously visited</technical_language>

Target:
public synchronized @NonNull TmfModelResponse<@NonNull List<@NonNull CriticalPathEntry>> fetchTree( @NonNull TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { TmfGraph graph = fCriticalPathModule.getCriticalPath(); if (graph == null) { return new TmfModelResponse<>(null, Status.RUNNING, CommonStatusMessage.RUNNING); } HorizontalLinksVisitor visitor = fHorizontalVisitorCache.getUnchecked(getCurrent()); return new TmfModelResponse<>(visitor.getEntries(), Status.COMPLETED, CommonStatusMessage.COMPLETED); }
Source:
<code>public void testLargeSize() { try { final int size = 1 + CircularBuffer.MAX_SIZE; CircularBuffer<Integer> instance = new CircularBuffer<Integer>(size); assert false; } catch (RuntimeException e) { <START> System.out.format("Got expected exception: %s%n", e); <END> } }</code><technical_language>System.out, log4j if necessary</technical_language>

Target:
public void testLargeSize() { CircularBuffer<Integer> instance = new CircularBuffer<Integer>(1 + MAX_SIZE); }
Source:
<code>public boolean performNextOperation(int completedChildCount) { getParameters().setCommandStep(getParameters().getNextCommandStep()); log.info("Command '{}' id '{}' executing step '{}'", getActionType(), getCommandId(), getParameters().getCommandStep()); switch (getParameters().getCommandStep()) { case PERFORM_LEASE_OPERATION: VmLeaseParameters leaseOperaionParams = buildLeaseOperationParams(); runInternalActionWithTasksContext(ActionType.PerformLeaseOperation, leaseOperaionParams); VmLeaseStep afterAddOrRemoveNextStep = getLeaseAction() == VDSCommandType.AddVmLease ? VmLeaseStep.UPDATE_LEASE_INFO : VmLeaseStep.COMPLETE; getParameters().setNextCommandStep(afterAddOrRemoveNextStep); break; case UPDATE_LEASE_INFO: runInternalAction(ActionType.UpdateLeaseInfo, getParameters(), cloneContext().withoutCompensationContext()); VmLeaseStep afterUpdateLeaseInfoNextStep = getParameters().isHotPlugLease() ? VmLeaseStep.HOT_PLUG_LEASE : VmLeaseStep.COMPLETE; getParameters().setNextCommandStep(afterUpdateLeaseInfoNextStep); break; case HOT_PLUG_LEASE: runInternalAction(ActionType.HotPlugLease, getParameters(), cloneContext().withoutCompensationContext()); getParameters().setNextCommandStep(VmLeaseStep.COMPLETE); break; case COMPLETE: setCommandStatus(CommandStatus.SUCCEEDED); return false; <START> } <END> persistCommandIfNeeded(); return true; }</code><technical_language>dont want error default unhandled case</technical_language>

Target:
public boolean performNextOperation(int completedChildCount) { getParameters().setCommandStep(getParameters().getNextCommandStep()); log.info("Command '{}' id '{}' executing step '{}'", getActionType(), getCommandId(), getParameters().getCommandStep()); switch (getParameters().getCommandStep()) { case PERFORM_LEASE_OPERATION: VmLeaseParameters leaseOperationParams = buildLeaseOperationParams(); runInternalActionWithTasksContext(ActionType.PerformLeaseOperation, leaseOperationParams); VmLeaseStep afterAddOrRemoveNextStep = getLeaseAction() == VDSCommandType.AddVmLease ? VmLeaseStep.UPDATE_LEASE_INFO : VmLeaseStep.COMPLETE; getParameters().setNextCommandStep(afterAddOrRemoveNextStep); break; case UPDATE_LEASE_INFO: runInternalAction(ActionType.UpdateLeaseInfo, getParameters(), cloneContext().withoutCompensationContext()); VmLeaseStep afterUpdateLeaseInfoNextStep = getParameters().isHotPlugLease() ? VmLeaseStep.HOT_PLUG_LEASE : VmLeaseStep.COMPLETE; getParameters().setNextCommandStep(afterUpdateLeaseInfoNextStep); break; case HOT_PLUG_LEASE: runInternalAction(ActionType.HotPlugLease, getParameters(), cloneContext().withoutCompensationContext()); getParameters().setNextCommandStep(VmLeaseStep.COMPLETE); break; case COMPLETE: setCommandStatus(CommandStatus.SUCCEEDED); return false; } persistCommandIfNeeded(); return true; }
Source:
<code>public void handleInputCommand(Command command, ChannelUID channelUID, int zone) throws IOException { if (command instanceof RefreshType) { logger.debug("handleInputCommand RefreshType {}", zone); try { SonyAudioConnection.SonyAudioInput result = input_cache[zone].getValue(); if (result != null) { <START> <END> if (zone > 0) { input_zone.put(zone, result.input); } updateState(channelUID, inputSource(result.input)); if (result.radio_freq.isPresent()) { updateState(SonyAudioBindingConstants.CHANNEL_RADIO_FREQ, new DecimalType(result.radio_freq.get() / 1000000.0)); } } } catch (CompletionException ex) { throw new IOException(ex.getCause()); } } if (command instanceof StringType) { logger.debug("handleInputCommand set {}", zone, command); connection.setInput(setInputCommand(command), zone); } }</code><technical_language>please remove empty line</technical_language>

Target:
public void handleInputCommand(Command command, ChannelUID channelUID, int zone) throws IOException { if (command instanceof RefreshType) { logger.debug("handleInputCommand RefreshType {}", zone); try { SonyAudioConnection.SonyAudioInput result = inputCache[zone].getValue(); if (result != null) { if (zone > 0) { input_zone.put(zone, result.input); } updateState(channelUID, inputSource(result.input)); if (result.radio_freq.isPresent()) { updateState(SonyAudioBindingConstants.CHANNEL_RADIO_FREQ, new DecimalType(result.radio_freq.get() / 1000000.0)); } } } catch (CompletionException ex) { throw new IOException(ex.getCause()); } } if (command instanceof StringType) { logger.debug("handleInputCommand set {}", zone, command); connection.setInput(setInputCommand(command), zone); } }
Source:
<code>protected void commandFailed(ICommandToken token, int statusCode, String errorMessage) { if ( !(token instanceof CommandHandle && token.getCommand() instanceof MICommand<?>) ) return; final CommandHandle commandHandle = (CommandHandle)token; Integer tokenId = commandHandle.getTokenId(); <START> synchronized(fRxCommands) { <END> CommandHandle h = fRxCommands.remove(tokenId); if (h == null) return; } MIConst value = new MIConst(); value.setCString(errorMessage); MIResult result = new MIResult(); result.setVariable("msg"); result.setMIValue(value); MIResultRecord resultRecord = new MIResultRecord(); resultRecord.setToken(tokenId.intValue()); resultRecord.setResultClass(MIResultRecord.ERROR); resultRecord.setMIResults(new MIResult[] { result }); MIOutput miOutput = new MIOutput(resultRecord, new MIOOBRecord[0]); final MIInfo info = commandHandle.getCommand().getResult(miOutput); DataRequestMonitor<MIInfo> rm = commandHandle.getRequestMonitor(); if ( rm != null ) { rm.setData(info); rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, statusCode, errorMessage, null)); if (commandHandle.getRequestMonitor() != null) { commandHandle.getRequestMonitor().done(); } processCommandDone(commandHandle, info); } }</code><technical_language>fRxCommands is a synchronizedMap, do need add synchronization access</technical_language>

Target:
protected void commandFailed(ICommandToken token, int statusCode, String errorMessage) { if ( !(token instanceof CommandHandle && token.getCommand() instanceof MICommand<?>) ) return; final CommandHandle commandHandle = (CommandHandle)token; Integer tokenId = commandHandle.getTokenId(); CommandHandle h = fRxCommands.remove(tokenId); if (h == null) return; MIConst value = new MIConst(); value.setCString(errorMessage); MIResult result = new MIResult(); result.setVariable("msg"); result.setMIValue(value); MIResultRecord resultRecord = new MIResultRecord(); resultRecord.setToken(tokenId.intValue()); resultRecord.setResultClass(MIResultRecord.ERROR); resultRecord.setMIResults(new MIResult[] { result }); MIOutput miOutput = new MIOutput(resultRecord, new MIOOBRecord[0]); final MIInfo info = commandHandle.getCommand().getResult(miOutput); DataRequestMonitor<MIInfo> rm = commandHandle.getRequestMonitor(); if ( rm != null ) { rm.setData(info); rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, statusCode, errorMessage, null)); rm.done(); processCommandDone(commandHandle, info); } }
Source:
<code>public @NonNull ITmfCommonXAxisResponse fetchXY(@NonNull TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { long[] xValues = filter.getTimesRequested(); int n = xValues.length; double[] y = new <START> double[n]; long[] yLong = new long[n]; <END> for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) { final TmfStatisticsModule statsMod = TmfTraceUtils.getAnalysisModuleOfClass(trace, TmfStatisticsModule.class, TmfStatisticsModule.ID); if (statsMod == null) { continue; } statsMod.waitForInitialization(); final ITmfStatistics stats = Objects.requireNonNull(statsMod.getStatistics()); List<Long> values = stats.histogramQuery(filter.getStart(), filter.getEnd(), n); for (int i = 0; i < n; i++) { yLong[i] += values.get(i); } } for (int i = 0; i < n; i++) { y[i] = yLong[i]; } String title = Messages.HistogramDataProvider_Title; ImmutableMap.Builder<String, IYModel> ySeries = ImmutableMap.builder(); String seriesName = Messages.HistogramDataProvider_NumberOfEvent; ySeries.put(seriesName, new YModel(seriesName, y)); return TmfCommonXAxisResponseFactory.create(title, xValues, ySeries.build(), filter.getEnd(), true); }</code><technical_language>precision losses significant adding a double directly</technical_language>

Target:
public @NonNull ITmfCommonXAxisResponse fetchXY(@NonNull TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { long[] xValues = filter.getTimesRequested(); int n = xValues.length; double[] y = new double[n]; long[] yLong = new long[n]; for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) { final TmfStatisticsModule statsMod = TmfTraceUtils.getAnalysisModuleOfClass(trace, TmfStatisticsModule.class, TmfStatisticsModule.ID); if (statsMod == null) { continue; } statsMod.waitForInitialization(); final ITmfStatistics stats = Objects.requireNonNull(statsMod.getStatistics()); List<Long> values = stats.histogramQuery(filter.getStart(), filter.getEnd(), n); for (int i = 0; i < n; i++) { yLong[i] += values.get(i); } } for (int i = 0; i < n; i++) { y[i] = yLong[i]; } String title = Objects.requireNonNull(Messages.HistogramDataProvider_Title); String seriesName = Objects.requireNonNull(Messages.HistogramDataProvider_NumberOfEvent); Map<String, IYModel> ySeries = ImmutableMap.of(seriesName, new YModel(seriesName, y)); return TmfCommonXAxisResponseFactory.create(title, xValues, ySeries, filter.getEnd(), true); }
Source:
<code>private void notifyRepoOpening(boolean isPrimaryRepository) { if (isPrimaryRepository) { Platform.runLater(() -> UI.events.triggerEvent(new PrimaryRepoOpeningEvent())); } else { Platform.runLater(() -> UI.events.triggerEvent(new FilterRepoOpeningEvent())); <START> } <END> }</code><technical_language>? : operator here</technical_language>

Target:
private void notifyRepoOpening(boolean isPrimaryRepository) { Event eventToTrigger = isPrimaryRepository ? new PrimaryRepoOpeningEvent() : new FilterRepoOpeningEvent(); Platform.runLater(() -> UI.events.triggerEvent(eventToTrigger)); }
Source:
<code>private static ServerSocketEndpointConfig createWanEndpointConfig() { ServerSocketEndpointConfig endpointConfig = new ServerSocketEndpointConfig(); endpointConfig.setName("active-wan") .setSSLConfig(new SSLConfig() .setEnabled(true) <START> .setProperty("trustStore", "truststore") <END> .setProperty("trustStorePassword", System.getenv("KEYSTORE_PASSWORD"))); endpointConfig.setPort(8443) .setPublicAddress("147.102.1.10:8443"); return endpointConfig; }</code><technical_language>I keyStore keyStorePassword for replication ClusterA -> ClusterB (or sides keystore truststore if mutual authentication is enabled)</technical_language>

Target:
private static ServerSocketEndpointConfig createWanEndpointConfig() { ServerSocketEndpointConfig endpointConfig = new ServerSocketEndpointConfig(); endpointConfig.setName("active-wan") .setSSLConfig(new SSLConfig() .setEnabled(true) .setFactoryClassName("com.hazelcast.nio.ssl.BasicSSLContextFactory") .setProperty("keyStore", "/home/hazelcast/hazelcast.p12") .setProperty("keyStorePassword", System.getenv("KEYSTORE_PASSWORD"))); endpointConfig.setPort(8443) .setPublicAddress("147.102.1.10:8443"); return endpointConfig; }
Source:
<code>public CorfuQueue(CorfuRuntime runtime, String streamName) { <START> this(runtime, streamName, Serializers.JSON, CorfuTable.IndexRegistry.empty()); <END> }</code><technical_language>JSON CORFU</technical_language>

Target:
public CorfuQueue(CorfuRuntime runtime, String streamName) { this(runtime, streamName, Serializers.getDefaultSerializer(), IndexRegistry.empty()); }
Source:
<code><START> private void filterAnyTextFieldCache() { Set<String> filteredList = new HashSet<>(); ConfigurationStore config = ConfigurationStore.getInstance(); List<String> anyTextFieldWhitelist = config.getAnyTextFieldWhitelist(); List<String> anyTextFieldBlacklist = config.getAnyTextFieldBlacklist(); if (!anyTextFieldWhitelist.isEmpty()) { for (String whitelistField : anyTextFieldWhitelist) { String whitelist; if (!whitelistField.endsWith(SchemaFields.TEXT_SUFFIX)) { whitelist = whitelistField + SchemaFields.TEXT_SUFFIX; } else { whitelist = whitelistField; } filteredList.addAll( anyTextFieldsCache .stream() .filter(field -> field.matches(whitelist)) .collect(Collectors.toList())); } } else if (!anyTextFieldBlacklist.isEmpty()) { filteredList.addAll(anyTextFieldsCache); for (String blacklistField : anyTextFieldBlacklist) { String blacklist; if (!blacklistField.endsWith(SchemaFields.TEXT_SUFFIX)) { blacklist = blacklistField + SchemaFields.TEXT_SUFFIX; } else { blacklist = blacklistField; } filteredList.removeAll( anyTextFieldsCache .stream() .filter(field -> field.matches(blacklist)) .collect(Collectors.toList())); } } else { filteredList.addAll(anyTextFieldsCache); } <END> filteredAnyTextFieldsCache = filteredList; }</code><technical_language>Yeah, intention in solution. start full list, blacklist things, add exceptions for. I confusing, a common pattern a blacklist a whitelist allowed. I argue current behavior is confusing, allow a blacklist a whitelist defined (with warnings), ultimately whitelist</technical_language>

Target:
private void filterAnyTextFieldCache() { Set<String> filteredList = new HashSet<>(); ConfigurationStore config = ConfigurationStore.getInstance(); List<String> anyTextFieldWhitelist = config.getAnyTextFieldWhitelist(); List<String> anyTextFieldBlacklist = config.getAnyTextFieldBlacklist(); if (!anyTextFieldBlacklist.isEmpty()) { filteredList.addAll(anyTextFieldsCache); for (String blacklistField : anyTextFieldBlacklist) { String blacklist; if (!blacklistField.endsWith(SchemaFields.TEXT_SUFFIX)) { blacklist = blacklistField + SchemaFields.TEXT_SUFFIX; } else { blacklist = blacklistField; } filteredList.removeAll( anyTextFieldsCache .stream() .filter(field -> field.matches(blacklist)) .collect(Collectors.toList())); } } if (!anyTextFieldWhitelist.isEmpty()) { for (String whitelistField : anyTextFieldWhitelist) { String whitelist; if (!whitelistField.endsWith(SchemaFields.TEXT_SUFFIX)) { whitelist = whitelistField + SchemaFields.TEXT_SUFFIX; } else { whitelist = whitelistField; } filteredList.addAll( anyTextFieldsCache .stream() .filter(field -> field.matches(whitelist)) .collect(Collectors.toList())); } } if (anyTextFieldBlacklist.isEmpty() && anyTextFieldWhitelist.isEmpty()) { filteredList.addAll(anyTextFieldsCache); } filteredAnyTextFieldsCache = filteredList; }
Source:
<code><START> public Iterable<IClasspathEntry> load(IJavaProject project) throws FileNotFoundException, CoreException { <END> Iterable<IClasspathEntry> classpath = super.load(project); if(configuration.isDownloadJavaDoc()) { return attacher.attach(project, classpath); } return classpath; }</code><technical_language>wrap weird, checked exceptions CoreException in unchecked ProjectConfigurationException. This means need modify a bunch of unrelated classes throw it</technical_language>

Target:
public Iterable<IClasspathEntry> load(IJavaProject project) throws FileNotFoundException { Iterable<IClasspathEntry> classpath = super.load(project); if(configuration.isDownloadJavaDoc()) { return attacher.attach(project, classpath); } return classpath; }
Source:
<code><START> private void validate(ImmutableList<UpdaterConfiguration> configurations) { <END> Set<Publisher> configuredSources = Sets.newHashSet(); for (UpdaterConfiguration configuration : configurations) { if (configuredSources.contains(configuration.getSource())) { throw new IllegalArgumentException(format( "Found duplicate updater configuration for source %s. Keeping last added", configuration.getSource() )); } configuredSources.add(configuration.getSource()); } }</code><technical_language>This static well, no</technical_language>

Target:
private static void validate(ImmutableList<UpdaterConfiguration> configurations) { Set<Publisher> configuredSources = Sets.newHashSet(); for (UpdaterConfiguration configuration : configurations) { if (configuredSources.contains(configuration.getSource())) { throw new IllegalArgumentException(format( "Found duplicate updater configuration for source %s", configuration.getSource() )); } configuredSources.add(configuration.getSource()); } }
Source:
<code>synchronized private Semaphore getSemaphore() { <START> if (sem == null) { <END> sem = new Semaphore(maxThreadPermits); } return sem; }</code><technical_language>avoid some synchronization here, try this: private Semaphore getSemaphore() { if (sem == null) { synchronized(this) { if (sem == null) { sem = new Semaphore(maxThreadPermits); } } return sem; }</technical_language>

Target:
public Semaphore getSemaphore() { int writeThreads = getServerConfig().getConfiguration().getCount(Property.TSERV_MAX_WRITETHREADS); if (writeThreads == 0) writeThreads = Integer.MAX_VALUE; if (sem == null || maxThreadPermits != writeThreads) { synchronized (this) { maxThreadPermits = writeThreads; sem = new Semaphore(maxThreadPermits); } } return sem; }
Source:
<code>protected String delete(String path, String ...params) { path = getPath(path, params); try { <START> HttpDelete get = new HttpDelete(); <END> setupCommonHeaders(get); get.setURI(uri.resolve(path)); return getJSON(get); } catch (IOException e) { throw new HttpClientException(e); } }</code><technical_language>variable name delete,</technical_language>

Target:
protected String delete(String path, String ...params) { path = getPath(path, params); try { HttpDelete delete = new HttpDelete(); setupCommonHeaders(delete); delete.setURI(uri.resolve(path)); return getJSON(delete); } catch (IOException e) { throw new HttpClientException(e); } }
Source:
<code>protected void updateStorageDomainFormatIfNeeded(StorageDomain domain) { final StorageDomainType sdType = domain.getStorageDomainType(); <START> if (sdType != StorageDomainType.Data && sdType != StorageDomainType.Master) { <END> log.debug("Skipping format update for domain '{}' (type '{}')", getStorageDomain().getId(), sdType); return; } final StorageDomainStatic storageStaticData = domain.getStorageStaticData(); final StorageFormatType targetFormat = getStoragePool().getStoragePoolFormatType(); if (storageStaticData.getStorageFormat() != targetFormat) { log.info("Updating storage domain '{}' (type '{}') to format '{}'", getStorageDomain().getId(), sdType, targetFormat); storageStaticData.setStorageFormat(targetFormat); getStorageDomainStaticDAO().update(storageStaticData); } else { log.debug("Skipping format update for domain '{}' format is '{}'", getStorageDomain().getId(), storageStaticData.getStorageFormat()); } }</code><technical_language>do mind change "isDataDomain" if touching it</technical_language>

Target:
protected void updateStorageDomainFormatIfNeeded(StorageDomain domain) { final StorageDomainType sdType = domain.getStorageDomainType(); if (!sdType.isDataDomain()) { log.debug("Skipping format update for domain '{}' (type '{}')", getStorageDomain().getId(), sdType); return; } final StorageDomainStatic storageStaticData = domain.getStorageStaticData(); final StorageFormatType targetFormat = getStoragePool().getStoragePoolFormatType(); if (storageStaticData.getStorageFormat() != targetFormat) { log.info("Updating storage domain '{}' (type '{}') to format '{}'", getStorageDomain().getId(), sdType, targetFormat); storageStaticData.setStorageFormat(targetFormat); getStorageDomainStaticDAO().update(storageStaticData); } else { log.debug("Skipping format update for domain '{}' format is '{}'", getStorageDomain().getId(), storageStaticData.getStorageFormat()); } }
Source:
<code>protected void onPostExecute(final StringWriter stringWriter) { <START> mTextView.setText(new String(stringWriter.getBuffer())); <END> mTextView.setVisibility(View.VISIBLE); dismissLoadingDialog(); }</code><technical_language>changing type of mTextView WeakReference<TextView> , needed check mTextView.get() is null, do setText() returned TextView</technical_language>

Target:
protected void onPostExecute(final StringWriter stringWriter) { final TextView textView = mTextViewReference.get(); if (textView != null) { textView.setText(new String(stringWriter.getBuffer())); textView.setVisibility(View.VISIBLE); } dismissLoadingDialog(); }
Source:
<code>public RangerCloudIdentitySyncStatus setAzureCloudIdentityMapping(String envCrn, Map<String, String> azureUserMapping) { Optional<SdxCluster> sdxCluster = getSdxCluster(envCrn); if (sdxCluster.isEmpty()) { <START> return sucessfulCloudIdSyncStatus("No datlakes associated with the environment."); <END> } return setAzureCloudIdentityMapping(envCrn, sdxCluster.get(), azureUserMapping); }</code><technical_language>typo: datalakes also, this sound a successful scenario. Is a status describe happened</technical_language>

Target:
public RangerCloudIdentitySyncStatus setAzureCloudIdentityMapping(String envCrn, Map<String, String> azureUserMapping) { Optional<SdxCluster> sdxCluster = getSdxCluster(envCrn); if (sdxCluster.isEmpty()) { return newSyncStatus(RangerCloudIdentitySyncState.NOT_APPLICABLE, "No datalakes associated with the environment."); } return setAzureCloudIdentityMapping(envCrn, sdxCluster.get(), azureUserMapping); }
Source:
<code><START> public void shouldCreateOnlyOneRepartitionTopicWhenRepartitionIsFollowedByGroupByKey() throws ExecutionException, InterruptedException { <END> final String repartitionName = "new-partitions"; final long timestamp = System.currentTimeMillis(); sendEvents( timestamp, Arrays.asList( new KeyValue<>(1, "A"), new KeyValue<>(2, "B") ) ); final StreamsBuilder builder = new StreamsBuilder(); final Repartitioned<String, String> repartitioned = Repartitioned.<String, String>as(repartitionName) .withKeySerde(Serdes.String()) .withValueSerde(Serdes.String()) .withNumberOfPartitions(1); builder.stream(inputTopic, Consumed.with(Serdes.Integer(), Serdes.String())) .selectKey((key, value) -> key.toString()) .repartition(repartitioned) .groupByKey() .count() .toStream() .to(outputTopic); startStreams(builder); final String topology = builder.build().describe().toString(); validateReceivedMessages( new StringDeserializer(), new LongDeserializer(), Arrays.asList( new KeyValue<>("1", 1L), new KeyValue<>("2", 1L) ) ); assertTrue(topicExists(toRepartitionTopicName(repartitionName))); assertEquals(1, countOccurrencesInTopology(topology, "Sink: .*-repartition")); }</code><technical_language>Similar above: able test unit tests Topology#describe()</technical_language>

Target:
public void shouldCreateOnlyOneRepartitionTopicWhenRepartitionIsFollowedByGroupByKey() throws Exception { final String repartitionName = "new-partitions"; final long timestamp = System.currentTimeMillis(); sendEvents( timestamp, Arrays.asList( new KeyValue<>(1, "A"), new KeyValue<>(2, "B") ) ); final StreamsBuilder builder = new StreamsBuilder(); final Repartitioned<String, String> repartitioned = Repartitioned.<String, String>as(repartitionName) .withKeySerde(Serdes.String()) .withValueSerde(Serdes.String()) .withNumberOfPartitions(1); builder.stream(inputTopic, Consumed.with(Serdes.Integer(), Serdes.String())) .selectKey((key, value) -> key.toString()) .repartition(repartitioned) .groupByKey() .count() .toStream() .to(outputTopic); startStreams(builder); final String topology = builder.build().describe().toString(); validateReceivedMessages( new StringDeserializer(), new LongDeserializer(), Arrays.asList( new KeyValue<>("1", 1L), new KeyValue<>("2", 1L) ) ); assertTrue(topicExists(toRepartitionTopicName(repartitionName))); assertEquals(1, countOccurrencesInTopology(topology, "Sink: .*-repartition")); }
Source:
<code>private ContentCategory getContentCategory(String mimetype, String extension) { if (mimetype == null) return ContentCategory.unknown; int index = mimetype.indexOf('/'); if (index != -1) { String mimetypeType = mimetype.substring(0, index); if (mimetypeType.equals("image")) return ContentCategory.image; if (mimetypeType.equals("video")) return ContentCategory.video; if (mimetypeType.equals("audio")) return ContentCategory.audio; } String contentCategory = (String) contentTypeProperties.get("mime." + mimetype); if (contentCategory == null) <START> contentCategory = (String) contentTypeProperties.get("ext." + extension); <END> return ContentCategory.getContentCategory(contentCategory); }</code><technical_language>a lot happening working list of sources, a test case hits this "get content type extension" bit successfully? for 100% code coverage unit tests, good major cases work</technical_language>

Target:
private ContentCategory getContentCategory(String mimetype, String extension) { if (mimetype == null) { return ContentCategory.unknown; } int index = mimetype.indexOf('/'); if (index != -1) { String mimetypeType = mimetype.substring(0, index); if (mimetypeType.equals("image")) { return ContentCategory.image; } if (mimetypeType.equals("video")) { return ContentCategory.video; } if (mimetypeType.equals("audio")) { return ContentCategory.audio; } } String contentCategory = (String) contentTypeProperties.get("mime." + mimetype); contentCategory = (String) contentTypeProperties.get("ext." + extension); return ContentCategory.getContentCategory(contentCategory); }
Source:
<code>private static boolean isException(ClassTree classTree) { Type type = classTree.symbol().type(); <START> return type.isSubtypeOf("java.lang.Exception") || type.isSubtypeOf("java.lang.Error"); <END> }</code><technical_language>wondering if check for throwable ? test is a subtype of throwable throwable</technical_language>

Target:
private static boolean isException(ClassTree classTree) { return classTree.simpleName() != null && classTree.symbol().type().isSubtypeOf("java.lang.Throwable"); }