auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static int encode(final Car car, final UnsafeBuffer directBuffer, final int bufferOffset) { final int srcOffset = 0; car.wrapForEncode(directBuffer, bufferOffset) .serialNumber(1234) .modelYear(2013) .available(BooleanType.TRUE) .code(Model.A) <START> .putVehicleCode(new String(VEHICLE_CODE)); <END> for (int i = 0, size = Car.someNumbersLength(); i < size; i++) { car.someNumbers(i, i); } car.extras() .clear() .cruiseControl(true) .sportsPack(true) .sunRoof(false); car.engine() .capacity(2000) .numCylinders((short)4) .putManufacturerCode(new String(MANUFACTURER_CODE)); car.fuelFiguresCount(3) .next().speed(30).mpg(35.9f) .next().speed(55).mpg(49.0f) .next().speed(75).mpg(40.0f); final Car.PerformanceFigures perfFigures = car.performanceFiguresCount(2); perfFigures.next() .octaneRating((short)95) .accelerationCount(3) .next().mph(30).seconds(4.0f) .next().mph(60).seconds(7.5f) .next().mph(100).seconds(12.2f); perfFigures.next() .octaneRating((short)99) .accelerationCount(3) .next().mph(30).seconds(3.8f) .next().mph(60).seconds(7.1f) .next().mph(100).seconds(11.8f); car.make(new String(MAKE)); car.putModel(MODEL, srcOffset, MODEL.length); return car.size(); }</code><technical_language>example show difference Strings raw byte arrays. Strings more usable introduce garbage. in HFT want applications garbage free avoid subsequent pauses</technical_language>

Target:
public static int encode(final Car car, final UnsafeBuffer directBuffer, final int bufferOffset) { final int srcOffset = 0; car.wrapForEncode(directBuffer, bufferOffset) .serialNumber(1234) .modelYear(2013) .available(BooleanType.TRUE) .code(Model.A) .putVehicleCode(VEHICLE_CODE, srcOffset); for (int i = 0, size = Car.someNumbersLength(); i < size; i++) { car.someNumbers(i, i); } car.extras() .clear() .cruiseControl(true) .sportsPack(true) .sunRoof(false); car.engine() .capacity(2000) .numCylinders((short)4) .putManufacturerCode(MANUFACTURER_CODE, srcOffset); car.fuelFiguresCount(3) .next().speed(30).mpg(35.9f) .next().speed(55).mpg(49.0f) .next().speed(75).mpg(40.0f); final Car.PerformanceFigures perfFigures = car.performanceFiguresCount(2); perfFigures.next() .octaneRating((short)95) .accelerationCount(3) .next().mph(30).seconds(4.0f) .next().mph(60).seconds(7.5f) .next().mph(100).seconds(12.2f); perfFigures.next() .octaneRating((short)99) .accelerationCount(3) .next().mph(30).seconds(3.8f) .next().mph(60).seconds(7.1f) .next().mph(100).seconds(11.8f); car.make(new String(MAKE)); car.putModel(MODEL, srcOffset, MODEL.length); return car.size(); }
Source:
<code>private void stopParserThreads() { <START> for (ParserThread thread : parserThreads) { <END> if (thread.isRunning()) { LOG.debug("Stopping Thread " + thread.getName()); thread.stopParser(); } } }</code><technical_language>clear list too, references threads longer needed (ideally thread/parser remove done too)</technical_language>

Target:
private void stopParserThreads() { synchronized (parserThreads) { for (ParserThread thread : parserThreads) { if (thread.isRunning()) { LOG.debug("Stopping Thread " + thread.getName()); thread.stopParser(); } } } parserThreads.clear(); }
Source:
<code>public void setUp() throws Exception { l1adminUser = "admin"; l1adminPassword = System.getProperty("admin_password"); loginPage = new LoginPage(driver); homePage = new HomePage(driver); participantPage = new ParticipantPage(driver); participantEditPage = new ParticipantEditPage(driver); <START> if (homePage.expectedUrlPath() != currentPage().urlPath()) { <END> loginPage.login(l1adminUser , l1adminPassword); } }</code><technical_language>compare Strings "!=" "==", equals methods instead if strings null org.apache.commons.lang.StringUtils.equals</technical_language>

Target:
public void setUp() throws Exception { l1adminUser = "admin"; l1adminPassword = System.getProperty("admin_password"); loginPage = new LoginPage(driver); homePage = new HomePage(driver); participantPage = new ParticipantPage(driver); participantEditPage = new ParticipantEditPage(driver); if (!StringUtils.equals(homePage.expectedUrlPath(), currentPage().urlPath())) { loginPage.login(l1adminUser , l1adminPassword); } }
Source:
<code>private static KafkaProducer<String, String> buildProducer(final Map<String, Object> kafkaConfig) { <START> kafkaConfig.putIfAbsent("batch.num.messages", 100); <END> kafkaConfig.putIfAbsent("compression.codec", "snappy"); kafkaConfig.putIfAbsent("message.max.bytes", 1000000); kafkaConfig.putIfAbsent("receive.message.max.bytes", 100000000); kafkaConfig.putIfAbsent("session.timeout.ms", 30000); kafkaConfig.putIfAbsent("socket.timeout.ms", 60000); kafkaConfig.putIfAbsent("queue.buffering.max.messages", 100000); kafkaConfig.putIfAbsent("queue.buffering.max.kbytes", 1048576); kafkaConfig.putIfAbsent("queue.buffering.max.ms", 1000); kafkaConfig.putIfAbsent("message.send.max.retries", 2); kafkaConfig.putIfAbsent("retry.backoff.ms", 100); return new KafkaProducer<>(kafkaConfig, new StringSerializer(), new StringSerializer()); }</code><technical_language>Kafka client library constants for strings, nice those</technical_language>

Target:
private static KafkaProducer<String, String> buildProducer(final Map<String, Object> kafkaConfig) { kafkaConfig.putIfAbsent(ProducerConfig.BATCH_SIZE_CONFIG, 100); kafkaConfig.putIfAbsent(ProducerConfig.COMPRESSION_TYPE_CONFIG, "snappy"); kafkaConfig.putIfAbsent(ProducerConfig.MAX_REQUEST_SIZE_CONFIG, 1000000); kafkaConfig.putIfAbsent(ProducerConfig.RETRIES_CONFIG, 2); kafkaConfig.putIfAbsent(ProducerConfig.RETRY_BACKOFF_MS_CONFIG, 100); return new KafkaProducer<>(kafkaConfig, new StringSerializer(), new StringSerializer()); }
Source:
<code>private UpsertOptions buildUpsertOptions() { final UpsertOptions options = UpsertOptions.upsertOptions(); if (persistTo != PersistTo.NONE || replicateTo != ReplicateTo.NONE) { options.durability(persistTo, replicateTo); } else if (durabilityLevel != DurabilityLevel.NONE) { options.durability(durabilityLevel); } <START> if (expiry != null && ! expiry.equals( Duration.ofSeconds(0))) { <END> options.expiry(expiry); } else if (domainType.isAnnotationPresent(Document.class)) { Document documentAnn = domainType.getAnnotation(Document.class); long durationSeconds = documentAnn.expiryUnit().toSeconds(documentAnn.expiry()); options.expiry(Duration.ofSeconds(durationSeconds)); } return options; }</code><technical_language>Nit: Duration.ZERO;</technical_language>

Target:
private UpsertOptions buildUpsertOptions() { final UpsertOptions options = UpsertOptions.upsertOptions(); if (persistTo != PersistTo.NONE || replicateTo != ReplicateTo.NONE) { options.durability(persistTo, replicateTo); } else if (durabilityLevel != DurabilityLevel.NONE) { options.durability(durabilityLevel); } if (expiry != null && ! expiry.isZero()) { options.expiry(expiry); } else if (domainType.isAnnotationPresent(Document.class)) { Document documentAnn = domainType.getAnnotation(Document.class); long durationSeconds = documentAnn.expiryUnit().toSeconds(documentAnn.expiry()); options.expiry(Duration.ofSeconds(durationSeconds)); } return options; }
Source:
<code><START> public CivicApiAddress getAddressForId(String location_id) { <END> if (locationIds.get(location_id) != null) { PollingLocation location = allLocations.get(locationIds.get(location_id)); return location.address; } else if (location_id.endsWith("eab")) { if (location_id.equals("state_eab") && stateAdmin != null) { return stateAdmin.physicalAddress; } else if (location_id.equals("local_eab") && localAdmin != null) { return localAdmin.physicalAddress; } } else { Log.e("VIPTabBarActivity", "Did not find ID in hash: " + location_id); return null; } return null; }</code><technical_language>methods moved of model classes</technical_language>

Target:
public CivicApiAddress getAddressForId(String location_id) { if (locationIds.get(location_id) != null) { PollingLocation location = allLocations.get(locationIds.get(location_id)); return location.address; } else if (location_id.equals(ElectionAdministrationBody.AdminBody.STATE) && stateAdmin != null) { return stateAdmin.physicalAddress; } else if (location_id.equals(ElectionAdministrationBody.AdminBody.LOCAL) && localAdmin != null) { return localAdmin.physicalAddress; } else { Log.e("VIPTabBarActivity", "Did not find ID in hash: " + location_id); return null; } }
Source:
<code>public TableFinishNode tableDelete(SchemaTableName schemaTableName, PlanNode deleteSource, Symbol deleteRowId) { TableWriterNode.DeleteHandle deleteHandle = new TableWriterNode.DeleteHandle( new TableHandle( new ConnectorId("testConnector"), <START> new TestingMetadata.TestingTableHandle()), <END> schemaTableName ); return new TableFinishNode( idAllocator.getNextId(), exchange(e -> e .addSource(new DeleteNode( idAllocator.getNextId(), deleteSource, deleteHandle, deleteRowId, ImmutableList.of(deleteRowId) )) .addInputsSet(deleteRowId) .singleDistributionPartitioningScheme(deleteRowId) ), deleteHandle, ImmutableList.of(deleteRowId) ); }</code><technical_language>static import</technical_language>

Target:
public TableFinishNode tableDelete(SchemaTableName schemaTableName, PlanNode deleteSource, Symbol deleteRowId) { TableWriterNode.DeleteHandle deleteHandle = new TableWriterNode.DeleteHandle( new TableHandle( new ConnectorId("testConnector"), new TestingTableHandle()), schemaTableName ); return new TableFinishNode( idAllocator.getNextId(), exchange(e -> e .addSource(new DeleteNode( idAllocator.getNextId(), deleteSource, deleteHandle, deleteRowId, ImmutableList.of(deleteRowId) )) .addInputsSet(deleteRowId) .singleDistributionPartitioningScheme(deleteRowId) ), deleteHandle, ImmutableList.of(deleteRowId) ); }
Source:
<code>private void handleFileEvent(File file, String event) throws Exception { if (this.isProcessConfigFile(file)) { <START> log.info("Configuration file " + event + ": " + file); <END> scheduleReload(); } }</code><technical_language>{} placeholders instead of concatenation</technical_language>

Target:
private void handleFileEvent(File file, String event) throws Exception { if (this.isProcessConfigFile(file)) { log.info("Configuration file {}: {}", event, file); scheduleReload(); } }
Source:
<code>void peekMessagesFromSequence(MessagingEntityType entityType) { setSenderAndReceiver(entityType, TestUtils.USE_CASE_PEEK_MESSAGE_FROM_SEQUENCE, false); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, false); final int maxMessages = 2; final int fromSequenceNumber = 1; Mono.when(sendMessage(message), sendMessage(message)).block(TIMEOUT); StepVerifier.create(receiver.peekMessagesAt(maxMessages, fromSequenceNumber)) .expectNextCount(maxMessages) .verifyComplete(); <START> StepVerifier.create(receiver.receiveMessages()) <END> .assertNext(receivedMessage -> { receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); }) .assertNext(receivedMessage -> { receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); }) .thenCancel() .verify(); }</code><technical_language>this... expect receiver.receiveMessages().take(2) cancel</technical_language>

Target:
void peekMessagesFromSequence(MessagingEntityType entityType) { setSenderAndReceiver(entityType, TestUtils.USE_CASE_PEEK_MESSAGE_FROM_SEQUENCE, false); final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId, false); final int maxMessages = 2; final int fromSequenceNumber = 1; Mono.when(sendMessage(message), sendMessage(message)).block(TIMEOUT); StepVerifier.create(receiver.peekMessagesAt(maxMessages, fromSequenceNumber)) .expectNextCount(maxMessages) .verifyComplete(); StepVerifier.create(receiver.receiveMessages().take(maxMessages)) .assertNext(receivedMessage -> { receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); }) .assertNext(receivedMessage -> { receiver.complete(receivedMessage).block(Duration.ofSeconds(15)); }) .expectComplete() .verify(TIMEOUT); }
Source:
<code>public void shouldNotAssignAdminToNonExistentUser() throws Throwable { InternalFlatFileRealm realm = internalTestRealmWithUsers( Collections.singletonList( "neo4j" ), Collections.singletonList( "morpheus" ) ); exception.expect( InvalidArgumentsException.class ); exception.expectMessage( "No roles defined, and default admin user 'morpheus' does not exist. Please use `" + <START> SetDefaultAdminCommand.COMMAND_NAME + "` to select a valid admin." ); <END> realm.initialize(); realm.start(); }</code><technical_language>set-default-admin. mention this command lives in neo4j-admin</technical_language>

Target:
public void shouldNotAssignAdminToNonExistentUser() throws Throwable { InternalFlatFileRealm realm = internalTestRealmWithUsers( Collections.singletonList( "neo4j" ), Collections.singletonList( "morpheus" ) ); exception.expect( InvalidArgumentsException.class ); exception.expectMessage( "No roles defined, and default admin user 'morpheus' does not exist. Please use `neo4j-admin " + SetDefaultAdminCommand.COMMAND_NAME + "` to select a valid admin." ); realm.initialize(); realm.start(); }
Source:
<code>protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.renderer_termination_activity_title); WebkitHelpers.appendWebViewVersionToTitle(this); setContentView(R.layout.activity_renderer_termination); mWebView = findViewById(R.id.renderer_termination_webview); mStatus = findViewById(R.id.renderer_termination_status); mTerminateButton = <START> (Button) findViewById( <END> R.id.renderer_termination_terminate_button); mBlockButton = (Button) findViewById( R.id.renderer_termination_block_button); mBlockTransientButton = (Button) findViewById( R.id.renderer_termination_block_transient_button); mUnblockButton = (Button) findViewById( R.id.renderer_termination_unblock_button); recreateWebView(); if (!WebViewFeature.isFeatureSupported( WebViewFeature.WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE)) { mStatus.setText("Renderer status: unknown"); return; } mTerminateButton.setOnClickListener((View view) -> { terminateWebViewRenderer(); }); mBlockButton.setOnClickListener((View view) -> { blockWebViewRenderer(); }); mBlockTransientButton.setOnClickListener((View view) -> { blockWebViewRenderer(10000); }); mUnblockButton.setOnClickListener((View view) -> { unblockWebViewRenderer(); }); }</code><technical_language>this (and below) castings redundant</technical_language>

Target:
protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.renderer_termination_activity_title); WebkitHelpers.appendWebViewVersionToTitle(this); setContentView(R.layout.activity_renderer_termination); mWebView = findViewById(R.id.renderer_termination_webview); mStatus = findViewById(R.id.renderer_termination_status); mTerminateButton = findViewById(R.id.renderer_termination_terminate_button); mBlockButton = findViewById(R.id.renderer_termination_block_button); mBlockTransientButton = findViewById(R.id.renderer_termination_block_transient_button); mUnblockButton = findViewById(R.id.renderer_termination_unblock_button); recreateWebView(); if (!WebViewFeature.isFeatureSupported( WebViewFeature.WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE)) { mStatus.setText("API not available"); } mTerminateButton.setOnClickListener((View view) -> { terminateWebViewRenderer(); }); mBlockButton.setOnClickListener((View view) -> { blockWebViewRenderer(); }); mBlockTransientButton.setOnClickListener((View view) -> { blockWebViewRenderer(10000); }); mUnblockButton.setOnClickListener((View view) -> { unblockWebViewRenderer(); }); }
Source:
<code>private boolean recheckMerges(ProjectConfig oldCfg, ProjectConfig newCfg) { if (oldCfg == null) { return true; } else if (newCfg == null) { return <START> false; <END> } return !oldCfg.getProject().getSubmitType().equals(newCfg.getProject().getSubmitType()) || oldCfg.getProject().getUseContentMerge() != newCfg.getProject().getUseContentMerge() || (oldCfg.getRulesId() == null ? newCfg.getRulesId() != null : !oldCfg.getRulesId().equals(newCfg.getRulesId())); }</code><technical_language>return false in this case? I expect this happen, if cfg is deleted (by deleting refs/meta/config branch) default submit type applies submit type set in config. This is I return true here</technical_language>

Target:
private boolean recheckMerges(ProjectConfig oldCfg, ProjectConfig newCfg) { if (oldCfg == null || newCfg == null) { return true; } return !oldCfg.getProject().getSubmitType().equals(newCfg.getProject().getSubmitType()) || oldCfg.getProject().getUseContentMerge() != newCfg.getProject().getUseContentMerge() || (oldCfg.getRulesId() == null ? newCfg.getRulesId() != null : !oldCfg.getRulesId().equals(newCfg.getRulesId())); }
Source:
<code>private void checkIfNotMixingRhels(VDS vds, VDSGroup vdsGroup) { if (vds.getHostOs() == null) { return; } String[] hostOsInfo = vds.getHostOs().split("-"); if (hostOsInfo.length != 3) { return; } String newOsName = hostOsInfo[0].trim(); String newRelease = hostOsInfo[2].trim(); if (newOsName.equals("RHEL") || newOsName.equals("oVirt Node") || newOsName.equals("RHEV Hypervisor")) { VDS beforeRhel = vdsDao.getFirstUpRhelForVdsGroup(vdsGroup.getId()); boolean firstHostInCluster = beforeRhel == null; if (firstHostInCluster) { return; } if (beforeRhel.getHostOs() == null) { return; } String[] prevOsInfo = beforeRhel.getHostOs().split("-"); if (prevOsInfo.length != 3) { return; } String prevRelease = prevOsInfo[2].trim(); boolean addingRhel6toRhel7 = newRelease.contains("el6") && prevRelease.contains("el7"); boolean addingRhel7toRhel6 = newRelease.contains("el7") && prevRelease.contains("el6"); if (addingRhel7toRhel6 || addingRhel6toRhel7) { Map<String, String> customLogValues = new HashMap<>(); customLogValues.put("previousRhel", beforeRhel.getHostOs()); customLogValues.put("addingRhel", vds.getHostOs()); vdsNonOperational(vds, NonOperationalReason.MIXING_RHEL_VERSIONS_IN_CLUSTER, customLogValues); vds.setStatus(VDSStatus.NonOperational); <START> logAuditLogEvent(vds, customLogValues, AuditLogType.MIXING_RHEL_VERSIONS_IN_CLUSTER); <END> } } }</code><technical_language>need log manually, SetNonOperationalVdsCommand job add right case in getAuditLogTypeValue() method</technical_language>

Target:
private void checkIfNotMixingRhels(VDS vds, VDSGroup vdsGroup) { if (vds.getHostOs() == null) { return; } String[] hostOsInfo = vds.getHostOs().split("-"); if (hostOsInfo.length != 3) { return; } String newOsName = hostOsInfo[0].trim(); String newRelease = hostOsInfo[2].trim(); if (newOsName.equals("RHEL") || newOsName.equals("oVirt Node") || newOsName.equals("RHEV Hypervisor")) { VDS beforeRhel = vdsDao.getFirstUpRhelForVdsGroup(vdsGroup.getId()); boolean firstHostInCluster = beforeRhel == null; if (firstHostInCluster) { return; } if (beforeRhel.getHostOs() == null) { return; } String[] prevOsInfo = beforeRhel.getHostOs().split("-"); if (prevOsInfo.length != 3) { return; } String prevRelease = prevOsInfo[2].trim(); boolean addingRhel6toRhel7 = newRelease.contains("el6") && prevRelease.contains("el7"); boolean addingRhel7toRhel6 = newRelease.contains("el7") && prevRelease.contains("el6"); if (addingRhel7toRhel6 || addingRhel6toRhel7) { Map<String, String> customLogValues = new HashMap<>(); customLogValues.put("previousRhel", beforeRhel.getHostOs()); customLogValues.put("addingRhel", vds.getHostOs()); vdsNonOperational(vds, NonOperationalReason.MIXING_RHEL_VERSIONS_IN_CLUSTER, customLogValues); vds.setStatus(VDSStatus.NonOperational); } } }
Source:
<code>public ServiceTaskUploadFormPresenter(final ServiceTaskUploadFormView view, final Caller<ServiceTaskService> serviceTaskService, Event<NotificationEvent> notificationEvent, <START> final SyncBeanManager iocManager) { <END> this.view = view; this.serviceTaskService = serviceTaskService; this.notificationEvent = notificationEvent; view.addHideHandler(new ModalHideHandler() { @Override public void onHide(ModalHideEvent hideEvent) { iocManager.destroyBean(ServiceTaskUploadFormPresenter.this); } }); }</code><technical_language>small formatting issue</technical_language>

Target:
public ServiceTaskUploadFormPresenter(final ServiceTaskUploadFormView view, final Caller<ServiceTaskService> serviceTaskService, Event<NotificationEvent> notificationEvent, final SyncBeanManager iocManager) { this.view = view; this.serviceTaskService = serviceTaskService; this.notificationEvent = notificationEvent; this.onClose = () -> iocManager.destroyBean(ServiceTaskUploadFormPresenter.this); }
Source:
<code>public void skip() { LOG.debug(() -> "The invocation is skipped"); <START> invoked.set(true); <END> }</code><technical_language>x: rename this invokedOrSkipped</technical_language>

Target:
public void skip() { LOG.debug(() -> "The invocation is skipped"); if (!invokedOrSkipped.compareAndSet(false, true)) { fail("Chain of InvocationInterceptors called invocation multiple times instead of just once"); } delegate.skip(); }
Source:
<code>CompactionManager(String mountPath, StoreConfig storeConfig, Collection<BlobStore> stores, StorageManagerMetrics metrics, Time time) { this.mountPath = mountPath; this.storeConfig = storeConfig; this.stores = stores; this.time = time; this.metrics = metrics; if (storeConfig.storeEnableCompaction) { boolean enableTimeBasedTrigger = false; boolean enableAdminBasedTrigger = false; for (String trigger : storeConfig.storeCompactionTriggers) { switch (trigger.toLowerCase()) { case TIME_BASED_TRIGGER_NAME: enableTimeBasedTrigger = true; break; case ADMIN_BASED_TRIGGER_NAME: enableAdminBasedTrigger = true; break; default: <START> throw new IllegalArgumentException("Unrecognized trigger name: " + trigger); <END> } } compactionExecutor = new CompactionExecutor(enableTimeBasedTrigger, enableAdminBasedTrigger); try { CompactionPolicyFactory compactionPolicyFactory = Utils.getObj(storeConfig.storeCompactionPolicyFactory, storeConfig, time); compactionPolicy = compactionPolicyFactory.getCompactionPolicy(); } catch (Exception e) { throw new IllegalStateException("Error creating compaction policy using compactionPolicyFactory " + storeConfig.storeCompactionPolicyFactory); } } else { compactionExecutor = null; compactionPolicy = null; } }</code><technical_language>This switch-case handle case config is set empty string (disable triggers). In case, string split , return array of element, empty string</technical_language>

Target:
CompactionManager(String mountPath, StoreConfig storeConfig, Collection<BlobStore> stores, StorageManagerMetrics metrics, Time time) { this.mountPath = mountPath; this.storeConfig = storeConfig; this.stores = stores; this.time = time; this.metrics = metrics; if (!storeConfig.storeCompactionTriggers[0].isEmpty()) { EnumSet<Trigger> triggers = EnumSet.noneOf(Trigger.class); for (String trigger : storeConfig.storeCompactionTriggers) { triggers.add(Trigger.valueOf(trigger.toUpperCase())); } compactionExecutor = new CompactionExecutor(triggers); try { CompactionPolicyFactory compactionPolicyFactory = Utils.getObj(storeConfig.storeCompactionPolicyFactory, storeConfig, time); compactionPolicy = compactionPolicyFactory.getCompactionPolicy(); } catch (Exception e) { throw new IllegalStateException("Error creating compaction policy using compactionPolicyFactory " + storeConfig.storeCompactionPolicyFactory); } } else { compactionExecutor = null; compactionPolicy = null; } }
Source:
<code>public PagingResponse<CandidateApplicationDTO> loadApplications( @PathVariable(value = "candidateId") Long candidateId, Locale locale, @RequestParam(name = "pageNumber") Integer pageNumber, @RequestParam(name = "pageSize") Integer pageSize) { PagingResponse<CandidateApplicationDTO> candidateApplicationDTOPagingResponse = applicationsService.getApplicationsByCandidateId(candidateId, pageNumber - 1, pageSize); for (CandidateApplicationDTO candidateApplicationDTO : candidateApplicationDTOPagingResponse .getRows()) { String stateType = candidateApplicationDTO.getStateType(); stateType = messageKeyResolver.resolveMessageOrDefault(APPLICATION_STATE + stateType, stateType); <START> candidateApplicationDTO.setStateType(stateType); <END> } return candidateApplicationDTOPagingResponse; }</code><technical_language>I this is original code, is sense in creating a variable for this issue. is easier more compact way, simply: candidateApplicationDTO.setStateType(messageKeyResolver.resolveMessageOrDefault(APPLICATION_STATE + stateType, stateType));. please correct this code part</technical_language>

Target:
public PagingResponse<CandidateApplicationDTO> loadApplications( @PathVariable(value = "candidateId") Long candidateId, Locale locale, @RequestParam(name = "pageNumber") Integer pageNumber, @RequestParam(name = "pageSize") Integer pageSize) { PagingResponse<CandidateApplicationDTO> candidateApplicationDTOPagingResponse = applicationsService.getApplicationsByCandidateId(candidateId, pageNumber - 1, pageSize); for (CandidateApplicationDTO candidateApplicationDTO : candidateApplicationDTOPagingResponse .getRows()) { String stateType = candidateApplicationDTO.getStateType(); candidateApplicationDTO.setStateType( messageKeyResolver.resolveMessageOrDefault(APPLICATION_STATE + stateType, stateType)); } return candidateApplicationDTOPagingResponse; }
Source:
<code><START> public List<DataSegment> getUnusedSegmentsForInterval(final String dataSource, final Interval interval) <END> { List<DataSegment> matchingSegments = SQLMetadataSegmentManager.inReadOnlyTransaction( connector, new TransactionCallback<List<DataSegment>>() { @Override public List<DataSegment> inTransaction(final Handle handle, final TransactionStatus status) throws Exception { return handle .createQuery( String.format( "SELECT payload FROM %s WHERE dataSource = :dataSource and start >= :start and \"end\" <= :end and used = false", dbTables.getSegmentsTable() ) ) .bind("dataSource", dataSource) .bind("start", interval.getStart().toString()) .bind("end", interval.getEnd().toString()) .setFetchSize(connector.getStreamingFetchSize()) .map(ByteArrayMapper.FIRST) .fold( Lists.<DataSegment>newArrayList(), new Folder3<List<DataSegment>, byte[]>() { @Override public List<DataSegment> fold( List<DataSegment> accumulator, byte[] payload, FoldController foldController, StatementContext statementContext ) throws SQLException { try { accumulator.add(jsonMapper.readValue(payload, DataSegment.class)); return accumulator; } catch (Exception e) { throw Throwables.propagate(e); } } } ); } } ); log.info("Found %,d segments for %s for interval %s.", matchingSegments.size(), dataSource, interval); return matchingSegments; }</code><technical_language>getUnusedSegmentIntervals in SQLMetadataSegmentManager, I move this method SQLMetadataSegmentManager segment table related methods defined there</technical_language>

Target:
public List<DataSegment> getUnusedSegmentsForInterval(final String dataSource, final Interval interval) { List<DataSegment> matchingSegments = connector.inReadOnlyTransaction( new TransactionCallback<List<DataSegment>>() { @Override public List<DataSegment> inTransaction(final Handle handle, final TransactionStatus status) throws Exception { return handle .createQuery( String.format( "SELECT payload FROM %s WHERE dataSource = :dataSource and start >= :start and \"end\" <= :end and used = false", dbTables.getSegmentsTable() ) ) .setFetchSize(connector.getStreamingFetchSize()) .bind("dataSource", dataSource) .bind("start", interval.getStart().toString()) .bind("end", interval.getEnd().toString()) .map(ByteArrayMapper.FIRST) .fold( Lists.<DataSegment>newArrayList(), new Folder3<List<DataSegment>, byte[]>() { @Override public List<DataSegment> fold( List<DataSegment> accumulator, byte[] payload, FoldController foldController, StatementContext statementContext ) throws SQLException { try { accumulator.add(jsonMapper.readValue(payload, DataSegment.class)); return accumulator; } catch (Exception e) { throw Throwables.propagate(e); } } } ); } } ); log.info("Found %,d segments for %s for interval %s.", matchingSegments.size(), dataSource, interval); return matchingSegments; }
Source:
<code>public void testRenameProcessVariableForAddDomainSpecifColumns() { TaskListViewImpl taskListView = view; GridGlobalPreferences gridPreferences = new GridGlobalPreferences("test", taskListView.getInitColumns(), taskListView.getBannedColumns()); ListTable<TaskSummary> extendedPagedTable = new ListTable<TaskSummary>(gridPreferences); Set<String> set = Collections.singleton("Id"); taskListView.initColumns(extendedPagedTable); <START> assertEquals(15, extendedPagedTable.getColumnMetaList().size()); <END> assertEquals(0, extendedPagedTable.getColumnMetaList().stream() .filter(column -> column.getCaption().equals("Var_Id")) .collect(Collectors.toList()).size()); taskListView.addDomainSpecifColumns(extendedPagedTable, set); assertEquals(16, extendedPagedTable.getColumnMetaList().size()); assertEquals(1, extendedPagedTable.getColumnMetaList().stream() .filter(column -> column.getCaption().equals("Var_Id")) .collect(Collectors.toList()).size()); }</code><technical_language>@bxf12315 above, please assertThat</technical_language>

Target:
public void testRenameProcessVariableForAddDomainSpecifColumns() { GridGlobalPreferences gridPreferences = new GridGlobalPreferences("test", view.getInitColumns(), view.getBannedColumns()); ListTable<TaskSummary> extendedPagedTable = new ListTable<TaskSummary>(gridPreferences); Set<String> set = Collections.singleton("Id"); view.initColumns(extendedPagedTable); assertThat(extendedPagedTable.getColumnMetaList().stream()).extracting(c -> c.getCaption()).hasSize(15).doesNotContain("Var_Id"); view.addDomainSpecifColumns(extendedPagedTable, set); assertThat(extendedPagedTable.getColumnMetaList().stream()).extracting(c -> c.getCaption()).hasSize(16).containsOnlyOnce("Var_Id"); }
Source:
<code>public void defaultPeriodicTask() { <START> final int[] count = {0}; <END> TestScheduler scheduler = new TestScheduler(); Runnable action = new Runnable() { @Override public void run() { count[0]++; } }; Disposable d = scheduler.schedulePeriodicallyDirect(action, 100, 100, TimeUnit.MILLISECONDS); assertEquals(0, count[0]); assertFalse(d.isDisposed()); scheduler.advanceTimeBy(200, TimeUnit.MILLISECONDS); assertEquals(2, count[0]); d.dispose(); assertTrue(d.isDisposed()); scheduler.advanceTimeBy(200, TimeUnit.MILLISECONDS); assertEquals(2, count[0]); }</code><technical_language>Please change unrelated tests</technical_language>

Target:
public void defaultPeriodicTask() { final int[] count = { 0 }; TestScheduler scheduler = new TestScheduler(); Disposable d = scheduler.schedulePeriodicallyDirect(new Runnable() { @Override public void run() { count[0]++; } }, 100, 100, TimeUnit.MILLISECONDS); assertEquals(0, count[0]); assertFalse(d.isDisposed()); scheduler.advanceTimeBy(200, TimeUnit.MILLISECONDS); assertEquals(2, count[0]); d.dispose(); assertTrue(d.isDisposed()); scheduler.advanceTimeBy(200, TimeUnit.MILLISECONDS); assertEquals(2, count[0]); }
Source:
<code>public void aSetClockConfigurationActionIsPartOfABundledRequest(final Map<String, String> settings) throws Throwable { final BundleRequest request = (BundleRequest) ScenarioContext.Current().get(SCENARIO_CONTEXT_BUNDLE_REQUEST); final SetClockConfigurationRequest action = this.defaultMapper.map( SetClockConfigurationRequestDataFactory.fromParameterMap(settings), SetClockConfigurationRequest.class); new Action() { <START> }; <END> request.getActions().getActionList().add(action); this.increaseCount(SCENARIO_CONTEXT_BUNDLE_ACTIONS); }</code><technical_language>This a left-over of code</technical_language>

Target:
public void aSetClockConfigurationActionIsPartOfABundledRequest(final Map<String, String> settings) throws Throwable { final BundleRequest request = (BundleRequest) ScenarioContext.Current().get(SCENARIO_CONTEXT_BUNDLE_REQUEST); final SetClockConfigurationRequest action = this.defaultMapper.map( SetClockConfigurationRequestDataFactory.fromParameterMap(settings), SetClockConfigurationRequest.class); request.getActions().getActionList().add(action); this.increaseCount(SCENARIO_CONTEXT_BUNDLE_ACTIONS); }
Source:
<code><START> protected IAtsVersion getOrCreateVersion(AtsArtifactConfigCache cache, Artifact artifact) throws OseeCoreException { <END> String guid = artifact.getGuid(); IAtsVersion item = cache.getSoleByGuid(guid, IAtsVersion.class); if (item == null) { item = versionFactory.createVersion(artifact.getName(), guid, artifact.getHumanReadableId()); cache.cache(item); } return item; }</code><technical_language>Suggest check artifact != null</technical_language>

Target:
protected IAtsVersion getOrCreateVersion(AtsArtifactConfigCache cache, Artifact artifact) throws OseeCoreException { Conditions.checkNotNull(artifact, "artifact"); String guid = artifact.getGuid(); IAtsVersion item = cache.getSoleByGuid(guid, IAtsVersion.class); if (item == null) { item = versionFactory.createVersion(artifact.getName(), guid, artifact.getHumanReadableId()); cache.cache(item); } return item; }
Source:
<code>public static String insertId(String message, ObjectId changeId) { <START> if (message.indexOf("\nChange-Id:") > 0) <END> return message; String[] lines = message.split("\n"); int lastPattern = -1; int firstPattern = -1; for (int i = lines.length - 1; i > 0; --i) { if (issuePattern.matcher(lines[i]).matches()) { firstPattern = i; lastPattern = i; continue; } if (footerPattern.matcher(lines[i]).matches()) { lastPattern = i; continue; } if (lines[i].trim().length() == 0) { lines[i] = ""; break; } lastPattern = lines.length; break; } if (lastPattern == -1) lastPattern = lines.length; if (firstPattern == -1) firstPattern = lastPattern - 1; if (firstPattern > lastPattern) firstPattern = lastPattern - 1; StringBuilder ret = new StringBuilder(); int i = 0; for (; i <= firstPattern; ++i) { if (lines[i].length() != 0 || i > 0 && lines[i-1].length() != 0) { ret.append(lines[i]); ret.append("\n"); } } if (i == lines.length && lastPattern == lines.length) ret.append("\n"); ret.append("Change-Id: I"); ret.append(ObjectId.toString(changeId)); ret.append("\n"); for (; i < lines.length; ++i) { ret.append(lines[i]); ret.append("\n"); } return ret.toString(); }</code><technical_language>Case insensitive form is honored Gerrit Code Review commit-msg hook with. a case insensitive match too</technical_language>

Target:
public static String insertId(String message, ObjectId changeId) { if (message.indexOf("\nChange-Id:") > 0) return message; String[] lines = message.split("\n"); int footerFirstLine = lines.length; for (int i = lines.length - 1; i > 1; --i) { if (footerPattern.matcher(lines[i]).matches()) { footerFirstLine = i; continue; } if (footerFirstLine != lines.length && lines[i].length() == 0) { break; } if (footerFirstLine != lines.length && includeInFooterPattern.matcher(lines[i]).matches()) { footerFirstLine = i + 1; continue; } footerFirstLine = lines.length; break; } int insertAfter = footerFirstLine; for (int i = footerFirstLine; i < lines.length; ++i) { if (issuePattern.matcher(lines[i]).matches()) { insertAfter = i + 1; continue; } break; } StringBuilder ret = new StringBuilder(); int i = 0; for (; i < insertAfter; ++i) { ret.append(lines[i]); ret.append("\n"); } if (insertAfter == lines.length && insertAfter == footerFirstLine) ret.append("\n"); ret.append("Change-Id: I"); ret.append(ObjectId.toString(changeId)); ret.append("\n"); for (; i < lines.length; ++i) { ret.append(lines[i]); ret.append("\n"); } return ret.toString(); }
Source:
<code>public void setUp() throws Exception { File folder = testDir.directory( "folder" ); indexStorage = new PartitionedIndexStorage( directoryFactory, fileSystemRule.get(), folder, false ); <START> index = LuceneSchemaIndexBuilder.create( descriptor, Config.defaults(), directoryFactory) <END> .withIndexStorage( indexStorage ) .build(); schemaDescriptor = descriptor.schema(); }</code><technical_language>Checkstyle; missing space end there</technical_language>

Target:
public void setUp() { File folder = testDir.directory( "folder" ); indexStorage = new PartitionedIndexStorage( directoryFactory, fileSystemRule.get(), folder, false ); index = LuceneSchemaIndexBuilder.create( descriptor, Config.defaults(), directoryFactory ) .withIndexStorage( indexStorage ) .build(); schemaDescriptor = descriptor.schema(); }
Source:
<code>public DataObject dateStringToOctetString(final String date) { final ByteBuffer bb = ByteBuffer.allocate(5); final String year = date.substring(0, 2); if (NOT_SPECIFIED.equalsIgnoreCase(year)) { bb.putShort((short) 0xFFFF); } else { bb.put(Integer.valueOf(20).byteValue()); bb.put(Integer.valueOf(year).byteValue()); } final String month = date.substring(2, 4); if (NOT_SPECIFIED.equalsIgnoreCase(month)) { bb.put((byte) 0xFF); } else if (DAYLIGHT_SAVINGS_END.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else if (DAYLIGHT_SAVINGS_BEGIN.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else { <START> bb.put(Integer.valueOf(month).byteValue()); <END> } final String dayOfMonth = date.substring(4); if (NOT_SPECIFIED.equalsIgnoreCase(dayOfMonth)) { bb.put((byte) 0xFF); } else if (SECOND_LAST_DAY_OF_MONTH.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else if (LAST_DAY_OF_MONTH.equalsIgnoreCase(month)) { bb.put((byte) 0xFE); } else { bb.put(Integer.valueOf(dayOfMonth).byteValue()); } bb.put((byte) 0xFF); return DataObject.newOctetStringData(bb.array()); }</code><technical_language>Is this a more complex of stating "bb.put(Byte.parseByte(month));"</technical_language>

Target:
public DataObject dateStringToOctetString(final String date) { final ByteBuffer bb = ByteBuffer.allocate(5); final String year = date.substring(0, 2); if (NOT_SPECIFIED.equalsIgnoreCase(year)) { bb.putShort((short) 0xFFFF); } else { bb.putShort(Short.valueOf(YEAR_MILLENIAL_PART + year)); } final String month = date.substring(2, 4); if (NOT_SPECIFIED.equalsIgnoreCase(month)) { bb.put((byte) 0xFF); } else if (DAYLIGHT_SAVINGS_END.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else if (DAYLIGHT_SAVINGS_BEGIN.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else { bb.put(Byte.parseByte(month)); } final String dayOfMonth = date.substring(4); if (NOT_SPECIFIED.equalsIgnoreCase(dayOfMonth)) { bb.put((byte) 0xFF); } else if (SECOND_LAST_DAY_OF_MONTH.equalsIgnoreCase(month)) { bb.put((byte) 0xFD); } else if (LAST_DAY_OF_MONTH.equalsIgnoreCase(month)) { bb.put((byte) 0xFE); } else { bb.put(Byte.parseByte(dayOfMonth)); } bb.put((byte) 0xFF); return DataObject.newOctetStringData(bb.array()); }
Source:
<code><START> public XBee64BitAddress(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7) { <END> address = new byte[8]; address[0] = (byte) b0; address[1] = (byte) b1; address[2] = (byte) b2; address[3] = (byte) b3; address[4] = (byte) b4; address[5] = (byte) b5; address[6] = (byte) b6; address[7] = (byte) b7; }</code><technical_language>allow provide int values bigger 255 0? If no, throw IllegalArgumentException this happens</technical_language>

Target:
public XBee64BitAddress(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7) { if (b0 > 255 || b0 < 0) throw new IllegalArgumentException("B0 must be betwwen 0 and 255."); if (b1 > 255 || b1 < 0) throw new IllegalArgumentException("B1 must be betwwen 0 and 255."); if (b2 > 255 || b2 < 0) throw new IllegalArgumentException("B2 must be betwwen 0 and 255."); if (b3 > 255 || b3 < 0) throw new IllegalArgumentException("B3 must be betwwen 0 and 255."); if (b5 > 255 || b5 < 0) throw new IllegalArgumentException("B4 must be betwwen 0 and 255."); if (b5 > 255 || b5 < 0) throw new IllegalArgumentException("B5 must be betwwen 0 and 255."); if (b6 > 255 || b6 < 0) throw new IllegalArgumentException("B6 must be betwwen 0 and 255."); if (b7 > 255 || b7 < 0) throw new IllegalArgumentException("B7 must be betwwen 0 and 255."); address = new byte[8]; address[0] = (byte) b0; address[1] = (byte) b1; address[2] = (byte) b2; address[3] = (byte) b3; address[4] = (byte) b4; address[5] = (byte) b5; address[6] = (byte) b6; address[7] = (byte) b7; }
Source:
<code>private void setSorting(ConceptSearchDTO source, SolrQuery result) { if (source.getSort() != null && source.getOrder() != null) { String sortField = source.getSort() + (CASE_INSENSITIVE_FIELDS.contains(source.getSort()) ? CASE_INSENSITIVE_SUFFIX : ""); result.setSort(sortField, SolrQuery.ORDER.valueOf(source.getOrder())); <START> } <END> }</code><technical_language>I this is more readable. result.setSort( useInsensitiveFieldIfNecessary(sortField), SolrQuery.ORDER.valueOf(source.getOrder()) ); } public static String useInsensitiveFieldIfNecessary(String filed) { if (!CASE_INSENSITIVE_FIELDS.contains(filed) { return filed; } return filed + CASE_INSENSITIVE_SUFFIX; }</technical_language>

Target:
private void setSorting(ConceptSearchDTO source, SolrQuery result) { if (source.getSort() != null && source.getOrder() != null) { result.setSort(getSortFieldWithSuffix(source.getSort()), SolrQuery.ORDER.valueOf(source.getOrder())); } }
Source:
<code>public boolean validate() { boolean isValid = true; setMessage(null); <START> if(getClusterConfigOptions().getItems() == null || getClusterConfigOptions().getItems().isEmpty()) { <END> return false; } for (EntityModel<GlusterVolumeSnapshotConfig> model : getClusterConfigOptions().getItems()) { GlusterVolumeSnapshotConfig option = model.getEntity(); if (option.getParamValue().trim().length() == 0) { setMessage(ConstantsManager.getInstance() .getMessages() .clusterSnapshotOptionValueEmpty(option.getParamName())); isValid = false; break; } } return isValid; }</code><technical_language>If model is valid, show some meaningful message user? Similar line 76</technical_language>

Target:
public boolean validate() { boolean isValid = true; setMessage(null); if(getClusterConfigOptions().getItems() == null || getClusterConfigOptions().getItems().isEmpty()) { setMessage(ConstantsManager.getInstance().getMessages().clusterSnapshotOptionNotExist()); return false; } for (EntityModel<GlusterVolumeSnapshotConfig> model : getClusterConfigOptions().getItems()) { GlusterVolumeSnapshotConfig option = model.getEntity(); if (option.getParamValue().trim().length() == 0) { setMessage(ConstantsManager.getInstance() .getMessages() .clusterSnapshotOptionValueEmpty(option.getParamName())); isValid = false; break; } } return isValid; }
Source:
<code>protected Network getNetworkFromDb(Guid vdsGroupId) { <START> List<Network> networks = getNetworkDAO().getAllForCluster(vdsGroupId); <END> return LinqUtils.firstOrNull(networks, new Predicate<Network>() { @Override public boolean eval(Network network) { return network.getName().equals(getNetworkName()); } }); }</code><technical_language>if moved already, get rid of LinqUtils</technical_language>

Target:
protected Network getNetworkFromDb(Guid vdsGroupId) { List<Network> networks = getNetworkDAO().getAllForCluster(vdsGroupId); for (Network network : networks) { if (network.getName().equals(getNetworkName())) { return network; } } return null; }
Source:
<code>private AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate, boolean amqpTemplateExplicitlySet) { Assert.notNull(listenerContainer, "listenerContainer must not be null"); Assert.isNull(listenerContainer.getMessageListener(), "The listenerContainer provided to an AMQP inbound Gateway " + "must not have a MessageListener configured since " + "the adapter needs to configure its own listener implementation."); this.messageListenerContainer = listenerContainer; this.messageListenerContainer.setAutoStartup(false); this.amqpTemplate = amqpTemplate; <START> this.amqpTemplateExplicitlySet = amqpTemplateExplicitlySet; <END> }</code><technical_language>Need assert null, if explicitly set</technical_language>

Target:
private AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate, boolean amqpTemplateExplicitlySet) { Assert.notNull(listenerContainer, "listenerContainer must not be null"); Assert.notNull(amqpTemplate, "'amqpTemplate' must not be null"); Assert.isNull(listenerContainer.getMessageListener(), "The listenerContainer provided to an AMQP inbound Gateway " + "must not have a MessageListener configured since " + "the adapter needs to configure its own listener implementation."); this.messageListenerContainer = listenerContainer; this.messageListenerContainer.setAutoStartup(false); this.amqpTemplate = amqpTemplate; this.amqpTemplateExplicitlySet = amqpTemplateExplicitlySet; }
Source:
<code>public void testReadBooleanList() { List<Boolean> expected = Arrays.asList(true, false); XmlReader reader = openReader("<action><value>true</value><value>false</value></action>"); reader.next(); List<Boolean> booleans = reader.readBooleans(); assertEquals(XMLStreamConstants.END_ELEMENT, reader.getEventType()); assertEquals("action", reader.getLocalName()); assertEquals(expected, booleans); <START> } <END></code><technical_language>tests OK, I tests for JSON, checking result is correct, cursor is positioned correctly</technical_language>

Target:
public void testReadBooleanList() { List<Boolean> expected = Arrays.asList(true, false); XmlReader reader = openReader("<action><value>true</value><value>false</value></action>"); reader.next(); List<Boolean> booleans = reader.readBooleans(); assertEquals(expected, booleans); }
Source:
<code>@Test public void getWithQueryThenPathThrows() { class Example { @GET("/foo/bar/{ping}/") Call<Object> method(@Query("kit") String kit, @Path("ping") String ping) { return null; } } try { <START> buildRequest(Example.class, "kat", "pong"); <END> } catch (IllegalArgumentException e) { assertThat(e).hasMessage("A @Path parameter must not come after a @Query. (parameter #2)\n" + " for method Example.method"); } }</code><technical_language>fail</technical_language>

Target:
@Test public void getWithQueryThenPathThrows() { class Example { @GET("/foo/bar/{ping}/") Call<Object> method(@Query("kit") String kit, @Path("ping") String ping) { return null; } } try { buildRequest(Example.class, "kat", "pong"); fail(); } catch (IllegalArgumentException e) { assertThat(e).hasMessage("A @Path parameter must not come after a @Query. (parameter #2)\n" + " for method Example.method"); } }
Source:
<code><START> protected Requester getTestRequester(){ <END> return new RequesterImpl(testClient(), Serializer.defaultSerializer()); }</code><technical_language>Spacing</technical_language>

Target:
Requester getTestRequester() { return new RequesterImpl(testClient(), Serializer.defaultSerializer()); }
Source:
<code><START> public final List<Report.TestCase> getTestCases() { <END> return testCases; }</code><technical_language>I this is visible for tests, current model synchronize suggestion public final synchronized List<Report.TestCase> getTestCases() {</technical_language>

Target:
public final synchronized List<Report.TestCase> getTestCases() { return testCases; }
Source:
<code>private void logVmStatusTransition(VM vmToUpdate, VmDynamic runningVm) { <START> log.infoFormat("VM moved from {0} --> {1}", vmToUpdate.getstatus().name(), runningVm.getstatus().name()); <END> }</code><technical_language>Again, if 80 chars line</technical_language>

Target:
private void logVmStatusTransition(VM vmToUpdate, VmDynamic runningVm) { if (vmToUpdate.getstatus() != runningVm.getstatus()) { log.infoFormat("VM {0} {1} moved from {2} --> {3}", vmToUpdate.getvm_name(), vmToUpdate.getId(), vmToUpdate.getstatus().name(), runningVm.getstatus().name()); } }