auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public Mailmap getMailmap() { <END> if (mailmap == null) { mailmap = new Mailmap(); if (!isBare() && getDirectory() != null) { File workTree = getWorkTree(); File configuredMailmapFile = Optional .ofNullable(getConfig().getString("mailmap", null, "file")) .map(filePath -> { File f = new File(filePath); if (!f.isAbsolute()) { f = new File(workTree, filePath); } return f; }) .orElse(null); if (configuredMailmapFile != null && configuredMailmapFile.exists()) { try { Mailmap configuredMailmap = MailmapParser.parse(configuredMailmapFile); mailmap.append(configuredMailmap); } catch (IOException ignored) { } } File defaultMailmapFile = new File(workTree, ".mailmap"); if (!defaultMailmapFile.equals(configuredMailmapFile) && defaultMailmapFile .exists()) { try { Mailmap defaultMailmap = MailmapParser.parse(defaultMailmapFile); mailmap.append(defaultMailmap); } catch (IOException ignored) { } } } } return mailmap; }</code><technical_language>missing @since 5.7 annotation for new API</technical_language>

Target:
public Mailmap getMailmap() { if (mailmap == null) { mailmap = new Mailmap(); if (!isBare() && getDirectory() != null) { File configuredMailmapFile = Optional .ofNullable(getConfig().getString( ConfigConstants.CONFIG_MAILMAP_SECTION, null, ConfigConstants.CONFIG_KEY_FILE)) .map(filePath -> { File f = new File(filePath); if (!f.isAbsolute()) { f = new File(workTree, filePath); } return f; }) .orElse(null); if (configuredMailmapFile != null && configuredMailmapFile.exists()) { try { Mailmap configuredMailmap = MailmapParser.parse(configuredMailmapFile); mailmap.append(configuredMailmap); } catch (IOException e) { LOG.error(e.getMessage(), e); } } File defaultMailmapFile = new File(workTree, Constants.MAILMAP_FILENAME); if (!defaultMailmapFile.equals(configuredMailmapFile) && defaultMailmapFile .exists()) { try { Mailmap defaultMailmap = MailmapParser.parse(defaultMailmapFile); mailmap.append(defaultMailmap); } catch (IOException e) { LOG.error(e.getMessage(), e); } } } } return mailmap; }
Source:
<code>public void testCreateNewUserVariableAndDeletion() { String userVariableName = "testVariable1"; String secondUserVariableName = "testVariable2"; onBrickAtPosition(0).checkShowsText(R.string.brick_when_started); onBrickAtPosition(1).checkShowsText(R.string.brick_set_variable); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).performNewVariableInitial(userVariableName); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).perform(click()); onView(withText(R.string.brick_variable_spinner_create_new_variable)) .perform(click()); onView(withId(R.id.dialog_formula_editor_data_name_edit_text)).perform(typeText(secondUserVariableName)); onView(withId(android.R.id.button1)).perform(click()); <START> onBrickAtPosition(1).onFormulaTextField(R.id.brick_set_variable_edit_text).perform(click()); <END> onView(withId(R.id.formula_editor_keyboard_data)).perform(click()); onView(allOf(withChild(withText(userVariableName)), withChild(withText("0.0")))).perform(longClick()); onView(withText(R.string.delete)).perform(click()); onView(withText(R.string.deletion_alert_yes)).perform(click()); pressBack(); pressBack(); onView(withText(userVariableName)).check(doesNotExist()); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).onChildView(withText(userVariableName)) .check(doesNotExist()); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).onChildView(withText(secondUserVariableName)) .check(matches(isDisplayed())); }</code><technical_language>similar is done in testDeleteItemOfUserListBrickMultipleLists, put deleting item of data list in formula editor a function</technical_language>

Target:
public void testCreateNewUserVariableAndDeletion() { String userVariableName = "testVariable1"; String secondUserVariableName = "testVariable2"; onBrickAtPosition(0).checkShowsText(R.string.brick_when_started); onBrickAtPosition(1).checkShowsText(R.string.brick_set_variable); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner) .performNewVariableInitial(userVariableName); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner) .performNewVariable(secondUserVariableName); onBrickAtPosition(1).onFormulaTextField(R.id.brick_set_variable_edit_text) .perform(click()); deleteItemWithTextFromFormulaEditorDataList(userVariableName); pressBack(); onView(withText(userVariableName)) .check(doesNotExist()); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).onChildView(withText(userVariableName)) .check(doesNotExist()); onBrickAtPosition(1).onVariableSpinner(R.id.set_variable_spinner).onChildView(withText(secondUserVariableName)) .check(matches(isDisplayed())); }
Source:
<code>public void configure() throws Exception { onException(Exception.class) .redeliveryDelay("{{error.retryDelay}}") .maximumRedeliveries("{{error.maxRedeliveries}}") <START> .backOffMultiplier(2) <END> .retryAttemptedLogLevel(LoggingLevel.WARN); from("{{cdr.triplesupdate.stream.camel}}") .routeId("TripleIndexingRoute") .bean(indexingMessageProcessor) .log(INFO, "Received triple reindexing update message: ${headers[CamelFcrepoUri]}") .inOnly("{{reindexing.stream}}?disableTimeToLive=true"); from("{{reindexing.stream}}?asyncConsumer=true") .routeId("FcrepoReindexingTraverse") .log(INFO, "Reindexing ${headers[CamelFcrepoUri]}") .inOnly("{{triplestore.reindex.stream}}") .to("fcrepo:{{fcrepo.baseUrl}}?preferInclude=PreferContainment" + "&preferOmit=ServerManaged&accept=application/n-triples") .split(body().tokenize("\\n")).streaming() .removeHeader(FCREPO_URI) .removeHeader("JMSCorrelationID") .process(exchange -> { final String body = exchange.getIn().getBody(String.class); if (body != null) { final String parts[] = body.split("\\s+"); if (parts.length > 2 && parts[1].equals(LDP_CONTAINS) && parts[2].startsWith("<")) { exchange.getIn().setHeader(FCREPO_URI, parts[2].substring(1, parts[2].length() - 1)); } exchange.getIn().setBody(null); } }) .filter(header(FCREPO_URI).isNotNull()) .inOnly("{{reindexing.stream}}?disableTimeToLive=true"); }</code><technical_language>sense capture backoff multiplier in a property well</technical_language>

Target:
public void configure() throws Exception { onException(Exception.class) .redeliveryDelay("{{error.retryDelay}}") .maximumRedeliveries("{{error.maxRedeliveries}}") .backOffMultiplier("{{error.backOffMultiplier}}") .retryAttemptedLogLevel(LoggingLevel.WARN); from("{{cdr.triplesupdate.stream.camel}}") .routeId("TripleIndexingRoute") .bean(indexingMessageProcessor) .log(INFO, "Received triple reindexing update message: ${headers[CamelFcrepoUri]}") .inOnly("{{reindexing.stream}}?disableTimeToLive=true"); from("{{reindexing.stream}}?asyncConsumer=true") .routeId("FcrepoReindexingTraverse") .log(INFO, "Reindexing ${headers[CamelFcrepoUri]}") .inOnly("{{triplestore.reindex.stream}}") .to("fcrepo:{{fcrepo.baseUrl}}?preferInclude=PreferContainment" + "&preferOmit=ServerManaged&accept=application/n-triples") .split(body().tokenize("\\n")).streaming() .removeHeader(FCREPO_URI) .removeHeader("JMSCorrelationID") .process(exchange -> { final String body = exchange.getIn().getBody(String.class); if (body != null) { final String parts[] = body.split("\\s+"); if (parts.length > 2 && parts[1].equals(LDP_CONTAINS) && parts[2].startsWith("<")) { exchange.getIn().setHeader(FCREPO_URI, parts[2].substring(1, parts[2].length() - 1)); } exchange.getIn().setBody(null); } }) .filter(header(FCREPO_URI).isNotNull()) .inOnly("{{reindexing.stream}}?disableTimeToLive=true"); }
Source:
<code>private AggregationIterator(final SeekableView[] iterators, final long start_time, final long end_time, final Aggregator aggregator, final Interpolation method, final boolean rate) { <START> LOG.debug(String.format("Aggregating %d iterators", iterators.length)); <END> this.iterators = iterators; this.start_time = start_time; this.end_time = end_time; this.aggregator = aggregator; this.method = method; this.rate = rate; final int size = iterators.length; timestamps = new long[size * 2]; values = new long[size * 2]; int num_empty_spans = 0; for (int i = 0; i < size; i++) { SeekableView it = iterators[i]; it.seek(start_time); final DataPoint dp; try { dp = it.next(); } catch (NoSuchElementException e) { ++num_empty_spans; endReached(i); continue; } if (dp.timestamp() >= start_time) { putDataPoint(size + i, dp); } else { if (LOG.isDebugEnabled()) { LOG.debug(String.format("No DP in range for #%d: %d < %d", i, dp.timestamp(), start_time)); } endReached(i); continue; } if (rate) { if (it.hasNext()) { moveToNext(i); } else { endReached(i); } } } if (num_empty_spans > 0) { LOG.debug(String.format("%d out of %d spans are empty!", num_empty_spans, size)); } }</code><technical_language>This is a lot cheaper: LOG.debug("Aggregating iterators", iterators.length);</technical_language>

Target:
private AggregationIterator(final SeekableView[] iterators, final long start_time, final long end_time, final Aggregator aggregator, final Interpolation method, final boolean rate) { LOG.debug("Aggregating iterators", iterators.length); this.iterators = iterators; this.start_time = start_time; this.end_time = end_time; this.aggregator = aggregator; this.method = method; this.rate = rate; final int size = iterators.length; timestamps = new long[size * 2]; values = new long[size * 2]; int num_empty_spans = 0; for (int i = 0; i < size; i++) { SeekableView it = iterators[i]; it.seek(start_time); final DataPoint dp; try { dp = it.next(); } catch (NoSuchElementException e) { ++num_empty_spans; endReached(i); continue; } if (dp.timestamp() >= start_time) { putDataPoint(size + i, dp); } else { if (LOG.isDebugEnabled()) { LOG.debug(String.format("No DP in range for #%d: %d < %d", i, dp.timestamp(), start_time)); } endReached(i); continue; } if (rate) { if (it.hasNext()) { moveToNext(i); } else { endReached(i); } } } if (num_empty_spans > 0) { LOG.debug(String.format("%d out of %d spans are empty!", num_empty_spans, size)); } }
Source:
<code>public static boolean isDummy(Result result) { if (result.rawCells().length != 1) { return false; } Cell cell = result.rawCells()[0]; <START> return Bytes.compareTo(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength(), <END> EMPTY_BYTE_ARRAY, 0, EMPTY_BYTE_ARRAY.length) == 0 && Bytes.compareTo(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength(), EMPTY_BYTE_ARRAY, 0, EMPTY_BYTE_ARRAY.length) == 0; }</code><technical_language>nit: replace checks CellUtil.matchingColumn</technical_language>

Target:
public static boolean isDummy(Result result) { if (result.rawCells().length != 1) { return false; } Cell cell = result.rawCells()[0]; return CellUtil.matchingColumn(cell, EMPTY_BYTE_ARRAY, EMPTY_BYTE_ARRAY); }
Source:
<code>@Override protected void closeInternal() { try { idx.close(); } catch (Exception ex) { onError(ex); } <START> <END> super.closeInternal(); }</code><technical_language>scan closed too</technical_language>

Target:
@Override protected void closeInternal() { try { scan.close(); } catch (Exception ex) { onError(ex); } try { idx.close(); } catch (Exception ex) { onError(ex); } super.closeInternal(); }
Source:
<code>public static void scheduleRange(String thingUID, AstroThingHandler astroHandler, Range range, String channelId) { boolean thingNull = checkNull(thingUID, "Thing UID is null"); boolean astroHandlerNull = checkNull(astroHandler, "AstroThingHandler is null"); boolean rangeNull = checkNull(range, "Range is null"); boolean channelIdNull = checkNull(channelId, "Channel ID is null"); if (thingNull || astroHandlerNull || rangeNull || channelIdNull) { return; } <START> int secondsPadding = 1; <END> Calendar start = range.getStart(); Calendar end = range.getEnd(); if (isTimeEquals(start, end)) { end.add(SECOND, secondsPadding); } scheduleEvent(thingUID, astroHandler, start, EVENT_START, channelId); scheduleEvent(thingUID, astroHandler, end, EVENT_END, channelId); }</code><technical_language>I missed something, shorter DateUtils compare dates? java Calendar end = range.getEnd(); if (DateUtils.truncatedEquals(range.getStart(), end, SECOND) { end.add(SECOND, 1); } padding: inline declare a constant field for it</technical_language>

Target:
public static void scheduleRange(String thingUID, AstroThingHandler astroHandler, Range range, String channelId) { boolean thingNull = checkNull(thingUID, "Thing UID is null"); boolean astroHandlerNull = checkNull(astroHandler, "AstroThingHandler is null"); boolean rangeNull = checkNull(range, "Range is null"); boolean channelIdNull = checkNull(channelId, "Channel ID is null"); if (thingNull || astroHandlerNull || rangeNull || channelIdNull) { return; } Calendar start = range.getStart(); Calendar end = range.getEnd(); if (truncatedEquals(start, end, SECOND)) { scheduleEvent(thingUID, astroHandler, start, asList(EVENT_START, EVENT_END), channelId); } else { scheduleEvent(thingUID, astroHandler, start, EVENT_START, channelId); scheduleEvent(thingUID, astroHandler, end, EVENT_END, channelId); } }
Source:
<code>public void setAbnormalStateResolverMap(Map<String, String> resolverMap) { <START> if (resolverMap != null && resolverMap.values().stream() <END> .anyMatch(className -> className == null)) { throw new IllegalArgumentException( "Invalid Abnormal State Resolver Map definition. Class name cannot be empty."); } if (resolverMap == null) { _record.getMapFields().remove(ClusterConfigProperty.ABNORMAL_STATES_RESOLVER_MAP.name()); } _record.setMapField(ClusterConfigProperty.ABNORMAL_STATES_RESOLVER_MAP.name(), resolverMap); }</code><technical_language>I a bit confused. anyMatch(className -> className == null)) means if is a className (key) in resolverMap, throw exception. in resolverMap, null? then</technical_language>

Target:
public void setAbnormalStateResolverMap(Map<String, String> resolverMap) { if (resolverMap == null) { _record.getMapFields().remove(ClusterConfigProperty.ABNORMAL_STATES_RESOLVER_MAP.name()); } else { if (resolverMap.entrySet().stream().anyMatch(e -> { String stateModelDefName = e.getKey(); String className = e.getValue(); return stateModelDefName == null || stateModelDefName.isEmpty() || className == null || className.isEmpty(); })) { throw new IllegalArgumentException( "Invalid Abnormal State Resolver Map definition. StateModel definition name and the resolver class name cannot be null or empty."); } _record.setMapField(ClusterConfigProperty.ABNORMAL_STATES_RESOLVER_MAP.name(), resolverMap); } }
Source:
<code>private RealmQuery(RealmResults<E> queryResults, Class<E> clazz) { this.realm = queryResults.realm; this.clazz = clazz; this.schema = realm.schema.getSchemaForClass(clazz); this.table = queryResults.getTableOrView(); this.linkView = null; <START> this.query = queryResults.getTableOrView().where(); <END> }</code><technical_language>Do need execute queryResults.getTableOrView() here? this.table instead if possible</technical_language>

Target:
private RealmQuery(RealmResults<E> queryResults, Class<E> clazz) { this.realm = queryResults.realm; this.clazz = clazz; this.schema = realm.schema.getSchemaForClass(clazz); this.table = queryResults.getTableOrView(); this.linkView = null; this.query = this.table.where(); }
Source:
<code>private void migrateUnitsToCodedValue(JdbcConnection connection, List<String> uniqueUnits) throws CustomChangeException, SQLException, DatabaseException { PreparedStatement updateDrugOrderStatement = null; Boolean autoCommit = null; try { autoCommit = connection.getAutoCommit(); connection.setAutoCommit(false); updateDrugOrderStatement = connection.prepareStatement("update drug_order set dose_units = ? where units = ?"); for (String unit : uniqueUnits) { Integer conceptIdForUnit = DatabaseUtil.getConceptIdForUnits(connection.getUnderlyingConnection(), unit); updateDrugOrderStatement.setInt(1, conceptIdForUnit); updateDrugOrderStatement.setString(2, unit); <START> updateDrugOrderStatement.executeUpdate(); <END> updateDrugOrderStatement.clearParameters(); } connection.commit(); } catch (DatabaseException e) { handleError(connection, e); } catch (SQLException e) { handleError(connection, e); } finally { if (autoCommit != null) { connection.setAutoCommit(autoCommit); } if(updateDrugOrderStatement != null) { updateDrugOrderStatement.close(); } } }</code><technical_language>I batch update instead calling updateDrugOrderStatement.addBatch() line 49 i call updateDrugOrderStatement.executeBatch()</technical_language>

Target:
private void migrateUnitsToCodedValue(JdbcConnection connection, List<String> uniqueUnits) throws CustomChangeException, SQLException, DatabaseException { PreparedStatement updateDrugOrderStatement = null; Boolean autoCommit = null; try { autoCommit = connection.getAutoCommit(); connection.setAutoCommit(false); updateDrugOrderStatement = connection.prepareStatement("update drug_order set dose_units = ? where units = ?"); for (String unit : uniqueUnits) { Integer conceptIdForUnit = DatabaseUtil.getConceptIdForUnits(connection.getUnderlyingConnection(), unit); if(conceptIdForUnit == null) { throw new CustomChangeException("No concept mapping found for unit: " + unit); } updateDrugOrderStatement.setInt(1, conceptIdForUnit); updateDrugOrderStatement.setString(2, unit); updateDrugOrderStatement.executeUpdate(); updateDrugOrderStatement.clearParameters(); } connection.commit(); } catch (DatabaseException e) { handleError(connection, e); } catch (SQLException e) { handleError(connection, e); } finally { if (autoCommit != null) { connection.setAutoCommit(autoCommit); } if(updateDrugOrderStatement != null) { updateDrugOrderStatement.close(); } } }
Source:
<code>private Long resizePV(String lunId) { try { return (Long) runVdsCommand( VDSCommandType.ResizeStorageDomainPV, new ResizeStorageDomainPVVDSCommandParameters(getStoragePoolId(), getStorageDomainId(), lunId)).getReturnValue(); } catch (VdcBLLException e) { <START> log.error("Failed to resize PV " + lunId, e); <END> throw e; } }</code><technical_language>log add info log, unneeded, clear log ResizeStorageDomainPV failed</technical_language>

Target:
private Long resizePV(String lunId) { return (Long) runVdsCommand( VDSCommandType.ResizeStorageDomainPV, new ResizeStorageDomainPVVDSCommandParameters(getStoragePoolId(), getStorageDomainId(), lunId)).getReturnValue(); }
Source:
<code><START> private boolean equalsProperties(Map<String, String> oldProperties, Map<String, String> newProperties) { <END> for (Entry<String, String> entry : oldProperties.entrySet()) { String oldValue = entry.getValue(); String newValue = newProperties.get(entry.getKey()); if (newValue == null) { return false; } else { if (!newValue.equals(oldValue)) { return false; } } } return true; }</code><technical_language>detect if newProperties contains a property is in oldProperties. we? do oldProperties.equals(newProperties)</technical_language>

Target:
private boolean equalsProperties(Map<String, String> oldProperties, Map<String, String> newProperties) { MapDifference<String, String> div = Maps.difference(oldProperties, newProperties); return div.entriesDiffering().size() != 0 && div.entriesOnlyOnLeft().size() != 0 && div.entriesOnlyOnRight().size() != 0; }
Source:
<code>public List<Ref> getChildRefsRecursive() throws IOException { List<Ref> childRefs = new ArrayList<>(); for (IPath myPath : getPathList()) { if (getObject().isPrefixOf(myPath)) { Ref ref = getRepository().exactRef(myPath.toPortableString()); if (ref != null) { childRefs.add(ref); <START> } <END> } } return childRefs; }</code><technical_language>1. this null here? 2. This code is strange. getRepository().getRefDatabase().getRefsByPrefix(getObject().toPortableString()) give refs wanted</technical_language>

Target:
public List<Ref> getChildRefsRecursive() throws IOException { return getRepository().getRefDatabase() .getRefsByPrefix(getObject().toPortableString()).stream() .filter(ref -> !ref.isSymbolic()).collect(Collectors.toList()); }
Source:
<code>public JavadocJarDefaultMavenProjectStub() { readModel( new File( getBasedir(), "javadocjar-default-plugin-config.xml" ) ); setGroupId( getModel().getGroupId() ); setArtifactId( getModel().getArtifactId() ); setVersion( getModel().getVersion() ); setName( getModel().getName() ); setUrl( getModel().getUrl() ); setPackaging( getModel().getPackaging() ); Scm scm = new Scm(); scm.setConnection( "scm:svn:<LINK_0>" ); setScm( scm ); JavadocPluginArtifactStub artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() ); artifact.setArtifactHandler( new DefaultArtifactHandlerStub() ); artifact.setType( "jar" ); artifact.setBaseVersion( "1.0-SNAPSHOT" ); setArtifact( artifact ); Build build = new Build(); <START> build.setFinalName( "javadocjar-archive-config" ); <END> build.setDirectory( super.getBasedir() + "/target/test/unit/javadocjar-default/target" ); setBuild( build ); List<String> compileSourceRoots = new ArrayList<String>(); compileSourceRoots.add( getBasedir() + "/javadocjar/def" ); setCompileSourceRoots( compileSourceRoots ); }</code><technical_language>If this is default this changed</technical_language>

Target:
public JavadocJarDefaultMavenProjectStub() { readModel( new File( getBasedir(), "javadocjar-default-plugin-config.xml" ) ); setGroupId( getModel().getGroupId() ); setArtifactId( getModel().getArtifactId() ); setVersion( getModel().getVersion() ); setName( getModel().getName() ); setUrl( getModel().getUrl() ); setPackaging( getModel().getPackaging() ); Scm scm = new Scm(); scm.setConnection( "scm:svn:<LINK_0>" ); setScm( scm ); JavadocPluginArtifactStub artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() ); artifact.setArtifactHandler( new DefaultArtifactHandlerStub() ); artifact.setType( "jar" ); artifact.setBaseVersion( "1.0-SNAPSHOT" ); setArtifact( artifact ); Build build = new Build(); build.setFinalName( "javadocjar-default-config" ); build.setDirectory( super.getBasedir() + "/target/test/unit/javadocjar-default/target" ); setBuild( build ); List<String> compileSourceRoots = new ArrayList<String>(); compileSourceRoots.add( getBasedir() + "/javadocjar/def" ); setCompileSourceRoots( compileSourceRoots ); }
Source:
<code>public abstract void doExecute() throws MojoExecutionException, MojoFailureException; public void initMojo() { if (projectBuildDirectory != null) { new ProjectDirectoryUpdater(project).updateBuildDirectory(projectBuildDirectory); } if (!lightweightPackage && useLocalRepository) { <START> getLog().info("'useLocalRepository' would be ignored, it could only be used when 'lightweightPackage' is enabled"); <END> useLocalRepository = false; } }</code><technical_language>></technical_language>

Target:
public abstract void doExecute() throws MojoExecutionException, MojoFailureException; public void initMojo() { if (projectBuildDirectory != null) { new ProjectDirectoryUpdater(project).updateBuildDirectory(projectBuildDirectory); } if (!lightweightPackage && useLocalRepository) { getLog().info("'useLocalRepository' would be ignored, it can only be used when 'lightweightPackage' is enabled"); useLocalRepository = false; } }
Source:
<code>protected ParameterizedCommand<Path> onSuccess() { return (path) -> { final T content = getContentSupplier().get(); final int originalHash = content.hashCode(); <START> setOriginalHash(originalHash); <END> }; }</code><technical_language>this is called a save/save-and-rename is successful. set metadataOriginalHash</technical_language>

Target:
protected ParameterizedCommand<Path> onSuccess() { return (path) -> { final T content = getContentSupplier().get(); final M metadata = getMetadataSupplier().get(); setOriginalHash(content.hashCode()); setMetadataOriginalHash(metadata.hashCode()); }; }
Source:
<code><START> private void addWithAdjustedWeight(double sample, double adjustedWeight) <END> { if (count < samples.length) { samples[count] = sample; count++; bubbleUp(); return; } if (adjustedWeight <= weights[0]) { return; } samples[0] = sample; weights[0] = adjustedWeight; bubbleDown(); }</code><technical_language>this change</technical_language>

Target:
private void addWithAdjustedWeight(double sample, double adjustedWeight) { if (count < samples.length) { samples[count] = sample; weights[count] = adjustedWeight; count++; bubbleUp(); return; } if (adjustedWeight <= weights[0]) { return; } samples[0] = sample; weights[0] = adjustedWeight; bubbleDown(); }
Source:
<code>public void run() { IJobManager manager = Job.getJobManager(); try { manager.beginRule(rule, getEventLoopMonitor()); context.run(false, false, runnable); } catch (InvocationTargetException | InterruptedException e) { status = new Status(IStatus.ERROR, IProgressConstants.PLUGIN_ID, e .getMessage(), e); <START> } catch (OperationCanceledException e) { <END> status = new Status(IStatus.ERROR, IProgressConstants.PLUGIN_ID, e .getMessage(), e); } finally { manager.endRule(rule); } }</code><technical_language>Missed</technical_language>

Target:
public void run() { IJobManager manager = Job.getJobManager(); try { manager.beginRule(rule, getEventLoopMonitor()); context.run(false, false, runnable); } catch (InvocationTargetException | InterruptedException | OperationCanceledException e) { status = new Status(IStatus.ERROR, IProgressConstants.PLUGIN_ID, e .getMessage(), e); } finally { manager.endRule(rule); } }
Source:
<code>public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); api = new OpenFoodAPIClient(getActivity()); mView = view; mSettings = getActivity().getSharedPreferences("prefs", 0); boolean firstRunAlert = mSettings.getBoolean("firstRunAlert", true); if (firstRunAlert) { new MaterialDialog.Builder(getContext()) .title(R.string.alert_dialog_warning_title) .content(R.string.warning_alert_data) .positiveText(R.string.ok_button) .show(); SharedPreferences.Editor editor = mSettings.edit(); editor.putBoolean("firstRunAlert", false); editor.apply(); } mRvAllergens = (RecyclerView) view.findViewById(R.id.alergens_recycle); <START> mAllergens = Utils.getAppDaoSession(this.getActivity()).getAllergenDao().queryBuilder().where(AllergenDao.Properties.Enable.eq("true")).list(); <END> mAdapter = new AllergensAdapter(mAllergens, getActivity()); mRvAllergens.setAdapter(mAdapter); mRvAllergens.setLayoutManager(new LinearLayoutManager(view.getContext())); mRvAllergens.setHasFixedSize(true); }</code><technical_language>a good idea require dao time need in class ? instead of create a class field intialize in constructor create method</technical_language>

Target:
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mAllergensFromDao = Utils.getAppDaoSession(this.getActivity()).getAllergenDao().loadAll(); api = new OpenFoodAPIClient(getActivity()); mView = view; mSettings = getActivity().getSharedPreferences("prefs", 0); boolean firstRunAlert = mSettings.getBoolean("firstRunAlert", true); if (firstRunAlert) { new MaterialDialog.Builder(getContext()) .title(R.string.alert_dialog_warning_title) .content(R.string.warning_alert_data) .positiveText(R.string.ok_button) .show(); SharedPreferences.Editor editor = mSettings.edit(); editor.putBoolean("firstRunAlert", false); editor.apply(); } mRvAllergens = (RecyclerView) view.findViewById(R.id.alergens_recycle); mAllergensEnabled = Utils.getAppDaoSession(this.getActivity()).getAllergenDao().queryBuilder().where(AllergenDao.Properties.Enable.eq("true")).list(); mAdapter = new AllergensAdapter(mAllergensEnabled, getActivity()); mRvAllergens.setAdapter(mAdapter); mRvAllergens.setLayoutManager(new LinearLayoutManager(view.getContext())); mRvAllergens.setHasFixedSize(true); }
Source:
<code>public BrowsePivotTableWidget(String id, IModel<OClass> model, IModel<ODocument> widgetDocumentModel) { super(id, model, widgetDocumentModel); noCacheRnd = Math.random(); <START> customSQL = ""; <END> add(new PivotPanel("pivot", new PropertyModel<String>(this, "url"), new PropertyModel<DisplayMode>(this, "displayMode"), new PropertyModel<String>(this, "config"))); add(UpdateOnDashboardDisplayModeChangeBehavior.INSTANCE); }</code><technical_language>empty string is needed here</technical_language>

Target:
public BrowsePivotTableWidget(String id, IModel<OClass> model, IModel<ODocument> widgetDocumentModel) { super(id, model, widgetDocumentModel); noCacheRnd = Math.random(); add(new PivotPanel("pivot", new PropertyModel<String>(this, "url"), new PropertyModel<DisplayMode>(this, "displayMode"), new PropertyModel<String>(this, "config"))); add(UpdateOnDashboardDisplayModeChangeBehavior.INSTANCE); }
Source:
<code>private void recover() { for (RuntimeInfrastructure infra : infraByRecipe.values()) { try { for (RuntimeIdentity id : infra.getIdentities()) { if (runtimes.putIfAbsent(id.getWorkspaceId(), new RuntimeState(validate(infra.getRuntime(id)), RUNNING)) != null) { <START> LOG.error("More than 1 runtime of workspace with id '' found. Skipping all duplicates."); <END> } } } catch (UnsupportedOperationException x) { LOG.warn("Not recoverable infrastructure: '{}'", infra.getName()); } catch (InfrastructureException x) { LOG.error("An error occurred while attempted to recover runtimes using infrastructure '{}'. Reason: '{}'", infra.getName(), x.getMessage()); } } }</code><technical_language>Missing _id_ parameter. I more information logged, for example _RuntineIdentity_ of duplicate</technical_language>

Target:
private void recover() { for (RuntimeInfrastructure infra : infraByRecipe.values()) { try { for (RuntimeIdentity id : infra.getIdentities()) { if (runtimes.putIfAbsent(id.getWorkspaceId(), new RuntimeState(validate(infra.getRuntime(id)), RUNNING)) != null) { LOG.error("More than 1 runtime of workspace found. " + "Runtime identity of duplicate is '{}'. Skipping duplicate.", id); } } } catch (UnsupportedOperationException x) { LOG.warn("Not recoverable infrastructure: '{}'", infra.getName()); } catch (InfrastructureException x) { LOG.error("An error occurred while attempted to recover runtimes using infrastructure '{}'. Reason: '{}'", infra.getName(), x.getMessage()); } } }
Source:
<code>private void executeAssignement(AssignmentExpressionTree tree) { ProgramState.Pop unstack; SymbolicValue value; boolean isSimpleAssignment = ExpressionUtils.isSimpleAssignment(tree); if (isSimpleAssignment) { <START> unstack = programState.unstackValue(1); <END> value = unstack.values.get(0); } else { unstack = programState.unstackValue(2); value = constraintManager.createSymbolicValue(tree); } programState = unstack.state; programState = programState.stackValue(value); if (isSimpleAssignment || tree.variable().is(Tree.Kind.IDENTIFIER)) { programState = programState.put(ExpressionUtils.extractIdentifier(tree).symbol(), value); } }</code><technical_language>want unstack SV this super in case of assignment them, sv field. guessing is currently impact compounds assignments for division zero</technical_language>

Target:
private void executeAssignement(AssignmentExpressionTree tree) { ProgramState.Pop unstack; SymbolicValue value; boolean isSimpleAssignment = ExpressionUtils.isSimpleAssignment(tree) || ExpressionUtils.isSelectOnThisOrSuper(tree); if (isSimpleAssignment) { unstack = programState.unstackValue(1); value = unstack.values.get(0); } else { unstack = programState.unstackValue(2); value = constraintManager.createSymbolicValue(tree); } programState = unstack.state; programState = programState.stackValue(value); if (isSimpleAssignment || tree.variable().is(Tree.Kind.IDENTIFIER)) { programState = programState.put(ExpressionUtils.extractIdentifier(tree).symbol(), value); } }
Source:
<code>public void handleEvent(MotechEvent event) { LOGGER.info("Daily password reset reminder triggered"); if (settingService.isPasswordResetReminderEnabled()) { int daysTillPasswordChange = settingService.getNumberOfDaysToChangePassword(); int daysTillReminder = daysTillPasswordChange - settingService.getNumberOfDaysForReminder(); for (MotechUser user : allUsers.retrieveAll()) { int daysWithoutPasswordChange = daysWithoutPasswordChange(user); <START> LOGGER.debug("User hasn't changed password in days. Notification should be sent at day {}", <END> user.getUserName(), daysWithoutPasswordChange, daysTillReminder); if (daysWithoutPasswordChange == daysTillReminder) { sendPasswordReminderEvent(user, daysTillPasswordChange); } } } }</code><technical_language>notification is days expiration</technical_language>

Target:
public void handleEvent(MotechEvent event) { if (settingService.isPasswordResetReminderEnabled()) { LOGGER.info("Daily password reset reminder triggered"); int numberOfDaysForReminder = settingService.getNumberOfDaysForReminder(); int daysTillPasswordChange = settingService.getNumberOfDaysToChangePassword(); int daysTillReminder = daysTillPasswordChange - numberOfDaysForReminder; for (MotechUser user : allUsers.retrieveAll()) { int daysWithoutPasswordChange = daysWithoutPasswordChange(user); LOGGER.debug("User hasn't changed password in days. Notification is being sent days before" + "expiration", user.getUserName(), daysWithoutPasswordChange, daysTillReminder); if (daysWithoutPasswordChange == daysTillReminder) { sendPasswordReminderEvent(user, daysTillPasswordChange, numberOfDaysForReminder); } } } else { LOGGER.info("Daily password reset reminder is disabled, skipping processing of users"); } }
Source:
<code>protected boolean isMariaDbCapableTlsv12() { if (!isMariaDbServer()) { return false; } <START> if (!versionGreaterOrEqual(10, 0, 15)) { <END> return true; } if (majorVersion != 10 && versionGreaterOrEqual(5, 5, 41)) { return true; } return false; }</code><technical_language>musn't "if (!versionGreaterOrEqual(10, 0, 15)) {" (without "!")</technical_language>

Target:
protected boolean isMariaDbCapableTlsv12() { if (!isMariaDbServer()) { return false; } if (versionGreaterOrEqual(10, 0, 15)) { return true; } if (majorVersion != 10 && versionGreaterOrEqual(5, 5, 41)) { return true; } return false; }
Source:
<code>public ListenableFuture<SegmentsAndMetadata> publishAndRegisterHandoff( final TransactionalSegmentPublisher publisher, final Committer committer, final Collection<String> sequenceNames ) { final SettableFuture<SegmentsAndMetadata> publishDoneFuture = SettableFuture.create(); <START> final ListenableFuture<SegmentsAndMetadata> publishFuture = publish(publisher, committer, sequenceNames); <END> Futures.addCallback(publishFuture, new FutureCallback<SegmentsAndMetadata>() { @Override public void onSuccess(@Nullable SegmentsAndMetadata result) { publishDoneFuture.set(result); } @Override public void onFailure(Throwable t) { publishDoneFuture.setException(t); } }); return publishDoneFuture; }</code><technical_language>is a bug, is currently written, is point in creation of publishDoneFuture publishFuture returned this method</technical_language>

Target:
public ListenableFuture<SegmentsAndMetadata> publishAndRegisterHandoff( final TransactionalSegmentPublisher publisher, final Committer committer, final Collection<String> sequenceNames ) { return ListenableFutures.transformAsync( publish(publisher, committer, sequenceNames), this::registerHandoff ); }
Source:
<code>public void viewInstanceStateSaveTest() { Context context = Robolectric.buildActivity(EmptyActivityWithoutLayout_.class).create().get(); ViewWithInstanceState_ savingView = (ViewWithInstanceState_) ViewWithInstanceState_.build(context); assertThat(savingView.stateTest).isEqualTo("does it work?"); savingView.stateTest = "it works!"; Parcelable savedInstanceState = savingView.onSaveInstanceState(); <START> ViewWithInstanceState_ resotringView = (ViewWithInstanceState_) ViewWithInstanceState_.build(context); <END> assertThat(resotringView.stateTest).isEqualTo("does it work?"); resotringView.onRestoreInstanceState(savedInstanceState); assertThat(resotringView.stateTest).isEqualTo("it works!"); }</code><technical_language>typo</technical_language>

Target:
public void viewInstanceStateSaveTest() { Context context = Robolectric.buildActivity(EmptyActivityWithoutLayout_.class).create().get(); ViewWithInstanceState_ savingView = (ViewWithInstanceState_) ViewWithInstanceState_.build(context); assertThat(savingView.stateTest).isEqualTo("does it work?"); assertThat(savingView.stringState).isEqualTo("does it work?"); assertThat(savingView.beanState.getX()).isEqualTo(0); savingView.stateTest = "it works!"; savingView.stringState = "it works!"; savingView.beanState = new MyParcelableBean(1); Parcelable savedInstanceState = savingView.onSaveInstanceState(); ViewWithInstanceState_ restoringView = (ViewWithInstanceState_) ViewWithInstanceState_.build(context); assertThat(restoringView.stateTest).isEqualTo("does it work?"); assertThat(restoringView.stringState).isEqualTo("does it work?"); assertThat(restoringView.beanState.getX()).isEqualTo(0); restoringView.onRestoreInstanceState(savedInstanceState); assertThat(restoringView.stateTest).isEqualTo("it works!"); assertThat(restoringView.stringState).isEqualTo("it works!"); assertThat(restoringView.beanState.getX()).isEqualTo(1); }
Source:
<code>public CompletableFuture<Boolean> splitSegment(int segmentId) { if (!this.activeSegments.containsKey(segmentId)) { return CompletableFuture.completedFuture(false); } CompletableFuture<Boolean> result = new CompletableFuture<>(); if (!tokenStore.requiresExplicitInitialization()) { <START> result.completeExceptionally(new UnsupportedOperationException("TokenStore must use explicit initialization to be able to safely split tokens")); <END> } this.instructions.computeIfAbsent(segmentId, i -> new CopyOnWriteArrayList<>()) .add(new SplitSegmentInstruction(result, segmentId)); return result; }</code><technical_language>result returned immediately completeExceptionally call, mergeSegment(int) function</technical_language>

Target:
public CompletableFuture<Boolean> splitSegment(int segmentId) { CompletableFuture<Boolean> result = new CompletableFuture<>(); if (!tokenStore.requiresExplicitSegmentInitialization()) { result.completeExceptionally(new UnsupportedOperationException("TokenStore must require explicit initialization to safely split tokens")); return result; } if (!this.activeSegments.containsKey(segmentId)) { return CompletableFuture.completedFuture(false); } this.instructions.computeIfAbsent(segmentId, i -> new CopyOnWriteArrayList<>()) .add(new SplitSegmentInstruction(result, segmentId)); return result; }
Source:
<code>private ConsumerCoordinator buildCoordinator(final GroupRebalanceConfig rebalanceConfig, final Metrics metrics, final List<ConsumerPartitionAssignor> assignors, final boolean autoCommitEnabled) { return new ConsumerCoordinator( rebalanceConfig, new LogContext(), consumerClient, assignors, metadata, subscriptions, metrics, "consumer" + groupId, time, autoCommitEnabled, autoCommitIntervalMs, <START> false, <END> null); }</code><technical_language>do pass false here</technical_language>

Target:
private ConsumerCoordinator buildCoordinator(final GroupRebalanceConfig rebalanceConfig, final Metrics metrics, final List<ConsumerPartitionAssignor> assignors, final boolean autoCommitEnabled) { return new ConsumerCoordinator( rebalanceConfig, new LogContext(), consumerClient, assignors, metadata, subscriptions, metrics, "consumer" + groupId, time, autoCommitEnabled, autoCommitIntervalMs, null); }
Source:
<code>private boolean containtsOnlyValidXMLChars(String stringToValidate) { char current; for (int i = 0; i < stringToValidate.length(); i++) { current = stringToValidate.charAt(i); <START> if (!((current == 0x9) || <END> (current == 0xA) || (current == 0xD) || ((current >= 0x20) && (current <= 0xD7FF)) || ((current >= 0xE000) && (current <= 0xFFFD)) || ((current >= 0x10000) && (current <= 0x10FFFF)))) return false; } return true; }</code><technical_language>refer symbols String '<' value? 0x9 a lot of sense for readers</technical_language>

Target:
private boolean containtsOnlyValidXMLChars(String stringToValidate) { String pattern = "[^" + "\u0009\r\n" + "\u0020-\uD7FF" + "\uE000-\uFFFD" + "\ud800\udc00-\udbff\udfff" + "]"; String resultString = stringToValidate.replaceAll(pattern, ""); return resultString.equals(stringToValidate); }
Source:
<code>private ReadCountCollection(final List<Target> targets, final List<String> columnNames, final RealMatrix counts, final boolean verifyInput) { if (verifyInput) { Utils.nonNull(targets,"the input targets cannot be null"); Utils.nonNull(columnNames,"the column names cannot be null"); Utils.nonNull(counts,"the counts cannot be null"); Utils.containsNoNull(columnNames, "column names contain nulls"); Utils.containsNoNull(targets, "there are some null targets"); Utils.validateArg(counts.getRowDimension() == targets.size(), "number of count rows does not match the number of targets"); Utils.validateArg(counts.getColumnDimension() == columnNames.size(), "number of count columns does not match the number of column names"); Utils.validateArg(new HashSet<>(targets).size() == targets.size(), "targets contain duplicates"); <START> Utils.validateArg(columnNames.size() == columnNames.size(), "column names contain duplicates"); <END> this.targets = Collections.unmodifiableList(new ArrayList<>(targets)); this.columnNames = Collections.unmodifiableList(new ArrayList<>(columnNames)); this.counts = counts.copy(); } else { this.targets = targets; this.columnNames = columnNames; this.counts = counts; } this.targetIndexMap = createTargetIndexMap(this.targets); }</code><technical_language>left hand side new HashSet<>(columnNames).size()</technical_language>

Target:
private ReadCountCollection(final List<Target> targets, final List<String> columnNames, final RealMatrix counts, final boolean verifyInput) { if (verifyInput) { Utils.nonNull(targets,"the input targets cannot be null"); Utils.nonNull(columnNames,"the column names cannot be null"); Utils.nonNull(counts,"the counts cannot be null"); Utils.containsNoNull(columnNames, "column names contain nulls"); Utils.containsNoNull(targets, "there are some null targets"); Utils.validateArg(counts.getRowDimension() == targets.size(), "number of count rows does not match the number of targets"); Utils.validateArg(counts.getColumnDimension() == columnNames.size(), "number of count columns does not match the number of column names"); Utils.validateArg(new HashSet<>(targets).size() == targets.size(), "targets contain duplicates"); Utils.validateArg(new HashSet<>(columnNames).size() == columnNames.size(), "column names contain duplicates"); this.targets = Collections.unmodifiableList(new ArrayList<>(targets)); this.columnNames = Collections.unmodifiableList(new ArrayList<>(columnNames)); this.counts = counts.copy(); } else { this.targets = targets; this.columnNames = columnNames; this.counts = counts; } this.targetIndexMap = createTargetIndexMap(this.targets); }
Source:
<code>protected boolean isMetadata(Path path) { try { <START> return Boolean.TRUE.equals(RepositoryFiles.isLsm((RepositoryPath) path)); <END> } catch (IOException e) { logger.error(String.format("Failed to read Path attributes for [%s]", path), e); return false; } }</code><technical_language>@sbespalov : is isLsm(...)? doest this abbreviation stand for? Layout-specific metadata, is else? If this is it, please rename method, clearer? Thanks! :)</technical_language>

Target:
protected boolean isMetadata(Path path) { try { return Boolean.TRUE.equals(RepositoryFiles.isMetadata((RepositoryPath) path)); } catch (IOException e) { logger.error(String.format("Failed to read Path attributes for [%s]", path), e); return false; } }
Source:
<code>public void enforceRestoreActive() { if (state != ChangelogReaderState.ACTIVE_RESTORING) { log.debug("Transiting to restore active tasks: {}", changelogs); <START> pauseChangelogsFromRestoreConsumer(standbyRestoringChangelogs()); <END> } state = ChangelogReaderState.ACTIVE_RESTORING; }</code><technical_language>move line 290 well</technical_language>

Target:
public void enforceRestoreActive() { if (state != ChangelogReaderState.ACTIVE_RESTORING) { log.debug("Transiting to restore active tasks: {}", changelogs); pauseChangelogsFromRestoreConsumer(standbyRestoringChangelogs()); state = ChangelogReaderState.ACTIVE_RESTORING; } }
Source:
<code>public boolean hasNext() { boolean hasNext = delegate.hasNext() || !cursor.isDone(); <START> if(!hasNext) for(BufferAggregator agg : aggregators) agg.close(); <END> return hasNext; }</code><technical_language>squigglies ftw</technical_language>

Target:
public boolean hasNext() { return delegate.hasNext() || !cursor.isDone(); }
Source:
<code>private GitResourceVariantTreeProvider createTreeProvider() throws Exception { File file1 = testRepo.createFile(iProject, "file1"); File file2 = testRepo.createFile(iProject, "file2"); testRepo.appendContentAndCommit(iProject, file1, INITIAL_CONTENT_1, "first file - initial commit"); RevCommit baseCommit = testRepo.appendContentAndCommit(iProject, file2, INITIAL_CONTENT_2, "second file - initial commit"); testRepo.createAndCheckoutBranch(MASTER, BRANCH); setContentsAndCommit(testRepo, iFile2, BRANCH_CHANGES + INITIAL_CONTENT_2, "branch commit"); testRepo.checkoutBranch(MASTER); setContentsAndCommit(testRepo, iFile1, INITIAL_CONTENT_1 + MASTER_CHANGES, "master commit"); iProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); <START> RevWalk walk = new RevWalk(repo); <END> RevTree baseTree = walk.parseTree(baseCommit.getId()); RevTree sourceTree = walk.parseTree(repo.resolve(MASTER)); RevTree remoteTree = walk.parseTree(repo.resolve(BRANCH)); TreeWalk tw = new NameConflictTreeWalk(repo); tw.addTree(baseTree); tw.addTree(sourceTree); tw.addTree(remoteTree); return new TreeWalkResourceVariantTreeProvider( repo, tw, 0, 1, 2); }</code><technical_language>create this in a try-with-resource statement ensure walk is closed longer needed</technical_language>

Target:
private GitResourceVariantTreeProvider createTreeProvider() throws Exception { testRepo.appendContentAndCommit(iProject, file1, INITIAL_CONTENT_1, "first file - initial commit"); testRepo.appendContentAndCommit(iProject, file2, INITIAL_CONTENT_2, "second file - initial commit"); testRepo.createBranch(MASTER, BASE); testRepo.createAndCheckoutBranch(MASTER, BRANCH); setContentsAndCommit(testRepo, iFile2, BRANCH_CHANGES + INITIAL_CONTENT_2, "branch commit"); testRepo.checkoutBranch(MASTER); setContentsAndCommit(testRepo, iFile1, INITIAL_CONTENT_1 + MASTER_CHANGES, "master commit"); iProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); try (RevWalk walk = new RevWalk(repo)) { RevTree baseTree = walk.parseTree(repo.resolve(BASE)); RevTree sourceTree = walk.parseTree(repo.resolve(MASTER)); RevTree remoteTree = walk.parseTree(repo.resolve(BRANCH)); TreeWalk tw = new NameConflictTreeWalk(repo); tw.addTree(baseTree); tw.addTree(sourceTree); tw.addTree(remoteTree); return new TreeWalkResourceVariantTreeProvider(repo, tw, 0, 1, 2); } }
Source:
<code>public static byte[] allFeatures() { final BitSet set = new BitSet(); <START> List<IgniteFeatures> features = new LinkedList<>(Arrays.asList(IgniteFeatures.values())); if (getBoolean(IGNITE_PME_FREE_SWITCH_DISABLED)) features.remove(PME_FREE_SWITCH); for (IgniteFeatures value : features ) { <END> final int featureId = value.getFeatureId(); assert !set.get(featureId) : "Duplicate feature ID found for [" + value + "] having same ID [" + featureId + "]"; set.set(featureId); } return set.toByteArray(); }</code><technical_language>Replace check leads feature ignore loop</technical_language>

Target:
public static byte[] allFeatures() { final BitSet set = new BitSet(IgniteFeatures.values().length); for (IgniteFeatures value : IgniteFeatures.values()) { if (value == PME_FREE_SWITCH && getBoolean(IGNITE_PME_FREE_SWITCH_DISABLED)) continue; final int featureId = value.getFeatureId(); assert !set.get(featureId) : "Duplicate feature ID found for [" + value + "] having same ID [" + featureId + "]"; set.set(featureId); } return set.toByteArray(); }