id
int64 2
70k
| bug_ctx
stringlengths 58
37.5k
| fixed
stringlengths 1
37k
|
---|---|---|
18,890 | <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)) |
45,484 | <BUG>import java.util.Observable;public class Client extends Observable {</BUG><CONTEXT>import android.support.annotation.Nullable;import android.text.TextUtils;import java.util.Locale;import java.util.Collections;import java.util.Map;<extra_id_0>private static final boolean BLOCKING = true;private static final String SHARED_PREF_KEY = "com.bugsnag.android";</CONTEXT> | import java.util.Observer;public class Client extends Observable implements Observer { |
48,633 | <BUG>if (BuildConfig.DEBUG) {Log.v(LOGTAG, "Fetching cached location", new Exception());}</BUG><CONTEXT>context.getApplicationContext().sendBroadcast(intent);}}@Nullablepublic static Location getCachedLocation(Context context) {<extra_id_0>Location location = null;</CONTEXT> | DebugLog.v(LOGTAG, "Fetching cached location", new Exception()); |
51,465 | <BUG>private SSLContextManager() {}private static SSLContextManager instance = new SSLContextManager();public static SSLContextManager getInstance() {return instance;}public void init(String keyStorePath, char[] keyStorePassword) {</BUG><CONTEXT>private BigInteger lastCaCertSerialNumber;private final ConcurrentHashMap<String, SSLContext> sslContextCache = new ConcurrentHashMap<>();private final ReadWriteLock lock = new ReentrantReadWriteLock();<extra_id_0>StopWatch stopWatch = StopWatch.create().start();</CONTEXT> | public SSLContextManager(String keyStorePath, char[] keyStorePassword) { |
8,780 | <BUG>public void itemStateChanged(final ItemEvent event) {if (event.getStateChange() == ItemEvent.SELECTED) {enableConcurrentDwn(true);} else {enableConcurrentDwn(false);</BUG><CONTEXT>concurrentDwn.setEnabled(false);concurrentPool.setEnabled(false);embeddedRE.setEnabled(false);}}<extra_id_0>}</CONTEXT> | [DELETED] |
5,140 | <BUG>this.delegate.close();}</BUG><CONTEXT>io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();distinctBatch(collection, fieldName, resultClassname, resultHandler.toHandler());return resultHandler;}public void close() {<extra_id_0>public static MongoClient newInstance(io.vertx.ext.mongo.MongoClient arg) {return arg != null ? new MongoClient(arg) : null;}</CONTEXT> | [DELETED] |
11,987 | <BUG>package com.amosyuen.videorecorder.util;import android.content.res.Resources;</BUG><CONTEXT><extra_id_0>import android.graphics.PorterDuff;import android.graphics.drawable.Drawable;import android.support.annotation.AttrRes;</CONTEXT> | import android.content.Context;import android.content.res.Configuration;import android.content.res.Resources; |
8,569 | <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());if(type != ModificationType.REMOVE) {</BUG><CONTEXT>final StringBuilder path = new StringBuilder();for(final String p : item.getPath()) {path.append(p).append(PATH_DELIMITER);}path.append(item.getName());<extra_id_0>writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash()));}if(type != ModificationType.ADD) {</CONTEXT> | if (item.isDirectory()) {writer.writeAttribute(Attribute.DIRECTORY.name, "true");if(type != ModificationType.REMOVE) { |
59,392 | <BUG>public static final int UPDATE_REQUEST = 0;</BUG><CONTEXT>public static final String CLIENT_INFO_TIME = "c_time";public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout";public static final String CLIENT_INFO_CONNECTED = "c_connected";public static final String CLIENT_INFO_CHANGED = "c_changed";public static final String CLIENT_INFO_DIFF = "c_diff";<extra_id_0>public static final int UPDATE = 1;public static final int REQUEST_PUT_HEADER = 2;public static final int REQUEST_FLUSH_HEADER = 3;</CONTEXT> | public static final int THREAD_INFO_TYPE = 0; |
33,788 | <BUG>MemoEntry._ID + " DESC", null);</BUG><CONTEXT>MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)});}public Cursor selectMemo(long topicId) {Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,<extra_id_0>if (c != null) {c.moveToFirst();}</CONTEXT> | MemoEntry.COLUMN_ORDER + " ASC", null); |
28,829 | <BUG>String path = FileUtil.toSystemDependentName(mergedFile.getPresentableUrl());conflictedFiles.remove(path);mergedGroup.add(path);}</BUG><CONTEXT>if (!vfFiles.isEmpty()) {final AbstractVcsHelper vcsHelper = AbstractVcsHelper.getInstance(myVcs.getProject());List<VirtualFile> mergedFiles = vcsHelper.showMergeDialog(vfFiles, new SvnMergeProvider(myVcs.getProject()));FileGroup mergedGroup = updatedFiles.getGroupById(FileGroup.MERGED_ID);for(VirtualFile mergedFile: mergedFiles) {<extra_id_0>}</CONTEXT> | VcsRevisionNumber revision = conflictedGroup.getRevision(myVcs.getProject(), path);conflictedGroup.remove(path);mergedGroup.add(path, myVcs, revision); |
35,870 | <BUG>import org.openstreetmap.josm.data.osm.DataSet;import org.openstreetmap.josm.gui.layer.OsmDataLayer;</BUG><CONTEXT>package org.openstreetmap.josm.command;import org.junit.BeforeClass;import org.junit.Test;import org.openstreetmap.josm.JOSMFixture;<extra_id_0>import nl.jqno.equalsverifier.EqualsVerifier;import nl.jqno.equalsverifier.Warning;public class SelectCommandTest {</CONTEXT> | import org.openstreetmap.josm.data.osm.User;import org.openstreetmap.josm.gui.layer.OsmDataLayer; |
27,046 | <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]; |
24,892 | <BUG>componentOf.setSourceDescriptionURI(URI.create(CommonMapper.getDescriptionEntryName(dqSource.getRef())));</BUG><CONTEXT>citation.setFields(new ArrayList<CitationField>());citation.setValue("");if (dqSource.getRef() != null) {gedxSourceDescription.setId(dqSource.getRef() + "-" + Long.toHexString(SequentialIdentifierGenerator.getNextId()));SourceReference componentOf = new SourceReference();<extra_id_0>gedxSourceDescription.setComponentOf(componentOf);sourceDescriptionHasData = true;if (dqSource.getDate() != null) {</CONTEXT> | componentOf.setDescriptionRef(URI.create(CommonMapper.getSourceDescriptionReference(dqSource.getRef()))); |
9,970 | <CONTEXT>if (fgObject.autoSave()) {Path singleDir = dir.resolve(name.toLowerCase());</BUG>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<extra_id_0>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);</BUG>constructDirectory(singleDir);try {fgObject.save(singleDir);</CONTEXT> | Path singleDir = serverDir.resolve(name.toLowerCase());logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir); |
49,556 | <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]);if (handler == null)throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1);if (handler instanceof GlobalHandler)</BUG><CONTEXT>source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region");return CommandResult.success();} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));<extra_id_0>throw new CommandException(Text.of("You may not delete the global handler!"));</CONTEXT> | Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);if (!handlerOpt.isPresent())IHandler handler = handlerOpt.get();if (handler instanceof GlobalHandler) |
54,942 | <BUG>import org.elasticsearch.common.Priority;import org.elasticsearch.common.settings.Settings;</BUG><CONTEXT>import org.elasticsearch.action.search.SearchRequestBuilder;import org.elasticsearch.action.search.SearchResponse;import org.elasticsearch.action.search.SearchType;import org.elasticsearch.action.search.ShardSearchFailure;import org.elasticsearch.client.Client;<extra_id_0>import org.elasticsearch.common.unit.TimeValue;import org.elasticsearch.common.xcontent.XContentFactory;import org.elasticsearch.search.facet.datehistogram.DateHistogramFacet;</CONTEXT> | import org.elasticsearch.common.bytes.BytesArray;import org.elasticsearch.common.settings.Settings; |
35,154 | <BUG>import java.text.DecimalFormat;public final class StringUtils {</BUG><CONTEXT>package ch.logixisland.anuto.util;<extra_id_0>private StringUtils() {}private static DecimalFormat fmt0 = new DecimalFormat("0");</CONTEXT> | import android.content.res.Resources;import ch.logixisland.anuto.R;public final class StringUtils { |
576 | <BUG>public void expand() {</BUG><CONTEXT>headerGroup.addActor(expandIcon);headerGroup.addActor(detachIcon);addActor(headerGroup);expandIcon.setChecked(expanded);}<extra_id_0>if (!expandIcon.isChecked()) {expandIcon.setChecked(true);}</CONTEXT> | public void expandPane() { |
60,519 | <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"); |
17,310 | <BUG>ChinaPhoneHelper.setStatusBar(this,true);</BUG><CONTEXT>}@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_memo);<extra_id_0>topicId = getIntent().getLongExtra("topicId", -1);if (topicId == -1) {finish();</CONTEXT> | ChinaPhoneHelper.setStatusBar(this, true); |
26,852 | <BUG>MemoEntry._ID + " DESC", null);</BUG><CONTEXT>MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)});}public Cursor selectMemo(long topicId) {Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,<extra_id_0>if (c != null) {c.moveToFirst();}</CONTEXT> | MemoEntry.COLUMN_ORDER + " ASC", null); |
45,532 | <BUG>for (i = 0; i < maxNumChoices; i++) {v = JDD.Var(ddVarsUsed++);ddChoiceVars[i] = v;ddVarNames.add("l" + i);</BUG><CONTEXT>for (i = 0; i < numVars; i++) {varDDRowVars[i] = new JDDVars();varDDColVars[i] = new JDDVars();}if (modelType == ModelType.MDP) {<extra_id_0>}</CONTEXT> | [DELETED] |
30,562 | <BUG>return instanceField;}</BUG><CONTEXT>private UserStorageService userStorage;private EconomyService economyService = null;private boolean loaded = false;private FCCommandDispatcher fgDispatcher;public static FoxGuardMain instance() {<extra_id_0>@Listenerpublic void construct(GameConstructionEvent event) {instanceField = this;</CONTEXT> | }public static Cause getCause() {return instance().pluginCause;} |
17,234 | <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 |
69,892 | <BUG>case APPLIES_TO_VERSION:builder.addAppliesTo(value);break;</BUG><CONTEXT>final int count = reader.getAttributeCount();for (int i = 0; i < count; i++) {final String value = reader.getAttributeValue(i);final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));switch (attribute) {<extra_id_0>case RESULTING_VERSION:if(type == Patch.PatchType.CUMULATIVE) {</CONTEXT> | [DELETED] |
53,691 | <BUG>public synchronized void render(Canvas canvas, double tranX , double tranY , double scale ) {this.scale = scale;</BUG><CONTEXT>hasRight = true;grayDst.setTo(image);ConvertBitmap.grayToBitmap(image,bitmapDst,storage);}}<extra_id_0>this.tranX = tranX;this.tranY = tranY;int startX = bitmapSrc.getWidth()+SEPARATION;</CONTEXT> | public void render(Canvas canvas, double tranX , double tranY , double scale ) {this.scale = scale; |
1,035 | <BUG>import java.util.Map;import brooklyn.location.basic.SshMachineLocation;import brooklyn.util.collections.MutableMap;import brooklyn.util.text.StringEscapes.BashStringEscapes;</BUG><CONTEXT>import java.io.IOException;import java.util.HashMap;import java.util.Iterator;import java.util.LinkedList;import java.util.List;<extra_id_0>import com.google.common.collect.ImmutableList;</CONTEXT> | import java.util.concurrent.ExecutionException;import brooklyn.util.exceptions.Exceptions;import brooklyn.util.task.Tasks;import brooklyn.util.text.StringEscapes.BashStringEscapes; |
27,684 | <BUG>public void load() {</BUG><CONTEXT>throw new IllegalArgumentException("Can't save an empty KnowledgeBase.");}dbc.saveObject("modelParameters", modelParameters);dbc.saveObject("trainingParameters", trainingParameters);}<extra_id_0>if(!isInitialized()) {modelParameters = dbc.loadObject("modelParameters", mpClass);trainingParameters = dbc.loadObject("trainingParameters", tpClass);</CONTEXT> | public void init() { |
5,389 | <BUG>return value;</BUG><CONTEXT>this.value = value;return result;}public boolean setAndGet(final boolean value) {this.value = value;<extra_id_0>}public void setFalse() {this.value = false;</CONTEXT> | return this;public boolean getAndSet(final boolean value) {final boolean result = this.value;return this.value; |
17,888 | <BUG>return Task.ofType(String.class).named("Enums", enm).process(enm::toString);</BUG><CONTEXT>assertThat(parsedEnum, is(CustomEnum.BAR));}@RootTaskpublic static Task<String> enums(CustomEnum enm) {parsedEnum = enm;<extra_id_0>}@Testpublic void shouldParseCustomTypes() throws Exception {</CONTEXT> | return Task.named("Enums", enm).ofType(String.class).process(enm::toString); |
17,736 | <BUG>out.print(getServletInfo());try</BUG><CONTEXT>throws ServletException, IOException{ShepherdLogManager.setRequestIp(request.getRemoteAddr(), request.getHeader("X-Forwarded-For"));log.debug(levelName + " Servlet Accessed");PrintWriter out = response.getWriter();<extra_id_0>{HttpSession ses = request.getSession(true);if(Validate.validateSession(ses))</CONTEXT> | Locale locale = new Locale(Validate.validateLanguage(request.getSession()));ResourceBundle errors = ResourceBundle.getBundle("i18n.servlets.errors", locale);ResourceBundle bundle = ResourceBundle.getBundle("i18n.servlets.challenges.xss3", locale);try |
69,423 | <BUG>destNod = interpB.getDestinationNoData();</BUG><CONTEXT>interpB.setROIdata(roiBounds, roiIter);if (nod == null) {nod = interpB.getNoDataRange();}if (destNod == null) {<extra_id_0>}}if (nod != null) {</CONTEXT> | destNod = new double[]{interpB.getDestinationNoData()}; |
57,238 | <BUG>public static final String GET_ENTITY_ALERTS = "GET_ENTITY_ALERTS";public static final String GET_ALL_ENTITY_ALERTS = "GET_ALL_ENTITY_ALERTS";public static final String GET_SLA_HIGH_CANDIDATES = "GET_SLA_HIGH_CANDIDATES";public static final String UPDATE_SLA_HIGH = "UPDATE_SLA_HIGH";</BUG><CONTEXT>"GET_INSTANCES_FOR_ENTITY_CLUSTER_FOR_STATES_WITH_RANGE";public static final String GET_LAST_INSTANCE_FOR_ENTITY_CLUSTER = "GET_LAST_INSTANCE_FOR_ENTITY_CLUSTER";public static final String DELETE_INSTANCES_TABLE = "DELETE_INSTANCES_TABLE";public static final String GET_INSTANCE_SUMMARY_BY_STATE_WITH_RANGE = "GET_INSTANCE_SUMMARY_BY_STATE_WITH_RANGE";public static final String GET_LATEST_INSTANCE_TIME = "GET_LATEST_INSTANCE_TIME";<extra_id_0>public static final String GET_ENTITY_ALERT_INSTANCE = "GET_ENTITY_ALERT_INSTANCE";</CONTEXT> | public static final String UPDATE_SLA_HIGH = "UPDATE_SLA_HIGH"; |
30,551 | <BUG>import org.infinispan.Version;import org.jboss.shrinkwrap.api.Archive;</BUG><CONTEXT>import java.io.IOException;import java.io.InputStream;import java.util.Map.Entry;import java.util.Properties;import java.util.Set;<extra_id_0>import org.jboss.shrinkwrap.api.asset.Asset;import org.jboss.shrinkwrap.api.asset.StringAsset;import org.jboss.shrinkwrap.descriptor.api.Descriptors;</CONTEXT> | [DELETED] |
2,161 | <BUG>import java.io.DataOutputStream;import java.util.HashMap;import java.util.Map;import mods.eln.Eln;import mods.eln.misc.Coordonate;</BUG><CONTEXT>package mods.eln.transparentnode.electricalantennatx;<extra_id_0>import mods.eln.misc.Direction;</CONTEXT> | import mods.eln.i18n.I18N;import mods.eln.misc.Coordonate; |
11,810 | <BUG>knowledgeBase.load();</BUG><CONTEXT>modeler.predict(testDataset);ClassificationMetrics vm = new ClassificationMetrics(testDataset);return vm;}public ClassificationMetrics validate(Map<Object, URI> datasets) {<extra_id_0>TextClassifier.TrainingParameters trainingParameters = knowledgeBase.getTrainingParameters();Dataframe testDataset = Dataframe.Builder.parseTextFiles(datasets,</CONTEXT> | knowledgeBase.init(); |
69,122 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;</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]] = destinationNoDataByte[k2]; |
49,802 | <BUG>databaseTypeComboViewer.setInput( DatabaseTypeEnum.values() );databaseTypeComboViewer.setSelection( new StructuredSelection( DatabaseTypeEnum.RELAY ) );</BUG><CONTEXT>databaseSpecificDetailsBlock = new NullDatabaseSpecificDetailsBlock( instance,( OlcNullConfig ) database );}else if ( database instanceof OlcRelayConfig ){<extra_id_0>databaseSpecificDetailsBlock = new RelayDatabaseSpecificDetailsBlock( instance,( OlcRelayConfig ) database, browserConnection );}</CONTEXT> | [DELETED] |
9,401 | <CONTEXT>import org.apache.cassandra.db.*;import org.apache.cassandra.db.index.SecondaryIndexManager;</BUG>import org.apache.cassandra.io.sstable.ColumnStats;import org.apache.cassandra.io.sstable.SSTableIdentityIterator;import org.apache.cassandra.io.util.DataOutputBuffer;<extra_id_0>import org.apache.cassandra.io.sstable.ColumnStats;import org.apache.cassandra.io.sstable.SSTableIdentityIterator;import org.apache.cassandra.io.util.DataOutputBuffer;<BUG>import org.apache.cassandra.utils.HeapAllocator;public class PrecompactedRow extends AbstractCompactedRow</BUG>{private final ColumnFamily compactedCf;</CONTEXT> | import org.apache.cassandra.db.columniterator.IdentityQueryFilter;import org.apache.cassandra.db.filter.IDiskAtomFilter;import org.apache.cassandra.db.index.SecondaryIndexManager;import org.apache.cassandra.utils.CloseableIterator;import org.apache.cassandra.utils.FBUtilities;import org.apache.cassandra.utils.MergeIterator;public class PrecompactedRow extends AbstractCompactedRow |
46,506 | <CONTEXT></BUG>isWorldRegion = true;}if (region == null)<extra_id_0>isWorldRegion = true;}if (region == null)<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));if (region instanceof GlobalWorldRegion) {</BUG>throw new CommandException(Text.of("You may not delete the global region!"));}</CONTEXT> | if (world == null)throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));if (world == null) throw new CommandException(Text.of("Must specify a world!"));region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!"));if (region instanceof IGlobal) { |
65,049 | <CONTEXT></BUG>String entityMetaClassName = signature.className + META_SUFFIX;TypeName entityMetaExactType = ClassName.get(ENTITY_META_PACKAGE, entityMetaClassName);return FieldSpec.builder(entityMetaExactType, "meta", Modifier.FINAL, Modifier.PROTECTED).build();}<extra_id_0>String entityMetaClassName = signature.className + META_SUFFIX;TypeName entityMetaExactType = ClassName.get(ENTITY_META_PACKAGE, entityMetaClassName);return FieldSpec.builder(entityMetaExactType, "meta", Modifier.FINAL, Modifier.PROTECTED).build();}<BUG>default FieldSpec buildEntityClassField(EntityMetaSignature signature) {</BUG>return FieldSpec.builder(classTypeOf(signature.entityRawClass), "entityClass", Modifier.FINAL, Modifier.PROTECTED).initializer("$T.class", signature.entityRawClass).build();</CONTEXT> | .fieldMetaSignatures.stream().filter(x -> x.context.columnType == ColumnType.COUNTER || x.context.columnType == ColumnType.STATIC_COUNTER).count() > 0;public FieldSpec buildExactEntityMetaField(EntityMetaSignature signature) {public FieldSpec buildEntityClassField(EntityMetaSignature signature) { |
37,135 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;</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]] = destinationNoDataInt[k2]; |
62,556 | <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); |
19,551 | <BUG>import java.security.NoSuchAlgorithmException;import java.util.ArrayList;import java.util.Collections;import java.util.List;</BUG><CONTEXT>import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.security.DigestOutputStream;import java.security.MessageDigest;<extra_id_0>public final class PatchUtils {</CONTEXT> | import java.text.DateFormat;import java.util.Date;import java.util.List; |
64,334 | <CONTEXT></BUG>if (indexersInjectors.containsKey(indexerName)) {throw new IndexerException(indexerName, "indexer already exists");}logger.debug("creating indexer [{}][{}]", indexerName.type(), indexerName.name());<extra_id_0>if (indexersInjectors.containsKey(indexerName)) {throw new IndexerException(indexerName, "indexer already exists");}logger.debug("creating indexer [{}][{}]", indexerName.type(), indexerName.name());<BUG>Settings indexerSettings = settingsBuilder().put(this.settings).put(settings).classLoader(settings.getClassLoader()).globalSettings(settings.getGlobalSettings()).build();</BUG>ModulesBuilder modules = new ModulesBuilder();</CONTEXT> | } catch (InterruptedException e) {@Override protected void doClose() throws ElasticSearchException {public synchronized Indexer createIndexer(IndexerName indexerName, Map<String, Object> settings) throws ElasticSearchException { |
7,774 | <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_(); |
30,947 | <BUG>import com.wm.remusic.lrc.LrcView;import com.wm.remusic.provider.PlaylistsManager;</BUG><CONTEXT>import com.wm.remusic.fragment.SimpleMoreFragment;import com.wm.remusic.handler.HandlerUtil;import com.wm.remusic.info.MusicInfo;import com.wm.remusic.lrc.DefaultLrcParser;import com.wm.remusic.lrc.LrcRow;<extra_id_0>import com.wm.remusic.service.MediaService;import com.wm.remusic.service.MusicPlayer;import com.wm.remusic.uitl.IConstants;</CONTEXT> | import com.wm.remusic.provider.MusicPlaybackState;import com.wm.remusic.provider.PlaylistsManager; |
39,998 | <BUG>import java.util.HashSet;import java.util.Properties;</BUG><CONTEXT>import edu.isi.wings.workflow.template.classes.sets.SetCreationRule.SetType;import edu.isi.wings.workflow.template.classes.variables.*;import java.util.ArrayList;import java.util.Collections;import java.util.HashMap;<extra_id_0>import java.util.TreeMap;public class WorkflowGenerationKB implements WorkflowGenerationAPI {private Logger logger;</CONTEXT> | import java.util.LinkedHashMap;import java.util.Properties; |
50,919 | <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)) |
68,954 | <BUG>"(foomissingbaz$)");</BUG><CONTEXT>public void testNewStyleFormattingEndsWithConstant() {doTestInjectedText("import re\n" +"\n" +"def f(**kwargs):" +" re.search('<caret>(foo{bar}baz$)'.format(**kwargs), 'foo')\n",<extra_id_0>}private void doTestInjectedText(@NotNull String text, @NotNull String expected) {myFixture.configureByText(PythonFileType.INSTANCE, text);</CONTEXT> | "(foomissing_valuebaz$)"); |
55,744 | <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),ProductIdentifier.class)</BUG><CONTEXT>}list.add(new NonStandardProperty((NonStandardProperty) child));}},PRODUCT_IDENTIFIER ("PRODID",<extra_id_0>{@Overridepublic VChild parse(VCalendar vCalendar, String contentLine)</CONTEXT> | public void copyChild(VChild child, VCalendar destination)CalendarScale calendarScale = (CalendarScale) child;destination.setCalendarScale(calendarScale);METHOD ("METHOD",Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),Method.class) |
33,465 | <BUG>Map<String, Object> map = adminRouteService.AdminSettings(request, response);</BUG><CONTEXT>return true;}, new JsonTransformer());get("/admin/settings/", (request, response) -> {checkLoggedIn(request, response);AdminRouteService adminRouteService = new AdminRouteService();<extra_id_0>return new ModelAndView(map, "admin_settings.ftl");}, new FreeMarkerEngine());get("/admin/logs/", (request, response) -> {</CONTEXT> | Map<String, Object> map = adminRouteService.adminSettings(request, response); |
28,135 | <BUG>tag.getAttributes().setAttribute("id", id); // No need to escape: this comes from an existing 'id' or from a tokentag.getAttributes().setAttribute("name", name); // No need to escape: this is a java-valid tokentag.getAttributes().setAttribute("value", RequestDataValueProcessorUtils.processFormFieldValue(context, name, "", "password"));</BUG><CONTEXT>final AttributeName attributeName, final String attributeValue,final BindStatus bindStatus, final IElementTagStructureHandler structureHandler) {String name = bindStatus.getExpression();name = (name == null? "" : name);final String id = computeId(context, tag, name, false);<extra_id_0>}</CONTEXT> | final IElementAttributes attributes = tag.getAttributes();StandardProcessorUtils.setAttribute(attributes, this.idAttributeDefinition, ID_ATTR_NAME, id); // No need to escape: this comes from an existing 'id' or from a tokenStandardProcessorUtils.setAttribute(attributes, this.nameAttributeDefinition, NAME_ATTR_NAME, name); // No need to escape: this is a java-valid tokenStandardProcessorUtils.setAttribute(attributes, this.valueAttributeDefinition, VALUE_ATTR_NAME, RequestDataValueProcessorUtils.processFormFieldValue(context, name, "", "password")); |
39,908 | <CONTEXT>String name = fgObject.getName();Path singleDir = dir.resolve(name.toLowerCase());</BUG>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<extra_id_0>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);</BUG>constructDirectory(singleDir);try {fgObject.save(singleDir);</CONTEXT> | UUID owner = fgObject.getOwner();boolean isOwned = !owner.equals(SERVER_UUID);Optional<User> userOwner = userStorageService.get(owner);String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;if (fgObject.autoSave()) {Path singleDir = serverDir.resolve(name.toLowerCase());logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir); |
69,690 | <BUG>{private List reactorProjects;private static final int PERCENTAGE = 100;</BUG><CONTEXT>import java.util.Locale;import java.util.Map;import java.util.TreeMap;public class DependencyConvergenceReportextends AbstractProjectInfoReport<extra_id_0>public String getOutputName(){</CONTEXT> | private static final int PERCENTAGE = 100;private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() ); |
57,607 | <BUG>import android.support.v4.app.NavUtils;import android.support.v7.app.AppCompatActivity;</BUG><CONTEXT>import android.content.Intent;import android.database.Cursor;import android.net.Uri;import android.os.Bundle;import android.os.Handler;<extra_id_0>import android.support.v7.widget.Toolbar;import android.util.Log;import android.view.ContextMenu;</CONTEXT> | import android.support.v4.view.MenuItemCompat;import android.support.v7.app.AppCompatActivity; |
33,229 | <BUG>import static org.firebirdsql.common.FBTestProperties.getConnectionViaDriverManager;import static org.firebirdsql.common.JdbcResourceHelper.*;</BUG><CONTEXT>import org.junit.Before;import org.junit.Rule;import org.junit.Test;import org.junit.rules.ExpectedException;import static org.firebirdsql.common.DdlHelper.*;<extra_id_0>import static org.firebirdsql.common.matchers.SQLExceptionMatchers.*;import static org.firebirdsql.util.FirebirdSupportInfo.supportInfoFor;import static org.hamcrest.CoreMatchers.*;</CONTEXT> | import static org.firebirdsql.common.FBTestProperties.getDefaultSupportInfo;import static org.firebirdsql.common.JdbcResourceHelper.*; |
55,829 | <BUG>import com.eucalyptus.entities.TransientEntityException;import com.eucalyptus.util.FullName;</BUG><CONTEXT>import com.eucalyptus.component.ComponentIds;import com.eucalyptus.component.id.Eucalyptus;import com.eucalyptus.entities.Entities;import com.eucalyptus.entities.TransactionException;import com.eucalyptus.entities.TransactionExecutionException;<extra_id_0>import com.eucalyptus.util.Numbers;import com.google.common.collect.Iterables;@Entity</CONTEXT> | import com.eucalyptus.records.Logs;import com.eucalyptus.util.FullName; |
23,140 | <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; |
62,742 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</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]] = destinationNoDataShort[k2]; |
19,422 | <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream()</BUG><CONTEXT>.autoCloseQuotes(true).leaveFinalAsIs(true).parse();if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {if (parse.current.index == 0)<extra_id_0>.filter(new StartsWithPredicate(parse.current.token)).collect(GuavaCollectors.toImmutableList());else if (parse.current.index == 1) {</CONTEXT> | return Stream.of("region", "worldregion", "handler", "controller") |
58,944 | <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; |
5,404 | <CONTEXT>if(factory().isForceNativeAsObject()) {gen.writeFieldName("request");nativeWriter().writeNativeRequest(nativ.getRequestNative(), gen);</BUG>} else {<extra_id_0>} else {<BUG>String nativeString = factory().newNativeWriter().writeNativeRequest(nativ.getRequestNative());gen.writeStringField("request", nativeString);}</BUG>}break;</CONTEXT> | writeExtensions(nativ, gen);gen.writeEndObject();protected void writeNativeFields(Native nativ, JsonGenerator gen) throws IOException {switch (nativ.getRequestOneofCase()) {case REQUEST_NATIVE:if (factory().isForceNativeAsObject()) {nativeWriter().writeNativeRequest(nativ.getRequestNative(), gen);gen.writeString(nativeWriter().writeNativeRequest(nativ.getRequestNative())); |
43,595 | <BUG>}private void reset() {streamWriterSizes.clear();streamBaseCount.set(0);</BUG><CONTEXT>publishNotification(sum);} finally {streamBaseCount.set(sum);}}<extra_id_0>}</CONTEXT> | [DELETED] |
60,633 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff;final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff;if (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]] = destinationNoDataUShort[k2]; |
39,926 | <BUG>} catch (OutOfMemoryError e) { }for (int j = 0; j < chunks; j++) {</BUG><CONTEXT>assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * shortSize);try {fieldReference = pointers;new ShortPointer(chunkSize);fail("OutOfMemoryError should have been thrown.");<extra_id_0>pointers[j] = null;}fieldReference = null;</CONTEXT> | } catch (OutOfMemoryError e) {System.out.println(e);System.out.println(e.getCause());for (int j = 0; j < chunks; j++) { |
15,981 | <CONTEXT>import groovy.swing.factory.RadioButtonMenuItemFactory;</BUG>import groovy.swing.factory.SeparatorFactory;import groovy.swing.factory.SplitPaneFactory;import groovy.swing.factory.TableLayoutFactory;import groovy.swing.factory.TableModelFactory;<extra_id_0>import groovy.swing.factory.SeparatorFactory;import groovy.swing.factory.SplitPaneFactory;import groovy.swing.factory.TableLayoutFactory;import groovy.swing.factory.TableModelFactory;<BUG>import groovy.swing.factory.TextAreaFactory;import groovy.swing.factory.TextFieldFactory;import groovy.swing.factory.TextPaneFactory;import groovy.swing.factory.ToggleButtonFactory;</BUG>import groovy.swing.factory.WidgetFactory;</CONTEXT> | import groovy.swing.factory.Factory;import groovy.swing.factory.FormattedTextFactory;import groovy.swing.factory.FrameFactory;import groovy.swing.factory.MapFactory;import groovy.swing.factory.TextArgWidgetFactory; |
56,580 | <BUG>List<ResponseTrending> repositories) {</BUG><CONTEXT>mContentResolver.delete(uri, null, null);mContentResolver.insert(uri, contentValues);}}public void saveTrendingRepositories(String period, String language,<extra_id_0>Uri uri = TrendingContract.TrendingEntry.CONTENT_URI;ArrayList<ContentProviderOperation> ops = new ArrayList<>();ops.add(ContentProviderOperation.newDelete(uri)</CONTEXT> | List<TrendingRepository> repositories) { |
6,437 | <BUG>if (isStaticJavaFeature(feature)) {return null;</BUG><CONTEXT>}public XExpression getActualReceiver(XAbstractFeatureCall call) {return getActualReceiver(call, getFeature(call), getImplicitReceiver(call));}public XExpression getActualReceiver(XAbstractFeatureCall featureCall, JvmIdentifiableElement feature, XExpression implicitReceiver) {<extra_id_0>}if (implicitReceiver!=null)return implicitReceiver;</CONTEXT> | return false;if (isStaticJavaFeature(feature) || feature instanceof JvmConstructor) {return null; |
44,758 | <BUG>private final AccumuloMetadata metadata;private final AccumuloSplitManager splitManager;</BUG><CONTEXT>public class AccumuloConnectorimplements Connector{private static final Logger LOG = Logger.get(AccumuloConnector.class);private final LifeCycleManager lifeCycleManager;<extra_id_0>private final AccumuloRecordSetProvider recordSetProvider;private final AccumuloHandleResolver handleResolver;private final AccumuloPageSinkProvider pageSinkProvider;</CONTEXT> | private final AccumuloMetadataFactory metadataFactory;private final AccumuloSplitManager splitManager; |
59,681 | <BUG>entityStore = new AtlasEntityStoreV1(deleteHandler, typeRegistry);</BUG><CONTEXT>compositeMapValueType = typeRegistry.getEntityTypeByName("CompositeMapValue");}@BeforeTestpublic void init() throws Exception {DeleteHandlerV1 deleteHandler = getDeleteHandler(typeRegistry);<extra_id_0>RequestContextV1.clear();}@AfterClass</CONTEXT> | entityStore = new AtlasEntityStoreV1(deleteHandler, typeRegistry, mockChangeNotifier); |
60,701 | <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]; |
67,132 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;</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]] = destinationNoDataDouble[k2]; |
23,982 | <BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG><CONTEXT>import org.apache.sling.jcr.resource.JcrResourceConstants;import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;import org.apache.sling.jcr.resource.internal.helper.MapEntries;import org.apache.sling.jcr.resource.internal.helper.Mapping;import org.apache.sling.performance.annotation.PerformanceTestSuite;<extra_id_0>import org.junit.runner.RunWith;</CONTEXT> | import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest; |
5,738 | <BUG>return Task.ofType(String.class).named("MyTask", parameter).in(() -> Adder.create(parameter.length(), PLUS))</BUG><CONTEXT>return args;}static class MyTask {static final int PLUS = 10;static Task<String> create(String parameter) {<extra_id_0>.in(() -> Fib.create(parameter.length())).process((sum, fib) -> something(parameter, sum, fib));}</CONTEXT> | return Task.named("MyTask", parameter).ofType(String.class).in(() -> Adder.create(parameter.length(), PLUS)) |
65,917 | <BUG>@Overrideprotected void run(Json json, JerseyClient client, CommandLine params) throws Exception {List<Application> applications = client.resource(uriFor("/v1/applications"))</BUG><CONTEXT>import org.apache.commons.cli.CommandLine;public class ListApplicationsCommand extends BrooklynCommand {public ListApplicationsCommand() {super("list-applications", "List all registered applications");}<extra_id_0>.type(MediaType.APPLICATION_JSON_TYPE).get(new GenericType<List<Application>>() {});</CONTEXT> | protected void run(PrintStream out, PrintStream err, Json json,List<Application> applications = client.resource(uriFor("/v1/applications")) |
29,416 | <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); |
11,690 | <BUG>import com.intellij.openapi.vfs.VirtualFile;import org.jetbrains.annotations.NotNull;</BUG><CONTEXT>import com.intellij.openapi.project.DumbAware;import com.intellij.openapi.project.Project;import com.intellij.openapi.projectRoots.Sdk;import com.intellij.openapi.roots.*;import com.intellij.openapi.roots.ui.configuration.ModulesConfigurator;<extra_id_0>import org.jetbrains.annotations.Nullable;import java.util.Collection;import java.util.Iterator;</CONTEXT> | import com.intellij.openapi.vfs.WrappingVirtualFile;import org.jetbrains.annotations.NotNull; |
24,407 | <BUG>public Object getAdapter(Class adapter) {</BUG><CONTEXT>return baseLocation;if (mirrors == null)mirrors = new MirrorSelector(this, getTransport());return mirrors.getMirrorLocation(baseLocation, monitor);}<extra_id_0>if (adapter == IFileArtifactRepository.class)if (!isLocal())return null;</CONTEXT> | public <T> T getAdapter(Class<T> adapter) { |
11,386 | <BUG>public Duration timeFromLastExecution(DateTime date){return new Interval(lastExecution(date), date).toDuration();}public boolean isMatch(DateTime date){</BUG><CONTEXT>return previousMatch;} catch (NoSuchValueException e) {throw new IllegalArgumentException(e);}}<extra_id_0>return nextExecution(lastExecution(date)).equals(date);</CONTEXT> | [DELETED] |
54,038 | <BUG>+ "CAST(UP.RDB$RELATION_NAME AS VARCHAR(40)) = ? and ((";</BUG><CONTEXT>+ "where "+ "RF.RDB$RELATION_NAME = UP.RDB$RELATION_NAME and "+ "RF.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME and "+ "(UP.RDB$FIELD_NAME is null or "+ "UP.RDB$FIELD_NAME = RF.RDB$FIELD_NAME) and "<extra_id_0>private static final String GET_COLUMN_PRIVILEGES_END = " UP.RDB$OBJECT_TYPE = 0) or "+ "(RF.RDB$FIELD_NAME is null and UP.RDB$OBJECT_TYPE = 0)) "+ "order by 2,5 ";</CONTEXT> | + "CAST(UP.RDB$RELATION_NAME AS VARCHAR(" + (OBJECT_NAME_LENGTH + 10) + ")) = ? and (("; |
3,729 | <BUG>public static boolean type_extends_(IElementType child_, IElementType parent_) {return type_extends_impl_(EXTENDS_SETS_, child_, parent_);}</BUG><CONTEXT>create_token_set_(BINARY_EXPRESSION, CONDITIONAL_EXPRESSION, EXPRESSION, INDEXED_EXPRESSION,LITERAL_EXPRESSION, METHOD_CALL_EXPRESSION, NEW_EXPRESSION, PARENTHESIZED_EXPRESSION,REFERENCE_EXPRESSION, SEQUENCE_EXPRESSION, UNARY_EXPRESSION, VARIABLE_ASSIGNMENT_EXPRESSION,VARIABLE_EXPRESSION),};<extra_id_0>static boolean arrayConstructorExpression(PsiBuilder builder_, int level_) {if (!recursion_guard_(builder_, level_, "arrayConstructorExpression")) return false;</CONTEXT> | [DELETED] |
34,188 | <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {this.mActivity = activity;</BUG><CONTEXT>private DBManager dbManager;private boolean isEditMode = false;private EditMemoDialogFragment.MemoCallback callback;private static final int TYPE_HEADER = 0;private static final int TYPE_ITEM = 1;<extra_id_0>this.topicId = topicId;this.memoList = memoList;</CONTEXT> | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {super(recyclerView);this.mActivity = activity; |
4,640 | <BUG>statementParent.addAfter(newStatement, statement);}if (parent == variable) {final PsiExpression initializer = variable.getInitializer();if (initializer != null) {initializer.delete();}}</BUG><CONTEXT>final PsiElement statementGrandParent =statementParent.getParent();statementGrandParent.addBefore(newStatement,statementParent);} else {<extra_id_0>}</CONTEXT> | statementParent.addAfter(newStatement, anchor); |
48,849 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</BUG><CONTEXT>weight &= (0xffff - (1 << 4 * h + z));}}}if (weight == 0 || 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]; |
22,237 | <BUG>import com.rackspace.papi.commons.util.pooling.ResourceContextException;import javax.xml.bind.Unmarshaller;</BUG><CONTEXT>package com.rackspace.papi.commons.config.parser.jaxb;import com.rackspace.papi.commons.config.resource.ConfigurationResource;import com.rackspace.papi.commons.util.pooling.ResourceContext;<extra_id_0>public class UnmarshallerResourceContext implements ResourceContext<Unmarshaller, Object> {private final ConfigurationResource cfgResource;public UnmarshallerResourceContext(ConfigurationResource cfgResource) {</CONTEXT> | import javax.xml.bind.JAXBException;import javax.xml.bind.Unmarshaller; |
2,346 | <BUG>import java.io.File;import java.util.Comparator;import org.springframework.beans.factory.BeanCreationException;import org.springframework.integration.dsl.MessageSourceSpec;import org.springframework.integration.file.DirectoryScanner;</BUG><CONTEXT>package org.springframework.integration.file.dsl;<extra_id_0>import org.springframework.integration.file.FileLocker;</CONTEXT> | import java.util.Collection;import java.util.Collections;import java.util.function.Function;import org.springframework.integration.dsl.ComponentsRegistration;import org.springframework.integration.expression.FunctionExpression;import org.springframework.integration.file.DirectoryScanner; |
33,563 | <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]; |
2,460 | <CONTEXT>String classUri =UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG>Link classLink = objectFactory.createLink();classLink.setHref(classUri);classLink.setRel(Relations.SELF);<extra_id_0>Link classLink = objectFactory.createLink();classLink.setHref(classUri);classLink.setRel(Relations.SELF);<BUG>clazz.getLinks().add(classLink);String propertiesUri =UriBuilder.fromUri(baseUri).path(ClassPropertiesResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG>Link propertyLink = objectFactory.createLink();</CONTEXT> | propertyLink.setHref(propertyUri);propertyLink.setRel(Relations.SELF);property.getLinks().add(propertyLink);clazz.getProperties().add(property);}String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName());String propertiesUri = uri(baseUri, ClassPropertiesResource.class, wikiName, xwikiClass.getName()); |
68,394 | <BUG>if (caseA) {for (int h = 0; h < dstHeight; h++) {</BUG><CONTEXT>pixelOffset += pixelStride;} // COLS LOOP} // ROWS LOOP}} else {// source has IndexColorModel<extra_id_0>int pixelOffset = lineOffset;lineOffset += lineStride;warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);</CONTEXT> | } else if (caseB) {for (int h = 0; h < dstHeight; h++) { |
18,744 | <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]; |
66,566 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;</BUG><CONTEXT>int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff;int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff;if (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]] = destinationNoDataFloat[k2]; |
36,420 | <BUG>final DeviceContext deviceContext, final InstanceIdentifier<Node> nodeII, final short version) {final OutboundQueue queue = deviceContext.getPrimaryConnectionContext().getOutboundQueueProvider();</BUG><CONTEXT>LOG.info("Request of type {} for static info of node {} failed.", type, nodeII);}});}private static ListenableFuture<RpcResult<List<MultipartReply>>> getNodeStaticInfo(final MultipartType type,<extra_id_0>final Long reserved = deviceContext.getDeviceInfo().reserveXidForDeviceMessage();final RequestContext<List<MultipartReply>> requestContext = new AbstractRequestContext<List<MultipartReply>>(reserved) {</CONTEXT> | final DeviceContext deviceContext,final InstanceIdentifier<Node> nodeII,final OutboundQueue queue = deviceContext.getPrimaryConnectionContext().getOutboundQueueProvider(); |
34,308 | <BUG>private GetRequestBuilder(String url, int method) {</BUG><CONTEXT>private String mUserAgent;public GetRequestBuilder(String url) {this.mUrl = url;this.mMethod = Method.GET;}<extra_id_0>this.mUrl = url;this.mMethod = method;}</CONTEXT> | public GetRequestBuilder(String url, int method) { |
26,731 | <BUG>import org.xeustechnologies.jcl.JarClassLoader;import com.athena.chameleon.common.utils.ClasspathUtil;</BUG><CONTEXT>package com.athena.chameleon.engine.core.analyzer.support;import java.io.File;import java.util.List;import org.apache.commons.lang.StringUtils;import org.springframework.util.Assert;<extra_id_0>import com.athena.chameleon.common.utils.ThreadLocalUtil;import com.athena.chameleon.common.utils.ZipUtil;import com.athena.chameleon.engine.constant.ChameleonConstants;</CONTEXT> | import com.athena.chameleon.common.jcl.JarClassLoader;import com.athena.chameleon.common.utils.ClasspathUtil; |
60,756 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</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]] = destinationNoDataShort[k2]; |
52,851 | <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;</BUG><CONTEXT>weight &= (0xffff - (1 << 4 * h + z));}}}if (weight == 0 || tmpROI == 0) {<extra_id_0>} else {for (int h = 0; h < KERNEL_LINE_DIM; h++) {long tempSum = 0;</CONTEXT> | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2]; |
67,656 | <BUG>}PointF r1Outer = calculateLineEnd(cx, cy, rad, startAngle);</BUG><CONTEXT>case PIXELS:donutSizePx = (donutSize > 0)?donutSize:(rad + donutSize);break;default:throw new UnsupportedOperationException("Not yet implemented.");<extra_id_0>PointF r1Inner = calculateLineEnd(cx, cy, donutSizePx, startAngle);PointF r2Outer = calculateLineEnd(cx, cy, rad, startAngle + sweep);PointF r2Inner = calculateLineEnd(cx, cy, donutSizePx, startAngle + sweep);</CONTEXT> | if(Math.abs(sweep - 360f) > Float.MIN_VALUE) {PointF r1Outer = calculateLineEnd(cx, cy, rad, startAngle); |
64,049 | <BUG>identificacao.setReferenciadas(Arrays.asList(referenciada));</BUG><CONTEXT>identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO);identificacao.setModelo(NFModelo.NFE);identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ");identificacao.setNumeroNota("999999999");identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE);<extra_id_0>identificacao.setSerie("999");identificacao.setTipo(NFTipo.ENTRADA);identificacao.setTipoEmissao(NFTipoEmissao.EMISSAO_NORMAL);</CONTEXT> | identificacao.setReferenciadas(Collections.singletonList(referenciada)); |