auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean isPolling() { <START> return false; <END> }</code><technical_language>this is a polling receiver? This polls messages a queue right (ref:SQSTask.java)</technical_language>

Target:
public boolean isPolling() { return true; }
Source:
<code>public ImagesListReturn(Map<String, Object> innerMap) { super(innerMap); Object[] tempObj = (Object[]) innerMap.get(IMAGES_LIST); if (tempObj != null) { imageList = Arrays.stream(tempObj) .map(id -> (String)id) <START> .filter(id -> !id.startsWith(StorageConstants.REMOVED_IMAGE_PREFIX)) <END> .toArray(String[]::new); } }</code><technical_language>ignore is a uuid (with a warning)</technical_language>

Target:
public ImagesListReturn(Map<String, Object> innerMap) { super(innerMap); Object[] tempObj = (Object[]) innerMap.get(IMAGES_LIST); if (tempObj != null) { imageList = Arrays.stream(tempObj) .map(id -> (String)id) .filter(id -> isValidUUID(id)) .toArray(String[]::new); } }
Source:
<code>public List<TablePartitionKeysProto> getAllPartitionKeys() throws CatalogException { Connection conn = null; Statement stmt = null; ResultSet resultSet = null; List<TablePartitionKeysProto> partitions = new ArrayList<TablePartitionKeysProto>(); try { String sql = " SELECT C." + COL_PARTITIONS_PK + ", C.COLUMN_NAME, C.PARTITION_VALUE " + " FROM " + TB_TABLES + " A " + <START> " JOIN " + TB_PARTTIONS + " B ON A." + COL_TABLES_PK + " = B." + COL_TABLES_PK <END> + " AND B." + COL_PARTITIONS_PK + " > 0 " + " JOIN " + TB_PARTTION_KEYS + " C ON B." + COL_PARTITIONS_PK + " = C." + COL_PARTITIONS_PK; conn = getConnection(); stmt = conn.createStatement(); resultSet = stmt.executeQuery(sql); while (resultSet.next()) { TablePartitionKeysProto.Builder builder = TablePartitionKeysProto.newBuilder(); builder.setPartitionId(resultSet.getInt(COL_PARTITIONS_PK)); builder.setColumnName(resultSet.getString("COLUMN_NAME")); builder.setPartitionValue(resultSet.getString("PARTITION_VALUE")); partitions.add(builder.build()); } } catch (SQLException se) { throw new TajoInternalError(se); } finally { CatalogUtil.closeQuietly(stmt, resultSet); } return partitions; }</code><technical_language>is guaranteed tables partitions exist, join necessary</technical_language>

Target:
public List<TablePartitionKeyProto> getAllPartitionKeys() { Connection conn = null; Statement stmt = null; ResultSet resultSet = null; List<TablePartitionKeyProto> partitions = new ArrayList<TablePartitionKeyProto>(); try { String sql = " SELECT A." + COL_PARTITIONS_PK + ", A.COLUMN_NAME, A.PARTITION_VALUE " + " FROM " + TB_PARTTION_KEYS + " A "; conn = getConnection(); stmt = conn.createStatement(); resultSet = stmt.executeQuery(sql); while (resultSet.next()) { TablePartitionKeyProto.Builder builder = TablePartitionKeyProto.newBuilder(); builder.setPartitionId(resultSet.getInt(COL_PARTITIONS_PK)); builder.setColumnName(resultSet.getString("COLUMN_NAME")); builder.setPartitionValue(resultSet.getString("PARTITION_VALUE")); partitions.add(builder.build()); } } catch (SQLException se) { throw new TajoInternalError(se); } finally { CatalogUtil.closeQuietly(stmt, resultSet); } return partitions; }
Source:
<code>public void testWarnWithLocationSuccess() throws IOException { <START> printer.warn(WARNING_MSG, new Location(LINE_NUMBER, COLUMN_NUMBER + 1)); <END> assertEquals(expectedOutput("warning", WARNING_MSG, LINE_NUMBER, COLUMN_NUMBER + 1), outContent.toString()); }</code><technical_language>COLUMN_NUMBER + 1 is redundant Location types everywhere</technical_language>

Target:
public void testWarnWithLocationSuccess() throws IOException { printer.warn(WARNING_MSG, new Location(LINE_NUMBER, COLUMN_NUMBER)); assertEquals(expectedOutput("warning", WARNING_MSG, LINE_NUMBER, COLUMN_NUMBER), outContent.toString()); }
Source:
<code>public void testGetInvalidityInfoForTimeForSessionStartAndEnd_valid_returnEmptyString() { Date date = new Date(); Date sessionStart = new Date(date.getTime() - 1000); <START> Date sessionEnd = new Date(date.getTime() + 1000); <END> assertEquals("", validator.getInvalidityInfoForTimeForSessionStartAndEnd(sessionStart, sessionEnd)); }</code><technical_language>of helper classes must/should a utility method get a time relative current time. If not, add one</technical_language>

Target:
public void testGetInvalidityInfoForTimeForSessionStartAndEnd_valid_returnEmptyString() { Date sessionStart = TimeHelper.getHoursOffsetToCurrentTime(-1); Date sessionEnd = TimeHelper.getHoursOffsetToCurrentTime(1); assertEquals("", validator.getInvalidityInfoForTimeForSessionStartAndEnd(sessionStart, sessionEnd)); }
Source:
<code>public void start() { <START> log.info("Starting DerbyConnector...."); <END> storage.start(); }</code><technical_language>dots, 3</technical_language>

Target:
public void start() { log.info("Starting DerbyConnector..."); storage.start(); }
Source:
<code>public void open(NotificationContext context) { LOG.debug("MQTTDeviceNotifier open called with context {}", context); try { this.context = context; mqttClientId = UUID.randomUUID().toString(); configProperties = context.getConfig().getProperties(); callbackOperations = context.getConfig().getDefaultFieldValues(); <START> deviceInstance = ((DeviceNotifierConfig)context.getConfig()).getDeviceMetaData(); <END> mqttBrokerURL = setBrokerUrl(); mqttQoS = setQoS(); mqttTopic = (String) deviceInstance.getProtocol().getProperties().get(MQTTProtocol.MQTT_TOPIC); mqttOptions = getMqttConnectOptions(); connect(); } catch(MqttException ex) { throw new NotifierRuntimeException("Got exception while attempting to connect to MQTT broker", ex); } }</code><technical_language>rename deviceInstance deviceMetadata</technical_language>

Target:
public void open(NotificationContext context) { LOG.debug("MQTTDeviceNotifier open called with context {}", context); try { this.context = context; mqttClientId = UUID.randomUUID().toString(); configProperties = context.getConfig().getProperties(); callbackOperation = context.getConfig().getDefaultFieldValues(); deviceInstance = ((DeviceNotifierConfig)context.getConfig()).getDeviceInstance(); mqttBrokerURL = setBrokerUrl(); mqttQoS = setQoS(); mqttTopic = (String) deviceInstance.getProtocol().getProperties().get(MQTTProtocol.MQTT_TOPIC); mqttOptions = getMqttConnectOptions(); connect(); } catch(MqttException ex) { throw new NotifierRuntimeException("Got exception while attempting to connect to MQTT broker", ex); } }
Source:
<code>public void visitNode(AstNode expression) { List<AstNode> children = expression.getChildren(); AstNode leftOperand = children.get(0); String operator = children.get(1).getTokenValue(); AstNode rightOperand = children.get(2); if (!EXCLUDED_OPERATOR_TYPES.contains(operator) && CheckUtils.equalNodes(leftOperand, rightOperand) && !isLeftShiftBy1(leftOperand, operator)) { <START> addIssue(rightOperand, "Identical sub-expressions on both sides of operator \"" + operator + "\".") <END> .secondary(leftOperand, "Identical left operand."); } }</code><technical_language>@mpaladin error message in RSPEC is 'Correct of identical sub-expressions sides of operator "XXX".'</technical_language>

Target:
public void visitNode(AstNode expression) { List<AstNode> children = expression.getChildren(); AstNode leftOperand = children.get(0); String operator = children.get(1).getTokenValue(); AstNode rightOperand = children.get(2); if (!EXCLUDED_OPERATOR_TYPES.contains(operator) && CheckUtils.equalNodes(leftOperand, rightOperand) && !isLeftShiftBy1(leftOperand, operator)) { addIssue(rightOperand, "Correct one of the identical sub-expressions on both sides of operator \"" + operator + "\".") .secondary(leftOperand, ""); } }
Source:
<code>private static List<MoveDescription> calculateNonCombatSea( final boolean nonCombat, final GameData data, final PlayerId player) { final Route amphibRoute = getAmphibRoute(player, data); Territory firstSeaZoneOnAmphib = null; Territory lastSeaZoneOnAmphib = null; if (amphibRoute != null) { firstSeaZoneOnAmphib = amphibRoute.getAllTerritories().get(1); lastSeaZoneOnAmphib = amphibRoute.getAllTerritories().get(amphibRoute.numberOfSteps() - 1); } final Predicate<Unit> ownedAndNotMoved = Matches.unitIsOwnedBy(player).and(Matches.unitHasNotMoved()); final var moves = new ArrayList<MoveDescription>(); for (final Territory t : data.getMap()) { if (t.isWater()) { if (t.getUnitCollection().anyMatch(Matches.unitIsLand())) { if (lastSeaZoneOnAmphib != null) { final Route r = getMaxSeaRoute(data, t, lastSeaZoneOnAmphib, player); <START> if (r != null) { <END> final List<Unit> unitsToMove = t.getUnitCollection().getMatches(Matches.unitIsOwnedBy(player)); moves.add(new MoveDescription(unitsToMove, r)); } } } if (nonCombat && t.getUnitCollection().anyMatch(ownedAndNotMoved)) { if (firstSeaZoneOnAmphib != null) { final Route r = getMaxSeaRoute(data, t, firstSeaZoneOnAmphib, player); if (r != null) { moves.add(new MoveDescription(t.getUnitCollection().getMatches(ownedAndNotMoved), r)); } } } } } return moves; }</code><technical_language>Avoid deeply nested control flow statements</technical_language>

Target:
private static List<MoveDescription> calculateNonCombatSea( final boolean nonCombat, final GameData data, final PlayerId player) { final Route amphibRoute = getAmphibRoute(player, data); Territory firstSeaZoneOnAmphib = null; Territory lastSeaZoneOnAmphib = null; if (amphibRoute != null) { firstSeaZoneOnAmphib = amphibRoute.getAllTerritories().get(1); lastSeaZoneOnAmphib = amphibRoute.getAllTerritories().get(amphibRoute.numberOfSteps() - 1); } final Predicate<Unit> ownedAndNotMoved = Matches.unitIsOwnedBy(player).and(Matches.unitHasNotMoved()); final var moves = new ArrayList<MoveDescription>(); for (final Territory t : data.getMap()) { if (t.isWater()) { if (t.getUnitCollection().anyMatch(Matches.unitIsLand())) { if (lastSeaZoneOnAmphib != null) { final @Nullable Route r = getMaxSeaRoute(data, t, lastSeaZoneOnAmphib, player); if (r != null) { final List<Unit> unitsToMove = t.getUnitCollection().getMatches(Matches.unitIsOwnedBy(player)); moves.add(new MoveDescription(unitsToMove, r)); } } } if (nonCombat && t.getUnitCollection().anyMatch(ownedAndNotMoved)) { if (firstSeaZoneOnAmphib != null) { final @Nullable Route r = getMaxSeaRoute(data, t, firstSeaZoneOnAmphib, player); if (r != null) { moves.add(new MoveDescription(t.getUnitCollection().getMatches(ownedAndNotMoved), r)); } } } } } return moves; }
Source:
<code>private void startConsumer(MqttMessageConsumer subscriber) { String topic = subscriber.getTopic(); logger.debug("Starting message consumer for broker '{}' on topic '{}'", name, topic); try { client.subscribe(topic, qos); } catch (Exception e) { <START> logger.error(String.format("Error starting consumer for broker '{}' on topic '{}'", name, topic), e); <END> } }</code><technical_language>in logger.error String.format called implicitly</technical_language>

Target:
private void startConsumer(MqttMessageConsumer subscriber) { String topic = subscriber.getTopic(); logger.debug("Starting message consumer for broker '{}' on topic '{}'", name, topic); try { client.subscribe(topic, qos); } catch (Exception e) { logger.error("Error starting consumer", e); } }
Source:
<code>protected void startHttpServer(String path, int port) { try { httpServer = HttpServer.create(new InetSocketAddress(port), 0); httpServer.createContext(path, new HttpHandler() { @Override public void handle(HttpExchange httpExchange) throws IOException { byte[] response = MAPPER.writeValueAsString(metrics).getBytes(); httpExchange.sendResponseHeaders(HTTP_STATUS_OK, response.length); OutputStream os = httpExchange.getResponseBody(); os.write(response); os.close(); LOG.log(Level.INFO, "Received metrics request."); } }); httpServer.start(); } catch (IOException e) { <START> LOG.log(Level.SEVERE, "Could not create HttpServer on port " + port, e); <END> } }</code><technical_language>bubble this exception solely log down</technical_language>

Target:
protected void startHttpServer(String path, int port) { try { httpServer = HttpServer.create(new InetSocketAddress(port), 0); httpServer.createContext(path, new HttpHandler() { @Override public void handle(HttpExchange httpExchange) throws IOException { metricsCache.cleanUp(); byte[] response = MAPPER.writeValueAsString(metricsCache.asMap()) .getBytes(); httpExchange.sendResponseHeaders(HTTP_STATUS_OK, response.length); OutputStream os = httpExchange.getResponseBody(); os.write(response); os.close(); LOG.log(Level.INFO, "Received metrics request."); } }); httpServer.start(); } catch (IOException e) { throw new RuntimeException("Failed to create Http server on port " + port, e); } }
Source:
<code>public SchemaRecordCheckTest() { <START> super( new SchemaRecordCheck( configureSchemaStore(), configureIndexAssessors() ), <END> ConsistencyReport.SchemaConsistencyReport.class, new int[0] ); }</code><technical_language>This is assessor, accessor</technical_language>

Target:
public SchemaRecordCheckTest() { super( new SchemaRecordCheck( configureSchemaStore(), configureIndexAccessors() ), ConsistencyReport.SchemaConsistencyReport.class, new int[0] ); }
Source:
<code>private <T extends FieldMetadataCreationContext> T create(Class<T> backend) { try { return backend.getDeclaredConstructor( BridgeDefinedField.class, FieldMetadataCreationContext.class ).newInstance( field, this ); } catch (Exception e) { <START> throw new RuntimeException( e ); <END> } }</code><technical_language>Logger, create a SearchException</technical_language>

Target:
private <T extends FieldMetadataCreationContext> T create(Class<T> backend) { try { return backend.getDeclaredConstructor( BridgeDefinedField.class, FieldMetadataCreationContext.class ).newInstance( field, this ); } catch (Exception e) { throw LOG.cannotCreateBridgeDefinedField( backend, e ); } }
Source:
<code>public static CompletableFuture<MessageActionItem> showMessageRequest(LanguageServerWrapper wrapper, ShowMessageRequestParams params) { String options[] = params.getActions().stream().map(MessageActionItem::getTitle).toArray(String[]::new); CompletableFuture<MessageActionItem> future = new CompletableFuture<>(); Display.getDefault().asyncExec(() -> { Shell shell = new Shell(Display.getCurrent()); MessageDialog dialog = new MessageDialog(shell, wrapper.serverDefinition.label, null, params.getMessage(), MessageDialog.INFORMATION, 0, options); MessageActionItem result = new MessageActionItem(); int dialogResult = dialog.open(); <START> if (dialogResult != SWT.DEFAULT) { END> result.setTitle(options[dialogResult]); future.complete(result); } }); return future; }</code><technical_language>future.completeExceptionally(new CancellationException())</technical_language>

Target:
public static CompletableFuture<MessageActionItem> showMessageRequest(LanguageServerWrapper wrapper, ShowMessageRequestParams params) { String options[] = params.getActions().stream().map(MessageActionItem::getTitle).toArray(String[]::new); CompletableFuture<MessageActionItem> future = new CompletableFuture<>(); Display.getDefault().asyncExec(() -> { Shell shell = new Shell(Display.getCurrent()); MessageDialog dialog = new MessageDialog(shell, wrapper.serverDefinition.label, null, params.getMessage(), MessageDialog.INFORMATION, 0, options); MessageActionItem result = new MessageActionItem(); int dialogResult = dialog.open(); if (dialogResult != SWT.DEFAULT) { result.setTitle(options[dialogResult]); } future.complete(result); }); return future; }
Source:
<code>public Set<CfgBlock> blocks() { <START> return ImmutableSet.<CfgBlock>copyOf(blocks); <END> }</code><technical_language>@pynicolas fixed b6229cc713c75b2a4e8a4e5f378d14e5b03b3eb7</technical_language>

Target:
public Set<CfgBlock> blocks() { return Collections.<CfgBlock>unmodifiableSet(blocks); }
Source:
<code>private void onCommitRemoveBricks() { if (getConfirmWindow() == null) { return; } ConfirmationModel model = (ConfirmationModel) getConfirmWindow(); if (model.getProgress() != null) { return; <START> } <END> if (getSelectedItems() == null || getSelectedItems().isEmpty()) { return; } GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); ArrayList<GlusterBrickEntity> list = new ArrayList<GlusterBrickEntity>(); for (GlusterBrickEntity brick : volumeEntity.getBricks()) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getStatus() == JobExecutionStatus.STARTED) { list.add(brick); } } GlusterVolumeRemoveBricksParameters parameter = new GlusterVolumeRemoveBricksParameters(volumeEntity.getId(), list); model.startProgress(null); Frontend.RunAction(VdcActionType.CommitRemoveGlusterVolumeBricks, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); setConfirmWindow(null); } }, model); }</code><technical_language>q, progress check</technical_language>

Target:
private void onCommitRemoveBricks() { if (getConfirmWindow() == null) { return; } ConfirmationModel model = (ConfirmationModel) getConfirmWindow(); if (model.getProgress() != null) { return; } if (getSelectedItems() == null || getSelectedItems().isEmpty()) { return; } GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); GlusterAsyncTask volumeTask = volumeEntity.getAsyncTask(); ArrayList<GlusterBrickEntity> list = new ArrayList<GlusterBrickEntity>(); for (GlusterBrickEntity brick : volumeEntity.getBricks()) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getTaskId() != null && volumeTask != null && volumeTask.getStatus() == JobExecutionStatus.FINISHED) { list.add(brick); } } GlusterVolumeRemoveBricksParameters parameter = new GlusterVolumeRemoveBricksParameters(volumeEntity.getId(), list); model.startProgress(null); Frontend.RunAction(VdcActionType.CommitRemoveGlusterVolumeBricks, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); setConfirmWindow(null); } }, model); }
Source:
<code>public <T> T lookup(C criteria, F filter) { Objects.requireNonNull(criteria); T service = delegate.lookup(criteria, filter); if (service != null) { return service; } final long waitUntil = System.currentTimeMillis() + this.waitTimeMs; <START> while (service == null <END> && uptimeSupplier.get() < this.gracePeriodInMs || System.currentTimeMillis() < waitUntil) { try { Thread.sleep(this.lookupDelayMs); } catch (InterruptedException e) { LOG.error("Interrupted while waiting for service with search criteria " + criteria + " to become available in the service registry. Aborting."); return null; } service = delegate.lookup(criteria, filter); if (service != null) { return service; } } return null; }</code><technical_language>Do need service == null in clause here</technical_language>

Target:
public <T> T lookup(C criteria, F filter) { Objects.requireNonNull(criteria); T service = delegate.lookup(criteria, filter); if (service != null) { return service; } final long waitUntil = System.currentTimeMillis() + this.waitTimeMs; while (uptimeSupplier.get() < this.gracePeriodInMs || System.currentTimeMillis() < waitUntil) { try { Thread.sleep(this.lookupDelayMs); } catch (InterruptedException e) { LOG.error("Interrupted while waiting for service with search criteria " + criteria + " to become available in the service registry. Aborting."); return null; } service = delegate.lookup(criteria, filter); if (service != null) { return service; } } return null; }
Source:
<code>private Bundle getAuthTokenFromAccountManager(final AuthenticationRequest request, final Bundle requestBundle) throws AuthenticationException { final Account targetAccount = getTargetAccount(request); Bundle bundleResult = null; if (targetAccount != null) { try { final AccountManagerFuture<Bundle> result = mAcctManager.getAuthToken(targetAccount, AuthenticationConstants.Broker.AUTHTOKEN_TYPE, requestBundle, false, null, mHandler); Logger.v(TAG, "Received result from broker"); bundleResult = result.getResult(); } catch (OperationCanceledException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.AUTH_FAILED_CANCELLED, e); } catch (AuthenticatorException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING); <START> if (!StringExtensions.isNullOrBlank(e.getMessage()) && e.getMessage().contains(ADALError.DEVICE_CONNECTION_IS_NOT_AVAILABLE.toString())) { <END> throw new AuthenticationException(ADALError.DEVICE_CONNECTION_IS_NOT_AVAILABLE, e.getMessage()); } } catch (IOException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.BROKER_AUTHENTICATOR_IO_EXCEPTION); } Logger.v(TAG, "Returning result from broker"); return bundleResult; } else { Logger.v(TAG, "Target account is not found"); } return null; }</code><technical_language>if I acquireToken call token in broker cache? acquireToken call PromptBehavior Force_prompt</technical_language>

Target:
private Bundle getAuthTokenFromAccountManager(final AuthenticationRequest request, final Bundle requestBundle) throws AuthenticationException { final Account targetAccount = getTargetAccount(request); Bundle bundleResult = null; if (targetAccount != null) { try { final AccountManagerFuture<Bundle> result = mAcctManager.getAuthToken(targetAccount, AuthenticationConstants.Broker.AUTHTOKEN_TYPE, requestBundle, false, null, mHandler); Logger.v(TAG, "Received result from broker"); bundleResult = result.getResult(); } catch (OperationCanceledException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.AUTH_FAILED_CANCELLED, e); } catch (AuthenticatorException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING); } catch (IOException e) { Logger.e(TAG, AUTHENTICATOR_CANCELS_REQUEST, "", ADALError.BROKER_AUTHENTICATOR_IO_EXCEPTION); } Logger.v(TAG, "Returning result from broker"); return bundleResult; } else { Logger.v(TAG, "Target account is not found"); } return null; }
Source:
<code>private static OutputFormat<BaseRow> createEncoderOutputFormat( Encoder<BaseRow> encoder, Path path) { return new OutputFormat<BaseRow>() { <START> private FSDataOutputStream output; <END> @Override public void configure(Configuration parameters) { } @Override public void open(int taskNumber, int numTasks) throws IOException { this.output = path.getFileSystem() .create(path, FileSystem.WriteMode.OVERWRITE); } @Override public void writeRecord(BaseRow record) throws IOException { encoder.encode(record, output); } @Override public void close() throws IOException { this.output.flush(); this.output.close(); } }; }</code><technical_language>Add a serialVersionUID</technical_language>

Target:
private static OutputFormat<BaseRow> createEncoderOutputFormat( Encoder<BaseRow> encoder, Path path) { return new OutputFormat<BaseRow>() { private static final long serialVersionUID = 1L; private transient FSDataOutputStream output; @Override public void configure(Configuration parameters) { } @Override public void open(int taskNumber, int numTasks) throws IOException { this.output = path.getFileSystem() .create(path, FileSystem.WriteMode.OVERWRITE); } @Override public void writeRecord(BaseRow record) throws IOException { encoder.encode(record, output); } @Override public void close() throws IOException { this.output.flush(); this.output.close(); } }; }
Source:
<code>public void testDuplicateClientIdSet() throws Exception { ActiveMQConnectionFactory activeMQConnectionFactory = (ActiveMQConnectionFactory) cf; Connection con = cf.createConnection(); Connection con2 = cf.createConnection(); try { con.setClientID("valid"); con2.setClientID("valid"); fail("Should have failed for duplicate clientId"); <START> } catch (Exception e) { <END> assertEquals(1, duplicateCount.get()); throw e; } finally { activeMQConnectionFactory.close(); } }</code><technical_language>this test explicit exception type is thrown exception. fail if unexpectes exception is thrown</technical_language>

Target:
public void testDuplicateClientIdSet() throws Exception { ActiveMQConnectionFactory activeMQConnectionFactory = (ActiveMQConnectionFactory) cf; Connection con = cf.createConnection(); Connection con2 = cf.createConnection(); try { con.setClientID("valid"); con2.setClientID("valid"); fail("Should have failed for duplicate clientId"); } catch (InvalidClientIDException e) { assertEquals(1, duplicateCount.get()); } finally { activeMQConnectionFactory.close(); } }
Source:
<code>public void validate_shouldFailValidationIfVisitDateBeforeBirthDate() { <START> VisitService vs = Context.getVisitService(); <END> Visit visit = new Visit(); visit.setVisitType(vs.getVisitType(1)); visit.setPatient(Context.getPatientService().getPatient(2)); Calendar c = Calendar.getInstance(); c.set(1974, 4, 8); visit.setStartDatetime(c.getTime()); Errors errors = new BindException(visit, "visit"); new VisitValidator().validate(visit, errors); assertTrue(errors.hasFieldErrors("startDatetime")); }</code><technical_language>test class field visitService</technical_language>

Target:
public void validate_shouldFailValidationIfVisitDateBeforeBirthDate() { Visit visit = new Visit(); Patient patient = new Patient(); calendar.set(1974, 4, 8); patient.setBirthdate(calendar.getTime()); patient.setBirthdateEstimated(false); visit.setPatient(patient); calendar.set(1974, 4, 7); visit.setStartDatetime(calendar.getTime()); Errors errors = new BindException(visit, "visit"); new VisitValidator().validate(visit, errors); assertThat(errors, hasFieldErrors("startDatetime", "Visit.startDateCannotFallBeforeTheBirthDateOfTheSamePatient")); }
Source:
<code>public void startUp() { cacheManager = TestCacheManagerFactory.createCacheManager(hotRodCacheConfiguration()); assertEquals(cacheManager.getCache().size(), 0); <START> TestingUtil.registerTranscoders(cacheManager, new ProtostreamBinaryTranscoder()); <END> hotRodServer = HotRodTestingUtil.startHotRodServer(cacheManager, 19711); }</code><technical_language>surprised server do this</technical_language>

Target:
public void startUp() { cacheManager = TestCacheManagerFactory.createCacheManager(hotRodCacheConfiguration()); assertEquals(cacheManager.getCache().size(), 0); hotRodServer = HotRodTestingUtil.startHotRodServer(cacheManager, 19711); }
Source:
<code>private ClientCnxnSocket getClientCnxnSocket() throws IOException { String clientCnxnSocketName = getClientConfig().getProperty(ZKClientConfig.ZOOKEEPER_CLIENT_CNXN_SOCKET); if (clientCnxnSocketName == null) { clientCnxnSocketName = ClientCnxnSocketNIO.class.getName(); } try { Constructor<?> clientCxnConstructor = Class.forName(clientCnxnSocketName).getDeclaredConstructor(ZKClientConfig.class); ClientCnxnSocket clientCxnSocket = (ClientCnxnSocket) clientCxnConstructor.newInstance(getClientConfig()); return clientCxnSocket; } catch (Exception e) { <START> IOException ioe = new IOException("Couldn't instantiate " + clientCnxnSocketName, e); <END> throw ioe; } }</code><technical_language>nit: throw new IOException...</technical_language>

Target:
private ClientCnxnSocket getClientCnxnSocket() throws IOException { String clientCnxnSocketName = getClientConfig().getProperty(ZKClientConfig.ZOOKEEPER_CLIENT_CNXN_SOCKET); if (clientCnxnSocketName == null) { clientCnxnSocketName = ClientCnxnSocketNIO.class.getName(); } try { Constructor<?> clientCxnConstructor = Class.forName(clientCnxnSocketName) .getDeclaredConstructor(ZKClientConfig.class); ClientCnxnSocket clientCxnSocket = (ClientCnxnSocket) clientCxnConstructor.newInstance(getClientConfig()); return clientCxnSocket; } catch (Exception e) { throw new IOException("Couldn't instantiate " + clientCnxnSocketName, e); } }
Source:
<code>public int compare(ItemStack o1, ItemStack o2) { <START> List<DataManipulator<?, ?>> manipulators = Lists.newArrayList(o2.getContainers()); <END> for (final DataManipulator<?, ?> manipulator : o1.getContainers()) { if (manipulators.contains(manipulator)) { manipulators.remove(manipulator); } else if (!isIgnored(manipulators, manipulator)) { return -1; } } return manipulators.size(); }</code><technical_language>for here. a LinkedHashSet need check in a set conditionally</technical_language>

Target:
public int compare(ItemStack o1, ItemStack o2) { Set<DataManipulator<?, ?>> manipulators = new LinkedHashSet<>(o2.getContainers()); for (final DataManipulator<?, ?> manipulator : o1.getContainers()) { if (manipulators.contains(manipulator)) { manipulators.remove(manipulator); } else if (!isIgnored(manipulators, manipulator)) { return -1; } } return manipulators.size(); }
Source:
<code>public StateTransitionException failed(Throwable t) { <START> if (st.done()) { <END> return null; } st.failed(); if (t == null) { return null; } logger.error("{} failed.", action); if(t instanceof StateTransitionException) { return (StateTransitionException) t; } return new StateTransitionException(t); }</code><technical_language>This condition feels wrong - linked Throwable null not</technical_language>

Target:
public StateTransitionException failed(Throwable t) { if (st.done()) { if (t != null) { throw new AssertionError("Throwable cannot be null if Transition is done."); } return null; } st.failed(); if (t == null) { return null; } logger.error("{} failed.", action); if(t instanceof StateTransitionException) { return (StateTransitionException) t; } return new StateTransitionException(t); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest)request; HttpServletResponse res = (HttpServletResponse)response; if (FiltersHelper.isAuthenticated(req)) { chain.doFilter(request, response); } else { @SuppressWarnings("unchecked") List<String> schemes = (List<String>) req.getAttribute(FiltersHelper.Constants.REQUEST_SCHEMES_KEY); if (schemes == null) { schemes = Collections.emptyList(); } Set<String> allSchemes = new HashSet<>(schemes); if (additionalSchemes != null) { allSchemes.addAll(additionalSchemes); } for (String scheme: allSchemes) { res.setHeader(FiltersHelper.Constants.HEADER_WWW_AUTHENTICATE, scheme); } if (req.getContextPath().endsWith("/api")) { req.setAttribute(SessionConstants.SSO_AUTHENTICATION_ERR, Boolean.TRUE); req.getRequestDispatcher(String.format(ERROR_URL_FORMAT, <START> req.getAttribute(SessionConstants.SSO_AUTHENTICATION_ERR_MSG))).forward(req, <END> res); } else { res.sendError(HttpServletResponse.SC_UNAUTHORIZED); } } }</code><technical_language>This URL encoded adding URL</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest)request; HttpServletResponse res = (HttpServletResponse)response; if (FiltersHelper.isAuthenticated(req)) { chain.doFilter(request, response); } else { @SuppressWarnings("unchecked") List<String> schemes = (List<String>) req.getAttribute(FiltersHelper.Constants.REQUEST_SCHEMES_KEY); if (schemes == null) { schemes = Collections.emptyList(); } Set<String> allSchemes = new HashSet<>(schemes); if (additionalSchemes != null) { allSchemes.addAll(additionalSchemes); } for (String scheme: allSchemes) { res.setHeader(FiltersHelper.Constants.HEADER_WWW_AUTHENTICATE, scheme); } String errMsg = (String) req.getAttribute(SessionConstants.SSO_AUTHENTICATION_ERR_MSG); if (StringUtils.isEmpty(errMsg)) { res.sendError(HttpServletResponse.SC_UNAUTHORIZED); } else { res.sendError(HttpServletResponse.SC_UNAUTHORIZED, errMsg); } } }
Source:
<code>protected List<EmailWrapper> prepareMailToBeSent() { <START> FeedbackSessionAttributes feedbackObject = FeedbackSessionsLogic.inst() <END> .getFeedbackSession(feedbackSessionName, courseId); log.info("Fetching feedback session object for feedback session name : " + feedbackSessionName + " and course : " + courseId); if (feedbackObject == null) { log.severe("Feedback session object for feedback session name : " + feedbackSessionName + " for course : " + courseId + " could not be fetched"); return null; } return new EmailGenerator().generateFeedbackSessionUnpublishedEmails(feedbackObject); }</code><technical_language>name this feedbackSession instead of feedbackObject</technical_language>

Target:
protected List<EmailWrapper> prepareMailToBeSent() { FeedbackSessionAttributes feedbackSession = FeedbackSessionsLogic.inst() .getFeedbackSession(feedbackSessionName, courseId); if (feedbackSession == null) { log.severe("Feedback session object for feedback session name : " + feedbackSessionName + " for course : " + courseId + " could not be fetched while sending unpublished emails"); return null; } return new EmailGenerator().generateFeedbackSessionUnpublishedEmails(feedbackSession); }
Source:
<code>public static Option startRowOpt() { <START> final Option o = new Option(START_ROW_OPT, "begin-row", true, "begin row (NOT) inclusive"); <END> o.setArgName("begin-row"); return o; }</code><technical_language>Parens "(NOT inclusive)" instead of "(NOT)". Personally, I prefer "(exclusive)"</technical_language>

Target:
public static Option startRowOpt() { final Option o = new Option(START_ROW_OPT, "begin-row", true, "begin row (exclusive)"); o.setArgName("begin-row"); return o; }
Source:
<code>public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("display"); description.addProperty("uuid"); description.addProperty("allergyId"); description.addProperty("allergen"); description.addProperty("severity"); description.addProperty("comment"); <START> description.addProperty("reactions"); <END> description.addProperty("patient"); description.addSelfLink(); description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("display"); description.addProperty("uuid"); description.addProperty("allergyId"); description.addProperty("allergen"); description.addProperty("severity"); description.addProperty("comment"); description.addProperty("reactions"); description.addProperty("patient"); description.addProperty("voided"); description.addProperty("auditInfo"); description.addSelfLink(); return description; } return null; }</code><technical_language>reactions REF representation</technical_language>

Target:
public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("display"); description.addProperty("uuid"); description.addProperty("allergen", rep); description.addProperty("severity", rep); description.addProperty("comment", rep); description.addProperty("reactions", rep); description.addProperty("patient", rep); description.addSelfLink(); description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("display"); description.addProperty("uuid"); description.addProperty("allergen", rep); description.addProperty("severity", rep); description.addProperty("comment", rep); description.addProperty("reactions", rep); description.addProperty("patient", rep); description.addProperty("voided"); description.addProperty("auditInfo"); description.addSelfLink(); return description; } return null; }
Source:
<code>public boolean isMember(User user) { if (user == null || user.getPerson() == null) { return false; } <START> return new ActivePhdProcessesGroup().isMember(user) || (user.getPerson().getStudent() != null && user.getPerson() <END> .getStudent().hasActiveRegistrations()); }</code><technical_language>more PHD students PHD students, switching order of || improve performance</technical_language>

Target:
public boolean isMember(User user) { if (user == null || user.getPerson() == null) { return false; } return (user.getPerson().getStudent() != null && user.getPerson().getStudent().hasActiveRegistrations()) || new ActivePhdProcessesGroup().isMember(user); }
Source:
<code>public boolean act(float delta) { if (firstStart) { firstStart = false; webConnection = webConnectionFactory.getWebConnection(url, this); <START> boolean successfullyAddedConnection = StageActivity.webConnectionHolder.addConnectionToList(webConnection); <END> if (!successfullyAddedConnection) { userVariable.setValue(ERROR_TOO_MANY_REQUESTS); return true; } boolean successfullySentWebRequest = webConnection.sendWebRequest(); if (!successfullySentWebRequest) { StageActivity.webConnectionHolder.removeConnectionFromList(webConnection); userVariable.setValue(ERROR_BAD_REQUEST); return true; } } if (isRequestFinished) { userVariable.setValue(response); StageActivity.webConnectionHolder.removeConnectionFromList(webConnection); return true; } time += delta; if (time >= TIMEOUT_DURATION) { userVariable.setValue(ERROR_TIMEOUT); StageActivity.webConnectionHolder.removeConnectionFromList(webConnection); return true; } return false; }</code><technical_language>webconnection doesnt care implementational details in webconnection holder. if a list, set, single reference difference here. share this information in method name? addConnection is sufficient, easier read</technical_language>

Target:
public boolean act(float delta) { if (userVariable == null) { return true; } if (requestStatus == NOT_SENT) { requestStatus = WAITING; webConnection = webConnectionFactory.createWebConnection(url, this); if (!StageActivity.stageListener.webConnectionHolder.addConnection(webConnection)) { userVariable.setValue(ERROR_TOO_MANY_REQUESTS); return true; } webConnection.sendWebRequest(); } if (requestStatus == FINISHED) { userVariable.setValue(response); StageActivity.stageListener.webConnectionHolder.removeConnection(webConnection); return true; } return false; }
Source:
<code>public void testRoles() { final String roles = "[role1, role2, role with space]"; final AuthenticationInfo authenticationInfo = new AuthenticationInfo("foo", roles, "bar"); assertEquals(authenticationInfo.getRoles(), <START> new ArrayList<>(Arrays.asList("role1", "role2", "role with space"))); <END> }</code><technical_language>Minor. Switch left right. left expected, right is actual</technical_language>

Target:
public void testRoles() { final String roles = "[role1, role2, role with space]"; final AuthenticationInfo authenticationInfo = new AuthenticationInfo("foo", roles, "bar"); assertEquals( new ArrayList<>(Arrays.asList("role1", "role2", "role with space")), authenticationInfo.getRoles()); }
Source:
<code>private boolean shouldRequireClientSaslAuth() { <START> String sessionRequireClientSASLAuth = System.getProperty("zookeeper.sessionRequireClientSASLAuth"); <END> if (sessionRequireClientSASLAuth == null) { return false; } else { return sessionRequireClientSASLAuth.equals("true"); } }</code><technical_language>sample system property once? (At boot for instance). hot write/read path reading system properties treated a slow operation. a blocker</technical_language>

Target:
private static boolean shouldRequireClientSaslAuth() { return Boolean.getBoolean(SESSION_REQUIRE_CLIENT_SASL_AUTH); }
Source:
<code>public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (!(getActivity() instanceof PhoneActivity)) { throw new IllegalStateException("Activity must implement PhoneVerificationHandler"); } mVerifier = (PhoneActivity) getActivity(); if (savedInstanceState != null) { return; } Bundle params = getArguments().getBundle(ExtraConstants.PARAMS); <START> List<String> whitelistedCountryCodes = null; <END> List<String> blacklistedCountryCodes = null; String phone = null; String countryIso = null; String nationalNumber = null; if (params != null) { phone = params.getString(ExtraConstants.PHONE); countryIso = params.getString(ExtraConstants.COUNTRY_ISO); nationalNumber = params.getString(ExtraConstants.NATIONAL_NUMBER); } if (!TextUtils.isEmpty(countryIso) && !TextUtils.isEmpty(nationalNumber)) { PhoneNumber phoneNumber = PhoneNumberUtils.getPhoneNumber(countryIso, nationalNumber); setPhoneNumber(phoneNumber); setCountryCode(phoneNumber); } else if (!TextUtils.isEmpty(countryIso)) { setCountryCode(new PhoneNumber( "", countryIso, String.valueOf(PhoneNumberUtils.getCountryCode(countryIso)))); } else if (!TextUtils.isEmpty(phone)) { PhoneNumber phoneNumber = PhoneNumberUtils.getPhoneNumber(phone); setPhoneNumber(phoneNumber); setCountryCode(phoneNumber); } else if (getFlowParams().enableHints) { showPhoneAutoCompleteHint(); } }</code><technical_language>I variables used</technical_language>

Target:
public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (!(getActivity() instanceof PhoneActivity)) { throw new IllegalStateException("Activity must implement PhoneVerificationHandler"); } mVerifier = (PhoneActivity) getActivity(); if (savedInstanceState != null) { return; } Bundle params = getArguments().getBundle(ExtraConstants.PARAMS); String phone = null; String countryIso = null; String nationalNumber = null; if (params != null) { phone = params.getString(ExtraConstants.PHONE); countryIso = params.getString(ExtraConstants.COUNTRY_ISO); nationalNumber = params.getString(ExtraConstants.NATIONAL_NUMBER); } if (!TextUtils.isEmpty(countryIso) && !TextUtils.isEmpty(nationalNumber)) { PhoneNumber phoneNumber = PhoneNumberUtils.getPhoneNumber(countryIso, nationalNumber); setPhoneNumber(phoneNumber); setCountryCode(phoneNumber); } else if (!TextUtils.isEmpty(countryIso)) { setCountryCode(new PhoneNumber( "", countryIso, String.valueOf(PhoneNumberUtils.getCountryCode(countryIso)))); } else if (!TextUtils.isEmpty(phone)) { PhoneNumber phoneNumber = PhoneNumberUtils.getPhoneNumber(phone); setPhoneNumber(phoneNumber); setCountryCode(phoneNumber); } else if (getFlowParams().enableHints) { showPhoneAutoCompleteHint(); } }
Source:
<code>public void shouldFailGettingCreatedCoupaInstance() throws Exception { onRequest() .havingMethodEqualTo("POST") .havingPathEqualTo("/gdc/projects/PROJECT_ID/connectors/coupa/integration/config/settings/instances") .respond() .withStatus(201) .withBody("{\"uri\":\"/coupa/instance/uri/123\"}"); onRequest() .havingMethodEqualTo("GET") .havingPathEqualTo("/coupa/instance/uri/123") .respond() .withStatus(404); <START> <END> connectors.createCoupaInstance(project, new CoupaInstance("i1", "url", "key")); }</code><technical_language>why? this default</technical_language>

Target:
public void shouldFailGettingCreatedCoupaInstance() throws Exception { onRequest() .havingMethodEqualTo("POST") .havingPathEqualTo("/gdc/projects/PROJECT_ID/connectors/coupa/integration/config/settings/instances") .respond() .withStatus(201) .withBody("{\"uri\":\"/gdc/projects/PROJECT_ID/connectors/coupa/integration/config/settings/instances/123\"}"); onRequest() .havingMethodEqualTo("GET") .havingPathEqualTo("/gdc/projects/PROJECT_ID/connectors/coupa/integration/config/settings/instances/123") .respond() .withStatus(404); connectors.createCoupaInstance(project, new CoupaInstance("i1", "url", "key")); }
Source:
<code>public AbstractDifferenceFilter() { super(); <START> setPredicateWhenSelected(); <END> setPredicateWhenUnselected(); }</code><technical_language>call setPredicateWhenSelected in constructor. I prefer override getPredicateWhen{Selected/Unselected} in concrete class</technical_language>

Target:
public AbstractDifferenceFilter() { super(); }
Source:
<code>private ResponseHandler<Object> getImageResponseHandler(final String filename, final ArchiveCompression compression) throws FileNotFoundException { return new ResponseHandler<Object>() { @Override public Object handleResponse(HttpResponse response) throws IOException { try (InputStream stream = response.getEntity().getContent(); OutputStream out = compression.wrapOutputStream(new FileOutputStream(filename))) { <START> IOUtils.copy(stream, out, 65536); <END> } return null; } }; }</code><technical_language>refactor buffersizes constants</technical_language>

Target:
private ResponseHandler<Object> getImageResponseHandler(final String filename, final ArchiveCompression compression) throws FileNotFoundException { return new ResponseHandler<Object>() { @Override public Object handleResponse(HttpResponse response) throws IOException { try (InputStream stream = response.getEntity().getContent(); OutputStream out = compression.wrapOutputStream(new FileOutputStream(filename))) { IOUtils.copy(stream, out, COPY_BUFFER_SIZE); } return null; } }; }
Source:
<code>private void writeBack() { ArrayList<CacheObject> list = cache.getAllChanged(); Collections.sort(list); for (CacheObject aList : list) { <START> writeBack(aList); <END> } }</code><technical_language>auto-generated names of variables</technical_language>

Target:
private void writeBack() { ArrayList<CacheObject> list = cache.getAllChanged(); Collections.sort(list); for (CacheObject cacheObject : list) { writeBack(cacheObject); } }
Source:
<code>private void reset() throws Exception { if ( (client.getState() == CuratorFrameworkState.STARTED) && (state.get() == State.STARTED) ) { BackgroundCallback backgroundCallback = new BackgroundCallback() { @Override public void processResult(CuratorFramework client, CuratorEvent event) throws Exception { outstanding.decrementAndGet(); if ( (event.getType() == CuratorEventType.GET_CONFIG) && (event.getResultCode() == KeeperException.Code.OK.intValue()) ) { processConfigData(event.getData()); } } }; outstanding.incrementAndGet(); try { client.getConfig().usingWatcher(this).inBackground(backgroundCallback).forEnsemble(); } catch ( Exception e ) { outstanding.decrementAndGet(); throw e; <START> } <END> } }</code><technical_language>formulate this as: outstanding.incrementAndGet(); try { client.getConfig().usingWatcher(this).inBackground(backgroundCallback).forEnsemble(); outstanding.incrementAndGet(); } finally { outstanding.decrementAndGet(); }</technical_language>

Target:
private void reset() throws Exception { if ( (client.getState() == CuratorFrameworkState.STARTED) && (state.get() == State.STARTED) ) { BackgroundCallback backgroundCallback = new BackgroundCallback() { @Override public void processResult(CuratorFramework client, CuratorEvent event) throws Exception { outstanding.decrementAndGet(); if ( (event.getType() == CuratorEventType.GET_CONFIG) && (event.getResultCode() == KeeperException.Code.OK.intValue()) ) { processConfigData(event.getData()); } } }; outstanding.incrementAndGet(); try { client.getConfig().usingWatcher(this).inBackground(backgroundCallback).forEnsemble(); outstanding.incrementAndGet(); } finally { outstanding.decrementAndGet(); } } }
Source:
<code>void verifyModel() { ModelVerifier verifier = new ModelVerifier(project); verify(project).getSubprojects(); <START> String commandHandlerTypeName = ModelVerifierTestEnv.AnyCommandHandler.class.getName(); <END> String aggregateTypeName = ModelVerifierTestEnv.Int32HandlerAggregate.class.getName(); String procManTypeName = ModelVerifierTestEnv.Int64HandlerProcMan.class.getName(); CommandHandlers spineModel = CommandHandlers.newBuilder() .addCommandHandlingTypes(commandHandlerTypeName) .addCommandHandlingTypes(aggregateTypeName) .addCommandHandlingTypes(procManTypeName) .build(); verifier.verify(spineModel); }</code><technical_language>Please static import for nested classes</technical_language>

Target:
void verifyModel() { ModelVerifier verifier = new ModelVerifier(project); verify(project).getSubprojects(); String commandHandlerTypeName = AnyCommandHandler.class.getName(); String aggregateTypeName = Int32HandlerAggregate.class.getName(); String procManTypeName = Int64HandlerProcMan.class.getName(); CommandHandlers spineModel = CommandHandlers.newBuilder() .addCommandHandlingTypes(commandHandlerTypeName) .addCommandHandlingTypes(aggregateTypeName) .addCommandHandlingTypes(procManTypeName) .build(); verifier.verify(spineModel); }