id
int64
2
70k
bug_ctx
stringlengths
58
37.5k
fixed
stringlengths
1
37k
29,626
<BUG>public final class FoxGuardMain {public final Cause pluginCause = Cause.builder().named("plugin", this).build();private static FoxGuardMain instanceField;</BUG><CONTEXT>@Dependency(id = "foxcore")},description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",authors = {"gravityfox"},url = "https://github.com/FoxDenStudio/FoxGuard")<extra_id_0>@Injectprivate Logger logger;</CONTEXT>
private static FoxGuardMain instanceField;
20,714
<BUG>name = "Potion of Liquid Flame";}</BUG><CONTEXT>import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;public class PotionOfLiquidFlame extends Potion {{<extra_id_0>@Overridepublic void shatter( int cell ) {if (Dungeon.visible[cell]) {</CONTEXT>
initials = "LF";}
22,058
<BUG>import me.xiaopan.android.easy.inject.DisableInject;</BUG><CONTEXT>package me.xiaopan.android.easy.app;<extra_id_0>import me.xiaopan.android.easy.inject.Injector;import android.app.IntentService;public abstract class EasyIntentService extends IntentService{</CONTEXT>
import me.xiaopan.android.easy.inject.DisableInjector;
4,859
<BUG>import com.google.android.gms.maps.MapFragment;import com.google.android.gms.maps.Projection;</BUG><CONTEXT>import com.google.android.gms.maps.GoogleMap;import com.google.android.gms.maps.GoogleMap.OnMapClickListener;import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener;import com.google.android.gms.maps.GoogleMap.OnMarkerDragListener;<extra_id_0>import com.google.android.gms.maps.model.BitmapDescriptorFactory;import com.google.android.gms.maps.model.LatLng;import com.google.android.gms.maps.model.LatLngBounds;</CONTEXT>
import com.google.android.gms.maps.OnMapReadyCallback;import com.google.android.gms.maps.Projection;
7,579
<BUG>public String getSunrise() {return sunrise;}public String getSunset() {return sunset;}</BUG><CONTEXT>return pressure;}public String getVisibility() {return visibility;}<extra_id_0>public String getWindSpeed() {</CONTEXT>
[DELETED]
67,887
<BUG>UnderlinedTextView profileName;ImageView profileIndicator;</BUG><CONTEXT>notifyDataSetChanged();}static class ViewHolder {ViewGroup listItemRoot;ImageView profileIcon;<extra_id_0>int position;}public View getView(int position, View convertView, ViewGroup parent)</CONTEXT>
ImageView profileIndicator;
51,226
<BUG>}}</BUG><CONTEXT>catch (InvocationTargetException e1) {return null;}catch (IllegalAccessException e1) {return null;<extra_id_0>@Overridepublic boolean checkLookAndFeel(UIManager.LookAndFeelInfo lookAndFeelInfo) {return checkLookAndFeel(lookAndFeelInfo, true);</CONTEXT>
[DELETED]
9,169
<BUG>}}</BUG><CONTEXT>}@Overridepublic void lazyRegisterMBean(Object object, String name) {lazyPlatformMBeanServer.lazyRegisterMBean(object, name);}<extra_id_0></CONTEXT>
void initEmbeddedServer() throws Exception {if (simpleRepoModule == null) {return;
1,688
<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
41,799
<BUG>this.fares = fares;}</BUG><CONTEXT>public String feed_id;public static class Loader extends Entity.Loader<FareAttribute> {private final Map<String, Fare> fares;public Loader(GTFSFeed feed, Map<String, Fare> fares) {super(feed, "fare_attributes");<extra_id_0>@Overridepublic void loadOneRow() throws IOException {String fareId = getStringField("fare_id", true);</CONTEXT>
}protected boolean isRequired() {return false;}
28,888
<BUG>long v = getIValue(off);if( v== NAS[_valsz_log -1])throw new IllegalArgumentException("at8 but value is missing");return v;</BUG><CONTEXT>@Override boolean set_impl(int idx, float f ) { return false; }@Override boolean setNA_impl(int idx) { return false; }@Override protected long at8_impl(int idx) {int off = findOffset(idx);if(getId(off) != idx)return 0;<extra_id_0>}@Override protected double atd_impl(int idx) {</CONTEXT>
if( v== NAS[_valsz_log])return v;
60,722
<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];
40,211
<BUG>private static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7);</BUG><CONTEXT>import nex.init.NetherExBlocks;import java.util.Random;@SuppressWarnings("ConstantConditions")public class BlockTilledSoulSand extends BlockNetherEx{<extra_id_0>private static final AxisAlignedBB FARMLAND_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.9375D, 1.0D);public BlockTilledSoulSand(){</CONTEXT>
public static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7);
27,149
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),Version.class)</BUG><CONTEXT>ProductIdentifier productIdentifier = (ProductIdentifier) child;destination.setProductIdentifier(productIdentifier);}},VERSION ("VERSION",<extra_id_0>{@Overridepublic VChild parse(VCalendar vCalendar, String contentLine)</CONTEXT>
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),Version.class)
45,598
<BUG>if (BuildConfig.DEBUG) {Log.w(LOGTAG, ignore);}</BUG><CONTEXT>final List<InetAddress> addresses = mDns.lookup(host);for (InetAddress address : addresses) {c.addRow(new String[]{host, address.getHostAddress()});}} catch (final IOException ignore) {<extra_id_0>}</CONTEXT>
DebugLog.w(LOGTAG, null, ignore);
32,214
<BUG>import org.angularjs.codeInsight.DirectiveUtil;import org.jetbrains.annotations.NonNls;</BUG><CONTEXT>import com.intellij.xml.XmlAttributeDescriptor;import com.intellij.xml.XmlElementDescriptor;import com.intellij.xml.XmlElementsGroup;import com.intellij.xml.XmlNSDescriptor;import com.intellij.xml.impl.schema.AnyXmlAttributeDescriptor;<extra_id_0>import org.jetbrains.annotations.Nullable;public class AngularJSTagDescriptor implements XmlElementDescriptor {protected final String myName;</CONTEXT>
import org.angularjs.codeInsight.attributes.AngularBindingDescriptor;import org.angularjs.index.AngularIndexUtil;import org.jetbrains.annotations.NonNls;
13,271
<BUG>return Task.ofType(String.class).named("Types", myType.content).process(() -> myType.content);</BUG><CONTEXT>assertThat(parsedType.content, is("blarg parsed for you!"));}@RootTaskpublic static Task<String> customType(CustomType myType) {parsedType = myType;<extra_id_0>}public enum CustomEnum {BAR</CONTEXT>
return Task.named("Types", myType.content).ofType(String.class).process(() -> myType.content);
27,987
<BUG>cachedImgWidth = bgImgWidth * 2;cachedImgHeight = bgImgHeight * 2;lastBGColor = Color.gray;run();</BUG><CONTEXT>icyLogo = ResourceUtil.getImage("logoICY.png");textColor = new Color(0, 0, 0, 0.5f);bgTextColor = new Color(1, 1, 1, 0.5f);bgImgWidth = backGround.getWidth();bgImgHeight = backGround.getHeight();<extra_id_0>}</CONTEXT>
[DELETED]
32,856
<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"),
2,381
<BUG>import org.cloudfoundry.identity.uaa.approval.ApprovalStore;import org.cloudfoundry.identity.uaa.client.ClientDetailsValidator.Mode;</BUG><CONTEXT>package org.cloudfoundry.identity.uaa.client;<extra_id_0>import org.cloudfoundry.identity.uaa.error.UaaException;import org.cloudfoundry.identity.uaa.oauth.client.ClientDetailsModification;import org.cloudfoundry.identity.uaa.oauth.client.SecretChangeRequest;</CONTEXT>
import org.cloudfoundry.identity.uaa.authentication.UaaAuthenticationTestFactory;import org.cloudfoundry.identity.uaa.client.ClientDetailsValidator.Mode;
55,874
<CONTEXT>parameter.getType().getConverter(),parameter.getType().getBinding()));</BUG>out.tab(1).javadoc("The parameter <code>%s</code>.%s", parameter.getQualifiedOutputName(), defaultIfBlank(" " + paramComment, ""));<extra_id_0>out.tab(1).javadoc("The parameter <code>%s</code>.%s", parameter.getQualifiedOutputName(), defaultIfBlank(" " + paramComment, ""));<BUG>out.tab(1).println("public static final %s<%s> %s = createParameter(\"%s\", %s, %s, %s[[before=, ][new %s()]]);",Parameter.class, paramType, paramId, paramName, paramTypeRef, isDefaulted, isUnnamed, converters);</BUG>}}if (scala) {</CONTEXT>
final String paramTypeRef = getJavaTypeReference(parameter.getDatabase(), parameter.getType());final String paramId = out.ref(getStrategy().getJavaIdentifier(parameter), 2);final String paramName = parameter.getName();final String paramComment = StringUtils.defaultString(parameter.getComment());final String isDefaulted = parameter.isDefaulted() ? "true" : "false";final String isUnnamed = parameter.isUnnamed() ? "true" : "false";final List<String> converter = out.ref(list(parameter.getType().getConverter()));final List<String> binding = out.ref(list(parameter.getType().getBinding()));out.tab(1).println("public static final %s<%s> %s = createParameter(\"%s\", %s, %s, %s" + converterTemplate(returnConverter) + converterTemplate(returnBinding) + ");",Parameter.class, paramType, paramId, paramName, paramTypeRef, isDefaulted, isUnnamed, converter, binding);
64,298
<BUG>public class Grid3D<T extends Node3D> extends Grid<T> {public Grid3D(int width, int height) {</BUG><CONTEXT>import geometry.geom2d.Point2D;import geometry.geom3d.Point3D;import geometry.geom3d.Triangle3D;import geometry.math.Angle;import geometry.structure.grid.Grid;<extra_id_0>super(width, height);}private Triangle3D getTriangleAt(Point2D coord) {</CONTEXT>
public Grid3D(){super();public Grid3D(int width, int height) {
23,165
<BUG>public class GetShippingAddressesRequest{private RequestEnvelope requestEnvelope;</BUG><CONTEXT>package com.paypal.svcs.types.ap;import com.paypal.svcs.types.common.RequestEnvelope;import java.io.UnsupportedEncodingException;import com.paypal.core.NVPUtil;<extra_id_0>private String key;public GetShippingAddressesRequest (RequestEnvelope requestEnvelope, String key){this.requestEnvelope = requestEnvelope;</CONTEXT>
private static final String nameSpace="com.paypal.svcs.types.ap";private static final String preferredPrefix="";private RequestEnvelope requestEnvelope;
24,144
<BUG>import com.google.common.base.Ticker;import org.checkerframework.checker.nullness.qual.MonotonicNonNull;</BUG><CONTEXT>import java.util.concurrent.ScheduledExecutorService;import javax.annotation.Nullable;import com.google.common.base.MoreObjects;import com.google.common.base.Stopwatch;import com.google.common.base.Supplier;<extra_id_0>import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.glowroot.agent.collector.Collector.AgentConfigUpdater;</CONTEXT>
import com.google.common.collect.ImmutableList;import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
19,348
<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;
63,488
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG><CONTEXT>package jfxtras.labs.icalendarfx.components;import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;<extra_id_0>import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;</CONTEXT>
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
39,481
<BUG>if (tagsObject.getProperty("tags") != null) {String tagsUri =UriBuilder.fromUri(baseUri).path(PageTagsResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG><CONTEXT>objectsLink.setRel(Relations.OBJECTS);pageSummary.getLinks().add(objectsLink);}com.xpn.xwiki.api.Object tagsObject = doc.getObject("XWiki.TagClass", 0);if (tagsObject != null) {<extra_id_0>Link tagsLink = objectFactory.createLink();</CONTEXT>
String tagsUri = uri(baseUri, PageTagsResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
50,217
<BUG>protected Map referenceData(HttpServletRequest req) throws Exception {Map<String, List<AvailabilityReportLocator>> data = new HashMap<String, List<AvailabilityReportLocator>>();List<AvailabilityReportLocator> reportLocator = m_reporListService.getAllReports();data.put("reportLocator", reportLocator);return data;</BUG><CONTEXT>}public void setPageSize(int pageSize) {m_pageSize = pageSize;}@Override<extra_id_0>}</CONTEXT>
public void setReportListService(ReportListService reportListService) {m_reporListService = reportListService;
56,303
<BUG>OnChangeSubscriptionQos broadcastSubscriptionQos = new OnChangeSubscriptionQos();broadcastSubscriptionQos.setMinIntervalMs(QOS_MIN_INTERVAL_MS).setExpiryDateMs(wsbExpiryDate).setPublicationTtlMs(QOS_PUBLICATION_TTL_MS);</BUG><CONTEXT>private String sanitiseForPartition(String value) {return value.replaceAll("[^a-zA-Z0-9]", "");}private void subscribeForDreChange(String userId) {long wsbExpiryDate = System.currentTimeMillis() + QOS_DURATION_MS;<extra_id_0>globalDomainAccessControllerClient.subscribeToDomainRoleEntryChangedBroadcast(new LdacDomainRoleEntryChangedBroadcastListener(localDomainAccessStore),</CONTEXT>
MulticastSubscriptionQos broadcastSubscriptionQos = new MulticastSubscriptionQos();broadcastSubscriptionQos.setExpiryDateMs(wsbExpiryDate);
45,840
<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"),
25,015
<BUG>import java.lang.instrument.Instrumentation;import java.util.Map;</BUG><CONTEXT>package org.glowroot.agent.embedded.init;import java.io.Closeable;import java.io.File;<extra_id_0>import java.util.concurrent.CountDownLatch;import java.util.concurrent.Executors;import java.util.concurrent.ScheduledExecutorService;</CONTEXT>
import java.util.List;import java.util.Map;
30,053
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),new InstanceProfileCredentialsProvider(),new S3AAnonymousAWSCredentialsProvider());</BUG><CONTEXT>} else {accessKey = userInfo;}}AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(<extra_id_0>bucket = name.getHost();</CONTEXT>
new BasicAWSCredentialsProvider(accessKey, secretKey),new AnonymousAWSCredentialsProvider()
35,653
<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);
18,653
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;</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]] = destinationNoDataUShort[k2];
65,160
<BUG>private String[] viewsToGenerate;private boolean dropTables = false;</BUG><CONTEXT>private String schemaXMLFilename;private boolean schemaXMLFilenameIsAResource = false; // for use when XML Schema is integrated into jar fileprivate String outputFile;private String[] tablesToGenerate;private boolean createSchema = true; // includes tables & views<extra_id_0>private boolean executeSQLScriptFiles;private boolean createONLYOtherInserts = false;private boolean createPostSchema = true;</CONTEXT>
private String[] queriesToGenerate;private boolean dropTables = false;
7,426
<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)
24,660
<BUG>final Session session = startClient(startServer(serverSessionFrameListener), null);</BUG><CONTEXT>stream.data(new ByteBufferDataInfo(buffer, true));}};}};<extra_id_0>final int iterations = 50;final int count = 50;final Headers headers = new Headers();</CONTEXT>
final Session session = startClient(startSPDYServer(serverSessionFrameListener), null);
19,002
<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();
59,473
<BUG>if (tagsObject.getProperty("tags") != null) {String tagsUri =UriBuilder.fromUri(baseUri).path(PageTagsResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG><CONTEXT>objectsLink.setRel(Relations.OBJECTS);pageSummary.getLinks().add(objectsLink);}com.xpn.xwiki.api.Object tagsObject = doc.getObject("XWiki.TagClass", 0);if (tagsObject != null) {<extra_id_0>Link tagsLink = objectFactory.createLink();</CONTEXT>
String tagsUri = uri(baseUri, PageTagsResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
37,509
<BUG>i.set(InstrumentationConfig.create(instrumentationConfig));found = true;break;}</BUG><CONTEXT>boolean found = false;for (ListIterator<InstrumentationConfig> i = configs.listIterator(); i.hasNext();) {InstrumentationConfig loopConfig = i.next();String loopVersion = Versions.getVersion(loopConfig.toProto());if (loopVersion.equals(priorVersion)) {<extra_id_0>}</CONTEXT>
i.set(config);} else if (loopConfig.equals(config)) {throw new IllegalStateException("This exact instrumentation already exists");
44,022
<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")
19,973
<BUG>import org.gradle.api.artifacts.component.ModuleComponentIdentifier;import org.gradle.api.artifacts.result.DependencyResult;</BUG><CONTEXT>package org.gradle.api.tasks.diagnostics.internal.dsl;<extra_id_0>import org.gradle.api.artifacts.result.ResolvedDependencyResult;import org.gradle.api.specs.Spec;class DependencyResultSpec implements Spec<DependencyResult> {</CONTEXT>
import org.gradle.api.artifacts.component.ModuleComponentSelector;import org.gradle.api.artifacts.result.DependencyResult;
49,285
<CONTEXT>this.temperature = builder.temperature;</BUG>this.humidity = builder.humidity;this.pressure = builder.pressure;this.visibility = builder.visibility;<extra_id_0>this.humidity = builder.humidity;this.pressure = builder.pressure;this.visibility = builder.visibility;<BUG>this.sunrise = builder.sunrise;this.sunset = builder.sunset;</BUG>this.windSpeed = builder.windSpeed;this.windTemperature = builder.windTemperature;this.windDirection = builder.windDirection;this.forecast = builder.forecast;</CONTEXT>
return new CurrentWeather(this);}}private CurrentWeather(Builder builder) {this.title = builder.title;this.icon = builder.icon;this.temperature = builder.temperature;
54,132
<BUG>return new RevisionMetadata(newId, newAuthor, rm.date, newDescription, rm.parents);}</BUG><CONTEXT>String regex = (wordAlone) ? ("(?i)(\\b)" + word + "(\\b)") : ("(?i)" + word);newId = newId.replaceAll(regex, replacement);newAuthor = newAuthor.replaceAll(regex, replacement);newDescription = newDescription.replaceAll(regex, replacement);}<extra_id_0>@dagger.Modulepublic static class Module {@Provides</CONTEXT>
return rm.toBuilder().id(newId).author(newAuthor).description(newDescription).build();
42,512
<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];
2,513
<BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo);PDPageContentStream pageStream = new PDPageContentStream(document, currPage, true, false);</BUG><CONTEXT>public ReportElement getBase() {return base;}@Overridepublic float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException {<extra_id_0>base.print(document, pageStream, pageNo, x, y, width);pageStream.close();</CONTEXT>
PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
34,269
<BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); }void initFiles() throws FileNotFoundException {</BUG><CONTEXT>e.printStackTrace();}filePlayback=null;}@Override<extra_id_0>if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if neededString samples_str = dataDir + "samples";String events_str = dataDir + "events";</CONTEXT>
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }void initFiles() throws FileNotFoundException {
12,041
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE);</BUG><CONTEXT>cannedACL = null;}if (!s3.doesBucketExist(bucket)) {throw new IOException("Bucket " + bucket + " does not exist");}<extra_id_0>if (purgeExistingMultipart) {</CONTEXT>
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
40,154
<BUG>checkForErrors(withJsLibAdded(files, config), bindingContext);</BUG><CONTEXT>}@NotNullpublic static BindingContext analyzeFilesAndCheckErrors(@NotNull List<JetFile> files,@NotNull Config config) {BindingContext bindingContext = analyzeFiles(files, Predicates.<PsiFile>alwaysTrue(), config).getBindingContext();<extra_id_0>return bindingContext;}@SuppressWarnings("UnusedDeclaration")</CONTEXT>
checkForErrors(Config.withJsLibAdded(files, config), bindingContext);
1,850
<BUG>import java.util.Properties;import org.jboss.dmr.ModelNode;</BUG><CONTEXT>import java.io.File;import java.io.IOException;import java.net.MalformedURLException;import java.util.LinkedList;import java.util.List;<extra_id_0>import org.jboss.msc.service.Service;import org.jboss.msc.service.StartContext;import org.jboss.msc.service.StartException;</CONTEXT>
import org.jboss.logging.Logger;import org.jboss.dmr.ModelNode;
32,660
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;</BUG><CONTEXT>final int posyROI = (s_iy - srcRectY) * roiScanlineStride;final int baseIndex = (posx / dst_num_bands) + posyROI;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]] = destinationNoDataDouble[k2];
62,891
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;</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]] = destinationNoDataInt[k2];
49,872
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;</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]] = destinationNoDataByte[k2];
12,339
<BUG>public void postInit(FMLPostInitializationEvent event){Registry.registerEnderbagLists();Registry.registerTeleportBlacklist();ModRegistry.checkLoadedMods();}@EventHandler</BUG><CONTEXT>public void init(FMLInitializationEvent event){proxy.registerColorHandlers();}@EventHandler<extra_id_0>public void onServerStartingEvent(FMLServerStartingEvent event)</CONTEXT>
[DELETED]
69,850
<CONTEXT>awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));</BUG>s3 = new AmazonS3Client(credentials, awsConf);<extra_id_0>s3 = new AmazonS3Client(credentials, awsConf);<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);</BUG>if (partSize < 5 * 1024 * 1024) {</CONTEXT>
new InstanceProfileCredentialsProvider(),new AnonymousAWSCredentialsProvider()bucket = name.getHost();ClientConfiguration awsConf = new ClientConfiguration();awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP);awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES)));awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)));maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS));partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE));partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
14,091
<BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month");this.year = year;</BUG><CONTEXT>class OnDayOfMonthValueGenerator extends FieldValueGenerator {private int year;private int month;public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) {super(cronField);<extra_id_0>this.month = month;}</CONTEXT>
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" +" month");this.year = year;
12,814
<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++) {
23,977
<BUG>@SuppressWarnings("FieldCanBeLocal")private float startDeg = 0;private float endDeg = 360;</BUG><CONTEXT>import com.androidplot.ui.SeriesBundle;import com.androidplot.ui.SeriesRenderer;import com.androidplot.ui.RenderStack;import java.util.List;public class PieRenderer extends SeriesRenderer<PieChart, Segment, SegmentFormatter> {<extra_id_0>private float donutSize = 0.5f;</CONTEXT>
private float startDegs = 0;private float extentDegs = 360;
38,144
<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) {
56,541
<BUG>resolveAndStartBase(container, context);}</BUG><CONTEXT>Metadata.mkRedirectionManifestWithMetadata(namesToByteArrays);if(persistent()) {container.store(baseMetadata);container.store(this);}<extra_id_0>private void resolveAndStartBase(ObjectContainer container, ClientContext context) {Bucket bucket = null;synchronized(this) {</CONTEXT>
container.deactivate(putHandlersByName, 1);
24,380
<BUG>} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null && site.extraRule.pictureUrl != null) {getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);</BUG><CONTEXT>final PictureViewHolder viewHolder = new PictureViewHolder(view);if (pictures != null && position < pictures.size()) {final Picture picture = pictures.get(getPicturePostion(position));if (picture.pic != null) {loadImage(container.getContext(), picture, viewHolder);<extra_id_0>} else if (site.picUrlSelector != null) {getPictureUrl(container.getContext(), viewHolder, picture, site, site.picUrlSelector, null);} else {</CONTEXT>
} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null) {if(site.extraRule.pictureRule != null && site.extraRule.pictureRule.url != null)getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureRule.url, site.extraRule.pictureRule.highRes);else if(site.extraRule.pictureUrl != null)getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);
35,481
<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"),
39,802
<BUG>List<Integer> initialPartitions = mapService.getOwnedPartitions().get();IndexService indexService = mapService.getMapContainer(name).getIndexService();</BUG><CONTEXT>}public QueryOperation() {}@Overridepublic void run() throws Exception {<extra_id_0>Set<QueryableEntry> entries = null;if (!getNodeEngine().getPartitionService().hasOnGoingMigration()) {entries = indexService.query(predicate);</CONTEXT>
List<Integer> initialPartitions = mapService.getOwnedPartitions();IndexService indexService = mapService.getMapContainer(name).getIndexService();
14,083
<BUG>}} finally {</BUG><CONTEXT>dos.write(versions);if (Version.isSnapshot()) {dos.write(SNAPSHOT);} else {dos.write(STABLE);<extra_id_0>dos.close();}}</CONTEXT>
} catch (IOException e) {dos.cancel();throw e;} finally {
13,008
<BUG>throw new StartException(MESSAGES.failedToCreate("connection-factory"), e);</BUG><CONTEXT>jmsManager.createConnectionFactory(false, configuration, configuration.getBindings());} finally {WritableServiceBasedNamingStore.popOwner();}} catch (Exception e) {<extra_id_0>}}public synchronized void stop(StopContext context) {</CONTEXT>
throw MESSAGES.failedToCreate(e, "connection-factory");
25,827
<BUG>private static final long serialVersionUID = -1980997520755400556L;</BUG><CONTEXT>package hudson.plugins.performance;import java.util.Date;import java.io.Serializable;public class HttpSample implements Serializable, Comparable<HttpSample> {<extra_id_0>private long duration;private boolean successful;private boolean errorObtained;</CONTEXT>
private static final long serialVersionUID = -3531990216789038711L;
6,456
<BUG>SparkManager sparkManager = applicationManager.getSparkManager("SparkStreamProgram");sparkManager.start();</BUG><CONTEXT>ApplicationManager applicationManager = deployApplication(TestSparkStreamIntegrationApp.class);StreamManager streamManager = getStreamManager("testStream");for (int i = 0; i < 50; i++) {streamManager.send(String.valueOf(i));}<extra_id_0>sparkManager.waitForFinish(120, TimeUnit.SECONDS);DataSetManager<KeyValueTable> datasetManager = applicationManager.getDataSet("result");</CONTEXT>
SparkManager sparkManager = applicationManager.getSparkManager("SparkStreamProgram").start();
23,292
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;public class S3AFileSystem extends FileSystem {</BUG><CONTEXT>import org.apache.hadoop.fs.FileSystem;import org.apache.hadoop.fs.LocalFileSystem;import org.apache.hadoop.fs.Path;import org.apache.hadoop.fs.permission.FsPermission;import org.apache.hadoop.util.Progressable;<extra_id_0>private URI uri;private Path workingDir;private AmazonS3Client s3;</CONTEXT>
import static org.apache.hadoop.fs.s3a.Constants.*;public class S3AFileSystem extends FileSystem {
53,529
<BUG>import rx.Observable;public class RetrofitHelper {</BUG><CONTEXT>import okhttp3.Response;import okhttp3.logging.HttpLoggingInterceptor;import retrofit2.Retrofit;import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;import retrofit2.converter.gson.GsonConverterFactory;<extra_id_0>private static OkHttpClient okHttpClient = null;private static ZhihuApis zhihuApiService = null;private static GankApis gankApiService = null;</CONTEXT>
import static com.google.common.net.HttpHeaders.CACHE_CONTROL;public class RetrofitHelper {
6,344
<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"),
50,320
<BUG>import android.support.design.widget.AppBarLayout;import android.support.design.widget.FloatingActionButton;</BUG><CONTEXT>import android.graphics.drawable.Drawable;import android.net.Uri;import android.os.Build;import android.os.Bundle;import android.support.annotation.NonNull;<extra_id_0>import android.support.design.widget.NavigationView;import android.support.v4.app.ActivityCompat;import android.support.v4.app.Fragment;</CONTEXT>
import android.support.design.widget.CollapsingToolbarLayout;import android.support.design.widget.FloatingActionButton;
42,361
<BUG>curUserJSON.put("userId", userId);curUserJSON.put("fullName", fullName);</BUG><CONTEXT>Status buddyStatus = StatusLocalServiceUtil.getUserStatus(userId);awake = buddyStatus.getAwake();String statusMessage = buddyStatus.getMessage();JSONObject curUserJSON = JSONFactoryUtil.createJSONObject();<extra_id_0>curUserJSON.put("portraitId", portraitId);curUserJSON.put("awake", awake);curUserJSON.put("statusMessage", statusMessage);</CONTEXT>
curUserJSON.put("screenName", screenName);curUserJSON.put("fullName", fullName);
56,002
<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;
9,646
<BUG>commands_.backToPreviousLocation().setEnabled(true);}</BUG><CONTEXT>event.getNavigation().isEqualTo(sourceNavigations_.peek())){return;}sourceNavigations_.push(event.getNavigation());<extra_id_0>@Handlerpublic void onBackToPreviousLocation(){</CONTEXT>
manageBackAndForwardCommands();
58,962
<BUG>public DriverFactory(boolean inputDriver, boolean outputDriver, List<OperatorFactory> operatorFactories, OptionalInt driverInstances){this.inputDriver = inputDriver;</BUG><CONTEXT>private final boolean outputDriver;private final List<OperatorFactory> operatorFactories;private final Optional<PlanNodeId> sourceId;private final OptionalInt driverInstances;private boolean closed;<extra_id_0>this.outputDriver = outputDriver;</CONTEXT>
public DriverFactory(int pipelineId, boolean inputDriver, boolean outputDriver, List<OperatorFactory> operatorFactories, OptionalInt driverInstances)this.pipelineId = pipelineId;this.inputDriver = inputDriver;
57,974
<BUG>.override(width, height).diskCacheStrategy(DiskCacheStrategy.ALL)</BUG><CONTEXT>.error(R.mipmap.fotomac).into(holder.postThumbView);}else if (StringUtils.containsIgnoreCase(feedLink, "sporx")) {Glide.with(myContext).load(imgLink)<extra_id_0>.placeholder(R.mipmap.sporx).error(R.mipmap.sporx).into(holder.postThumbView);</CONTEXT>
.fitCenter().diskCacheStrategy(DiskCacheStrategy.ALL)
46,485
<BUG>text.x = (Camera.main.width - text.width()) / 2;text.y = amulet.y + amulet.height + LARGE_GAP;btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.y + text.height() + LARGE_GAP );</BUG><CONTEXT>btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP );} else {height = amulet.height + LARGE_GAP + text.height() + LARGE_GAP + btnExit.height() + SMALL_GAP + btnStay.height();amulet.x = (Camera.main.width - amulet.width) / 2;amulet.y = (Camera.main.height - height) / 2;<extra_id_0>btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP );</CONTEXT>
align(amulet);text.setPos((Camera.main.width - text.width()) / 2, amulet.y + amulet.height + LARGE_GAP);align(text);btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.top() + text.height() + LARGE_GAP );
20,470
<BUG>import org.mariotaku.microblog.library.twitter.model.Status;import org.mariotaku.sqliteqb.library.AllColumns;</BUG><CONTEXT>import org.apache.commons.lang3.math.NumberUtils;import org.json.JSONException;import org.mariotaku.microblog.library.MicroBlog;import org.mariotaku.microblog.library.MicroBlogException;import org.mariotaku.microblog.library.twitter.model.RateLimitStatus;<extra_id_0>import org.mariotaku.sqliteqb.library.Columns;import org.mariotaku.sqliteqb.library.Columns.Column;import org.mariotaku.sqliteqb.library.Expression;</CONTEXT>
import org.mariotaku.pickncrop.library.PNCUtils;import org.mariotaku.sqliteqb.library.AllColumns;
1,509
<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
38,487
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;</BUG><CONTEXT>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (result & 0xff);}}} else if (setDestinationNoData) {for (int k2 = 0; k2 < dst_num_bands; k2++) {<extra_id_0>}}if (fracx < fracdx1) {</CONTEXT>
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,310
<BUG>private final OperationRequestParser parser = new DefaultOperationRequestParser();private final Prefix prefix = new DefaultPrefix();private final PrefixParser prefixParser = new DefaultPrefixParser();private final PrefixFormatter prefixFormatter = new DefaultPrefixFormatter();private CommandContextImpl(jline.ConsoleReader console) {this.console = console;}</BUG><CONTEXT>private jline.ConsoleReader console;private boolean terminate;private String cmdArgs;private ModelControllerClient client;private Map<String, Object> map = new HashMap<String, Object>();<extra_id_0>@Override</CONTEXT>
private final OperationRequestAddress prefix = new DefaultOperationRequestAddress();private final OperationCandidatesProvider operationCandidatesProvider;operationCandidatesProvider = new DefaultOperationCandidatesProvider(this);}
40,345
<BUG>package com.cronutils.model.time.generator;import com.cronutils.model.field.CronField;</BUG><CONTEXT><extra_id_0>import com.cronutils.model.field.expression.Every;import com.cronutils.model.field.expression.FieldExpression;import com.google.common.annotations.VisibleForTesting;</CONTEXT>
import java.time.ZonedDateTime;import java.util.List;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import com.cronutils.model.field.CronField;
45,017
<BUG>@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable The ArmorPlus Sword's Recipes")public static boolean enableSwordsRecipes = true;@ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable The ArmorPlus Battle Axes's Recipes")public static boolean enableBattleAxesRecipes = true;@ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable The ArmorPlus Bows's Recipes")public static boolean enableBowsRecipes = true;@ModConfigProperty(category = "Armors.SuperStarArmor.Effects", name = "enableSuperStarHRegen", comment = "Enable/Disable The Super Star Helmet Regeneration")</BUG><CONTEXT>public static boolean debugMode = false;@ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods")public static boolean debugModeGOTG = false;@ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode for the Enchantments")public static boolean debugModeEnchantments = false;<extra_id_0>public static boolean enableSuperStarHRegen = true;</CONTEXT>
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes")@ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes")@ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable ArmorPlus Bows's Recipes")
3,345
<BUG>public void weCanCompareQuicklyTwoBigStates() throws Exception {TimeElapsed te = new TimeElapsed();</BUG><CONTEXT>public class StateComparatorPerformanceTest {private static Comparator<FileState> fileNameComparator = new FileState.FileNameComparator();private static final String characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";private static SecureRandom random = new SecureRandom();@Test<extra_id_0>Context context = new Context();int count = 1_000_000;State lastState = createState(count);</CONTEXT>
public void weCanCompareQuicklyTwoBigStates() {TimeElapsed te = new TimeElapsed();
60,314
<BUG>protected InformationLossWithBound<ILSingleDimensional> getInformationLossInternal(Transformation transformation, HashGroupifyEntry entry) {double adversarySuccessProbability = this.getSuccessProbability(entry);double informationLoss = this.getEntropyBasedInformationLoss(transformation, entry);double real = !entry.isNotOutlier ? 0d : entry.count * modelRisk.getExpectedPublisherPayout(informationLoss, adversarySuccessProbability);double bound = entry.count * modelRisk.getExpectedPublisherPayout(informationLoss, 0d);real = entry.count * this.config.getPublisherBenefit() - real;bound = entry.count * this.config.getPublisherBenefit() - bound;return super.createInformationLoss(real, bound);</BUG><CONTEXT>}@Override<extra_id_0>}</CONTEXT>
entry = entry.nextOrdered;return super.createInformationLoss(real, bound);
64,627
<BUG>public static boolean isUserModel(@NotNull org.jetbrains.mps.openapi.model.SModel model) {return isUserModelStereotype(getStereotype(model));</BUG><CONTEXT>public static final String NONE = "";public static final String GENERATOR = "generator";public static final String TESTS = "tests";public static final String DESCRIPTOR = "descriptor";public static final String[] values = new String[]{NONE, GENERATOR, TESTS};<extra_id_0>}public static boolean isUserModel(@NotNull String modelFqName) {return isUserModelStereotype(getStereotype(modelFqName));</CONTEXT>
public static boolean isUserModel(@NotNull SModel model) {return isUserModelStereotype(getStereotype(model));
155
<CONTEXT></BUG>DNSMessage.RESPONSE_CODE.NO_ERROR) {continue;}<extra_id_0>DNSMessage.RESPONSE_CODE.NO_ERROR) {continue;}<BUG>for (Record record : message.getAnswers()) {</BUG>if (record.isAnswer(q)) {return message;}}</CONTEXT>
if (disableResultFilter) {if (message.responseCode !=for (Record record : message.answers) {
4,110
<BUG>if (replayExpectation.isRedundantRecordedExpectation(verification)) {throw replayExpectation.invocation.exceptionForRedundantExpectation();}</BUG><CONTEXT>Expectation replayExpectation = expectationsInReplayOrder.get(i);Object replayInstance = invocationInstancesInReplayOrder.get(i);Object[] replayArgs = invocationArgumentsInReplayOrder.get(i);if (matches(mock, mockClassDesc, mockNameAndDesc, args, replayExpectation, replayInstance, replayArgs)) {Expectation verification = expectationBeingVerified();<extra_id_0>replayIndex = i;verification.constraints.invocationCount++;</CONTEXT>
[DELETED]
63,636
<BUG>SimpleDateFormat sdf;</BUG><CONTEXT>private final ScrollView sv;private final PullRefreshLayout pullRefreshLayout;private final RequestQueue queue;private final Context context;private final String TAG = Constants.TAG;<extra_id_0>private String json = "";private List<AfhFiles> filesD = new ArrayList<>();private AfhAdapter adapter;</CONTEXT>
private SimpleDateFormat sdf;
12,858
<BUG>protected void getHttpScroll() {getBoardPinsMax(mKey, mMaxId, mLimit)</BUG><CONTEXT>}private int getMaxId(List<PinsAndUserEntity> result) {return result.get(result.size() - 1).getPin_id();}@Override<extra_id_0>.subscribeOn(Schedulers.io())</CONTEXT>
mTVBoardGather.setText(String.format(mStringGatherNumber, gather));mTVBoardAttention.setText(String.format(mStringAttentionNumber, attention));private void setBoardUserInfo(String url_head, String username) {new ImageLoadFresco.LoadImageFrescoBuilder(getContext(), mImageUser, url_head).setIsCircle(true).build();mTVUserName.setText(username);protected Subscription getHttpFirst() {return getBoardPins(mKey, mLimit)
48,414
<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];
10,082
<BUG>public Object construct(byte[] b) {</BUG><CONTEXT>} catch (DataFormatException dfe) {logError("DB Write Fail - properties too big?", dfe);return new byte[2];}}<extra_id_0>Properties rv = new Properties();try {DataHelper.fromProperties(b, 0, rv);</CONTEXT>
public Properties construct(byte[] b) {
55,150
<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);
2,430
<BUG>TransactionProcessorPool<Provider<ASTType>, Map<Provider<ASTType>, ParcelImplementations>> externalParcelProcessor =new TransactionProcessorPool<Provider<ASTType>, Map<Provider<ASTType>, ParcelImplementations>>();TransactionProcessorPool<Provider<ASTType>, ParcelImplementations> parcelProcessor = new TransactionProcessorPool<Provider<ASTType>, ParcelImplementations>();</BUG><CONTEXT>ScopedTransactionBuilder scopedTransactionBuilder,Logger logger,@Named(STACKTRACE) boolean stacktrace) {TransactionProcessorPool<Provider<ASTType>, Provider<ASTType>> externalParcelRepositoryProcessor =new TransactionProcessorPool<Provider<ASTType>, Provider<ASTType>>();<extra_id_0>TransactionProcessor processor = new TransactionProcessorComposite(ImmutableSet.of(externalParcelRepositoryProcessor,</CONTEXT>
TransactionProcessorPool<Provider<ASTType>, Void> externalParcelProcessor =new TransactionProcessorPool<Provider<ASTType>, Void>();TransactionProcessorPool<Provider<ASTType>, Void> parcelProcessor = new TransactionProcessorPool<Provider<ASTType>, Void>();
6,692
<CONTEXT></BUG>import java.awt.geom.AffineTransform;import java.awt.geom.Line2D;import java.util.ArrayList;import java.util.List;<extra_id_0>import java.awt.geom.AffineTransform;import java.awt.geom.Line2D;import java.util.ArrayList;import java.util.List;<BUG>import org.teachingextensions.approvals.lite.util.ObjectUtils;import org.teachingextensions.logo.Turtle;import org.teachingextensions.logo.Turtle.Animals;import org.teachingextensions.logo.utils.ColorUtils.PenColors;import org.teachingextensions.logo.utils.InterfaceUtils.TkpPanel;import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment;</BUG>public class MultiTurtleWindow extends TurtlePanel</CONTEXT>
package org.teachingextensions.WindowUtils;import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment;import java.awt.*;
46,462
<BUG>return ".";}</BUG><CONTEXT>.password(password).buildOutputManager();return outputRepoManager;}protected String getCurrentWorkingDir() {<extra_id_0>private String getSystemRepoOption() {return options.get(OptionName.CEYLONSYSTEMREPO);}</CONTEXT>
return options.get(OptionName.CEYLONCWD);
26,250
<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];
29,267
<BUG>case TO_BASE: return toBase(ctx, ii);default: return super.item(ctx, ii);</BUG><CONTEXT>throws QueryException {switch(def) {case MB: return mb(ctx);case MS: return ms(ctx);case FRM_BASE: return fromBase(ctx, ii);<extra_id_0>}}private Iter eval(final QueryContext ctx) throws QueryException {</CONTEXT>
case MD5: return hash(ctx, "MD5");case SHA1: return hash(ctx, "SHA");default: return super.item(ctx, ii);
31,115
<BUG>public class ErrorController extends AbstractController {@RequestMapping(value = {"/404"})</BUG><CONTEXT>package com.easytoolsoft.easyreport.web.controller.common;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;@Controller@RequestMapping(value = "/error")<extra_id_0>public String error404() {return "/error/404";}</CONTEXT>
public class ErrorController {@RequestMapping(value = {"/404"})
66,887
<BUG>TezApiVersionInfo apiVersionInfo, HistoryACLPolicyManager historyACLPolicyManager,ServicePluginsDescriptor servicePluginsDescriptor, JavaOptsChecker javaOptsChecker)</BUG><CONTEXT>@VisibleForTestingpublic static ApplicationSubmissionContext createApplicationSubmissionContext(ApplicationId appId, DAG dag, String amName,AMConfiguration amConfig, Map<String, LocalResource> tezJarResources,Credentials sessionCreds, boolean tezLrsAsArchive,<extra_id_0>throws IOException, YarnException {Preconditions.checkNotNull(sessionCreds);TezConfiguration conf = amConfig.getTezConfiguration();</CONTEXT>
TezApiVersionInfo apiVersionInfo,ServicePluginsDescriptor servicePluginsDescriptor, JavaOptsChecker javaOptsChecker)