auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected PageableResult doSearch(RequestContext context) throws ResponseException { String identifierType = context.getRequest().getParameter("identifierType"); if(identifierType != null){ PatientIdentifierType requestedPatientIdentifierType = Context.getPatientService().getPatientIdentifierTypeByUuid(identifierType); <START> if(requestedPatientIdentifierType == null) <END> return new EmptySearchResult(); List<IdentifierSource> requestedIdentifierSources = new ArrayList(); for(IdentifierSource source: Context.getService(IdentifierSourceService.class).getAllIdentifierSources(false)){ if(source.getIdentifierType() == requestedPatientIdentifierType){ requestedIdentifierSources.add(source); } } return new NeedsPaging<IdentifierSource>(requestedIdentifierSources, context); } return new NeedsPaging<IdentifierSource>(Context.getService(IdentifierSourceService.class).getAllIdentifierSources(false), context); }</code><technical_language>For this, a at? <LINK_0></technical_language>

Target:
protected PageableResult doSearch(RequestContext context) throws ResponseException { String identifierType = context.getRequest().getParameter("identifierType"); if(identifierType != null){ PatientIdentifierType requestedPatientIdentifierType = Context.getPatientService().getPatientIdentifierTypeByUuid(identifierType); if(requestedPatientIdentifierType == null){ return new EmptySearchResult(); } List<IdentifierSource> requestedIdentifierSources = Context.getService(IdentifierSourceService.class) .getIdentifierSourcesByType(requestedPatientIdentifierType); return new NeedsPaging<IdentifierSource>(requestedIdentifierSources, context); } return new NeedsPaging<IdentifierSource>(Context.getService(IdentifierSourceService.class).getAllIdentifierSources(false), context); }
Source:
<code>public static ListValue concat( ListValue... lists ) { int totalSize = 0; for ( ListValue list : lists ) { totalSize += list.size(); } AnyValue[] anyValues = new AnyValue[totalSize]; int startPoint = 0; for ( ListValue list : lists ) { <START> System.arraycopy( list.asArray(), 0, anyValues, startPoint, list.size() ); <END> startPoint += list.size(); } return VirtualValues.list( anyValues ); }</code><technical_language>asArray calls allocate extra transient arrays depending underlying list implementation. a ListValue.copyToArray( AnyValue[] target, int startPoint ) method instead solve this (here methods below)</technical_language>

Target:
public static ListValue concat( ListValue... lists ) { return new ListValue.ConcatList( lists ); }
Source:
<code>public QueryExplainer( List<PlanOptimizer> planOptimizers, PlanFragmenter planFragmenter, Metadata metadata, NodePartitioningManager nodePartitioningManager, AccessControl accessControl, SqlParser sqlParser, StatsCalculator statsCalculator, CostCalculator costCalculator, InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig, Map<Class<? extends Statement>, DataDefinitionTask<?>> dataDefinitionTask) { this.planOptimizers = requireNonNull(planOptimizers, "planOptimizers is null"); this.planFragmenter = requireNonNull(planFragmenter, "planFragmenter is null"); this.metadata = requireNonNull(metadata, "metadata is null"); this.nodePartitioningManager = requireNonNull(nodePartitioningManager, "nodePartitioningManager is null"); this.accessControl = requireNonNull(accessControl, "accessControl is null"); this.sqlParser = requireNonNull(sqlParser, "sqlParser is null"); this.statsCalculator = requireNonNull(statsCalculator, "statsCalculator is null"); this.costCalculator = requireNonNull(costCalculator, "costCalculator is null"); this.nodeManager = requireNonNull(nodeManager, "nodeManager is null"); <START> this.nodeSchedulerConfig = requireNonNull(nodeSchedulerConfig); <END> this.dataDefinitionTask = ImmutableMap.copyOf(requireNonNull(dataDefinitionTask, "dataDefinitionTask is null")); }</code><technical_language>message</technical_language>

Target:
public QueryExplainer( List<PlanOptimizer> planOptimizers, PlanFragmenter planFragmenter, Metadata metadata, NodePartitioningManager nodePartitioningManager, AccessControl accessControl, SqlParser sqlParser, StatsCalculator statsCalculator, CostCalculator costCalculator, InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig, Map<Class<? extends Statement>, DataDefinitionTask<?>> dataDefinitionTask) { this.planOptimizers = requireNonNull(planOptimizers, "planOptimizers is null"); this.planFragmenter = requireNonNull(planFragmenter, "planFragmenter is null"); this.metadata = requireNonNull(metadata, "metadata is null"); this.nodePartitioningManager = requireNonNull(nodePartitioningManager, "nodePartitioningManager is null"); this.accessControl = requireNonNull(accessControl, "accessControl is null"); this.sqlParser = requireNonNull(sqlParser, "sqlParser is null"); this.statsCalculator = requireNonNull(statsCalculator, "statsCalculator is null"); this.costCalculator = requireNonNull(costCalculator, "costCalculator is null"); this.nodeManager = requireNonNull(nodeManager, "nodeManager is null"); this.nodeSchedulerConfig = requireNonNull(nodeSchedulerConfig, "nodeSchedulerConfig is null"); this.dataDefinitionTask = ImmutableMap.copyOf(requireNonNull(dataDefinitionTask, "dataDefinitionTask is null")); }
Source:
<code>public FirmwareUpdateConsoleCommandExtension() { <START> super("firmware", "Manage your thing´s firmwares."); <END> }</code><technical_language>small typo: talking multiple things, things'</technical_language>

Target:
public FirmwareUpdateConsoleCommandExtension() { super("firmware", "Manage your things' firmwares."); }
Source:
<code>private boolean imageStorageValidation() { if (disk.getDiskStorageType() != DiskStorageType.IMAGE <START> || (getVm().getStatus() != VMStatus.Up && getVm().getStatus() != VMStatus.Paused)) { <END> return true; } DiskImage diskImage = (DiskImage) disk; StorageDomain storageDomain = getStorageDomainDAO().getForStoragePool( diskImage.getStorageIds().get(0), diskImage.getStoragePoolId()); StorageDomainValidator storageDomainValidator = new StorageDomainValidator(storageDomain); return validate(storageDomainValidator.isDomainExistAndActive()); }</code><technical_language>!getVm().getStatus().isRunningOrPaused()</technical_language>

Target:
private boolean imageStorageValidation() { if (disk.getDiskStorageType() != DiskStorageType.IMAGE || !getVm().getStatus().isRunningOrPaused()) { return true; } DiskImage diskImage = (DiskImage) disk; StorageDomain storageDomain = getStorageDomainDAO().getForStoragePool( diskImage.getStorageIds().get(0), diskImage.getStoragePoolId()); StorageDomainValidator storageDomainValidator = new StorageDomainValidator(storageDomain); return validate(storageDomainValidator.isDomainExistAndActive()); }
Source:
<code>public TrackingToken createTokenAt(Instant dateTime) { <START> List<Long> results = entityManager().createQuery("SELECT MAX(e.globalIndex) FROM " + domainEventEntryEntityName() + " e WHERE e.timeStamp < :dateTime", Long.class) <END> .setParameter("dateTime", formatInstant(dateTime)) .getResultList(); if (results.size() == 0 || results.get(0) == null) { return null; } return GapAwareTrackingToken.newInstance(results.get(0), Collections.emptySet()); }</code><technical_language>JDBC implementation, select smallest globalIndex for event date. Subtract result ensure event is included in openStream</technical_language>

Target:
public TrackingToken createTokenAt(Instant dateTime) { List<Long> results = entityManager().createQuery("SELECT MIN(e.globalIndex) - 1 FROM " + domainEventEntryEntityName() + " e WHERE e.timeStamp >= :dateTime", Long.class) .setParameter("dateTime", formatInstant(dateTime)) .getResultList(); return createToken(results); }
Source:
<code>public void onlyReadsRelevantIteratorScopeConfigurations() { Map<String,String> data = new HashMap<>(); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo", "50," + SummingCombiner.class.getName()); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo.opt.all", "true"); data.put(Property.TABLE_ITERATOR_PREFIX + ".fakescope.bar", "50," + SummingCombiner.class.getName()); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo.opt.fakeopt", "fakevalue"); AccumuloConfiguration conf = new ConfigurationCopy(data); <START> List<IterInfo> iterators = IterConfigUtil.parseIterConf(IteratorScope.scan, new ArrayList<>(), <END> new HashMap<>(), conf); assertEquals(1, iterators.size()); IterInfo ii = iterators.get(0); assertEquals(new IterInfo(50, SummingCombiner.class.getName(), "foo"), ii); }</code><technical_language>pass Collections.emptylist()</technical_language>

Target:
public void onlyReadsRelevantIteratorScopeConfigurations() { Map<String,String> data = new HashMap<>(); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo", "50," + SummingCombiner.class.getName()); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo.opt.all", "true"); data.put(Property.TABLE_ITERATOR_PREFIX + ".fakescope.bar", "50," + SummingCombiner.class.getName()); data.put(Property.TABLE_ITERATOR_SCAN_PREFIX + "foo.opt.fakeopt", "fakevalue"); AccumuloConfiguration conf = new ConfigurationCopy(data); List<IterInfo> iterators = IterConfigUtil.parseIterConf(IteratorScope.scan, EMPTY_ITERS, new HashMap<>(), conf); assertEquals(1, iterators.size()); IterInfo ii = iterators.get(0); assertEquals(new IterInfo(50, SummingCombiner.class.getName(), "foo"), ii); }
Source:
<code>public void setPan(double x, double y) { <START> resetZoom(); <END> translateX(x); translateY(y); }</code><technical_language>restoring anymore, setPan branch is want. require zoom reset :)</technical_language>

Target:
private void setPan(double x, double y) { scale.setTx(0); scale.setTy(0); translate.setX(x * scale.getMxx()); translate.setY(y * scale.getMxx()); updateStrain(); }
Source:
<code>public CustomizedStateProvider buildCustomizedStateProvider(HelixManager helixManager, String instanceName) { synchronized (_customizedStateProviderMap) { if (_customizedStateProviderMap.get(instanceName) != null) { return _customizedStateProviderMap.get(instanceName); <START> } else { <END> CustomizedStateProvider customizedStateProvider = new CustomizedStateProvider(helixManager, instanceName); _customizedStateProviderMap.put(instanceName, customizedStateProvider); return customizedStateProvider; } } }</code><technical_language>here. Remove else clause</technical_language>

Target:
public CustomizedStateProvider buildCustomizedStateProvider(HelixManager helixManager, String instanceName) { synchronized (_customizedStateProviderMap) { if (_customizedStateProviderMap.get(instanceName) != null) { return _customizedStateProviderMap.get(instanceName); } CustomizedStateProvider customizedStateProvider = new CustomizedStateProvider(helixManager, instanceName); _customizedStateProviderMap.put(instanceName, customizedStateProvider); return customizedStateProvider; } }
Source:
<code>public void handleLabelsFileUpload(FileUploadEvent event) { logger.fine("entering handleUpload method."); UploadedFile file = event.getFile(); if (file != null) { InputStream uploadStream = null; try { uploadStream = file.getInputstream(); } catch (IOException ioex) { <START> logger.log(Level.WARNING, "the file {0} failed to upload!", file.getFileName()); <END> FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, "upload failure", "the file " + file.getFileName() + " failed to upload!"); FacesContext.getCurrentInstance().addMessage(null, message); return; } savedLabelsTempFile = saveTempFile(uploadStream); logger.log(Level.FINE, "{0} is successfully uploaded.", file.getFileName()); FacesMessage message = new FacesMessage("Succesful", file.getFileName() + " is uploaded."); FacesContext.getCurrentInstance().addMessage(null, message); } }</code><technical_language>Is a interpolation logger.log(Level.WARNING, is a bit clunky</technical_language>

Target:
public void handleLabelsFileUpload(FileUploadEvent event) { logger.fine("entering handleUpload method."); UploadedFile file = event.getFile(); if (file != null) { InputStream uploadStream = null; try { uploadStream = file.getInputstream(); } catch (IOException ioex) { logger.log(Level.WARNING, ioex, ()->"the file "+file.getFileName()+" failed to upload!"); List<String> args = Arrays.asList(file.getFileName()); String msg = BundleUtil.getStringFromBundle("dataset.file.uploadFailure.detailmsg", args); FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.file.uploadFailure"), msg); FacesContext.getCurrentInstance().addMessage(null, message); return; } savedLabelsTempFile = saveTempFile(uploadStream); logger.fine(()->file.getFileName() + " is successfully uploaded."); List<String> args = Arrays.asList(file.getFileName()); FacesMessage message = new FacesMessage(BundleUtil.getStringFromBundle("dataset.file.upload", args)); FacesContext.getCurrentInstance().addMessage(null, message); } }
Source:
<code>protected void executeVdsIdCommand() { final SetVdsStatusVDSCommandParameters parameters = getParameters(); if (_vdsManager != null) { <START> final VDS vds = getVds(); <END> if (vds.getSpmStatus() != VdsSpmStatus.None && parameters.getStatus() != VDSStatus.Up) { log.infoFormat("VDS {0} is spm and moved from up calling resetIrs.", vds.getName()); getVDSReturnValue().setSucceeded( ResourceManager .getInstance() .runVdsCommand( VDSCommandType.ResetIrs, new ResetIrsVDSCommandParameters(vds.getStoragePoolId(), vds.getId())) .getSucceeded()); if (!getVDSReturnValue().getSucceeded()) { if (getParameters().isStopSpmFailureLogged()) { AuditLogableBase base = new AuditLogableBase(); base.setVds(vds); AuditLogDirector.log(base, AuditLogType.FAILED_TO_STOP_SPM_ON_HOST); } return; } } updateVdsFromParameters(parameters, vds); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { _vdsManager.setStatus(parameters.getStatus(), vds); _vdsManager.updateDynamicData(vds.getDynamicData()); _vdsManager.updateStatisticsData(vds.getStatisticsData()); return null; } }); } else { getVDSReturnValue().setSucceeded(false); } }</code><technical_language>General - a bug - consider result of resetIrs specific cases, moving maintenance. other cases fail issue spm stop status change before. failure spm stop prevent host status changing anything, change here</technical_language>

Target:
protected void executeVdsIdCommand() { final SetVdsStatusVDSCommandParameters parameters = getParameters(); if (_vdsManager != null) { final VDS vds = getVds(); if (vds.getSpmStatus() != VdsSpmStatus.None && parameters.getStatus() != VDSStatus.Up) { log.infoFormat("VDS {0} is spm and moved from up calling resetIrs.", vds.getName()); getVDSReturnValue().setSucceeded( ResourceManager .getInstance() .runVdsCommand( VDSCommandType.ResetIrs, new ResetIrsVDSCommandParameters(vds.getStoragePoolId(), vds.getId())) .getSucceeded()); if (!getVDSReturnValue().getSucceeded()) { if (getParameters().isStopSpmFailureLogged()) { AuditLogableBase base = new AuditLogableBase(); base.setVds(vds); AuditLogDirector.log(base, AuditLogType.VDS_STATUS_CHANGE_FAILED_DUE_TO_STOP_SPM_FAILURE); } if (parameters.getStatus() == VDSStatus.PreparingForMaintenance) { return; } } } updateVdsFromParameters(parameters, vds); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { _vdsManager.setStatus(parameters.getStatus(), vds); _vdsManager.updateDynamicData(vds.getDynamicData()); _vdsManager.updateStatisticsData(vds.getStatisticsData()); return null; } }); } else { getVDSReturnValue().setSucceeded(false); } }
Source:
<code>protected Long getNextBackoff() { if (currentBackoff == null) { currentBackoff = exponentialRetryAlgorithm.createFirstAttempt(); } currentBackoff = exponentialRetryAlgorithm.createNextAttempt(currentBackoff); if (!exponentialRetryAlgorithm.shouldRetry(currentBackoff)) { long timeLeftNs = currentBackoff.getGlobalSettings().getTotalTimeout().toNanos() - (clock.nanoTime() - currentBackoff.getFirstAttemptStartTimeNanos()); long timeLeftMs = TimeUnit.NANOSECONDS.toMillis(timeLeftNs); if (timeLeftMs > currentBackoff.getGlobalSettings().getInitialRetryDelay().toMillis()) { return timeLeftMs; } else { return null; } } else { return Math.min(currentBackoff.getRetryDelay().toMillis(), <START> currentBackoff.getRandomizedRetryDelay().toMillis()); <END> } }</code><technical_language>a bit confused, shouldnt getRandomizedRetryDelay</technical_language>

Target:
protected Long getNextBackoff() { if (currentBackoff == null) { currentBackoff = exponentialRetryAlgorithm.createFirstAttempt(); } currentBackoff = exponentialRetryAlgorithm.createNextAttempt(currentBackoff); if (!exponentialRetryAlgorithm.shouldRetry(currentBackoff)) { long timeLeftNs = currentBackoff.getGlobalSettings().getTotalTimeout().toNanos() - (clock.nanoTime() - currentBackoff.getFirstAttemptStartTimeNanos()); long timeLeftMs = TimeUnit.NANOSECONDS.toMillis(timeLeftNs); if (timeLeftMs > currentBackoff.getGlobalSettings().getInitialRetryDelay().toMillis()) { return timeLeftMs; } else { return null; } } else { return currentBackoff.getRandomizedRetryDelay().toMillis(); } }
Source:
<code>public MobileEditModePageObject clickEdit() { <START> editButton.click(); <END> return new MobileEditModePageObject(driver); }</code><technical_language>mobile tests executed chrome, please scrollAndClick()</technical_language>

Target:
public MobileEditModePageObject clickEdit() { scrollAndClick(editButton); return new MobileEditModePageObject(driver); }
Source:
<code>public static void main(String[] args) throws IOException { File mdlRsrc = IgniteUtils.resolveIgnitePath(MODEL_PATH); if (mdlRsrc == null) throw new IllegalArgumentException("Resource not found [resource_path=" + MODEL_PATH + "]"); InfModelReader reader = new DirectoryInfModelReader(mdlRsrc.getPath()); InfModelParser<double[], Long> parser = new TensorFlowSavedModelInfModelParser<double[], Long>("serve") <START> <END> .withInput("Placeholder", doubles -> { float[][][] reshaped = new float[1][28][28]; for (int i = 0; i < doubles.length; i++) reshaped[0][i / 28][i % 28] = (float)doubles[i]; return Tensor.create(reshaped); }) .withOutput(Collections.singletonList("ArgMax"), collectedTensors -> { return collectedTensors.get("ArgMax").copyTo(new long[1])[0]; }); List<MnistUtils.MnistLabeledImage> images = MnistUtils.mnistAsListFromResource( MNIST_IMG_PATH, MNIST_LBL_PATH, new Random(0), 10000 ); long t0 = System.currentTimeMillis(); try (InfModel<double[], Long> locMdl = new SingleInfModelBuilder().build(reader, parser)) { for (MnistUtils.MnistLabeledImage image : images) locMdl.predict(image.getPixels()); } long t1 = System.currentTimeMillis(); System.out.println("Threaded model throughput: " + 1.0 * images.size() / ((t1 - t0) / 1000) + " req/sec"); }</code><technical_language>delete this gap</technical_language>

Target:
public static void main(String[] args) throws IOException { File mdlRsrc = IgniteUtils.resolveIgnitePath(MODEL_PATH); if (mdlRsrc == null) throw new IllegalArgumentException("Resource not found [resource_path=" + MODEL_PATH + "]"); InfModelReader reader = new FileSystemInfModelReader(mdlRsrc.getPath()); InfModelParser<double[], Long> parser = new TensorFlowSavedModelInfModelParser<double[], Long>("serve") .withInput("Placeholder", doubles -> { float[][][] reshaped = new float[1][28][28]; for (int i = 0; i < doubles.length; i++) reshaped[0][i / 28][i % 28] = (float)doubles[i]; return Tensor.create(reshaped); }) .withOutput(Collections.singletonList("ArgMax"), collectedTensors -> { return collectedTensors.get("ArgMax").copyTo(new long[1])[0]; }); List<MnistUtils.MnistLabeledImage> images = MnistUtils.mnistAsListFromResource( MNIST_IMG_PATH, MNIST_LBL_PATH, new Random(0), 10000 ); long t0 = System.currentTimeMillis(); try (InfModel<double[], Long> locMdl = new SingleInfModelBuilder().build(reader, parser)) { for (MnistUtils.MnistLabeledImage image : images) locMdl.predict(image.getPixels()); } long t1 = System.currentTimeMillis(); System.out.println("Threaded model throughput: " + 1.0 * images.size() / ((t1 - t0) / 1000) + " req/sec"); }
Source:
<code>void enable() { if (compactionExecutor != null) { logger.info("Compaction thread started for {}", mountPath); compactionThread = Utils.newThread(THREAD_NAME_PREFIX + mountPath, compactionExecutor, true); compactionThread.start(); try { <START> if (!compactionExecutor.startLatch.await(1, TimeUnit.SECONDS)) { <END> throw new IllegalStateException("Compaction thread did not start in 1 second"); } } catch (InterruptedException e) { throw new IllegalStateException(e); } } }</code><technical_language>do care this? This is essentially checking if JVM started thread asked start, it? arbitrary check do. If this is done for tests, TestUtils.getThreadByThisName()</technical_language>

Target:
void enable() { if (compactionExecutor != null) { logger.info("Compaction thread started for {}", mountPath); compactionThread = Utils.newThread(THREAD_NAME_PREFIX + mountPath, compactionExecutor, true); compactionThread.start(); } }
Source:
<code>protected TupleBatch fetchNextReady() throws DbException { final Operator child = getChild(); <START> for (TupleBatch tb = child.nextReady(); tb != null; tb = child.nextReady()) { <END> List<ColumnBuilder<?>> colBuilders = new ArrayList<>(tb.numColumns()); for (int i = 0; i < tb.numColumns(); ++i) { if (i != splitColIdx) { colBuilders.add(ColumnFactory.allocateColumn(tb.asColumn(i).getType())); } } final ColumnBuilder<?> splitColBuilder = ColumnFactory.allocateColumn(Type.STRING_TYPE); colBuilders.add(splitColBuilder); for (int rowIdx = 0; rowIdx < tb.numTuples(); ++rowIdx) { try { String colValue = tb.asColumn(splitColIdx).getString(rowIdx); String[] splits = pattern.split(colValue, -1); for (String segment : splits) { splitColBuilder.appendString(segment); for (int inputColIdx = 0; inputColIdx < inputColIndexToOutputColIndex.length; ++inputColIdx) { int outputColIdx = inputColIndexToOutputColIndex[inputColIdx]; if (outputColIdx != -1) { TupleUtils.copyValue(tb.asColumn(inputColIdx), rowIdx, colBuilders.get(outputColIdx)); } } } } catch (Exception e) { throw new DbException(e); } } List<Column<?>> columns = new ArrayList<>(); for (ColumnBuilder<?> colBuilder : colBuilders) { columns.add(colBuilder.build()); } return new TupleBatch(outputSchema, columns); } return null; }</code><technical_language>is a for loop here? If loop once, return out of L102. I simplify like: java TupleBatch tb = child.nextReader(); if (tb == null) { return null; } ..</technical_language>

Target:
protected TupleBatch fetchNextReady() throws DbException { while (!outputBuffer.hasFilledTB()) { TupleBatch inputTuples = getChild().nextReady(); if (inputTuples != null) { for (int rowIdx = 0; rowIdx < inputTuples.numTuples(); ++rowIdx) { String colValue = inputTuples.getString(splitColumnIndex, rowIdx); String[] splits = pattern.split(colValue, -1); for (String segment : splits) { outputBuffer.putString(getSchema().numColumns() - 1, segment); for (int colIdx = 0; colIdx < inputTuples.numColumns(); ++colIdx) { TupleUtils.copyValue(inputTuples.asColumn(colIdx), rowIdx, outputBuffer, colIdx); } } } } else { break; } } return outputBuffer.popAny(); }
Source:
<code>public List getSubscriberClaims(String subscriber) throws APIManagementException { <START> String tenantDomain = MultitenantUtils.getTenantDomain(subscriber); <END> int tenantId = 0; List claimList = new ArrayList(); try { tenantId = getTenantId(tenantDomain); SortedMap<String, String> subscriberClaims = APIUtil.getClaims(subscriber, tenantId, ClaimsRetriever.DEFAULT_DIALECT_URI); APIManagerConfiguration configuration = getAPIManagerConfiguration(); String configuredClaims = configuration .getFirstProperty(APIConstants.API_PUBLISHER_SUBSCRIBER_CLAIMS); if (subscriberClaims != null) { for (String claimURI : configuredClaims.split(",")) { Map<String, String> claimMap = new HashMap<>(); claimMap.put(claimURI, subscriberClaims.get(claimURI)); claimList.add(claimMap); } } } catch (UserStoreException e) { throw new APIManagementException("Error while retrieving tenant id for tenant domain " + tenantDomain, e); } return claimList; }</code><technical_language>pass full username get tenant domain correctly. Please test email username for a tenant</technical_language>

Target:
public Map<String, String> getSubscriberClaims(String subscriber) throws APIManagementException { String tenantDomain = MultitenantUtils.getTenantDomain(subscriber); int tenantId = 0; Map<String, String> claimMap = new HashMap<>(); try { tenantId = getTenantId(tenantDomain); SortedMap<String, String> subscriberClaims = APIUtil.getClaims(subscriber, tenantId, ClaimsRetriever.DEFAULT_DIALECT_URI); APIManagerConfiguration configuration = getAPIManagerConfiguration(); String configuredClaims = configuration .getFirstProperty(APIConstants.API_PUBLISHER_SUBSCRIBER_CLAIMS); if (subscriberClaims != null) { for (String claimURI : configuredClaims.split(",")) { claimMap.put(claimURI, subscriberClaims.get(claimURI)); } } } catch (UserStoreException e) { throw new APIManagementException("Error while retrieving tenant id for tenant domain " + tenantDomain, e); } return claimMap; }
Source:
<code>private List<String> readAllLines(File f) { List<String> list = new ArrayList(); try { BufferedReader br = new BufferedReader(new FileReader(f)); String line; while ((line = br.readLine()) != null) { list.add(line); } }catch (Exception e) { <START> e.printStackTrace(); <END> } return list; }</code><technical_language>This throw error test fail</technical_language>

Target:
private List<String> readAllLines(File f) throws FileNotFoundException, IOException { List<String> list = new ArrayList(); BufferedReader br = new BufferedReader(new FileReader(f)); String line; while ((line = br.readLine()) != null) { list.add(line); } return list; }
Source:
<code>private boolean check(File fingerprintFile, TaskListener listener) { try { Fingerprint fp = loadFingerprint(fingerprintFile); <START> if (fp == null || (!fp.isAlive() && !fp.isFingerprintDeletionBlocked()) ) { <END> listener.getLogger().println("deleting obsolete " + fingerprintFile); fingerprintFile.delete(); return true; } else { fp = getFingerprint(fp); return fp.trim(); } } catch (IOException e) { Functions.printStackTrace(e, listener.error("Failed to process " + fingerprintFile)); return false; } }</code><technical_language>great add some logging later, current chance convention</technical_language>

Target:
private boolean check(File fingerprintFile, TaskListener listener) { try { Fingerprint fp = loadFingerprint(fingerprintFile); if (fp == null || (!fp.isAlive() && fp.getFacetBlockingDeletion() == null) ) { listener.getLogger().println("deleting obsolete " + fingerprintFile); fingerprintFile.delete(); return true; } else { if (!fp.isAlive()) { FingerprintFacet deletionBlockerFacet = fp.getFacetBlockingDeletion(); listener.getLogger().println(deletionBlockerFacet.getClass().getName() + " created on " + DATE_CONVERTER.toString(deletionBlockerFacet.getTimestamp()) + " blocked deletion of " + fingerprintFile); } fp = getFingerprint(fp); return fp.trim(); } } catch (IOException e) { Functions.printStackTrace(e, listener.error("Failed to process " + fingerprintFile)); return false; } }
Source:
<code>public void onEmission(TextureOffsetGeneratorComponent component, ParticleData particleData, Random random) { if (component.validOffsets.size() == 0) { return; } final int randomOffsetIndex = random.nextInt(component.validOffsets.size()); final Vector2f randomOffset = component.validOffsets.get(randomOffsetIndex); <START> particleData.textureOffset.set(randomOffset.x(), randomOffset.y()); <END> }</code><technical_language>simplified: suggestion particleData.textureOffset.set(randomOffset);</technical_language>

Target:
public void onEmission(TextureOffsetGeneratorComponent component, ParticleData particleData, Random random) { if (component.validOffsets.size() == 0) { return; } final int randomOffsetIndex = random.nextInt(component.validOffsets.size()); final Vector2f randomOffset = component.validOffsets.get(randomOffsetIndex); particleData.textureOffset.set(randomOffset); }
Source:
<code>public void testManyStartNotNull() throws IOException { final CompressionCodec codec = Algorithm.GZ.getCodec(); Assert.assertNotNull(codec); ExecutorService service = Executors.newFixedThreadPool(10); for (int i = 0; i < 30; i++) { service.submit(new Callable<Boolean>() { @Override public Boolean call() throws Exception { <START> Assert.assertNotNull(Compression.Algorithm.GZ.getCodec()); <END> return true; } }); } service.shutdown(); Assert.assertNotNull(codec); }</code><technical_language>If assertion throws exception in a background thread, this fail test</technical_language>

Target:
public void testManyStartNotNull() throws IOException, InterruptedException, ExecutionException { for (final Algorithm al : Algorithm.values()) { if (isSupported.get(al) != null && isSupported.get(al) == true) { Assert.assertTrue(al + " is not supported, but should be", al.isSupported()); final CompressionCodec codec = al.getCodec(); Assert.assertNotNull(al + " should not be null", codec); ExecutorService service = Executors.newFixedThreadPool(10); ArrayList<Future<Boolean>> results = Lists.newArrayList(); for (int i = 0; i < 30; i++) { results.add(service.submit(new Callable<Boolean>() { @Override public Boolean call() throws Exception { Assert.assertNotNull(al + " should not be null", al.getCodec()); return true; } })); } service.shutdown(); Assert.assertNotNull(al + " should not be null", codec); while (!service.awaitTermination(1, TimeUnit.SECONDS)) { } for (Future<Boolean> result : results) { Assert.assertTrue(al + " resulted in a failed call to getcodec within the thread pool", result.get()); } } } }
Source:
<code>private Set<String> parse(HttpServletRequest req) { <START> String includedParam = req.getParameter("names[]"); <END> if(includedParam == null) { return Collections.emptySet(); } else { return new HashSet<String>(Arrays.asList(includedParam.split(","))); } }</code><technical_language>getParameterValues, multiple params provided</technical_language>

Target:
private Set<String> parse(HttpServletRequest req) { String[] includedParam = req.getParameterValues("names[]"); if (includedParam == null) { return Collections.emptySet(); } else { return new HashSet<String>(Arrays.asList(includedParam)); } }
Source:
<code>public GapBuffer(String content) { <START> this(content, 1); <END> }</code><technical_language>Is a reason GapBuffer is initialized a buffer size of 1 default? I this is a vague question, 1 a weird choice me. reserves ram in anticipation of future insertions save computation time, allocates buffer space array size increased insertion. if action is a deletion, this additional character of buffer size of a difference. I experience gap buffers, I missing (or overthinking this)</technical_language>

Target:
public GapBuffer(String content) { this(content, 0); }
Source:
<code>public int getRevisionAmount() { <START> LOG.log(Level.WARNING, "Paging is not implemented for agents, yet!"); <END> return -1; }</code><technical_language>a warning info</technical_language>

Target:
public int getRevisionAmount() { LOG.log(Level.INFO, "Paging is not implemented for agents, yet!"); return -1; }
Source:
<code>static <T> WorkProcessor<T> create(WorkProcessor.Process<T> process) { return new WorkProcessor<T>() { ProcessorState<T> state; @Override public boolean process() { if (isBlocked()) { return false; } if (isFinished()) { return true; } state = requireNonNull(process.process()); <START> return state.type == ProcessorState.Type.RESULT || state.type == ProcessorState.Type.FINISHED; <END> } @Override public boolean isBlocked() { return state != null && state.type == ProcessorState.Type.BLOCKED && !state.blocked.get().isDone(); } @Override public ListenableFuture<?> getBlockedFuture() { checkState(state != null && state.type == ProcessorState.Type.BLOCKED, "Must be blocked to get blocked future"); return state.blocked.get(); } @Override public boolean isFinished() { return state != null && state.type == ProcessorState.Type.FINISHED; } @Override public T getResult() { checkState(state != null && state.type == ProcessorState.Type.RESULT, "process() must return true and must not be finished"); return state.result.get(); } }; }</code><technical_language>if state is NEEDS_MORE_DATA</technical_language>

Target:
static <T> WorkProcessor<T> create(WorkProcessor.Process<T> process) { return new WorkProcessor<T>() { ProcessorState<T> state; @Override public boolean process() { if (isBlocked()) { return false; } if (isFinished()) { return true; } state = requireNonNull(process.process()); checkState(state.getType() != NEEDS_MORE_DATA, "Unexpected state: NEEDS_MORE_DATA"); return state.getType() == RESULT || state.getType() == FINISHED; } @Override public boolean isBlocked() { return state != null && state.getType() == BLOCKED && !state.getBlocked().get().isDone(); } @Override public ListenableFuture<?> getBlockedFuture() { checkState(state != null && state.getType() == BLOCKED, "Must be blocked to get blocked future"); return state.getBlocked().get(); } @Override public boolean isFinished() { return state != null && state.getType() == FINISHED; } @Override public T getResult() { checkState(state != null && state.getType() == RESULT, "process() must return true and must not be finished"); return state.getResult().get(); } }; }
Source:
<code>private void returnToSyncStateFromOperationHistory() { <START> IProgressMonitor pm = new NullProgressMonitor(); <END> try { IOperationHistory operationHistory = OperationHistoryFactory.getOperationHistory(); IUndoContext undoCtx = getUndoContext(); while (operationHistory != null && operationHistory.canUndo(undoCtx) && session.getStatus() != SessionStatus.SYNC) { IUndoableOperation toUndo = operationHistory.getUndoOperation(undoCtx); operationHistory.undoOperation(toUndo, new NullProgressMonitor(), null); if (marker == toUndo) { break; } } setResourcesBackToSync(); } catch (ExecutionException e) { reloadTheResources(); String sessionLabel = SiriusEditPlugin.getPlugin().getUiCallback().getSessionNameToDisplayWhileSaving(session); SiriusPlugin.getDefault().warning(sessionLabel + " modified resources were reloaded. An error occurs while attempting to cancel all modifications.", e); } }</code><technical_language>pm is used</technical_language>

Target:
private void returnToSyncStateFromOperationHistory() { try { IOperationHistory operationHistory = OperationHistoryFactory.getOperationHistory(); IUndoContext undoCtx = getUndoContext(); while (operationHistory != null && operationHistory.canUndo(undoCtx) && session.getStatus() != SessionStatus.SYNC) { IUndoableOperation toUndo = operationHistory.getUndoOperation(undoCtx); operationHistory.undoOperation(toUndo, new NullProgressMonitor(), null); if (marker == toUndo) { break; } } setResourcesBackToSync(); } catch (ExecutionException e) { reloadTheResources(); String sessionLabel = SiriusEditPlugin.getPlugin().getUiCallback().getSessionNameToDisplayWhileSaving(session); SiriusPlugin.getDefault().warning(sessionLabel + " modified resources were reloaded. An error occurs while attempting to cancel all modifications.", e); } }
Source:
<code>public void timerExpired(Object callbackData) { State newState = state; switch (state) { case STATE_DOORS_CLOSED: localDoorMotor.set(DoorCommand.STOP); mDoorMotor.setDoorCommand(DoorCommand.STOP); if ((mAtFloors.getCurrentFloor() == mDesiredFloor.getFloor() && ((mDriveSpeed.getSpeed()-0.0)<EPSILON || mDriveSpeed.getDirection()==Direction.STOP)) || (mCarWeight.getValue() >= Elevator.MaxCarCapacity && mDoorOpenedFront.getBothOpened() == false && mDoorOpenedBack.getBothOpened() == false)) { newState = State.STATE_DOORS_OPENING; } else { newState = state; } break; case STATE_DOORS_OPENING: localDoorMotor.set(DoorCommand.OPEN); mDoorMotor.setDoorCommand(DoorCommand.OPEN); countdown = dwell; if (mDoorOpenedFront.getBothOpened() && mDoorOpenedBack.getBothOpened()) { newState = State.STATE_DOORS_OPENED; } else { newState = state; } break; case STATE_DOORS_OPENED: localDoorMotor.set(DoorCommand.STOP); mDoorMotor.setDoorCommand(DoorCommand.STOP); <START> countdown = SimTime.subtract(countdown, period); <END> if (countdown.isLessThanOrEqual(SimTime.ZERO)) { newState = State.STATE_DOORS_NUDGE; } else { newState = state; } break; case STATE_DOORS_NUDGE: localDoorMotor.set(DoorCommand.NUDGE); mDoorMotor.setDoorCommand(DoorCommand.NUDGE); if (mDoorClosedFront.getBothClosed() && mDoorClosedBack.getBothClosed()) { newState = State.STATE_DOORS_CLOSED; } else { newState = state; } break; default: throw new RuntimeException("State " + state + " was not recognized."); } }</code><technical_language>some crazy indenting here</technical_language>

Target:
public void timerExpired(Object callbackData) { State newState = state; switch (state) { case STATE_DOORS_CLOSED: localDoorMotor.set(DoorCommand.STOP); mDoorMotor.setDoorCommand(DoorCommand.STOP); if ((mAtFloors.getCurrentFloor() == mDesiredFloor.getFloor() && ((mDriveSpeed.getSpeed()==Speed.STOP) || mDriveSpeed.getDirection()==Direction.STOP)) || (mCarWeight.getValue() >= Elevator.MaxCarCapacity && mDoorOpenedFront.getBothOpened() == false && mDoorOpenedBack.getBothOpened() == false)) { newState = State.STATE_DOORS_OPENING; } else { newState = state; } break; case STATE_DOORS_OPENING: localDoorMotor.set(DoorCommand.OPEN); mDoorMotor.setDoorCommand(DoorCommand.OPEN); countdown = dwell; if (mDoorOpenedFront.getBothOpened() && mDoorOpenedBack.getBothOpened()) { newState = State.STATE_DOORS_OPENED; } else { newState = state; } break; case STATE_DOORS_OPENED: localDoorMotor.set(DoorCommand.STOP); mDoorMotor.setDoorCommand(DoorCommand.STOP); countdown = SimTime.subtract(countdown, period); if (countdown.isLessThanOrEqual(SimTime.ZERO)) { newState = State.STATE_DOORS_NUDGE; } else { newState = state; } break; case STATE_DOORS_NUDGE: localDoorMotor.set(DoorCommand.NUDGE); mDoorMotor.setDoorCommand(DoorCommand.NUDGE); if (mDoorClosedFront.getBothClosed() && mDoorClosedBack.getBothClosed()) { newState = State.STATE_DOORS_CLOSED; } else { newState = state; } break; default: throw new RuntimeException("State " + state + " was not recognized."); } }
Source:
<code>private ValueSnak getValueSnak(JSONArray jsonValueSnak) throws JSONException { ValueSnak result; int intId = jsonValueSnak.getInt(1); PropertyIdValue propertyId = (PropertyIdValue) this.getEntityId(intId, DocumentType.PROPERTY); String valueString = jsonValueSnak.getString(2); Value value; switch (valueString) { case "time": value = this.getTimeValue(jsonValueSnak.getJSONObject(3)); break; case "wikibase-entityid": value = this.getEntityIdValue(jsonValueSnak.getJSONObject(3)); break; case "string": value = this.getStringIdValue(jsonValueSnak.getString(3)); break; case "globecoordinate": value = this.getGlobeCoordinatesValue(jsonValueSnak .getJSONObject(3)); break; case "quantity": value = this.getQuantityValue(jsonValueSnak.getJSONObject(3)); break; default: throw new JSONException("Unknown value type " + valueString <START> + "in value snak JSON"); <END> } result = this.factory.getValueSnak(propertyId, value); return result; }</code><technical_language>Missing space "</technical_language>

Target:
private ValueSnak getValueSnak(JSONArray jsonValueSnak) throws JSONException { int intPropertyId = jsonValueSnak.getInt(1); PropertyIdValue propertyIdValue = this .getPropertyIdValue(PREFIX_PROPERTY + intPropertyId); String valueType = jsonValueSnak.getString(2); Value value; switch (valueType) { case "time": value = this.getTimeValue(jsonValueSnak.getJSONObject(3)); break; case "wikibase-entityid": value = this.getEntityIdValue(jsonValueSnak.getJSONObject(3)); break; case "string": value = this.getStringValue(jsonValueSnak.getString(3)); break; case "globecoordinate": value = this.getGlobeCoordinatesValue(jsonValueSnak .getJSONObject(3)); break; case "quantity": value = this.getQuantityValue(jsonValueSnak.getJSONObject(3)); break; default: throw new JSONException("Unknown value type " + valueType + " in value snak JSON"); } return this.factory.getValueSnak(propertyIdValue, value); }
Source:
<code>private void maybeRemapOrphanedAllocation( final AllocationID allocationIdOfRequest, final AllocationID allocationIdOfSlot) { <START> final AllocationID orphanedAllocationId = allocationIdOfRequest.equals(allocationIdOfSlot) ? null : allocationIdOfRequest; if (orphanedAllocationId != null) { <END> final SlotRequestId requestIdOfAllocatedSlot = pendingRequests.getKeyA(allocationIdOfSlot); if (requestIdOfAllocatedSlot != null) { final PendingRequest requestOfAllocatedSlot = pendingRequests.getByKeyA(requestIdOfAllocatedSlot); requestOfAllocatedSlot.setAllocationId(orphanedAllocationId); pendingRequests.put(requestIdOfAllocatedSlot, orphanedAllocationId, requestOfAllocatedSlot); } else { resourceManagerGateway.cancelSlotRequest(orphanedAllocationId); } } }</code><technical_language>suggestion // if request initiated allocation is pending, orphaned allocation // of fulfilled request fail fast if remapped allocation fails if (!allocationIdOfRequest.equals(allocationIdOfSlot)) { final AllocationID orphanedAllocationId = allocationIdOfRequest;</technical_language>

Target:
private void maybeRemapOrphanedAllocation( final AllocationID allocationIdOfRequest, final AllocationID allocationIdOfSlot) { if (!allocationIdOfRequest.equals(allocationIdOfSlot)) { final SlotRequestId requestIdOfAllocatedSlot = pendingRequests.getKeyAByKeyB(allocationIdOfSlot); if (requestIdOfAllocatedSlot != null) { final PendingRequest requestOfAllocatedSlot = pendingRequests.getValueByKeyA(requestIdOfAllocatedSlot); requestOfAllocatedSlot.setAllocationId(allocationIdOfRequest); pendingRequests.put(requestIdOfAllocatedSlot, allocationIdOfRequest, requestOfAllocatedSlot); } else { resourceManagerGateway.cancelSlotRequest(allocationIdOfRequest); } } }
Source:
<code>private ClassifiedClasses classes2singletons(final Application application, final BeanManager beanManager) { final ClassifiedClasses classified = new ClassifiedClasses(); Set<Class<?>> classes = application.getClasses(); if (!classes.isEmpty()) { classified.addProviders(loadProviders(beanManager, classes)); classified.addFeatures(loadFeatures(beanManager, classes)); for (final Bean< ? > bean: serviceBeans) { if (classes.contains(bean.getBeanClass())) { final CdiResourceProvider provider = new CdiResourceProvider(beanManager, bean); if (provider.isSingleton() && Dependent.class == bean.getScope()) { <START> disposableResourceProviders.add(provider); <END> } classified.addResourceProvider(provider); } } } return classified; }</code><technical_language>synchronized (disposableResourceProviders) { disposableResourceProviders.add(provider); }</technical_language>

Target:
private ClassifiedClasses classes2singletons(final Application application, final BeanManager beanManager) { final ClassifiedClasses classified = new ClassifiedClasses(); Set<Class<?>> classes = application.getClasses(); if (!classes.isEmpty()) { classified.addProviders(loadProviders(beanManager, classes)); classified.addFeatures(loadFeatures(beanManager, classes)); for (final Bean< ? > bean: serviceBeans) { if (classes.contains(bean.getBeanClass())) { final ResourceProvider resourceProvider; if (isCxfSingleton(beanManager, bean)) { final Lifecycle lifecycle = new Lifecycle(beanManager, bean); resourceProvider = new SingletonResourceProvider(lifecycle, bean.getBeanClass()); if (Dependent.class == bean.getScope()) { disposableLifecycles.add(lifecycle); } } else { resourceProvider = new PerRequestResourceProvider( () -> new Lifecycle(beanManager, bean), bean.getBeanClass()); } classified.addResourceProvider(resourceProvider); } } } return classified; }
Source:
<code>public ODatabaseExport(final ODatabaseDocumentInternal iDatabase, final String iFileName, final OCommandOutputListener iListener) throws IOException { super(iDatabase, iFileName, iListener); if (fileName == null) throw new IllegalArgumentException("file name missing"); if (!fileName.endsWith(".gz")) { fileName += ".gz"; } final File f = new File(fileName); if (f.getParentFile() != null) f.getParentFile().mkdirs(); if (f.exists()) f.delete(); this.tempFileName = fileName + ".tmp"; final File tempFile = new File(tempFileName); if (tempFile.getParentFile() != null) <START> tempFile.getParentFile().mkdirs(); <END> if (tempFile.exists()) tempFile.delete(); final GZIPOutputStream gzipOS = new GZIPOutputStream(new FileOutputStream(tempFileName), compressionBuffer) { { def.setLevel(compressionLevel); } }; writer = new OJSONWriter(new OutputStreamWriter(gzipOS)); writer.beginObject(); }</code><technical_language>is 3.0 version supports features of Java 8 API. new file API create remove directories files? This allow produce meaningful exceptions if creation of directory is failed for some reason</technical_language>

Target:
public ODatabaseExport(final ODatabaseDocumentInternal iDatabase, final String iFileName, final OCommandOutputListener iListener) throws IOException { super(iDatabase, iFileName, iListener); if (fileName == null) throw new IllegalArgumentException("file name missing"); if (!fileName.endsWith(".gz")) { fileName += ".gz"; } OFileUtils.prepareForFileCreationOrReplacement(Paths.get(fileName), this, "exporting"); this.tempFileName = fileName + ".tmp"; OFileUtils.prepareForFileCreationOrReplacement(Paths.get(tempFileName), this, "exporting"); final GZIPOutputStream gzipOS = new GZIPOutputStream(new FileOutputStream(tempFileName), compressionBuffer) { { def.setLevel(compressionLevel); } }; writer = new OJSONWriter(new OutputStreamWriter(gzipOS)); writer.beginObject(); }
Source:
<code>public double priceDerivativeForward(double strike, PutCall putCall) { <START> double priceDerivative; <END> if (strike <= cutOffStrike) { ValueDerivatives volatilityA = sabrFunction.getVolatilityAdjoint(forward, strike, timeToExpiry, sabrData); BlackFunctionData dataBlack = BlackFunctionData.of(forward, 1d, volatilityA.getValue()); EuropeanVanillaOption option = EuropeanVanillaOption.of(strike, timeToExpiry, putCall); ValueDerivatives pA = BLACK_FUNCTION.getPriceAdjoint(option, dataBlack); priceDerivative = pA.getDerivative(0) + pA.getDerivative(1) * volatilityA.getDerivative(0); } else { if (!parameterDerivativeForwardComputed) { parameterDerivativeForward = computesParametersDerivativeForward(); parameterDerivativeForwardComputed = true; } double f = extrapolation(strike); double fDa = f; double fDb = f / strike; double fDc = fDb / strike; priceDerivative = fDa * parameterDerivativeForward[0] + fDb * parameterDerivativeForward[1] + fDc * parameterDerivativeForward[2]; if (putCall.isPut()) { priceDerivative -= 1; } } return priceDerivative; }</code><technical_language>declaring a local variable, return if statements</technical_language>

Target:
public double priceDerivativeForward(double strike, PutCall putCall) { if (strike <= cutOffStrike) { ValueDerivatives volatilityA = sabrFunction.getVolatilityAdjoint(forward, strike, timeToExpiry, sabrData); BlackFunctionData dataBlack = BlackFunctionData.of(forward, 1d, volatilityA.getValue()); EuropeanVanillaOption option = EuropeanVanillaOption.of(strike, timeToExpiry, putCall); ValueDerivatives pA = BLACK_FUNCTION.getPriceAdjoint(option, dataBlack); return pA.getDerivative(0) + pA.getDerivative(1) * volatilityA.getDerivative(0); } if (parameterDerivativeForward == null) { parameterDerivativeForward = computesParametersDerivativeForward(); } double f = extrapolation(strike); double fDa = f; double fDb = f / strike; double fDc = fDb / strike; double priceDerivative = fDa * parameterDerivativeForward[0] + fDb * parameterDerivativeForward[1] + fDc * parameterDerivativeForward[2]; if (putCall.isPut()) { priceDerivative -= 1; } return priceDerivative; }
Source:
<code>public HmRsHeader(final Matcher<String> hdrm, <START> final Matcher<Iterable<String>> vlm) { <END> super(); this.headerm = hdrm; this.valuem = vlm; }</code><technical_language>@exper0 need for extra indentation</technical_language>

Target:
public HmRsHeader(final Matcher<String> hdrm, final Matcher<Iterable<String>> vlm) { super(); this.header = hdrm; this.value = vlm; }