auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean canPaymentWorksNewVendorRequestProcessingContinueForVendor(PaymentWorksVendor stgNewVendorRequestDetailToProcess, PaymentWorksNewVendorRequestsBatchReportData reportData) { List<String> errorMessages = new ArrayList<String>(); if (pmwDtosCouldConvertCustomAttributesToPmwJavaClassAttributes(stgNewVendorRequestDetailToProcess) && pmwNewVendorAttributesConformToKfsLengthsOrFormats(stgNewVendorRequestDetailToProcess, errorMessages) && <START> validateVendorType(stgNewVendorRequestDetailToProcess, errorMessages) && <END> allPmwNewVendorIsoCountriesMapToSingleFipsCountry(stgNewVendorRequestDetailToProcess, errorMessages) && pmwNewVendorIdentifierDoesNotExistInKfsStagingTable(stgNewVendorRequestDetailToProcess, errorMessages)){ return true; } else { if (!errorMessages.isEmpty()){ reportData.getPendingPaymentWorksVendorsThatCouldNotBeProcessed().incrementRecordCount(); reportData.addPmwVendorsThatCouldNotBeProcessed(new PaymentWorksBatchReportRawDataItem( stgNewVendorRequestDetailToProcess.toString(), errorMessages)); } return false; } }</code><technical_language>I another this. consideration, more include this check in method pmwNewVendorAttributesConformToKfsLengthsOrFormats rest of types of items validated instead of additional boolean check in if-clause</technical_language>

Target:
private boolean canPaymentWorksNewVendorRequestProcessingContinueForVendor(PaymentWorksVendor stgNewVendorRequestDetailToProcess, PaymentWorksNewVendorRequestsBatchReportData reportData) { List<String> errorMessages = new ArrayList<String>(); if (pmwDtosCouldConvertCustomAttributesToPmwJavaClassAttributes(stgNewVendorRequestDetailToProcess) && pmwNewVendorAttributesConformToKfsLengthsOrFormats(stgNewVendorRequestDetailToProcess, errorMessages) && allPmwNewVendorIsoCountriesMapToSingleFipsCountry(stgNewVendorRequestDetailToProcess, errorMessages) && pmwNewVendorIdentifierDoesNotExistInKfsStagingTable(stgNewVendorRequestDetailToProcess, errorMessages)){ return true; } else { if (!errorMessages.isEmpty()){ reportData.getPendingPaymentWorksVendorsThatCouldNotBeProcessed().incrementRecordCount(); reportData.addPmwVendorsThatCouldNotBeProcessed(new PaymentWorksBatchReportRawDataItem(stgNewVendorRequestDetailToProcess.toString(), errorMessages)); } return false; } }
Source:
<code>public StateDescription getStateDescription(String itemName, Locale locale) { Set<ChannelUID> boundChannels = itemChannelLinkRegistry.getBoundChannels(itemName); if (!boundChannels.isEmpty()) { ChannelUID channelUID = boundChannels.iterator().next(); Channel channel = thingRegistry.getChannel(channelUID); if (channel != null) { ChannelType channelType = thingTypeRegistry.getChannelType(channel, locale); if (channelType != null) { <START> StateDescription stateDescription = thingTypeRegistry.getStateDescription(channel, locale); <END> if (stateDescription == null) { stateDescription = channelType.getState(); } if ((channelType.getItemType() != null) && ((stateDescription == null) || (stateDescription.getPattern() == null))) { String pattern = null; if (channelType.getItemType().equalsIgnoreCase(CoreItemFactory.STRING)) { pattern = "%s"; } else if (channelType.getItemType().equalsIgnoreCase(CoreItemFactory.NUMBER)) { pattern = "%.0f"; } if (pattern != null) { logger.trace("Provide a default pattern for item {}", pattern, itemName); if (stateDescription == null) { stateDescription = new StateDescription(null, null, null, pattern, false, null); } else { stateDescription = new StateDescription(stateDescription.getMinimum(), stateDescription.getMaximum(), stateDescription.getStep(), pattern, stateDescription.isReadOnly(), stateDescription.getOptions()); } } } return stateDescription; } else { return null; } } } return null; }</code><technical_language>if service reference mentioned able query DynamicStateDescriptionRegistry ThingTypeRegistry</technical_language>

Target:
public StateDescription getStateDescription(String itemName, Locale locale) { Set<ChannelUID> boundChannels = itemChannelLinkRegistry.getBoundChannels(itemName); if (!boundChannels.isEmpty()) { ChannelUID channelUID = boundChannels.iterator().next(); Channel channel = thingRegistry.getChannel(channelUID); if (channel != null) { StateDescription stateDescription = null; ChannelType channelType = thingTypeRegistry.getChannelType(channel, locale); if (channelType != null) { stateDescription = channelType.getState(); if ((channelType.getItemType() != null) && ((stateDescription == null) || (stateDescription.getPattern() == null))) { String pattern = null; if (channelType.getItemType().equalsIgnoreCase(CoreItemFactory.STRING)) { pattern = "%s"; } else if (channelType.getItemType().equalsIgnoreCase(CoreItemFactory.NUMBER)) { pattern = "%.0f"; } if (pattern != null) { logger.trace("Provide a default pattern for item {}", pattern, itemName); if (stateDescription == null) { stateDescription = new StateDescription(null, null, null, pattern, false, null); } else { stateDescription = new StateDescription(stateDescription.getMinimum(), stateDescription.getMaximum(), stateDescription.getStep(), pattern, stateDescription.isReadOnly(), stateDescription.getOptions()); } } } } StateDescription dynamicStateDescription = getDynamicStateDescription(channel, stateDescription, locale); if (dynamicStateDescription != null) { return dynamicStateDescription; } return stateDescription; } } return null; }
Source:
<code><START> public void takeSnapshot(){ <END> try { lastSnapshotZxid = zkDb.getDataTreeLastProcessedZxid(); isGeneratingSnapshot.incrementAndGet(); txnLogFactory.save(zkDb.getDataTree(), zkDb.getSessionWithTimeOuts()); } catch (IOException e) { LOG.error("Severe unrecoverable error, exiting", e); System.exit(10); } finally { isGeneratingSnapshot.decrementAndGet(); } }</code><technical_language>a lot of potential paths a snapshot. JMX, SyncRequestProcessor, Admin, part of sync stage in ZABP. In SyncRequestProcessor ZABP trigger snapshots. concern collisions, SyncRequestProcessor run edits sent, edits ZABP sync phase completed. Admin JMX possibly a snapshot in background. if a snapshot request in ZABP sync phase clear out in memory DB applied new snapshot crash write out new snapshot end data corruption. This super super rare I if care it, I is fix. I expert code, I of cleanest fix this, feels maybeTakeSnapshot a part of SyncRequestProcessor instead of ZooKeeperServer. I simple is get SyncRequestProcessor JMX/Admin if means reset edit count a lot of snapshots once, right another. means avoid more snapshot time</technical_language>

Target:
public void takeSnapshot(){ generatingSnapshot.lock(); try { lastSnapshotZxid = zkDb.getDataTreeLastProcessedZxid(); txnLogFactory.save(zkDb.getDataTree(), zkDb.getSessionWithTimeOuts()); } catch (IOException e) { LOG.error("Severe unrecoverable error, exiting", e); System.exit(10); } finally { generatingSnapshot.unlock(); } }
Source:
<code>public Optional<FieldProjectionExpectations<Double>> getFieldProjectionExpectations() { return Optional.of( new FieldProjectionExpectations<>( <START> 1.001, 3.0, 5.1 <END> ) ); }</code><technical_language>While it... a negative in there, too</technical_language>

Target:
public Optional<FieldProjectionExpectations<Double>> getFieldProjectionExpectations() { return Optional.of( new FieldProjectionExpectations<>( -1.001, 3.0, 5.1 ) ); }
Source:
<code>public void run() { int httpPort = -1; m_rvdb.m_jsonEnabled = false; boolean httpsEnabled = false; if ((m_deployment.getHttpd() != null) && (m_deployment.getHttpd().isEnabled())) { <START> if (m_deployment.getHttpd().getSsl()!=null && m_deployment.getHttpd().getSsl().isEnabled()) { <END> httpsEnabled = true; } httpPort = (m_deployment.getHttpd().getPort()==null) ? (httpsEnabled ? VoltDB.DEFAULT_HTTPS_PORT : VoltDB.DEFAULT_HTTP_PORT) : m_deployment.getHttpd().getPort(); if (m_deployment.getHttpd().getJsonapi() != null) { m_rvdb.m_jsonEnabled = m_deployment.getHttpd().getJsonapi().isEnabled(); } } if (m_config.m_httpPort != Constants.HTTP_PORT_DISABLED) { setupHttpServer(m_config.m_httpPortInterface, m_config.m_publicInterface, m_config.m_httpPort, false, true); } else if (httpPort == Constants.HTTP_PORT_AUTO) { httpPort = httpsEnabled ? VoltDB.DEFAULT_HTTPS_PORT : VoltDB.DEFAULT_HTTP_PORT; setupHttpServer("", "", httpPort, true, false); } else if (httpPort != Constants.HTTP_PORT_DISABLED) { if (!m_deployment.getHttpd().isEnabled()) { return; } setupHttpServer(m_config.m_httpPortInterface, m_config.m_publicInterface, httpPort, false, true); } }</code><technical_language>spacing</technical_language>

Target:
public void run() { int httpPort = -1; m_rvdb.m_jsonEnabled = false; boolean sslEnabled = false; if ((m_deployment.getHttpd() != null) && (m_deployment.getHttpd().isEnabled())) { if (m_config.m_sslContextFactory != null) { sslEnabled = true; } httpPort = (m_deployment.getHttpd().getPort()==null) ? (sslEnabled ? VoltDB.DEFAULT_HTTPS_PORT : VoltDB.DEFAULT_HTTP_PORT) : m_deployment.getHttpd().getPort(); if (m_deployment.getHttpd().getJsonapi() != null) { m_rvdb.m_jsonEnabled = m_deployment.getHttpd().getJsonapi().isEnabled(); } } if (m_config.m_httpPort != Constants.HTTP_PORT_DISABLED) { setupHttpServer(m_config.m_httpPortInterface, m_config.m_publicInterface, m_config.m_httpPort, false, true); } else if (httpPort == Constants.HTTP_PORT_AUTO) { httpPort = sslEnabled ? VoltDB.DEFAULT_HTTPS_PORT : VoltDB.DEFAULT_HTTP_PORT; setupHttpServer("", "", httpPort, true, false); } else if (httpPort != Constants.HTTP_PORT_DISABLED) { if (!m_deployment.getHttpd().isEnabled()) { return; } setupHttpServer(m_config.m_httpPortInterface, m_config.m_publicInterface, httpPort, false, true); } }
Source:
<code>public <B> IO<List<B>> traverseIO(F<A, IO<B>> f) { F2<A, IO<List<B>>, IO<List<B>>> f2 = (a, acc) -> IOFunctions.bind(acc, (bs) -> IOFunctions.map(f.f(a), b -> bs.cons(b))); return this.foldRight(f2, IOFunctions.unit(List.<B>nil())); <START> } <END></code><technical_language>I looked down, this above, line avoid types</technical_language>

Target:
public <B> IO<List<B>> traverseIO(F<A, IO<B>> f) { return this.foldRight( (a, acc) -> IOFunctions.bind(acc, (bs) -> IOFunctions.map(f.f(a), b -> bs.cons(b))), IOFunctions.unit(List.<B>nil()) ); }
Source:
<code>public void countLostEvent(TmfTimeRange timeRange, int nbLostEvents, boolean fullRange) { if (timeRange.getStartTime().getValue() < 0 || timeRange.getEndTime().getValue() < 0) { return; } int indexStart = (int) ((timeRange.getStartTime().getValue() - fFirstBucketTime) / fBucketDuration); int indexEnd = (int) ((timeRange.getEndTime().getValue() - fFirstBucketTime) / fBucketDuration); if (!fullRange) { if (timeRange.getEndTime().getValue() > fTimeLimit) { indexEnd = (int) ((fTimeLimit - fFirstBucketTime) / fBucketDuration); } } int nbBucketRange = (indexEnd - indexStart) + 1; int lostEventPerBucket = (int) Math.ceil((double) nbLostEvents / nbBucketRange); <START> int lastLostCol = nbLostEvents - lostEventPerBucket * (nbBucketRange -1); <END> if (fullRange && timeRange.getEndTime().getValue() >= fTimeLimit) { while (timeRange.getEndTime().getValue() >= fTimeLimit) { mergeBuckets(); } } indexEnd = Math.min(indexEnd, DEFAULT_NUMBER_OF_BUCKETS); for (int index = indexStart; index <= indexEnd; index++) { if (index == (indexStart + nbBucketRange)) { fLostEventsBuckets[index] += lastLostCol; } else { fLostEventsBuckets[index] += lostEventPerBucket; } } fNbEvents++; fireModelUpdateNotification(nbLostEvents); }</code><technical_language>space -1</technical_language>

Target:
public void countLostEvent(TmfTimeRange timeRange, int nbLostEvents, boolean fullRange) { if (timeRange.getStartTime().getValue() < 0 || timeRange.getEndTime().getValue() < 0) { return; } int indexStart = (int) ((timeRange.getStartTime().getValue() - fFirstBucketTime) / fBucketDuration); int indexEnd = (int) ((timeRange.getEndTime().getValue() - fFirstBucketTime) / fBucketDuration); if (!fullRange) { if (timeRange.getEndTime().getValue() > fTimeLimit) { indexEnd = (int) ((fTimeLimit - fFirstBucketTime) / fBucketDuration); } } int nbBucketRange = (indexEnd - indexStart) + 1; int lostEventPerBucket = (int) Math.ceil((double) nbLostEvents / nbBucketRange); int lastLostCol = nbLostEvents - lostEventPerBucket * (nbBucketRange - 1); if (fullRange && timeRange.getEndTime().getValue() >= fTimeLimit) { while (timeRange.getEndTime().getValue() >= fTimeLimit) { mergeBuckets(); } } indexEnd = Math.min(indexEnd, fLastBucket); for (int index = indexStart; index <= indexEnd; index++) { if (index == (indexStart + nbBucketRange)) { fLostEventsBuckets[index] += lastLostCol; } else { fLostEventsBuckets[index] += lostEventPerBucket; } } fNbEvents++; fireModelUpdateNotification(nbLostEvents); }
Source:
<code>private static boolean isSAM(ClassTree classBody) { if (hasOnlyOneMethod(classBody.members()) && classBody.symbol().isTypeSymbol()) { <START> MethodJavaSymbol methodSymbol = ((MethodJavaSymbol) ((MethodTree) classBody.symbol().memberSymbols().stream().findFirst().get().declaration()) <END> .symbol()); JavaSymbol.TypeJavaSymbol symbol = (JavaSymbol.TypeJavaSymbol) classBody.symbol(); boolean checkAnonymousClassFP = defaultMehodsSameSign(methodSymbol); return symbol.getInterfaces().size() == 1 && symbol.getSuperclass().is("java.lang.Object") && checkAnonymousClassFP; } return false; }</code><technical_language>JavaSymbol.MethodJavaSymbol simply MethodJavaSymbol. This class is a nested class JavaSymbol prefer limit number of imports</technical_language>

Target:
private static boolean isSAM(ClassTree classBody) { if (hasOnlyOneMethod(classBody.members())) { JavaSymbol.TypeJavaSymbol symbol = (JavaSymbol.TypeJavaSymbol) classBody.symbol(); return symbol.getInterfaces().size() == 1 && symbol.getSuperclass().is(JAVA_LANG_OBJECT) && hasSingleAbstractMethodInHierarchy(symbol.superTypes()); } return false; }
Source:
<code>protected void documentModelToAvro(Schema schema, DocumentModel doc, GenericRecord record) { record.put(Constants.UUID, doc.getId()); record.put(Constants.NAME, doc.getName()); record.put(Constants.TITLE, doc.getTitle()); record.put(Constants.PATH, doc.getPathAsString()); <START> record.put(Constants.REPOSITORY, doc.getRepositoryName()); <END> record.put(Constants.PRIMARY_TYPE, doc.getType()); DocumentRef parentRef = doc.getParentRef(); if (parentRef != null) { record.put(Constants.PARENT_ID, parentRef.toString()); } record.put(Constants.CURRENT_LIFE_CYCLE_STATE, doc.getCurrentLifeCycleState()); if (doc.isVersion()) { record.put(Constants.VERSION_LABEL, doc.getVersionLabel()); record.put(Constants.VERSION_VERSIONABLE_ID, doc.getVersionSeriesId()); } record.put(Constants.IS_PROXY, doc.isProxy()); record.put(Constants.IS_TRASHED, doc.isTrashed()); record.put(Constants.IS_VERSION, doc.isVersion()); record.put(Constants.IS_CHECKIN, !doc.isCheckedOut()); record.put(Constants.IS_LATEST_VERSION, doc.isLatestVersion()); record.put(Constants.IS_LATEST_MAJOR_VERSION, doc.isLatestMajorVersion()); record.put(Constants.CHANGE_TOKEN, doc.getChangeToken()); if (doc.getPos() != null) { record.put(Constants.IS_PROXY, doc.getPos()); } record.put(Constants.MIXIN_TYPES, doc.getFacets()); record.put(Constants.DOCUMENT_TYPE, service.toAvro(schema.getField(Constants.DOCUMENT_TYPE).schema(), doc)); }</code><technical_language>call constant (and value) REPOSITORY_NAME</technical_language>

Target:
protected void documentModelToAvro(Schema schema, DocumentModel doc, GenericRecord record) { record.put(AvroConstants.UUID, doc.getId()); record.put(AvroConstants.NAME, doc.getName()); record.put(AvroConstants.TITLE, doc.getTitle()); record.put(AvroConstants.PATH, doc.getPathAsString()); record.put(AvroConstants.REPOSITORY_NAME, doc.getRepositoryName()); record.put(AvroConstants.PRIMARY_TYPE, doc.getType()); DocumentRef parentRef = doc.getParentRef(); if (parentRef != null) { record.put(AvroConstants.PARENT_ID, parentRef.toString()); } record.put(AvroConstants.CURRENT_LIFE_CYCLE_STATE, doc.getCurrentLifeCycleState()); if (doc.isVersion()) { record.put(AvroConstants.VERSION_LABEL, doc.getVersionLabel()); record.put(AvroConstants.VERSION_VERSIONABLE_ID, doc.getVersionSeriesId()); } record.put(AvroConstants.IS_PROXY, doc.isProxy()); record.put(AvroConstants.IS_TRASHED, doc.isTrashed()); record.put(AvroConstants.IS_VERSION, doc.isVersion()); record.put(AvroConstants.IS_CHECKEDIN, !doc.isCheckedOut()); record.put(AvroConstants.IS_LATEST_VERSION, doc.isLatestVersion()); record.put(AvroConstants.IS_LATEST_MAJOR_VERSION, doc.isLatestMajorVersion()); record.put(AvroConstants.CHANGE_TOKEN, doc.getChangeToken()); if (doc.getPos() != null) { record.put(AvroConstants.POS, doc.getPos()); } record.put(AvroConstants.MIXIN_TYPES, doc.getFacets()); record.put(AvroConstants.DOCUMENT_TYPE, service.toAvro(schema.getField(AvroConstants.DOCUMENT_TYPE).schema(), doc)); }
Source:
<code>public boolean releaseAllWriters() { boolean released = writerPool.releaseAll(); if (null != backupWriterPool) { <START> return backupWriterPool.releaseAll() || released; <END> } return released; }</code><technical_language>return is WriterMaintenanceJob throttle threads</technical_language>

Target:
public boolean releaseAllWriters () { return writerPool.releaseAll(); }
Source:
<code>private void setBondAggregatorIdsValidStatuses( List<VdsNetworkInterface> interfaces) { <START> for (VdsNetworkInterface bond : interfaces) { if (!bond.isBond()) { continue; } bond.setBondAggregatorIdsValid(isSlaveAggregatorIdsValid(bond, interfaces)); } <END> }</code><technical_language>notice previous alterations, this easily rewritten stream api do filtering applying method items. If better, do this, important</technical_language>

Target:
private void setBondAggregatorIdsValidStatuses( List<VdsNetworkInterface> interfaces) { interfaces.stream().filter(b -> b.isBond()).forEach(b -> b.setBondAggregationAlert(getBondAggregationAlert(b, interfaces))); }
Source:
<code>private void createExistingTagsSection(Composite parent) { Composite right = new Composite(parent, SWT.BORDER); right.setLayout(GridLayoutFactory.swtDefaults().create()); new Label(right, SWT.WRAP).setText(UIText.CreateTagDialog_existingTags); Table table = new Table(right, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION | SWT.FILL); table.setLayoutData(new GridData(GridData.FILL_BOTH)); TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(100, 20)); table.setLayout(layout); <START> new TableColumn(table, SWT.BORDER | SWT.V_SCROLL); <END> tagViewer = new TableViewer(table); tagViewer.setLabelProvider(new TagLabelProvider()); tagViewer.setContentProvider(new WorkbenchContentProvider()); tagViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { fillTagDialog(); } }); tagViewer.setInput(new TagInputList(existingTags)); tagViewer.addFilter(new ViewerFilter() { @Override public boolean select(Viewer viewer, Object parentElement, Object element) { Tag tag = (Tag) element; if (null != tagNamePattern) return tagNamePattern.matcher(tag.getTag()).find(); else return true; } }); applyDialogFont(parent); }</code><technical_language>is gain introducing columns is column? change 597 for a previous bug caused introduction of columns</technical_language>

Target:
private void createExistingTagsSection(Composite parent) { Composite right = new Composite(parent, SWT.BORDER); right.setLayout(GridLayoutFactory.swtDefaults().create()); new Label(right, SWT.WRAP).setText(UIText.CreateTagDialog_existingTags); Table table = new Table(right, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION | SWT.FILL); table.setLayoutData(new GridData(GridData.FILL_BOTH)); TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(100, 20)); table.setLayout(layout); tagViewer = new TableViewer(table); tagViewer.setLabelProvider(new TagLabelProvider()); tagViewer.setContentProvider(new WorkbenchContentProvider()); tagViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { fillTagDialog(); } }); tagViewer.setInput(new TagInputList(existingTags)); tagViewer.addFilter(new ViewerFilter() { @Override public boolean select(Viewer viewer, Object parentElement, Object element) { Tag tag = (Tag) element; if (tagNamePattern != null) return tagNamePattern.matcher(tag.getTag()).find(); else return true; } }); applyDialogFont(parent); }
Source:
<code>protected boolean isInVisibleLines() { if (!super.isInVisibleLines()) { return false; } try { ISourceViewer viewer= super.getViewer(); int startLineOffset= <START> viewer.getDocument().getLineInformationOfOffset(getPosition().getOffset()).getOffset(); <END> int previousEndLineOffset= startLineOffset - 1; return super.isInVisibleLines(previousEndLineOffset); } catch (Exception e) { return true; } }</code><technical_language>null guard</technical_language>

Target:
protected boolean isInVisibleLines() { if (!super.isInVisibleLines()) { return false; } ISourceViewer viewer= super.getViewer(); IDocument document= viewer.getDocument(); if (document == null) { return false; } try { int startLineOffset= document.getLineInformationOfOffset(getPosition().getOffset()).getOffset(); int previousEndLineOffset= startLineOffset - 1; return super.isInVisibleLines(previousEndLineOffset); } catch (BadLocationException e) { return false; } }
Source:
<code>public void validateRedirectURIs(FacesContext context, UIComponent component, Object value) { if (!(value instanceof String)) { handleValidationError(context, "label.oauth2.missing.redirectURI"); } List<String> redirectURIs = Arrays.asList(((String) value).split(",")); if (redirectURIs.isEmpty()) { handleValidationError(context, "label.oauth2.missing.redirectURI"); } <START> redirectURIs.stream().map(redirectURI -> redirectURI.trim()).forEach(redirectURI -> { <END> if (redirectURI.isEmpty()) { handleValidationError(context, "label.oauth2.empty.redirectURI"); } if (!OAuth2Client.isRedirectURIValid(redirectURI)) { handleValidationError(context, "label.oauth2.invalid.redirectURIs"); } }); }</code><technical_language>String::trim</technical_language>

Target:
public void validateRedirectURIs(FacesContext context, UIComponent component, Object value) { if (!(value instanceof String)) { handleValidationError(context, "label.oauth2.missing.redirectURI"); } List<String> redirectURIs = Arrays.asList(((String) value).split(",")); if (redirectURIs.isEmpty()) { handleValidationError(context, "label.oauth2.missing.redirectURI"); } redirectURIs.stream().map(String::trim).forEach(redirectURI -> { if (redirectURI.isEmpty()) { handleValidationError(context, "label.oauth2.empty.redirectURI"); } if (!OAuth2Client.isRedirectURIValid(redirectURI)) { handleValidationError(context, "label.oauth2.invalid.redirectURIs"); } }); }
Source:
<code>public void execute(TaskListener listener) { int numFiles = 0; <START> File root = new File(getRootDir(), FINGERPRINTS_DIR_NAME); <END> File[] files1 = root.listFiles(f -> f.isDirectory() && f.getName().length()==2); if(files1!=null) { for (File file1 : files1) { File[] files2 = file1.listFiles(f -> f.isDirectory() && f.getName().length()==2); for(File file2 : files2) { File[] files3 = file2.listFiles(f -> f.isFile() && Pattern.compile("[0-9a-f]{28}\\.xml").matcher(f.getName()).matches()); for(File file3 : files3) { if(check(file3, listener)) numFiles++; } deleteIfEmpty(file2); } deleteIfEmpty(file1); } } listener.getLogger().println("Cleaned up "+numFiles+" records"); }</code><technical_language>nit: feels more sense a method File getFingerprintsFile() for testing separating out String getRootDir()</technical_language>

Target:
public void execute(TaskListener listener) { int numFiles = 0; File root = new File(getRootDir(), FINGERPRINTS_DIR_NAME); File[] files1 = root.listFiles(f -> f.isDirectory() && f.getName().length()==2); if(files1!=null) { for (File file1 : files1) { File[] files2 = file1.listFiles(f -> f.isDirectory() && f.getName().length()==2); for(File file2 : files2) { File[] files3 = file2.listFiles(f -> f.isFile() && FINGERPRINT_FILE_PATTERN.matcher(f.getName()).matches()); for(File file3 : files3) { if(check(file3, listener)) numFiles++; } deleteIfEmpty(file2); } deleteIfEmpty(file1); } } listener.getLogger().println("Cleaned up "+numFiles+" records"); }
Source:
<code>public void testExceptionWhenUsePositionalParameters() throws Exception { thrown.expect( PersistenceException.class ); thrown.expectMessage( "org.hibernate.HibernateException: OGM000094" ); StoredProcedureQuery storedProcedureQuery = em.createStoredProcedureQuery( Car.SIMPLE_VALUE_PROC, Car.class ); storedProcedureQuery.registerStoredProcedureParameter( 0, Integer.class, ParameterMode.IN ); storedProcedureQuery.setParameter( 0, 1 ); <START> storedProcedureQuery.getSingleResult(); <END> }</code><technical_language>In OgmJpaTestCase is a method called inTransaction this: inTransaction( em -> { StoredProcedureQuery storedProcedureQuery = em.createStoredProcedureQuery( Car.SIMPLE_VALUE_PROC, Car.class ); storedProcedureQuery.registerStoredProcedureParameter( 0, Integer.class, ParameterMode.IN ); storedProcedureQuery.setParameter( 0, 1 ); storedProcedureQuery.getSingleResult(); } ); in new tests this remove setup tear methods</technical_language>

Target:
public void testExceptionWhenUsePositionalParameters() throws Exception { thrown.expect( PersistenceException.class ); thrown.expectMessage( "org.hibernate.HibernateException: OGM000094" ); inTransaction( em -> { StoredProcedureQuery storedProcedureQuery = em.createStoredProcedureQuery( Car.SIMPLE_VALUE_PROC, Car.class ); storedProcedureQuery.registerStoredProcedureParameter( 0, Integer.class, ParameterMode.IN ); storedProcedureQuery.setParameter( 0, 1 ); storedProcedureQuery.getSingleResult(); } ); }
Source:
<code>public int read(byte[] b, int off, int len) throws IOException { try { return super.read(b, off, len); <START> } catch (ZipException e) { <END> throw buildBadDataException(format, e); } catch (EOFException e) { throw buildPrematureEofException(format, e); } }</code><technical_language>I sense add a generic method for handling IOException instead of repeat logic in method. like: java static BadMessageException handleException(String format, IOException e) throws IOException { if (e instanceof ZipException) { return buildBadDataException(format, e); } else if (e instanceof EOFException) { return buildPrematureEofException(format, e); } else { throw e; } }</technical_language>

Target:
public int read(byte[] b, int off, int len) throws IOException { try { return delegate.read(b, off, len); } catch (IOException e) { throw handleException(format, e); } }
Source:
<code>public void downloadLinkReceived(String url) { <START> if (url != null) <END> incomingRef = url; uiState = UiState.READY_TO_INSTALL; uiStateScreenTransition(); Toast.makeText(this, Localization.get("menu.sms.ready"), Toast.LENGTH_LONG).show(); }</code><technical_language>need curly braces here</technical_language>

Target:
public void downloadLinkReceived(String url) { if (url != null) { incomingRef = url; uiState = UiState.READY_TO_INSTALL; uiStateScreenTransition(); Toast.makeText(this, Localization.get("menu.sms.ready"), Toast.LENGTH_LONG).show(); } }
Source:
<code>public AdGroupConditionFieldAutoCompleter() { super(); mVerbs.put("NAME", "NAME"); buildCompletions(); getTypeDictionary().put("NAME", String.class); mColumnNameDict.put("NAME", "$CN"); ValueValidationFunction charValidation = validCahracters; for (String key : mVerbs.keySet()) { <START> java.util.ArrayList<ValueValidationFunction> curList = new java.util.ArrayList<ValueValidationFunction>(); <END> curList.add(charValidation); mValidationDict.put(key, curList); } }</code><technical_language>please remove java.util</technical_language>

Target:
public AdGroupConditionFieldAutoCompleter() { super(); mVerbs.put("NAME", "NAME"); buildCompletions(); getTypeDictionary().put("NAME", String.class); mColumnNameDict.put("NAME", "$CN"); ValueValidationFunction charValidation = validCahracters; for (String key : mVerbs.keySet()) { List<ValueValidationFunction> curList = new ArrayList<ValueValidationFunction>(1); curList.add(charValidation); mValidationDict.put(key, curList); } }
Source:
<code>public LiveData<List<Provider>> getProviders(RestApi restApi) { final MutableLiveData<List<Provider>> providerLiveData = new MutableLiveData<>(); if (NetworkUtils.isOnline()) { restApi.getProviderList().enqueue(new Callback<Results<Provider>>() { @Override public void onResponse(@NotNull Call<Results<Provider>> call, @NotNull Response<Results<Provider>> response) { if (response.isSuccessful()) { if (!response.body().getResults().isEmpty()) { providerLiveData.setValue(response.body().getResults()); } else { providerLiveData.setValue(null); } } else { Log.d(TAG, "Response Unsuccessful!" + response.errorBody()); ToastUtil.error(openMRS.getString(R.string.unable_to_fetch_providers)); providerLiveData.setValue(null); } } @Override public void onFailure(@NotNull Call<Results<Provider>> call, @NotNull Throwable t) { Log.d(TAG, "Call Failed! Error: " + t.getMessage()); ToastUtil.error(openMRS.getString(R.string.unable_to_fetch_providers)); providerLiveData.setValue(null); } }); } else { <START> ToastUtil.error(openMRS.getString(R.string.device_offline_msg)); <END> } return providerLiveData; }</code><technical_language>**log** (that device is offline)</technical_language>

Target:
public LiveData<List<Provider>> getProviders(RestApi restApi) { final MutableLiveData<List<Provider>> providerLiveData = new MutableLiveData<>(); if (NetworkUtils.isOnline()) { restApi.getProviderList().enqueue(new Callback<Results<Provider>>() { @Override public void onResponse(@NotNull Call<Results<Provider>> call, @NotNull Response<Results<Provider>> response) { if (response.isSuccessful()) { if (!response.body().getResults().isEmpty()) { providerLiveData.setValue(response.body().getResults()); } else { providerLiveData.setValue(null); } } else { OpenMRS.getInstance().getOpenMRSLogger().e("Reading providers failed. Response: " + response.errorBody()); ToastUtil.error(OpenMRS.getInstance().getString(R.string.unable_to_fetch_providers)); providerLiveData.setValue(null); } } @Override public void onFailure(@NotNull Call<Results<Provider>> call, @NotNull Throwable t) { OpenMRS.getInstance().getOpenMRSLogger().e("Reading providers failed.", t); ToastUtil.error(OpenMRS.getInstance().getString(R.string.unable_to_fetch_providers)); providerLiveData.setValue(null); } }); } else { ToastUtil.error(OpenMRS.getInstance().getString(R.string.device_offline_msg)); OpenMRS.getInstance().getOpenMRSLogger().e("Failed to read providers. Device Offline"); } return providerLiveData; }
Source:
<code>public void onMapReady(@NonNull final MapboxMap map) { map.setStyle(Style.LIGHT, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { style.addSource(new VectorSource(VECTOR_SOURCE_NAME, "mapbox://mapbox.us_census_states_2015")); try { <START> statesArray = new JSONArray(loadJson()); <END> } catch (Exception exception) { Log.e("JSONVectorMix", "Exception Loading GeoJSON: ", exception); } Expression.Stop[] stops = new Expression.Stop[statesArray.length()]; for (int x = 0; x < statesArray.length(); x++) { try { JSONObject singleState = statesArray.getJSONObject(x); double green = singleState.getDouble(DATA_STYLE_UNEMPLOYMENT_PROP) / 14 * 255; stops[x] = stop( Double.parseDouble(singleState.getString(DATA_MATCH_PROP)), rgba(0, green, 0, 1) ); } catch (JSONException exception) { throw new RuntimeException(exception); } } FillLayer statesJoinLayer = new FillLayer("states-join", VECTOR_SOURCE_NAME); statesJoinLayer.setSourceLayer(VECTOR_SOURCE_NAME); statesJoinLayer.withProperties( fillColor(match(toNumber(get(DATA_MATCH_PROP)), rgba(0, 0, 0, 1), stops)) ); style.addLayerAbove(statesJoinLayer, "waterway-label"); } }); }</code><technical_language>Load file a worker thread</technical_language>

Target:
public void onMapReady(@NonNull final MapboxMap map) { this.mapboxMap = map; map.setStyle(Style.LIGHT, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { style.addSource(new VectorSource(VECTOR_SOURCE_NAME, "mapbox://mapbox.us_census_states_2015")); new LoadJson(ChoroplethJsonVectorMixActivity.this).execute(); } }); }
Source:
<code><START> public ModeshapeNodeData readModeshapeNodeData(ModelId modelId) { <END> String path = '/' + modelId.getNamespace().replace('.', '/') + '/' + modelId.getName() + '/' + modelId.getVersion(); return readModeshapeNodeData(path); }</code><technical_language>important I guess a formatter nicer string concatenation here</technical_language>

Target:
public ModeshapeNodeData readModeshapeNodeData(ModelId modelId) { String path = String.format("/%s/%s/%s", modelId.getNamespace().replace('.', '/'), modelId.getName(), modelId.getVersion()); return readModeshapeNodeData(path); }
Source:
<code>public List<Thread> getThreads() { try { getResult(); } catch (SQLException e) { <START> new IllegalStateException("SQL Error: " + e); <END> } return threads; }</code><technical_language>thrown, others</technical_language>

Target:
public List<Thread> getThreads() { try { getResult(); } catch (SQLException e) { throw new IllegalStateException("SQL Error: " + e); } return threads; }
Source:
<code>private VariantContext createVC(final VCFHeader header) { <START> return createVCGeneral(header, "1", 1); <END> }</code><technical_language>This method collapsed createVCGeneral (it calls identical)</technical_language>

Target:
private VariantContext createVC(final VCFHeader header) { final List<Allele> alleles = new ArrayList<>(); final Map<String, Object> attributes = new HashMap<>(); final GenotypesContext genotypes = GenotypesContext.create(header.getGenotypeSamples().size()); alleles.add(Allele.create("A", true)); alleles.add(Allele.create("ACC", false)); attributes.put("DP", "50"); for (final String name : header.getGenotypeSamples()) { final Genotype gt = new GenotypeBuilder(name, alleles.subList(1, 2)).GQ(0).attribute("BB", "1").phased(true) .make(); genotypes.add(gt); } return new VariantContextBuilder("RANDOM", "1", 1, 1, alleles) .genotypes(genotypes).attributes(attributes).make(); }
Source:
<code>private long processFile(FileStatus file, String currentFile, String checkPointValue, FileSystem fs, Map<FileStatus, String> results, Map<String, FileStatus> collectorPaths, String stream) throws IOException { long fileTimeStamp = -1; String fileName = file.getPath().getName(); if (fileName != null && (!fileName.equalsIgnoreCase(currentFile) || processLastFile)) { String destDir = getCategoryJobOutTmpPath(stream) .toString(); if (aboveCheckpoint(checkPointValue, fileName)) { results.put(file, destDir); fileTimeStamp = CalendarHelper.getDateFromCollectorFileName(fileName); <START> numberOfFilesProcessed++; <END> } collectorPaths.put(fileName, file); } return fileTimeStamp; }</code><technical_language>changing defintion of numberOfFilesProcessed..earlier data files empty files</technical_language>

Target:
private long processFile(FileStatus file, String currentFile, String checkPointValue, FileSystem fs, Map<FileStatus, String> results, Map<String, FileStatus> collectorPaths, String stream) throws IOException { long fileTimeStamp = -1; String fileName = file.getPath().getName(); if (fileName != null && (!fileName.equalsIgnoreCase(currentFile) || processLastFile)) { String destDir = getCategoryJobOutTmpPath(stream) .toString(); if (aboveCheckpoint(checkPointValue, fileName)) { results.put(file, destDir); fileTimeStamp = CalendarHelper.getDateFromCollectorFileName(fileName); if (file.getLen() != 0) { numberOfFilesProcessed++; } } collectorPaths.put(fileName, file); } return fileTimeStamp; }
Source:
<code>private boolean finalizeParentTemplate(DatadiskTO dataDiskTemplate, VMTemplateVO templateVO, TemplateInfo parentTemplate, DataStore imageStore, int diskCount) { TemplateInfo templateInfo = imageFactory.getTemplate(templateVO.getId(), imageStore); AsyncCallFuture<TemplateApiResult> templateFuture = createDatadiskTemplateAsync(parentTemplate, templateInfo, dataDiskTemplate.getPath(), dataDiskTemplate.getDiskId(), dataDiskTemplate.getFileSize(), dataDiskTemplate.isBootable()); TemplateApiResult result = null; try { result = templateFuture.get(); if (!result.isSuccess()) { s_logger.debug("Since creation of parent template: " + templateInfo.getId() + " failed, delete Datadisk templates that were created as part of parent" + " template download"); cleanupDatadiskTemplates(templateInfo); } return result.isSuccess(); <START> } catch (Exception e) { <END> s_logger.error("Creation of template: " + templateVO.getId() + " failed: " + result.getResult(), e); return false; } }</code><technical_language>Do need catch Pokemons here</technical_language>

Target:
private boolean finalizeParentTemplate(DatadiskTO dataDiskTemplate, VMTemplateVO templateVO, TemplateInfo parentTemplate, DataStore imageStore, int diskCount) throws ExecutionException, InterruptedException, CloudRuntimeException { TemplateInfo templateInfo = imageFactory.getTemplate(templateVO.getId(), imageStore); AsyncCallFuture<TemplateApiResult> templateFuture = createDatadiskTemplateAsync(parentTemplate, templateInfo, dataDiskTemplate.getPath(), dataDiskTemplate.getDiskId(), dataDiskTemplate.getFileSize(), dataDiskTemplate.isBootable()); TemplateApiResult result = null; result = templateFuture.get(); if (!result.isSuccess()) { s_logger.debug("Since creation of parent template: " + templateInfo.getId() + " failed, delete Datadisk templates that were created as part of parent" + " template download"); cleanupDatadiskTemplates(templateInfo); } return result.isSuccess(); }
Source:
<code>public void saveTestMeasures(SensorContext context) { InputFile unitTestFile = getUnitTestInputFile(context.fileSystem()); if (unitTestFile != null) { context.<Integer>newMeasure().on(unitTestFile).withValue(skipped).forMetric(CoreMetrics.SKIPPED_TESTS).save(); context.<Long>newMeasure().on(unitTestFile).withValue((long) testDurationSeconds()).forMetric(CoreMetrics.TEST_EXECUTION_TIME).save(); context.<Integer>newMeasure().on(unitTestFile).withValue((int) liveTests()).forMetric(CoreMetrics.TESTS).save(); context.<Integer>newMeasure().on(unitTestFile).withValue(errors).forMetric(CoreMetrics.TEST_ERRORS).save(); context.<Integer>newMeasure().on(unitTestFile).withValue(failures).forMetric(CoreMetrics.TEST_FAILURES).save(); if (liveTests() > 0) { context.<Double>newMeasure().on(unitTestFile).withValue(ParsingUtils.scaleValue(successPercentage())).forMetric(CoreMetrics.TEST_SUCCESS_DENSITY).save(); } } else { <START> LOGGER.debug("Following file is not located in the test folder specified in the Sonar configuration: " + file <END> + ". The test results won't be reported in Sonar."); } }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') built-in formatting construct this argument. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public void saveTestMeasures(SensorContext context) { InputFile unitTestFile = getUnitTestInputFile(context.fileSystem()); if (unitTestFile != null) { context.<Integer>newMeasure().on(unitTestFile).withValue(skipped).forMetric(CoreMetrics.SKIPPED_TESTS).save(); context.<Long>newMeasure().on(unitTestFile).withValue((long) testDurationMilliseconds()).forMetric(CoreMetrics.TEST_EXECUTION_TIME).save(); context.<Integer>newMeasure().on(unitTestFile).withValue((int) liveTests()).forMetric(CoreMetrics.TESTS).save(); context.<Integer>newMeasure().on(unitTestFile).withValue(errors).forMetric(CoreMetrics.TEST_ERRORS).save(); context.<Integer>newMeasure().on(unitTestFile).withValue(failures).forMetric(CoreMetrics.TEST_FAILURES).save(); if (liveTests() > 0) { context.<Double>newMeasure().on(unitTestFile).withValue(ParsingUtils.scaleValue(successPercentage())).forMetric(CoreMetrics.TEST_SUCCESS_DENSITY).save(); } } else { LOGGER.debug("Following file is not located in the test folder specified in the Sonar configuration: " + file + ". The test results won't be reported in Sonar."); } }
Source:
<code>public boolean verifySig(byte[] data, byte[] sig) throws EncryptionException { try { Signature signer = Signature.getInstance("SHA1withDSA"); signer.initVerify(this.publicKeyPart); signer.update(data); return (signer.verify(sig)); <START> } catch (Exception e) { <END> throw new EncryptionException("DSA verification failed unexpectedly", e); } }</code><technical_language>avoid catch exception</technical_language>

Target:
public boolean verifySig(byte[] data, byte[] sig) throws EncryptionException { try { Signature signer = Signature.getInstance("SHA1withDSA"); signer.initVerify(this.publicKeyPart); signer.update(data); return (signer.verify(sig)); } catch (InvalidKeyException|SignatureException|NoSuchAlgorithmException e) { throw new EncryptionException("DSA verification failed unexpectedly", e); } }
Source:
<code>public void afterVideoExtensionConfigured(@Observes VideoExtensionConfigured event, ArquillianDescriptor descriptor) { VideoConfiguration configuration = new WebcamVideoConfiguration(reporterConfiguration.get()); for (ExtensionDef extension : descriptor.getExtensions()) { if (extension.getExtensionName().equals(EXTENSION_NAME)) { configuration.setConfiguration(extension.getExtensionProperties()); <START> configuration.validate(); <END> break; } } this.configuration.set(configuration); if (logger.isLoggable(Level.INFO)) { System.out.println("Configuration of Arquillian Desktop Video Recorder:"); System.out.println(this.configuration.get().toString()); } List<VideoStrategy> strategies = new ArrayList<VideoStrategy>(serviceLoader.get().all(VideoStrategy.class)); strategy.set(resolveVideoStrategy(strategies)); strategy.get().setConfiguration(this.configuration.get()); setup(); }</code><technical_language>in theory put this validation of this for loop. In case configuration validated time</technical_language>

Target:
public void afterVideoExtensionConfigured(@Observes VideoExtensionConfigured event, ArquillianDescriptor descriptor) { VideoConfiguration configuration = new WebcamVideoConfiguration(reporterConfiguration.get()); for (ExtensionDef extension : descriptor.getExtensions()) { if (extension.getExtensionName().equals(EXTENSION_NAME)) { configuration.setConfiguration(extension.getExtensionProperties()); configuration.validate(); break; } } this.configuration.set(configuration); if (logger.isLoggable(Level.INFO)) { System.out.println("Configuration of Arquillian Webcam Video Recorder:"); System.out.println(this.configuration.get().toString()); } List<VideoStrategy> strategies = new ArrayList<VideoStrategy>(serviceLoader.get().all(VideoStrategy.class)); strategy.set(resolveVideoStrategy(strategies)); strategy.get().setConfiguration(this.configuration.get()); setup(); }
Source:
<code>public InitCommand setSeparateGitDir(File gitDir) throws IllegalStateException { this.gitDir = gitDir; <START> validateDirs(); <END> return this; }</code><technical_language>I validate set member if validation succeeded</technical_language>

Target:
public InitCommand setSeparateGitDir(File gitDir) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.gitDir = gitDir; return this; }
Source:
<code>protected void addReadBuffer(final ByteBuffer bb) { addReadStats(bb.remaining()); synchronized(readerLock) { readBuffers.add(bb); <START> callReader(); <END> } }</code><technical_language>written currently listener execute pool for listener while holding this lock. I listeners, I want hold this lock while do that? is a reason lock it, I move out. FWIW, is another ListenerHelper type listener loop another thread, for specialized cases, I a good fit here</technical_language>

Target:
protected void addReadBuffer(final ByteBuffer bb) { addReadStats(bb.remaining()); synchronized(readerLock) { readBuffers.add(bb); } callReader(); }
Source:
<code>public void onBindHeaderViewHolder(HeaderViewHolder holder, int position) { String sortTitle = Utils.checkStringEmpty(getItem(position).getTitle()); String sortName = Utils.checkStringEmpty(getItem(position).getTrack().getName()); if (SortOrder.sortTypeSchedule().equals(Session.Companion.getTITLE()) && (!Utils.isEmpty(sortTitle))) { holder.header.setText(String.valueOf(sortTitle.toUpperCase().charAt(0))); } else if (SortOrder.sortTypeSchedule().equals(Session.Companion.getTRACK())){ holder.header.setText(String.valueOf(sortName)); <START> } else if (SortOrder.sortTypeSchedule().equals(Session.Companion.getSTART_TIME())) { <END> holder.header.setText(DateConverter.formatDateWithDefault(DateConverter.FORMAT_24H, getItem(position).getStartsAt())); } }</code><technical_language>Companion</technical_language>

Target:
public void onBindHeaderViewHolder(HeaderViewHolder holder, int position) { String sortTitle = Utils.checkStringEmpty(getItem(position).getTitle()); String sortName = Utils.checkStringEmpty(getItem(position).getTrack().getName()); if (SortOrder.sortTypeSchedule().equals(Session.TITLE) && (!Utils.isEmpty(sortTitle))) { holder.header.setText(String.valueOf(sortTitle.toUpperCase().charAt(0))); } else if (SortOrder.sortTypeSchedule().equals(Session.TRACK)){ holder.header.setText(String.valueOf(sortName)); } else if (SortOrder.sortTypeSchedule().equals(Session.START_TIME)) { holder.header.setText(DateConverter.formatDateWithDefault(DateConverter.FORMAT_24H, getItem(position).getStartsAt())); } }
Source:
<code>public Object[] getSyncConfigurationOptions(RealmConfiguration config) { <START> return new Object[14]; <END> }</code><technical_language>Is this change intended? Also, avoid magic numbers</technical_language>

Target:
public Object[] getSyncConfigurationOptions(RealmConfiguration config) { return new Object[SYNC_CONFIG_OPTIONS]; }
Source:
<code>private void validateRngRequiredSource() { <START> Version cluVersion = getVersion().getSelectedItem(); <END> boolean rngSupportedForCluster = isRngSupportedForClusterVersion(cluVersion); getRngRandomSourceRequired().setIsValid(rngSupportedForCluster || !getRngRandomSourceRequired().getEntity()); getRngHwrngSourceRequired().setIsValid(rngSupportedForCluster || !getRngHwrngSourceRequired().getEntity()); }</code><technical_language>Please call "clusterVersion" instead of "cluVersion"</technical_language>

Target:
private void validateRngRequiredSource() { Version clusterVersion = getVersion().getSelectedItem(); boolean rngSupportedForCluster = isRngSupportedForClusterVersion(clusterVersion); getRngRandomSourceRequired().setIsValid(rngSupportedForCluster || !getRngRandomSourceRequired().getEntity()); getRngHwrngSourceRequired().setIsValid(rngSupportedForCluster || !getRngHwrngSourceRequired().getEntity()); }
Source:
<code>public ArticlePageObject openMercuryArticleByName(String wikiURL, String articleName) { <START> getUrl(wikiURL + URLsContent.WIKI_DIR + articleName + "?cb=" + new Timestamp(System.currentTimeMillis()).getTime()); <END> PageObjectLogging .log("openMercuryArticleByName", "Article" + articleName + " was opened", true); return new ArticlePageObject(driver); }</code><technical_language>Please Yoda DateTime.now().getMillis() for a timestamp</technical_language>

Target:
public ArticlePageObject openMercuryArticleByName(String wikiURL, String articleName) { getUrl(wikiURL + URLsContent.WIKI_DIR + articleName + "?cb=" + DateTime.now().getMillis()); PageObjectLogging .log("openMercuryArticleByName", "Article" + articleName + " was opened", true); return new ArticlePageObject(driver); }
Source:
<code>public CcLinkingHelper setLinkedDLLNameSuffix(String suffix) { <START> if(this.cppConfiguration.isRenameDLL(featureConfiguration)) { <END> this.linkedDLLNameSuffix = Preconditions.checkNotNull(suffix); } return this; }</code><technical_language>do need check check if a suffix in CppHelper</technical_language>

Target:
public CcLinkingHelper setLinkedDLLNameSuffix(String suffix) { this.linkedDLLNameSuffix = Preconditions.checkNotNull(suffix); return this; }