id
int64
2
70k
bug_ctx
stringlengths
58
37.5k
fixed
stringlengths
1
37k
57,275
<BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()),expression</BUG><CONTEXT>return dom;}public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) {return new NominalDescriptionStrategy(bundle,<extra_id_0>);}public static DescriptionStrategy plainInstance(ResourceBundle bundle, final FieldExpression expression) {</CONTEXT>
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()),expression
17,348
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>w01 = noData.contains(s01) ? 0 : 1;w10 = noData.contains(s10) ? 0 : 1;w11 = noData.contains(s11) ? 0 : 1;if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {if (setDestinationNoData) {<extra_id_0>}} else {double result = computeValue(s00, s01, s10, s11, w00, w01, w10,</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
69,797
<BUG>import de.kuschku.quasseldroid_ng.ui.chat.Settings;</BUG><CONTEXT>import de.kuschku.libquassel.events.ConnectionChangeEvent;import de.kuschku.libquassel.events.GeneralErrorEvent;import de.kuschku.libquassel.events.LoginRequireEvent;import de.kuschku.libquassel.localtypes.backlogstorage.MemoryBacklogStorage;import de.kuschku.libquassel.protocols.RemotePeer;<extra_id_0>import de.kuschku.util.CompatibilityUtils;import de.kuschku.util.accounts.Account;import de.kuschku.util.accounts.AccountManager;</CONTEXT>
import de.kuschku.quasseldroid_ng.ui.settings.Settings;
54,845
<BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()),expression</BUG><CONTEXT>return dom;}public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) {return new NominalDescriptionStrategy(bundle,<extra_id_0>);}public static DescriptionStrategy plainInstance(ResourceBundle bundle, final FieldExpression expression) {</CONTEXT>
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()),expression
38,725
<BUG>ADDED_MODULE("added-module"),BUNDLES("bundles"),</BUG><CONTEXT>private static final String PATH_DELIMITER = "/";public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;enum Element {ADDED_BUNDLE("added-bundle"),ADDED_MISC_CONTENT("added-misc-content"),<extra_id_0>CUMULATIVE("cumulative"),DESCRIPTION("description"),MISC_FILES("misc-files"),</CONTEXT>
APPLIES_TO_VERSION("applies-to-version"),BUNDLES("bundles"),
20,656
<BUG>import org.apache.commons.lang3.Validate;import org.joda.time.DateTime;import java.util.Collections;import java.util.List;import java.util.Set;</BUG><CONTEXT>import com.cronutils.model.field.expression.Between;import com.cronutils.model.field.expression.FieldExpression;import com.cronutils.parser.CronParserField;import com.google.common.collect.Lists;import com.google.common.collect.Sets;<extra_id_0>class BetweenDayOfWeekValueGenerator extends FieldValueGenerator {</CONTEXT>
[DELETED]
15,136
<BUG>package org.fusesource.fabric.itests.paxexam;import java.util.HashMap;</BUG><CONTEXT><extra_id_0>import java.util.LinkedHashMap;import java.util.List;import java.util.Map;</CONTEXT>
import java.util.ArrayList;import java.util.Arrays;import java.util.Collections;import java.util.HashMap;
50,503
<BUG>String pageChildrenUri =UriBuilder.fromUri(baseUri).path(PageChildrenResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG><CONTEXT>Link historyLink = objectFactory.createLink();historyLink.setHref(historyUri);historyLink.setRel(Relations.HISTORY);pageSummary.getLinks().add(historyLink);if (!doc.getChildren().isEmpty()) {<extra_id_0>Link pageChildrenLink = objectFactory.createLink();pageChildrenLink.setHref(pageChildrenUri);</CONTEXT>
uri(baseUri, PageChildrenResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
68,702
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),</BUG><CONTEXT>Term terme = new Term();terme.setId_thesaurus(idTheso);terme.setLang(langueEdit);terme.setLexical_value(valueEdit);terme.setId_term(idT);<extra_id_0>terme.getLexical_value(),terme.getId_thesaurus(), terme.getLang())) {FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));</CONTEXT>
if (termHelper.isTermExist(connect.getPoolConnexion(),
30,379
<CONTEXT>import java.util.ResourceBundle;import java.util.function.Function;</BUG>class DescriptionStrategyFactory {private DescriptionStrategyFactory() {}public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) {<extra_id_0>class DescriptionStrategyFactory {private DescriptionStrategyFactory() {}public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) {<BUG>final Function<Integer, String> nominal = integer -> new DateTime().withDayOfWeek(integer).dayOfWeek().getAsText(bundle.getLocale());</BUG>NominalDescriptionStrategy dow = new NominalDescriptionStrategy(bundle, nominal, expression);dow.addDescription(fieldExpression -> {if (fieldExpression instanceof On) {</CONTEXT>
import java.util.function.Function;import com.cronutils.model.field.expression.FieldExpression;import com.cronutils.model.field.expression.On;final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
27,345
<BUG>}else{</BUG><CONTEXT>} else {updateMemo();callback.updateMemo();}dismiss();<extra_id_0>Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();}}</CONTEXT>
[DELETED]
31,098
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));IRegion region = FGManager.getInstance().getRegion(parse.args[1]);</BUG><CONTEXT>.append(Text.of(TextColors.GREEN, "Usage: ")).append(getUsage(source)).build());return CommandResult.empty();} else if (isIn(REGIONS_ALIASES, parse.args[0])) {<extra_id_0>boolean isWorldRegion = false;if (region == null) {</CONTEXT>
String regionName = parse.args[1];IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
4,116
<BUG>GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()</BUG><CONTEXT>.put("undefined", Tristate.UNDEFINED).put("true", Tristate.TRUE).build())),optional(GenericArguments.onlyOne(GenericArguments.string(Text.of("context"))))),GenericArguments.seq(<extra_id_0>.put("-1", Tristate.FALSE).put("0", Tristate.UNDEFINED)</CONTEXT>
onlyOne(choices(Text.of("source"), catalogChoices)),choices(Text.of("target"), catalogChoices),onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
63,814
<BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY = null;@CapabilityInject(IRotaryHandler.class)public static Capability<IRotaryHandler> ROTARY_HANDLER_CAPABILITY = null;</BUG><CONTEXT>import net.minecraftforge.common.capabilities.Capability;import net.minecraftforge.common.capabilities.CapabilityInject;import net.minecraftforge.common.capabilities.CapabilityManager;public class Capabilities{@CapabilityInject(IHeatHandler.class)<extra_id_0>@CapabilityInject(IMagicHandler.class)</CONTEXT>
@CapabilityInject(IAxleHandler.class)public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null;@CapabilityInject(ICogHandler.class)public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
38,622
<BUG>import com.intellij.openapi.project.DumbAwareRunnable;import com.intellij.openapi.project.Project;</BUG><CONTEXT>import com.intellij.openapi.editor.EditorFactory;import com.intellij.openapi.editor.EditorSettings;import com.intellij.openapi.editor.markup.TextAttributes;import com.intellij.openapi.extensions.Extensions;import com.intellij.openapi.progress.ProcessCanceledException;<extra_id_0>import com.intellij.openapi.startup.StartupManager;import com.intellij.openapi.util.*;import com.intellij.openapi.util.io.FileUtil;</CONTEXT>
import com.intellij.openapi.project.DumbService;import com.intellij.openapi.project.Project;
26,696
<BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n);</BUG><CONTEXT>TaskContext taskContext = TaskContext.inmem();TaskContext.Value<Long> value = taskContext.evaluate(fib92);value.consume(f92 -> System.out.println("fib(92) = " + f92));}static Task<Long> create(long n) {<extra_id_0>if (n < 2) {return fib.process(() -> n);</CONTEXT>
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
54,008
<BUG>nonTerminalInfo.put("RRC", new String[][]{{"left", "RRC"}, {"right", "VP", "ADJP", "JJP", "NP", "PP", "ADVP"}});</BUG><CONTEXT>nonTerminalInfo.put("NX", new String[][]{{"right", "NP", "NX"}});nonTerminalInfo.put("PP", new String[][]{{"right", "IN", "TO", "VBG", "VBN", "RP", "FW", "JJ", "SYM"}, {"left", "PP"}});nonTerminalInfo.put("PRN", new String[][]{{"left", "VP", "NP", "PP", "SQ", "S", "SINV", "SBAR", "ADJP", "JJP", "ADVP", "INTJ", "WHNP", "NAC", "VBP", "JJ", "NN", "NNP"}});nonTerminalInfo.put("PRT", new String[][]{{"right", "RP"}});nonTerminalInfo.put("QP", new String[][]{{"left", "$", "IN", "NNS", "NN", "JJ", "CD", "PDT", "DT", "RB", "NCD", "QP", "JJR", "JJS"}});<extra_id_0>nonTerminalInfo.put("S", new String[][]{{"left", "TO", "VP", "S", "FRAG", "SBAR", "ADJP", "JJP", "UCP", "NP"}});nonTerminalInfo.put("SBAR", new String[][]{{"left", "WHNP", "WHPP", "WHADVP", "WHADJP", "IN", "DT", "S", "SQ", "SINV", "SBAR", "FRAG"}});nonTerminalInfo.put("SBARQ", new String[][]{{"left", "SQ", "S", "SINV", "SBARQ", "FRAG", "SBAR"}});</CONTEXT>
nonTerminalInfo.put("RRC", new String[][]{{"right", "VP", "NP", "ADVP", "ADJP", "JJP", "PP"}});
21,798
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);final int pos = posx + posy;if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {if (setDestinationNoData) {for (int k2 = 0; k2 < dst_num_bands; k2++) {<extra_id_0>}}} else {</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
18,645
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>dstPixelOffset += dstPixelStride;}if (setDestinationNoData && clipMinX <= clipMaxX) {for (int x = clipMaxX; x < dst_max_x; x++) {for (int k2 = 0; k2 < dst_num_bands; k2++)<extra_id_0>dstPixelOffset += dstPixelStride;}}</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,918
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</BUG><CONTEXT>w01 = noData.contains(s01) ? 0 : 1;w10 = noData.contains(s10) ? 0 : 1;w11 = noData.contains(s11) ? 0 : 1;if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {if (setDestinationNoData) {<extra_id_0>}} else {double result = computeValue(s00, s01, s10, s11, w00, w01,</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
59,575
<CONTEXT>sink.tableCaption();sink.text( getI18nString( locale, "stats.caption" ) );sink.tableCaption_();</BUG>sink.tableRow();<extra_id_0>sink.tableRow();<BUG>sink.tableHeaderCell();sink.text( getI18nString( locale, "stats.subprojects" ) + ":" );sink.tableHeaderCell_();</BUG>sink.tableCell();sink.text( String.valueOf( reactorProjects.size() ) );sink.tableCell_();</CONTEXT>
sink.bold();sink.bold_();sink.tableCaption_();sink.tableHeaderCell( headerCellWidth );sink.text( getI18nString( locale, "stats.subprojects" ) );sink.tableHeaderCell_();
35,311
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);minX = src.getMinX() + 1; // Left paddingmaxX = src.getMaxX() - 2; // Right paddingminY = src.getMinY() + 1; // Top paddingmaxY = src.getMaxY() - 2; // Bottom padding</BUG><CONTEXT>minX = src.getMinX();maxX = src.getMaxX();minY = src.getMinY();maxY = src.getMaxY();} else {<extra_id_0>}</CONTEXT>
iterSource = getRandomIterator(src, null);minX = src.getMinX() + leftPad; // Left paddingmaxX = src.getMaxX() - rightPad; // Right paddingminY = src.getMinY() + topPad; // Top paddingmaxY = src.getMaxY() - bottomPad; // Bottom padding
68,137
<BUG>protected Callback<VChild, Void> copyChildCallback()</BUG><CONTEXT>System.out.println(change);}}};@Override<extra_id_0>{return (child) ->{</CONTEXT>
protected Callback<VChild, Void> copyIntoCallback()
49,542
<BUG>UnsavedStreamAttachment usa = this.sourceDb.getAttachmentStream(documentRevs.getId(),documentRevs.getRev(), attachmentName,contentType, encoding);preparedAtts.put(attachmentName, this.targetDb.prepareAttachment(usa, length,encodedLength));}</BUG><CONTEXT>attachmentName);if (a != null) {continue;}}<extra_id_0>}</CONTEXT>
preparedAtts.put(attachmentName, this.sourceDb.pullAttachmentWithRetry(documentRevs.getId(), documentRevs.getRev(), entry.getKey(), new AttachmentPullProcessor(this.targetDb, entry.getKey(), contentType,encoding, length, encodedLength)));
38,731
<BUG>InetAddress address = socket.getInetAddress();</BUG><CONTEXT>} catch (SocketException ex) {Server.logDebug("interrupted " + getName() + " connection.");result = "INTERRUPTED\n";} finally {socket.close();<extra_id_0>clearSocket();Server.logAdministration(time,</CONTEXT>
InetAddress address = ipAddress;
61,049
<BUG>if (state != null && state.getBlock() != Blocks.air) {</BUG><CONTEXT>int count = 0;for (int i = chunk.minX(); i < chunk.maxX(); i++) {for (int j = chunk.minY(); j < chunk.maxY(); j++) {for (int k = chunk.minZ(); k < chunk.maxZ(); k++) {IBlockState state = chunk.getBlockState(new BlockPos(i, j, k));<extra_id_0>count++;}}</CONTEXT>
if (state != null && state.getBlock() != Blocks.AIR) {
59,676
<BUG>if (caseA) {for (int h = 0; h < dstHeight; h++) {</BUG><CONTEXT>final int pixelStride = dst.getPixelStride();final int[] bandOffsets = dst.getBandOffsets();final float[][] data = dst.getFloatDataArrays();final float[] warpData = new float[2 * dstWidth];int lineOffset = 0;<extra_id_0>int pixelOffset = lineOffset;lineOffset += lineStride;warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);</CONTEXT>
if(hasROI && !roiContainsTile && roiIter == null){throw new IllegalArgumentException("Error on creating the ROI iterator");}if (caseA || (caseB && roiContainsTile)) {for (int h = 0; h < dstHeight; h++) {
2,584
<BUG>final int jobs = options.get("jobs").asInteger().orElse(DEFAULT_JOBS);final IndexType indexType = options.get("index-type").asEnum(IndexType::parse).orElse(IndexType.SOLR);</BUG><CONTEXT>public Long run(final String[] mappings) throws Exception {if (null == mappings || 0 == mappings.length) {throw new IllegalArgumentException("You must pass the field mappings on the command line.");}final Map<String, String> map = new HashMap<>();<extra_id_0>for (String mapping : mappings) {</CONTEXT>
final int jobs = options.get("jobs").parse().asInteger().orElse(DEFAULT_JOBS);final IndexType indexType = options.get("index-type").parse().asEnum(IndexType::parse).orElse(IndexType.SOLR);
47,925
<BUG>sink.tableCell();iconError( sink );</BUG><CONTEXT>sink.tableCell();sink.text( getI18nString( locale, "legend.shared" ) );sink.tableCell_();sink.tableRow_();sink.tableRow();<extra_id_0>sink.tableCell_();sink.tableCell();sink.text( getI18nString( locale, "legend.different" ) );</CONTEXT>
sink.tableCell( "15px" ); // according /images/icon_error_sml.gificonError( sink );
28,505
<BUG>}Type responseType = ((ParameterizedType) innerType).getActualTypeArguments()[0];if (responseType instanceof WildcardType) {responseType = ((WildcardType) responseType).getUpperBounds()[0];}</BUG><CONTEXT>return new BodyCallAdapter(innerType);}if (!(innerType instanceof ParameterizedType)) {throw new IllegalStateException("Response must be parameterized"+ " as Response<Foo> or Response<? extends Foo>");<extra_id_0>return new ResponseCallAdapter(responseType);</CONTEXT>
Type responseType = getParameterUpperBound(0, (ParameterizedType) innerType);
12,889
<BUG>ThreadFactory threadFactory = new CamelThreadFactory(threadNamePattern, name, isDaemon);return threadFactory;</BUG><CONTEXT>}}onNewExecutorService(executorService);}private ThreadFactory createThreadFactory(String name, boolean isDaemon) {<extra_id_0>}}</CONTEXT>
if (!failSafe) {executorServices.remove(executorService);
50,096
<BUG>import org.sonar.core.util.stream.Collectors;import org.sonar.server.exceptions.Message;</BUG><CONTEXT>import org.sonar.api.server.ServerSide;import org.sonar.api.server.ws.Request;import org.sonar.api.server.ws.Response;import org.sonar.api.server.ws.WebService;import org.sonar.api.utils.text.JsonWriter;<extra_id_0>import org.sonar.server.qualityprofile.BulkChangeResult;import org.sonar.server.qualityprofile.QProfileService;import org.sonar.server.rule.ws.RuleQueryFactory;</CONTEXT>
[DELETED]
40,139
<BUG>this.allowMaximumSizeToDivergeFromCoreSize = getValueOnce(propertyPrefix, key, "allowMaximumSizeToDivergeFromCoreSize",</BUG><CONTEXT>}protected HystrixThreadPoolProperties(HystrixThreadPoolKey key, Setter builder) {this(key, builder, "hystrix");}protected HystrixThreadPoolProperties(HystrixThreadPoolKey key, Setter builder, String propertyPrefix) {<extra_id_0>builder.getAllowMaximumSizeToDivergeFromCoreSize(), default_allow_maximum_size_to_diverge_from_core_size);this.corePoolSize = getProperty(propertyPrefix, key, "coreSize", builder.getCoreSize(), default_coreSize);this.maximumPoolSize = getProperty(propertyPrefix, key, "maximumSize", builder.getMaximumSize(), default_maximumSize);</CONTEXT>
this.allowMaximumSizeToDivergeFromCoreSize = getProperty(propertyPrefix, key, "allowMaximumSizeToDivergeFromCoreSize",
38,699
<BUG>import me.xiaopan.android.easy.inject.DisableInject;</BUG><CONTEXT>package me.xiaopan.android.easy.app;import java.util.Locale;<extra_id_0>import me.xiaopan.android.easy.inject.InjectContentView;import me.xiaopan.android.easy.inject.Injector;import me.xiaopan.android.easy.util.ActivityPool;</CONTEXT>
import me.xiaopan.android.easy.inject.DisableInjector;
34,652
<BUG>PreparedStatement deleteAlertStatus = CassStatement.get(session,CassStatement.DELETE_ALERT_STATUS);PreparedStatement insertAlertStatus = CassStatement.get(session,CassStatement.INSERT_ALERT_STATUS);</BUG><CONTEXT>private Alert updateAlertStatus(Alert alert) throws Exception {if (alert == null || alert.getAlertId() == null || alert.getAlertId().isEmpty()) {throw new IllegalArgumentException("AlertId must be not null");}try {<extra_id_0>PreparedStatement insertAlertLifecycle = CassStatement.get(session,</CONTEXT>
[DELETED]
25,605
<BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh").in(() -> task1)</BUG><CONTEXT>}@RootTaskstatic Task<Exec.Result> exec(String parameter, int number) {Task<String> task1 = MyTask.create(parameter);Task<Integer> task2 = Adder.create(number, number + 2);<extra_id_0>.in(() -> task2).process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\"")));}</CONTEXT>
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class).in(() -> task1)
69,399
<BUG>Task<String> task = Task.ofType(String.class).named("WithRef").process(() -> instanceField + " causes an outer reference");</BUG><CONTEXT>assertEquals(des.id().name(), "Baz");assertEquals(val.awaitAndGet(), "[9999] hello 10004");}@Test(expected = NotSerializableException.class)public void shouldNotSerializeWithInstanceFieldReference() throws Exception {<extra_id_0>serialize(task);}@Test</CONTEXT>
Task<String> task = Task.named("WithRef").ofType(String.class).process(() -> instanceField + " causes an outer reference");
51,396
<BUG>import org.rajawali3d.math.Matrix4;import org.rajawali3d.math.vector.Vector3;</BUG><CONTEXT>import org.rajawali3d.materials.Material;import org.rajawali3d.materials.methods.DiffuseMethod;import org.rajawali3d.materials.textures.ATexture;import org.rajawali3d.materials.textures.StreamingTexture;import org.rajawali3d.materials.textures.Texture;<extra_id_0>import org.rajawali3d.primitives.ScreenQuad;import org.rajawali3d.primitives.Sphere;import org.rajawali3d.renderer.RajawaliRenderer;</CONTEXT>
import org.rajawali3d.math.Quaternion;import org.rajawali3d.math.vector.Vector3;
33,095
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;</BUG><CONTEXT>pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;}}if (tmpROI == 0) {<extra_id_0>} else {for (int h = 0; h < KERNEL_LINE_DIM; h++) {float tempSum = 0;</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
67,250
<CONTEXT>for (int index = 1; index < line_arr.length - 2; ++index)</BUG>{<extra_id_0>{<BUG>PlaDirection d1 = line_arr[index].direction();PlaDirection d2 = line_arr[index + 1].direction();</BUG>if (d1.is_multiple_of_45_degree() && d2.is_multiple_of_45_degree() && d1.projection(d2) != Signum.POSITIVE){</CONTEXT>
boolean polyline_changed = true;while (polyline_changed)if (p_polyline.plaline_len() < 4) return p_polyline;polyline_changed = false;PlaLineIntAlist line_arr = p_polyline.alist_copy(0);for (int index = 1; index < line_arr.size() - 2; ++index)PlaDirection d1 = line_arr.get(index).direction();PlaDirection d2 = line_arr.get(index + 1).direction();
60,164
<BUG>public class AccountsManagementFragment extends Fragment implements HomeActivity.Refreshable, Observer<DaemonEvent> {</BUG><CONTEXT>import cx.ring.services.AccountService;import cx.ring.utils.ContentUriHandler;import cx.ring.utils.Observable;import cx.ring.utils.Observer;import cx.ring.views.dragsortlv.DragSortListView;<extra_id_0>static final String TAG = AccountsManagementFragment.class.getSimpleName();public static final int ACCOUNT_CREATE_REQUEST = 1;public static final int ACCOUNT_EDIT_REQUEST = 2;</CONTEXT>
public class AccountsManagementFragment extends Fragment implements HomeActivity.Refreshable, Observer<ServiceEvent> {
59,844
<BUG>Map<String, Set<SymbolInformation>> getTypeReferences();Set<SymbolInformation> findReferences(ReferenceParams params);Set<SymbolInformation> getFilteredSymbols(String query);</BUG><CONTEXT>import java.util.Map;import java.util.Set;public interface TreeParser {void parseAllSymbols();Map<URI, Set<SymbolInformation>> getFileSymbols();<extra_id_0>}</CONTEXT>
Map<Location, Set<Location>> getReferences();Set<Location> findReferences(ReferenceParams params);Optional<Location> gotoDefinition(URI uri, Position position);Set<SymbolInformation> getFilteredSymbols(String query);
62,895
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;</BUG><CONTEXT>float result = (float) ((s1 - s0) * fracy + s0);dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = result;}} else if (setDestinationNoData) {for (int k2 = 0; k2 < dst_num_bands; k2++) {<extra_id_0>}}if (fracx < fracdx1) {</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
21,792
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>int x0 = src.getX() + posx / srcPixelStride;int y0 = src.getY() + posy / srcScanlineStride;if (!roiBounds.contains(x0, y0)) {if (setDestinationNoData) {for (int k2 = 0; k2 < dst_num_bands; k2++) {<extra_id_0>}}} else {</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
9,687
<BUG>sink.tableCell();sink.text( version );</BUG><CONTEXT>Iterator it = artifactMap.keySet().iterator();while ( it.hasNext() ){String version = (String) it.next();sink.tableRow();<extra_id_0>sink.tableCell_();sink.tableCell();generateVersionDetails( sink, artifactMap, version );</CONTEXT>
sink.tableCell( String.valueOf( cellWidth ) + "px" );sink.text( version );
51,651
<BUG>import java.util.HashSet;import java.util.Map;import java.util.function.BiPredicate;import java.util.function.Predicate;</BUG><CONTEXT>import java.util.Collections;import java.util.HashMap;<extra_id_0>import java.util.function.Supplier;import java.util.function.UnaryOperator;import javax.net.ssl.SSLContext;import javax.net.ssl.SSLEngine;</CONTEXT>
import java.util.List;import java.util.Set;import java.util.function.Function;import java.util.function.Predicate;
13,220
<BUG>java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1});</BUG><CONTEXT>_call.setSOAPActionURI("");_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);_call.setOperationName(new javax.xml.namespace.QName("urn:exist", "connect"));setRequestHeaders(_call);setAttachments(_call);<extra_id_0>if (_resp instanceof java.rmi.RemoteException) {throw (java.rmi.RemoteException)_resp;}</CONTEXT>
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1});
32,839
<BUG>LOG.debug("VrfEntry updated: id={} vrfEntry=[ destination={}, nexthops=[{}], label={} ]",identifier, update.getDestPrefix(), update.getNextHopAddressList(), update.getLabel());if (!Objects.equals(original.getLabel(), update.getLabel())) {remove(identifier, original);</BUG><CONTEXT>String vpnRd = identifier.firstKeyOf(VrfTables.class).getRouteDistinguisher();programLabelInAllVpnDpns(vpnRd, vrfEntryDeleted, NwConstants.DEL_FLOW);}@Overrideprotected void update(InstanceIdentifier<VrfEntry> identifier, VrfEntry original, VrfEntry update) {<extra_id_0>add(identifier, update);</CONTEXT>
LOG.debug("VrfEntry updated: id={} vrfEntry=[ destination={}, route-paths=[{}]]",identifier, update.getDestPrefix(), update.getRoutePaths());List<Long> originalLabels = getUniqueLabelList(original);List<Long> updateLabels = getUniqueLabelList(update);if (!updateLabels.equals(originalLabels)) {remove(identifier, original);
31,641
<BUG>}void serialize(JiraInjectables jiraInjectables, Board board, ModelNode parent, ApplicationUser user, boolean backlog) {</BUG><CONTEXT>int getComponentIndex(Component component) {return board.getComponentIndex(component);}public int getCustomFieldValueIndex(CustomFieldValue customFieldValue) {return board.getCustomFieldIndex(customFieldValue);<extra_id_0>parent.get(RANK).set(hasRankPermission(user, jiraInjectables.getProjectManager(), jiraInjectables.getPermissionManager()));ModelNode ranked = new ModelNode();ranked.setEmptyList();</CONTEXT>
public List<String> getRankedIssueKeys() {return rankedIssueKeys;void serialize(JiraInjectables jiraInjectables, Board board, ModelNode parent, ApplicationUser user, boolean backlog) {
6,855
<BUG>obj.accumulate("ident", username + "@" + os);obj.accumulate("userid", username);obj.accumulate("version", "9999");obj.accumulate("xivoversion", "1.1");</BUG><CONTEXT>String os = "x11";if(OSUtils.IS_WINDOWS)os = "win";else if(OSUtils.IS_MAC)os = "mac";<extra_id_0>return send(obj);</CONTEXT>
obj.put("ident", username + "@" + os);obj.put("userid", username);obj.put("version", "9999");obj.put("xivoversion", "1.1");
180
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));IRegion region = FGManager.getInstance().getRegion(parse.args[1]);</BUG><CONTEXT>.append(Text.of(TextColors.GREEN, "Usage: ")).append(getUsage(source)).build());return CommandResult.empty();} else if (isIn(REGIONS_ALIASES, parse.args[0])) {<extra_id_0>boolean isWorldRegion = false;if (region == null) {</CONTEXT>
String regionName = parse.args[1];IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
22,098
<BUG>return ImmutableList.of("region", "handler").stream().filter(new StartsWithPredicate(parse.current.token))</BUG><CONTEXT>.excludeCurrent(true).autoCloseQuotes(true).parse();if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {if (parse.current.index == 0)<extra_id_0>.map(args -> parse.current.prefix + args).collect(GuavaCollectors.toImmutableList());else if (parse.current.index == 1) {</CONTEXT>
return Stream.of("region", "handler").filter(new StartsWithPredicate(parse.current.token))
24,447
<BUG>private static final boolean DEFAULT_USESSL = false;private boolean m_useSsl = DEFAULT_USESSL;</BUG><CONTEXT>import org.opennms.netmgt.utils.RelaxedX509TrustManager;@Distributablefinal public class NrpeMonitor extends IPv4Monitor {private static final int DEFAULT_RETRY = 0;private static final int DEFAULT_TIMEOUT = 3000; // 3 second timeout on<extra_id_0>private static final String[] ADH_CIPHER_SUITES = new String[] {"TLS_DH_anon_WITH_AES_128_CBC_SHA"};public PollStatus poll(MonitoredService svc, Map parameters) {</CONTEXT>
private static final boolean DEFAULT_USE_SSL = false;
40,297
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {private View rootView;private TextView TV_memo_item_content;</BUG><CONTEXT>editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");}});}}<extra_id_0>private ImageView IV_memo_item_delete;</CONTEXT>
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {private ImageView IV_memo_item_dot;private TextView TV_memo_item_content;
22,477
<BUG>try {connectTango();</BUG><CONTEXT>super.onResume();if (!mIsConnected) {mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {@Overridepublic void run() {<extra_id_0>setupRenderer();mIsConnected = true;} catch (TangoOutOfDateException e) {</CONTEXT>
TangoSupport.initialize();connectTango();
46,621
<BUG>import static org.jboss.as.ee.EeLogger.SERVER_DEPLOYMENT_LOGGER;import static org.jboss.as.ee.EeMessages.MESSAGES;import static org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX;</BUG><CONTEXT>package org.jboss.as.ee.component;<extra_id_0>import java.io.Serializable;import java.lang.reflect.Constructor;</CONTEXT>
[DELETED]
53,987
<BUG>}Settings settings = builder.build();</BUG><CONTEXT>public void testPositionIncrementSetting() throws IOException {Builder builder = ImmutableSettings.settingsBuilder().put("index.analysis.filter.my_stop.type", "stop").put("index.analysis.filter.my_stop.enable_position_increments", false);if (random().nextBoolean()) {builder.put("index.analysis.filter.my_stop.version", "5.0");<extra_id_0>AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settings);analysisService.tokenFilter("my_stop");}</CONTEXT>
builder.put("path.home", createTempDir().toString());Settings settings = builder.build();
41,389
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>s_ix = startPts[0].x;s_iy = startPts[0].y;if (setDestinationNoData) {for (int x = dst_min_x; x < clipMinX; x++) {for (int k2 = 0; k2 < dst_num_bands; k2++)<extra_id_0>dstPixelOffset += dstPixelStride;}} else</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
605
<BUG>simpleRepoModule.getAgentDao(), simpleRepoModule.getAggregateDao(),simpleRepoModule.getTraceDao(),</BUG><CONTEXT>SimpleRepoModule simpleRepoModule = new SimpleRepoModule(dataSource,dataDir, clock, ticker, configRepository, backgroundExecutor);simpleRepoModule.registerMBeans(new PlatformMBeanServerLifecycleImpl(agentModule.getLazyPlatformMBeanServer()));CollectorImpl collectorImpl = new CollectorImpl(<extra_id_0>simpleRepoModule.getGaugeValueDao());collectorProxy.setInstance(collectorImpl);collectorImpl.init(baseDir, EnvironmentCreator.create(glowrootVersion),</CONTEXT>
simpleRepoModule.getEnvironmentDao(),simpleRepoModule.getTraceDao(),
2,520
<BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;import java.io.IOException;</BUG><CONTEXT>package cc.catalysts.boot.report.pdf.elements;import org.apache.pdfbox.pdmodel.PDDocument;<extra_id_0>import java.util.ArrayList;import java.util.Collection;import java.util.LinkedList;</CONTEXT>
import org.apache.pdfbox.pdmodel.PDPageContentStream;import java.io.IOException;
27,386
<BUG>add( new NodeFirstRelationshipStep( control(), config.workAheadSize(), config.movingAverageSize(),nodeStore, relationshipGroupStore, cache ) );add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );</BUG><CONTEXT>public NodeFirstRelationshipStage( Configuration config, NodeStore nodeStore,RelationshipGroupStore relationshipGroupStore, NodeRelationshipLink cache ){super( "Node --> Relationship", config, false );add( new ReadNodeRecordsStep( control(), config.batchSize(), config.movingAverageSize(), nodeStore ) );<extra_id_0>}</CONTEXT>
add( new RecordProcessorStep<>( control(), "LINK", config.workAheadSize(), config.movingAverageSize(),new NodeFirstRelationshipProcessor( relationshipGroupStore, cache ), false ) );add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );
59,980
<BUG>ADDED_MODULE("added-module"),BUNDLES("bundles"),</BUG><CONTEXT>private static final String PATH_DELIMITER = "/";public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;enum Element {ADDED_BUNDLE("added-bundle"),ADDED_MISC_CONTENT("added-misc-content"),<extra_id_0>CUMULATIVE("cumulative"),DESCRIPTION("description"),MISC_FILES("misc-files"),</CONTEXT>
APPLIES_TO_VERSION("applies-to-version"),BUNDLES("bundles"),
47,238
<BUG>import org.hawkular.inventory.json.mixins.CanonicalPathMixin;</BUG><CONTEXT>import org.hawkular.alerts.api.model.condition.Condition;import org.hawkular.inventory.api.model.CanonicalPath;import org.hawkular.inventory.api.model.Tenant;import org.hawkular.inventory.json.DetypedPathDeserializer;import org.hawkular.inventory.json.InventoryJacksonConfig;<extra_id_0>import org.slf4j.Logger;import org.slf4j.LoggerFactory;import com.fasterxml.jackson.core.JsonParseException;</CONTEXT>
import org.hawkular.inventory.json.mixins.model.CanonicalPathMixin;
13,256
<BUG>Iterable<Entity> startables = Iterables.filter(e.getOwnedChildren(), Predicates.instanceOf(Startable.class));if (!Iterables.isEmpty(startables)) {</BUG><CONTEXT>Entities.invokeEffectorList(e, startables, Startable.START, MutableMap.of("locations", locations)).getUnchecked();}}public static void stop(EntityLocal e) {log.debug("Stopping entity "+e);<extra_id_0>Entities.invokeEffectorList(e, startables, Startable.STOP).getUnchecked();}if (log.isDebugEnabled()) log.debug("Stopped entity "+e);</CONTEXT>
Iterable<Entity> startables = filterStartableManagedEntities(e.getOwnedChildren());if (!Iterables.isEmpty(startables)) {
58,004
<BUG>PsiSubstitutor subst = PsiSubstitutor.EMPTY;subst = subst.putAll(TypeConversionUtil.getSuperClassSubstitutor(psiMethod.getContainingClass(), myQualifierResolveResult.getContainingClass(), mySubstitutor));subst = subst.putAll(conflict.getSubstitutor());final PsiType[] signatureParameterTypes2 = psiMethod.getSignature(subst).getParameterTypes();</BUG><CONTEXT>final List<CandidateInfo> secondCandidates = new ArrayList<CandidateInfo>();for (CandidateInfo conflict : conflicts) {if (!(conflict instanceof MethodCandidateInfo)) continue;final PsiMethod psiMethod = ((MethodCandidateInfo)conflict).getElement();if (psiMethod == null) continue;<extra_id_0>final boolean varArgs = psiMethod.isVarArgs();</CONTEXT>
PsiSubstitutor substitutor = conflict.getSubstitutor();final PsiType[] signatureParameterTypes2 = psiMethod.getSignature(substitutor).getParameterTypes();
69,058
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</BUG><CONTEXT>dstPixelOffset += dstPixelStride;}if (setDestinationNoData && clipMinX <= clipMaxX) {for (int x = clipMaxX; x < dst_max_x; x++) {for (int k2 = 0; k2 < dst_num_bands; k2++)<extra_id_0>dstPixelOffset += dstPixelStride;}}</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
39,579
<BUG>throws DistanceCalculationException {Set<Event> events = new HashSet<Event>(unknownEventMap.uniqueEvents());events.addAll(knownEventMap.uniqueEvents());</BUG><CONTEXT>public boolean showInGUI() {return true;}@Overridepublic double distance(EventMap unknownEventMap, EventMap knownEventMap)<extra_id_0>double sum = 0.0;for(Event event : events){</CONTEXT>
Set<Event> events = Sets.union(unknownEventMap.uniqueEvents(), knownEventMap.uniqueEvents());
33,606
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;</BUG><CONTEXT>w01 = noData.contains(s01) ? 0 : 1;w10 = noData.contains(s10) ? 0 : 1;w11 = noData.contains(s11) ? 0 : 1;if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {if (setDestinationNoData) {<extra_id_0>}} else {double result = computeValue(s00, s01, s10, s11, w00, w01, w10,</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
15,731
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;</BUG><CONTEXT>int w11 = w11index < roiDataLength ? roiDataArray[w11index] & 0xff : 0;if (baseIndex > roiDataLength || w00 == 0|| (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0)) {if (setDestinationNoData) {for (int k2 = 0; k2 < dst_num_bands; k2++) {<extra_id_0>}}} else {</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
9,198
<BUG>import org.glowroot.agent.embedded.repo.AgentDao;import org.glowroot.agent.embedded.repo.AggregateDao;import org.glowroot.agent.embedded.repo.GaugeValueDao;</BUG><CONTEXT>package org.glowroot.agent.embedded.init;import java.io.File;import java.util.List;import org.glowroot.agent.collector.Collector;<extra_id_0>import org.glowroot.agent.embedded.repo.TraceDao;import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;</CONTEXT>
import org.glowroot.agent.embedded.repo.EnvironmentDao;import org.glowroot.agent.embedded.repo.GaugeValueDao;
2,755
<BUG>import org.eclipse.triquetrum.workflow.editor.features.StopFeature;public class TriqToolBehaviorProvider extends DefaultToolBehaviorProvider {</BUG><CONTEXT>import org.eclipse.triquetrum.workflow.editor.features.ModelElementConfigureFeature;import org.eclipse.triquetrum.workflow.editor.features.ModelElementCreateFeature;import org.eclipse.triquetrum.workflow.editor.features.PauseFeature;import org.eclipse.triquetrum.workflow.editor.features.ResumeFeature;import org.eclipse.triquetrum.workflow.editor.features.RunFeature;<extra_id_0>public TriqToolBehaviorProvider(IDiagramTypeProvider diagramTypeProvider) {super(diagramTypeProvider);}</CONTEXT>
import org.eclipse.triquetrum.workflow.model.NamedObj;import org.eclipse.triquetrum.workflow.model.Vertex;public class TriqToolBehaviorProvider extends DefaultToolBehaviorProvider {
69,496
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;</BUG><CONTEXT>s_ix = startPts[0].x;s_iy = startPts[0].y;if (setDestinationNoData) {for (int x = dst_min_x; x < clipMinX; x++) {for (int k2 = 0; k2 < dst_num_bands; k2++)<extra_id_0>dstPixelOffset += dstPixelStride;}} else</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
21,926
<BUG>public class ArabicAnalyzerProvider extends AbstractAnalyzerProvider<ArabicAnalyzer> {</BUG><CONTEXT>import org.elasticsearch.util.inject.Inject;import org.elasticsearch.util.inject.assistedinject.Assisted;import org.elasticsearch.util.lucene.Lucene;import org.elasticsearch.util.settings.Settings;import java.util.Set;<extra_id_0>private final Set<String> stopWords;private final ArabicAnalyzer arabicAnalyzer;@Inject public ArabicAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {</CONTEXT>
public class ArabicAnalyzerProvider extends AbstractIndexAnalyzerProvider<ArabicAnalyzer> {
31,910
<BUG>}}</BUG><CONTEXT>assertTrue(Arrays.equals(new float[0], ret));ret = Arrays.copyOf(emptyArray, 5);assertEquals(5, ret.length);for (; i < ret.length; i++) {assertEquals(0f, ret[i]);<extra_id_0>public void testCopyOfInt() {int[] a1 = {9, 8, 7, 5, 1, 2, -1037, 3, 4, 0};int[] ret = Arrays.copyOf(a1, a1.length);</CONTEXT>
ret = Arrays.copyOf(new float[] {1, 2}, 3);assertTrue(Arrays.equals(new float[] {1, 2, 0}, ret));
6,110
<BUG>((JSpinner.DefaultEditor) heatSinkNumber.getEditor()).getTextField().setEditable(false);</BUG><CONTEXT>.setMaximumSize(spinnerSize);((JSpinner.DefaultEditor) heatSinkNumber.getEditor()).setPreferredSize(spinnerSize);((JSpinner.DefaultEditor) heatSinkNumber.getEditor()).setMinimumSize(spinnerSize);<extra_id_0>baseChassisHeatSinks = new JSpinner(new SpinnerNumberModel(0, 0, 50, 1));((JSpinner.DefaultEditor) baseChassisHeatSinks.getEditor()).setSize(spinnerSize);</CONTEXT>
[DELETED]
55,037
<BUG>} else if (index == rowRange.getFinishRow() + (hasContent ? 1 : 0) && 0 != rows.size()) {List<Border> lastBorderOnCurrentPage = getBorderList(bottomBorderCollapseWith, tableBoundingBorders[2], numberOfColumns);</BUG><CONTEXT>break;}}}return firstBorderOnCurrentPage;<extra_id_0>int col = 0;int row = index - 1;while (col < numberOfColumns) {</CONTEXT>
} else if ((index == rowRange.getFinishRow() + 1 && !forceNotToProcessAsLast || index == horizontalBorders.size() - 1) && 0 != rows.size()) {List<Border> lastBorderOnCurrentPage = getBorderList(bottomBorderCollapseWith, tableBoundingBorders[2], numberOfColumns);
52,203
<BUG>install(previousXarExtension, newLocalExtension, wiki);</BUG><CONTEXT>previousXarExtension = (XarLocalExtension) this.xarRepository.resolve(previousLocalExtension.getId());} catch (ResolveException e) {throw new InstallException("Failed to get xar extension [" + previousLocalExtension.getId()+ "] from xar repository", e);}<extra_id_0>Set<XarEntry> previousPages = new HashSet<XarEntry>(previousXarExtension.getPages());List<XarEntry> newPages;try {</CONTEXT>
install(previousXarExtension, newLocalExtension, wiki, request);
64,389
<BUG>double avgBrightness = brightnessSum / (2 * xDistanceRange + 1);</BUG><CONTEXT>int leftBoundary = Math.max(mXCenter - expectedXDistance - xDistanceRange, 0);int rightBoundary = Math.min(mXCenter - expectedXDistance + xDistanceRange, (int) mImage.getWidth() - 1);for (int x = leftBoundary; x <= rightBoundary; x++) {brightnessSum += getBrightness(pixelReader.getColor(x, yCoord));}<extra_id_0>int leftCounter = 0;int rightCounter = 0;while (leftBoundary < rightBoundary) {</CONTEXT>
float avgBrightness = brightnessSum / (2 * xDistanceRange + 1);
52,309
<BUG>if ( !iAmCurrentlyMaster ){</BUG><CONTEXT>boolean restarted = false;if ( cachedMaster.getMachineId() != master.other().getMachineId() ){if ( master.other().getMachineId() == machineId ){<extra_id_0>internalShutdown();startAsMaster();restarted = true;</CONTEXT>
if ( this.localGraph == null || !iAmCurrentlyMaster )
65,281
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;import com.google.atap.tangoservice.TangoConfig;</BUG><CONTEXT>package com.projecttango.examples.java.helloareadescription;import com.google.atap.tangoservice.Tango;<extra_id_0>import com.google.atap.tangoservice.TangoCoordinateFramePair;import com.google.atap.tangoservice.TangoErrorException;import com.google.atap.tangoservice.TangoEvent;</CONTEXT>
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;import com.google.atap.tangoservice.TangoConfig;
57,391
<BUG>if (_shouldTest()) {try {</BUG><CONTEXT>}}};@Testpublic void testCreateFIFOWithBrokenFile() throws Exception {<extra_id_0>FIFOUtil.createFIFO(new File("") {</CONTEXT>
if (!_shouldTest()) {return;try {
63,079
<BUG>env.viewIoPool() == null ? env.ioPool() : env.viewIoPool());</BUG><CONTEXT>import java.util.concurrent.TimeUnit;public class ViewEndpoint extends AbstractEndpoint {public ViewEndpoint(final String hostname, String bucket, String password, int port, final CoreEnvironment env,final RingBuffer<ResponseEvent> responseBuffer) {super(hostname, bucket, password, port, env, responseBuffer, false,<extra_id_0>}@Overrideprotected void customEndpointHandlers(final ChannelPipeline pipeline) {</CONTEXT>
env.viewIoPool() == null ? env.ioPool() : env.viewIoPool(), false);
20,630
<BUG>assert indexId >= 0;return storage.indexContainsKey(indexId, key);} finally {</BUG><CONTEXT>if (!txIsActive)keyLockManager.acquireSharedLock(key);try {acquireSharedLock();try {<extra_id_0>releaseSharedLock();}</CONTEXT>
while (true)} catch (OInvalidIndexEngineIdException e) {doReloadIndexEngine();
43,150
<BUG>sink.tableHeaderCell();sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" );sink.tableHeaderCell_();</BUG><CONTEXT>sink.text( String.valueOf( convergence ) + "%" );sink.bold_();sink.tableCell_();sink.tableRow_();sink.tableRow();<extra_id_0>sink.tableCell();if ( convergence >= PERCENTAGE && snapshotCount <= 0 )</CONTEXT>
sink.tableHeaderCell( headerCellWidth );sink.text( getI18nString( locale, "stats.readyrelease" ) );sink.tableHeaderCell_();
68,716
<BUG>Task<String> task = Task.ofType(String.class).named("WithRef").process(() -> instanceField + " causes an outer reference");</BUG><CONTEXT>assertEquals(des.id().name(), "Baz");assertEquals(val.awaitAndGet(), "[9999] hello 10004");}@Test(expected = NotSerializableException.class)public void shouldNotSerializeWithInstanceFieldReference() throws Exception {<extra_id_0>serialize(task);}@Test</CONTEXT>
Task<String> task = Task.named("WithRef").ofType(String.class).process(() -> instanceField + " causes an outer reference");
60,654
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</BUG><CONTEXT>w01 = noData.contains(s01) ? 0 : 1;w10 = noData.contains(s10) ? 0 : 1;w11 = noData.contains(s11) ? 0 : 1;if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {if (setDestinationNoData) {<extra_id_0>}} else {double result = computeValue(s00, s01, s10, s11, w00, w01, w10,</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
48,843
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;}}if (tmpROI == 0) {<extra_id_0>} else {for (int h = 0; h < KERNEL_LINE_DIM; h++) {long tempSum = 0;</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
21,425
<BUG>import org.jboss.logging.annotations.MessageBundle;import java.io.IOException;</BUG><CONTEXT>package org.jboss.as.patching;import org.jboss.as.controller.OperationFailedException;import org.jboss.as.patching.runner.PatchingException;import org.jboss.logging.Messages;import org.jboss.logging.annotations.Message;<extra_id_0>import java.util.List;@MessageBundle(projectCode = "JBAS")public interface PatchMessages {</CONTEXT>
import org.jboss.logging.annotations.Cause;import java.io.IOException;
8,710
<BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groovy.lang.GroovyObject";private static final String JAVA_DEFAULT_OBJECT = "java.lang.Object";private Map<URI, Set<SymbolInformation>> fileSymbols = Maps.newHashMap();private Map<String, Set<SymbolInformation>> typeReferences = Maps.newHashMap();</BUG><CONTEXT>import org.codehaus.groovy.control.CompilationUnit;import org.slf4j.Logger;import org.slf4j.LoggerFactory;public final class GroovyTreeParser implements TreeParser {private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class);<extra_id_0>private final Supplier<CompilationUnit> unitSupplier;</CONTEXT>
private Indexer indexer = new Indexer();
29,466
<BUG>import java.util.Locale;import org.apache.felix.gogo.commands.Argument;</BUG><CONTEXT>import io.fabric8.api.ProfileService;import io.fabric8.api.Version;import io.fabric8.commands.support.CommandUtils;import java.io.PrintStream;import java.util.List;<extra_id_0>import org.apache.felix.gogo.commands.Command;import org.apache.felix.gogo.commands.Option;import org.apache.karaf.shell.console.AbstractAction;</CONTEXT>
import io.fabric8.utils.TablePrinter;import org.apache.felix.gogo.commands.Argument;
58,867
<BUG>result.addEditorCell(createCommentConstantCell(editorContext, node, false));return result;</BUG><CONTEXT>EditorCell_Collection result = jetbrains.mps.nodeEditor.cells.EditorCell_Collection.createIndent2(editorContext, node);result.setBig(true);result.getStyle().putAll(StyleRegistry.getInstance().getStyle("LINE_COMMENT"), 1);result.addEditorCell(createCommentConstantCell(editorContext, node, true));result.addEditorCell(mainCell);<extra_id_0>}private EditorCell_Constant createCommentConstantCell(jetbrains.mps.openapi.editor.EditorContext editorContext, SNode node, boolean left) {EditorCell_Constant cell = new EditorCell_Constant(editorContext, node, left ? "/*" : "*/", false);</CONTEXT>
result.setCellId("main_comment_collection");return result;
46,475
<BUG>if (!r) r = consumeToken(b, STRUCT_OPERATOR);if (!r) r = consumeToken(b, TWO_OPERATOR);</BUG><CONTEXT>if (!r) r = consumeToken(b, OR_OPERATOR);if (!r) r = consumeToken(b, PIPE_OPERATOR);if (!r) r = consumeToken(b, RELATIONAL_OPERATOR);if (!r) r = consumeToken(b, RESCUE);if (!r) r = consumeToken(b, STAB_OPERATOR);<extra_id_0>if (!r) r = consumeToken(b, UNARY_OPERATOR);if (!r) r = consumeToken(b, WHEN_OPERATOR);if (!r) r = atomKeyword(b, l + 1);</CONTEXT>
if (!r) r = consumeToken(b, THREE_OPERATOR);if (!r) r = consumeToken(b, TWO_OPERATOR);
26,050
<BUG>}txManager.open();</BUG><CONTEXT>} else {if (clusterConfig.getName().equals(OStorage.CLUSTER_DEFAULT_NAME))defaultClusterId = pos;clusters[pos].open();}<extra_id_0>} catch (IOException e) {open = false;dataSegments = new ODataLocal[0];</CONTEXT>
loadVersion();txManager.open();
67,737
<BUG>package com.cronutils.model.time.generator;import com.cronutils.mapper.WeekDay;</BUG><CONTEXT><extra_id_0>import com.cronutils.model.field.CronField;import com.cronutils.model.field.CronFieldName;import com.cronutils.model.field.constraint.FieldConstraintsBuilder;</CONTEXT>
import java.time.LocalDate;import java.util.Collections;import java.util.List;import java.util.Set;import org.apache.commons.lang3.Validate;import com.cronutils.mapper.WeekDay;
69,007
<BUG>final DestroyStatusTask task = new DestroyStatusTask(context,accountKey, statusId);</BUG><CONTEXT>public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) {final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId);return asyncTaskManager.add(task, true);}public int destroyStatusAsync(final UserKey accountKey, final String statusId) {<extra_id_0>return asyncTaskManager.add(task, true);}public int destroyUserListAsync(final UserKey accountKey, final String listId) {</CONTEXT>
final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
67,487
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);getCurrentCamera().setRotation(cameraPose.getOrientation());getCurrentCamera().setPosition(cameraPose.getPosition());}</BUG><CONTEXT>translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);translationMoon.setTransformable3D(moon);getCurrentScene().registerAnimation(translationMoon);translationMoon.play();}<extra_id_0>public int getTextureId() {</CONTEXT>
public void updateRenderCameraPose(TangoPoseData cameraPose) {float[] rotation = cameraPose.getRotationAsFloats();float[] translation = cameraPose.getTranslationAsFloats();Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);getCurrentCamera().setRotation(quaternion.conjugate());getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
49,443
<BUG>Task<String> task = Task.ofType(String.class).named("WithRef").process(() -> instanceField + " causes an outer reference");</BUG><CONTEXT>assertEquals(des.id().name(), "Baz");assertEquals(val.awaitAndGet(), "[9999] hello 10004");}@Test(expected = NotSerializableException.class)public void shouldNotSerializeWithInstanceFieldReference() throws Exception {<extra_id_0>serialize(task);}@Test</CONTEXT>
Task<String> task = Task.named("WithRef").ofType(String.class).process(() -> instanceField + " causes an outer reference");
51,007
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {</BUG><CONTEXT>this.memoList = memoList;this.dbManager = dbManager;this.callback = callback;}@Override<extra_id_0>View view;if (isEditMode) {if (viewType == TYPE_HEADER) {</CONTEXT>
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
16,527
<BUG>if (caseA) {for (int h = 0; h < dstHeight; h++) {</BUG><CONTEXT>final int pixelStride = dst.getPixelStride();final int[] bandOffsets = dst.getBandOffsets();final double[][] data = dst.getDoubleDataArrays();final float[] warpData = new float[2 * dstWidth];int lineOffset = 0;<extra_id_0>int pixelOffset = lineOffset;lineOffset += lineStride;warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);</CONTEXT>
if(hasROI && !roiContainsTile && roiIter == null){throw new IllegalArgumentException("Error on creating the ROI iterator");}if (caseA || (caseB && roiContainsTile)) {for (int h = 0; h < dstHeight; h++) {
64,952
<BUG>return GamesRoomManager.getInstance().getRoom(roomId).getFinished();}</BUG><CONTEXT>return null;}@Overridepublic List<MatchView> getFinishedMatches(UUID roomId) throws MageException {try {<extra_id_0>catch (Exception ex) {handleException(ex);}</CONTEXT>
[DELETED]