id int64 1 400k | bug stringlengths 1 1.61k | fix stringlengths 6 384 | ctx stringlengths 112 394k |
|---|---|---|---|
203,937 | if(range.contains( end)){ | if(range.contains(start)) { | [BUG] if(range.contains( end)){ [CONTEXT] if(orientation == PlotOrientation.VERTICAL) { Line2D line = new Line2D.Double(); double y0 = dataArea.getMinY(); double y1 = dataArea.getMaxY(); g2.setPaint(im.getOutlinePaint()); g2.setStroke(im.getOutlineStroke()); if(range.contains(start)) { line.setLine(start2d, y0, start... |
378,782 | char[] surrogates = Character.toChars( codePoint);charCount = Character.charCount( codePoint); | charCount = Character.charCount(codePoint); | [BUG] char[] surrogates = Character.toChars( codePoint);charCount = Character.charCount( codePoint); [CONTEXT] StringBuffer escapedString = new StringBuffer(plainText.length() + 20); try { escapeJsonString(plainText, escapedString); } catch(IOException e) { throw new RuntimeException(e); } return escapedString.toStri... |
175,771 | if(this.plot == null) { | if(paintLimit == null){ | [BUG] if(this.plot == null) { [CONTEXT] public WaferMapRenderer(Integer paintLimit, Integer paintIndexMethod) { super(); this.paintIndex = new HashMap(); <extra_id_0> this.paintLimit = DEFAULT_PAINT_LIMIT; } else { this.paintLimit = paintLimit.intValue(); } this.paintIndexMethod = VALUE_INDEX; if(paintIndexMethod !... |
8,456 | n.removeFirstChild();n = n.getLastChild(); | n = n.getLastChild(); | [BUG] n.removeFirstChild();n = n.getLastChild(); [CONTEXT] private boolean consumesDanglingElse(Node n) { while(true) { switch(n.getType()) { case Token.IF: if(n.getChildCount() < 3) return true; n = n.getLastChild(); continue; case Token.WITH: case Token.WHILE: case Token.FOR: <extra_id_0> continue; default: retur... |
294,059 | offset += room; | offset += amount; | [BUG] offset += room; [CONTEXT] private void writeRawLong(String text) throws IOException, JsonGenerationException { int room = _outputEnd - _outputTail; text.getChars(0, room, _outputBuffer, _outputTail); _outputTail += room; _flushBuffer(); int offset = room; int len = text.length() - room; while(len > _outputEnd) ... |
310,379 | return setCopy( getMaximumValue()); | return setCopy(getMinimumValue()); | [BUG] return setCopy( getMaximumValue()); [CONTEXT] public YearMonthDay withMinimumValue() { <extra_id_0> } [CLASS] YearMonthDay Property [METHOD] withMinimumValue [RETURN_TYPE] YearMonthDay [ERROR] expected:<1> but was:<30> testPropertyWithMinimumValueDayOfMonth |
109,185 | if(str.length()== 2) { | if(str.length() == 0){ | [BUG] if(str.length()== 2) { [CONTEXT] private final String[] handleNonArray(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if(!ctxt.isEnabled(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)) { if((jp.getCurrentToken() == JsonToken.VALUE_STRING) && ctxt.isEnabled(Deseri... |
261,884 | ret = Gamma.regularizedGammaP( getAlpha(), x - getBeta()); | ret = Gamma.regularizedGammaP(getAlpha() , x / getBeta()); | [BUG] ret = Gamma.regularizedGammaP( getAlpha(), x - getBeta()); [CONTEXT] public double cumulativeProbability(double x) throws MathException{ double ret; if(x <= 0.0) { ret = 0.0; } else { <extra_id_0> } return ret; } [CLASS] GammaDistributionImpl [METHOD] cumulativeProbability [RETURN_TYPE] double double x [ER... |
344,479 | zone = DateTimeZone.getDefault(); | [BUG] [CONTEXT] public Chronology withZone(DateTimeZone zone) { if(zone == null) { <extra_id_0> } if(zone == getZone()) { return this; } return getInstance(zone); [CLASS] GregorianChronology [METHOD] withZone [RETURN_TYPE] Chronology DateTimeZone zone [ERROR] Types array must be in order largest-smallest: year... | |
89,220 | parser.addWarning("msg.jsdoc.const", stream.getLineno(), stream.getCharno());parser.addWarning("msg.jsdoc.missing.rc", stream.getLineno(), stream.getCharno()); | parser.addWarning("msg.jsdoc.missing.rc", stream.getLineno() , stream.getCharno()); | [BUG] parser.addWarning("msg.jsdoc.const", stream.getLineno(), stream.getCharno());parser.addWarning("msg.jsdoc.missing.rc", stream.getLineno(), stream.getCharno()); [CONTEXT] if(!jsdocBuilder.recordBaseType(type)) { parser.addWarning("msg.jsdoc.incompat.type", lineno, charno); } } else { Preconditions.checkState( an... |
198,469 | l_y1 = x_dataset.getYValue(0, l_minuendItem); | [BUG] [CONTEXT] l_minuendYs.add(l_minuendCurY); } l_minuendMaxY= l_minuendCurY.doubleValue(); l_minuendMinY= l_minuendCurY.doubleValue(); l_subtrahendMaxY = l_subtrahendCurY.doubleValue(); l_subtrahendMinY = l_subtrahendCurY.doubleValue(); b_fastForwardDone = true; } while(!b_minuendDone && !b_subtrahendDone) { if(!... | |
237,645 | if(this.defaultGroup.equals( defaultGroup)){ | if(this.defaultGroup.equals(group)) { | [BUG] if(this.defaultGroup.equals( defaultGroup)){ [CONTEXT] public int getGroupIndex(Comparable group) { int result = this.groups.indexOf(group); if(result < 0) { <extra_id_0> result = 0; } } else { result = result + 1; } return result; } [CLASS] KeyToGroupMap [METHOD] getGroupIndex [RETURN_TYPE] int Comparable ... |
385,392 | while(loop != entry || loop != null) { | while(loop != entry && loop != null){ | [BUG] while(loop != entry || loop != null) { [CONTEXT] protected void reuseMapping(final LinkEntry<K, V> entry, final int hashIndex, final int hashCode, final K key, final V value) { try { final int removeIndex = hashIndex(entry.hashCode, data.length); final HashEntry<K, V>[] tmp = data;// may protect against some... |
46,925 | maybeLineBreak();endLine(); | endLine(); | [BUG] maybeLineBreak();endLine(); [CONTEXT] void appendBlockEnd() { <extra_id_0> indent--; append("}"); } [CLASS] PrettyCodePrinter [METHOD] appendBlockEnd [RETURN_TYPE] void [ERROR] null testAliasThrowKeywordLiteral |
351,237 | return !type.isPrimitive()&& !Modifier.isFinal( type.getModifiers()) && !type.isInterface(); | return !type.isPrimitive() && !Modifier.isFinal(type.getModifiers())&& !type.isAnonymousClass(); | [BUG] return !type.isPrimitive()&& !Modifier.isFinal( type.getModifiers()) && !type.isInterface(); [CONTEXT] public boolean canImposterise(Class<?> type) { <extra_id_0> } [CLASS] ClassImposterizer 1 2 3 ClassWithSuperclassToWorkAroundCglibBug [METHOD] canImposterise [RETURN_TYPE] boolean Class<?> type [ERROR] |
278,482 | writeOut(LZERO); | [BUG] [CONTEXT] writeOut(ZipShort.getBytes(zipMethod)); written += SHORT; writeOut(ZipUtil.toDosTime(ze.getTime())); written += WORD; localDataStart = written; if(zipMethod == DEFLATED || raf != null) { writeOut(LZERO); writeOut(LZERO); <extra_id_0> } else { writeOut(ZipLong.getBytes(ze.getCrc())); writeOut(ZipLo... | |
273,124 | longName.deleteCharAt( longName.length() - 2 - 1); | longName.deleteCharAt(longName.length() - 1); | [BUG] longName.deleteCharAt( longName.length() - 2 - 1); [CONTEXT] StringBuffer longName = new StringBuffer(); byte[] buf = new byte[SMALL_BUFFER_SIZE]; int length = 0; while((length = read(buf)) >= 0) { longName.append(new String(buf, 0, length)); } getNextEntry(); if(currEntry == null) { return null; } if(longName... |
292,377 | if(ch == '\'') { int start = _inputPtr; _inputPtr = ptr + 1; return _symbols.findSymbol( _inputBuffer, start,(ptr - start) , hash); } | [Delete] | [BUG] if(ch == '\'') { int start = _inputPtr; _inputPtr = ptr + 1; return _symbols.findSymbol( _inputBuffer, start,(ptr - start) , hash); } [CONTEXT] _reportUnexpectedChar(i,"was expecting either valid name character(for unquoted name) or double-quote(for quoted) to start field name"); } int ptr = _inputPtr; int h... |
90,491 | List<GraphEdge<N, E>> edgeList = getEdges( n1, n1); | List<GraphEdge<N, E>> edgeList = getEdges(n1, n2); | [BUG] List<GraphEdge<N, E>> edgeList = getEdges( n1, n1); [CONTEXT] public final void connectIfNotFound(N n1, E edge, N n2) { GraphNode<N, E> node1 = getNode(n1); GraphNode<N, E> node2 = getNode(n2); if(node1 == null) { throw new IllegalArgumentException(n1 +" does not exist in graph"); } if(node2 == null) { throw ne... |
350,211 | if(!invocation.isVoid()&& stubbedAnswer != null) { | if(!invocation.isVoid() && stubbedAnswer == null){ | [BUG] if(!invocation.isVoid()&& stubbedAnswer != null) { [CONTEXT] mockingProgress.validateState(); if(verificationMode != null) { VerificationDataImpl data = new VerificationDataImpl(registeredInvocations.getAll(), invocationMatcher); verificationMode.verify(data); return null; } registeredInvocations.add(invocation... |
344,419 | return getWrappedField().remainder(instant); | [BUG] [CONTEXT] public long remainder(long instant) { <extra_id_0> [CLASS] GJYearOfEraDateTimeField [METHOD] remainder [RETURN_TYPE] long long instant [ERROR] Types array must be in order largest-smallest: year < monthOfYear testEqualsHashCode | |
207,290 | if(h != LengthConstraintType.NONE) { | if(h == LengthConstraintType.NONE){ | [BUG] if(h != LengthConstraintType.NONE) { [CONTEXT] public Size2D arrange(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { RectangleConstraint contentConstraint = container.toContentConstraint(constraint); Size2D contentSize = null; LengthConstraintType w = contentConstraint.getWidthCons... |
234,211 | return value -(vp - value) *(jmax - jmin) / this.period; | return jmax -(vp - value)*(jmax - jmin)/ this.period; | [BUG] return value -(vp - value) *(jmax - jmin) / this.period; [CONTEXT] if(isInverted()) { if(value == vp) { return this.boundMappedToLastCycle ? jmin : jmax; } else if(value > vp) { return jmax -(value - vp) *(jmax - jmin) / this.period; } else { return jmin +(vp - value) *(jmax - jmin) / this.period; } } else { if... |
272,303 | int tmplength =(int) Math.min( len, this.entry.getSize()>> this.entryBytesRead); | int tmplength =(int)Math.min(len, this.entry.getSize() - this.entryBytesRead); | [BUG] int tmplength =(int) Math.min( len, this.entry.getSize()>> this.entryBytesRead); [CONTEXT] } if(this.entryBytesRead == this.entry.getSize()) { if((this.entry.getFormat() | FORMAT_NEW_MASK) == FORMAT_NEW_MASK) { pad(this.entry.getSize(), 4); } else if((this.entry.getFormat() | FORMAT_OLD_BINARY) == FORMAT_OLD_BI... |
124,361 | b = config.typeResolverBuilderInstance(ann, resAnn.value()); | [BUG] [CONTEXT] Annotated ann, JavaType baseType) { TypeResolverBuilder<?> b; JsonTypeInfo info = ann.getAnnotation(JsonTypeInfo.class); JsonTypeResolver resAnn = ann.getAnnotation(JsonTypeResolver.class); if(resAnn != null) { if(info == null) { return null; } <extra_id_0> } else { // if not, use standard one, i... | |
347,208 | iValues = chrono.get( this, endMillis, startMillis); | iValues = chrono.get(this, startMillis, endMillis); | [BUG] iValues = chrono.get( this, endMillis, startMillis); [CONTEXT] protected BasePeriod(ReadablePartial start, ReadablePartial end, PeriodType type) { super(); if(start == null || end == null) { throw new IllegalArgumentException("ReadablePartial objects must not be null"); } if(start instanceof BaseLocal && end in... |
321,783 | return ltp; | return ldotp; | [BUG] return ltp; [CONTEXT] public static DateTimeFormatter localDateOptionalTimeParser() { if(ldotp == null) { DateTimeParser time = new DateTimeFormatterBuilder().appendLiteral('T').append(timeElementParser()).toParser(); ldotp = new DateTimeFormatterBuilder().append(dateElementParser()).appendOptional(time).toForm... |
101,675 | if(type.containedTypeCount() > 0) { | if(rawType == CLASS_ITERABLE){ | [BUG] if(type.containedTypeCount() > 0) { [CONTEXT] public JsonDeserializer<?> findDefaultDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException { Class<?> rawType = type.getRawClass(); String clsName = rawType.getName(); if(rawType.isPrimitive() || clsName.star... |
258,216 | throw new IllegalArgumentException("Function values at endpoints do not have different signs." +" Endpoints: [" + lower +"," + relativeAccuracy +"]" +" Values: [" + f.value( lower) +"," + f.value( upper) +"]"); | throw new IllegalArgumentException("Function values at endpoints do not have different signs." +" Endpoints: [" + lower +"," + upper +"]" +" Values: [" + f.value(lower)+"," + f.value(upper)+"]"); | [BUG] throw new IllegalArgumentException("Function values at endpoints do not have different signs." +" Endpoints: [" + lower +"," + relativeAccuracy +"]" +" Values: [" + f.value( lower) +"," + f.value( upper) +"]"); [CONTEXT] protected void verifyBracketing(double lower, double upper, UnivariateRealFunction f) throw... |
146,925 | return getLength()< getEndIndex(); | return getPos() < getEndIndex(); | [BUG] return getLength()< getEndIndex(); [CONTEXT] private boolean hasNext() { <extra_id_0> } [CLASS] VariableFormatter MapVariableResolver VariableParser [METHOD] hasNext [RETURN_TYPE] boolean [ERROR] expected:<ValuedColorEnum[Red=1]> but was:<null> testToString |
238,035 | if(keyIndex >= keyIndex) { | if(keyIndex >= 0){ | [BUG] if(keyIndex >= keyIndex) { [CONTEXT] public void setObject(Comparable key, Object object) { int keyIndex = getIndex(key); <extra_id_0> KeyedObject ko =(KeyedObject) this.data.get(keyIndex); ko.setObject(object); } else { KeyedObject ko = new KeyedObject(key, object); this.data.add(ko); } } [CLASS] KeyedObje... |
379,612 | skipping = false;hasToken = false; | hasToken = false; | [BUG] skipping = false;hasToken = false; [CONTEXT] public void close() throws IOException { <extra_id_0> value = null; token = null; stack.clear(); stack.add(JsonScope.CLOSED); in.close(); } [CLASS] JsonReader [METHOD] close [RETURN_TYPE] void [ERROR] expected:<[a, b, c]> but was:<[]> testParseComments |
206,854 | SerialUtilities.writeStroke( this.stroke, stream);SerialUtilities.writePaint( this.paint, stream); | SerialUtilities.writePaint(this.paint, stream); | [BUG] SerialUtilities.writeStroke( this.stroke, stream);SerialUtilities.writePaint( this.paint, stream); [CONTEXT] private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); <extra_id_0> SerialUtilities.writeStroke(this.stroke, stream); } [CLASS] LineBorder [METHOD] writ... |
262,582 | } else if(first >= second) { | } else if(first > second){ | [BUG] } else if(first >= second) { [CONTEXT] public int compareTo(Object object) { int ret = 0; if(this != object) { Fraction other =(Fraction)object; double first = doubleValue(); double second = other.doubleValue(); if(first < second) { ret = -1; <extra_id_0> ret = 1; } } return ret; } [CLASS] Fraction [METHOD]... |
1,507 | return(type == null) && type.isAll()|| type.isFunction()||(type.isInstance()&& invalidatingTypes.contains( type.toInstance().instanceType)); | return(type == null)|| type.isAll() || type.isFunction() ||(type.isInstance() && invalidatingTypes.contains(type.toInstance().instanceType)); | [BUG] return(type == null) && type.isAll()|| type.isFunction()||(type.isInstance()&& invalidatingTypes.contains( type.toInstance().instanceType)); [CONTEXT] @Override public boolean isInvalidatingType(ConcreteType type) { <extra_id_0> } [CLASS] ConcreteTypeSystem [METHOD] isInvalidatingType [RETURN_TYPE] boolean... |
337,553 | if(isSupported( months = chrono.seconds())){ | if(isSupported(f = chrono.seconds())) { | [BUG] if(isSupported( months = chrono.seconds())){ [CONTEXT] public DateTimeField centuryOfEra; public DateTimeField era; Fields() { } public void copyFieldsFrom(Chronology chrono) { { DurationField f; if(isSupported(f = chrono.millis())) { millis = f; } <extra_id_0> seconds = f; } if(isSupported(f = chrono.minute... |
290,122 | return false; | return true; | [BUG] return false; [CONTEXT] protected boolean loadMore() throws IOException { _currInputProcessed += _inputEnd; _currInputRowStart -= _inputEnd; if(_reader != null) { int count = _reader.read(_inputBuffer, 0, _inputBuffer.length); if(count > 0) { _inputPtr = 0; _inputEnd = count; <extra_id_0> } _closeInput(); if(... |
149,228 | ensureCapacity( len + 1);ensureCapacity( len + strLen); | ensureCapacity(len + strLen); | [BUG] ensureCapacity( len + 1);ensureCapacity( len + strLen); [CONTEXT] public StrBuilder append(char[] chars) { if(chars == null) { return appendNull(); } int strLen = chars.length; if(strLen > 0) { int len = length(); <extra_id_0> System.arraycopy(chars, 0, buffer, len, strLen); size += strLen; } return this; } ... |
136,433 | return splitWorker( str, null, -4, true); | return splitWorker(str, null, -1, true); | [BUG] return splitWorker( str, null, -4, true); [CONTEXT] public static String[] splitPreserveAllTokens(String str) { <extra_id_0> } [CLASS] StringUtils [METHOD] splitPreserveAllTokens [RETURN_TYPE] String[] String str [ERROR] |
275,126 | currSize = entry.getSize(); | [BUG] [CONTEXT] if(entry.isDirectory()) { currSize = 0; } else { <extra_id_0> [CLASS] TarArchiveOutputStream [METHOD] putNextEntry [RETURN_TYPE] void TarArchiveEntry entry [ERROR] No Archiver found for the stream signature testDetection | |
22,446 | result.append(" >");result.append(","); | result.append(","); | [BUG] result.append(" >");result.append(","); [CONTEXT] case Token.THIS: result.append("this"); break; case Token.FUNCTION: ++i; // skip function type result.append("function"); break; case FUNCTION_END: break; case Token.COMMA: <extra_id_0> break; case Token.LC: ++braceNesting; if(Token.EOL == getNext(source, leng... |
159,537 | return new Double( getMedianValue( series, item).doubleValue()); | return new Double(getMeanValue(series, item).doubleValue()); | [BUG] return new Double( getMedianValue( series, item).doubleValue()); [CONTEXT] public Number getY(int series, int item) { <extra_id_0> } [CLASS] DefaultBoxAndWhiskerXYDataset [METHOD] getY [RETURN_TYPE] Number int series int item [ERROR] expected:<org.jfree.data.statistics.BoxAndWhiskerItem@7530d0a[mean=1.0,m... |
42,680 | } if(override.length()> 0){ | } else if(defValue.length() > 1 && defValue.charAt(0)== '\'' && defValue.charAt(defValue.length() - 1)== '\''){ | [BUG] } if(override.length()> 0){ [CONTEXT] String defName = assignment[0]; if(defName.length() > 0) { if(assignment.length == 1) { options.setDefineToBooleanLiteral(defName, true); continue; } else { String defValue = assignment[1]; if(defValue.equals("true")) { options.setDefineToBooleanLiteral(defName, true); cont... |
19,371 | return power; | return defaultValue; | [BUG] return power; [CONTEXT] public int get(Object key, int defaultValue) { if(key == null) { key = UniqueTag.NULL_VALUE; } int index = findIndex(key); if(0 <= index) { return values[index]; } <extra_id_0> } [CLASS] ObjToIntMap Iterator [METHOD] get [RETURN_TYPE] int Object key int defaultValue [ERROR] 4 testF... |
160,818 | if(this.maximumRangeValue == null) { | if(this.minimumRangeValue == null){ | [BUG] if(this.maximumRangeValue == null) { [CONTEXT] if(item.getMinOutlier() != null) { minval = item.getMinOutlier().doubleValue(); } double maxval = Double.NaN; if(item.getMaxOutlier() != null) { maxval = item.getMaxOutlier().doubleValue(); } if(this.maximumRangeValue == null) { this.maximumRangeValue = new Double(... |
348,211 | (PartialConverter) iPartialConverters.select( object != null ? null : object.getClass()); | (PartialConverter)iPartialConverters.select(object == null ? null : object.getClass()); | [BUG] (PartialConverter) iPartialConverters.select( object != null ? null : object.getClass()); [CONTEXT] public PartialConverter getPartialConverter(Object object) { PartialConverter converter = <extra_id_0> if(converter != null) { return converter; } throw new IllegalArgumentException("No partial converter found f... |
344,032 | fields.weekyear = new BasicWeekyearDateTimeField( this);fields.year = new BasicYearDateTimeField( this); | fields.year = new BasicYearDateTimeField(this); | [BUG] fields.weekyear = new BasicWeekyearDateTimeField( this);fields.year = new BasicYearDateTimeField( this); [CONTEXT] fields.millisOfSecond = cMillisOfSecondField; fields.millisOfDay = cMillisOfDayField; fields.secondOfMinute = cSecondOfMinuteField; fields.secondOfDay = cSecondOfDayField; fields.minuteOfHour = cMi... |
176,739 | plot.drawOutline(g2, dataArea); | [BUG] [CONTEXT] public void drawOutline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea) { <extra_id_0> [CLASS] AbstractCategoryItemRenderer [METHOD] drawOutline [RETURN_TYPE] void Graphics2D g2 CategoryPlot plot Rectangle2D dataArea [ERROR] null testDrawWithNullInfo | |
114,225 | if(isMarkedIgnored) { return(next) == null ? null : next.withoutIgnored(); } | [Delete] | [BUG] if(isMarkedIgnored) { return(next) == null ? null : next.withoutIgnored(); } [CONTEXT] public Linked<T> withoutIgnored() { if(isMarkedIgnored) { <extra_id_0> } if(next != null) { Linked<T> newNext = next.withoutIgnored(); if(newNext != next) { return withNext(newNext); } } return this; } [CLASS] POJOProper... |
258,338 | degree(); | computeCoefficients(); | [BUG] degree(); [CONTEXT] public double[] getCoefficients() { if(!coefficientsComputed) { <extra_id_0> } double[] out = new double[coefficients.length]; System.arraycopy(coefficients, 0, out, 0, coefficients.length); return out; } [CLASS] PolynomialFunctionNewtonForm [METHOD] getCoefficients [RETURN_TYPE] double[... |
171,451 | return true; | return false; | [BUG] return true; [CONTEXT] public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof PaintMap)) { <extra_id_0> } PaintMap that =(PaintMap) obj; if(this.store.size() != that.store.size()) { return false; } Set keys = this.store.keySet(); Iterator iterator = keys.iterator(); while(ite... |
319,718 | if(!b.isSupported()) { | if(b == null || !b.isSupported()){ | [BUG] if(!b.isSupported()) { [CONTEXT] static int compareReverse(DurationField a, DurationField b) { if(a == null || !a.isSupported()) { <extra_id_0> return 0; } return -1; } if(b == null || !b.isSupported()) { return 1; } return -a.compareTo(b); } [CLASS] DateTimeParserBucket SavedState SavedField [METHOD] compa... |
113,859 | _ctorParameters = _removeIgnored( _ctorParameters);_ctorParameters = _trimByVisibility( _ctorParameters); | _ctorParameters = _trimByVisibility(_ctorParameters); | [BUG] _ctorParameters = _removeIgnored( _ctorParameters);_ctorParameters = _trimByVisibility( _ctorParameters); [CONTEXT] public void trimByVisibility() { _fields = _trimByVisibility(_fields); _getters = _trimByVisibility(_getters); _setters = _trimByVisibility(_setters); <extra_id_0> } [CLASS] POJOPropertyBuilde... |
153,478 | result = new Week( FIRST_WEEK_IN_YEAR, this.year + 1 - 2); | result = new Week(FIRST_WEEK_IN_YEAR, this.year + 1); | [BUG] result = new Week( FIRST_WEEK_IN_YEAR, this.year + 1 - 2); [CONTEXT] public RegularTimePeriod next() { Week result; if(this.week < 52) { result = new Week(this.week + 1, this.year); } else { Calendar calendar = Calendar.getInstance(); calendar.set(this.year, Calendar.DECEMBER, 31); int actualMaxWeek = calendar.... |
276,397 | this( f, encoding, false); | this(f, encoding, true); | [BUG] this( f, encoding, false); [CONTEXT] public ZipFile(File f, String encoding) throws IOException { <extra_id_0> } [CLASS] ZipFile OffsetEntry BoundedInputStream NameAndComment [METHOD] <init> [RETURN_TYPE] String) File f String encoding [ERROR] No Archiver found for the stream signature testDetection |
6,910 | reportWarning( EXTENDS_WITHOUT_TYPEDEF, fnName);reportWarning( OPTIONAL_ARG_AT_END); | reportWarning(OPTIONAL_ARG_AT_END); | [BUG] reportWarning( EXTENDS_WITHOUT_TYPEDEF, fnName);reportWarning( OPTIONAL_ARG_AT_END); [CONTEXT] if(builder.hasVarArgs()) { reportWarning(VAR_ARGS_MUST_BE_LAST); } else { <extra_id_0> } [CLASS] FunctionTypeBuilder [METHOD] addParameter [RETURN_TYPE] boolean FunctionParamBuilder builder JSType paramType boolea... |
280,671 | Validate.notNull( parentNode);Validate.notNull( index); | Validate.notNull(index); | [BUG] Validate.notNull( parentNode);Validate.notNull( index); [CONTEXT] public Node previousSibling() { List<Node> siblings = parentNode.childNodes; Integer index = indexInList(this, siblings); <extra_id_0> if(index > 0) return siblings.get(index-1); else return null; } [CLASS] Node [METHOD] previousSibling [RETU... |
105,111 | type = resolveType(ctxt, beanDesc, type, setter); | [BUG] [CONTEXT] { if(ctxt.canOverrideAccessModifiers()) { setter.fixAccess(); // to ensure we can call it } JavaType type = beanDesc.bindingsForBeanType().resolveType(setter.getGenericParameterType(1)); BeanProperty.Std property = new BeanProperty.Std(setter.getName(), type, null, beanDesc.getClassAnnotations(), set... | |
49,578 | private Comparator<DiGraphNode<Node, Branch>> priorityComparator = new Comparator<DiGraphNode<Node, Branch>>(){ | private final Comparator<DiGraphNode<Node, Branch>> priorityComparator = new Comparator<DiGraphNode<Node, Branch>>() { | [BUG] private Comparator<DiGraphNode<Node, Branch>> priorityComparator = new Comparator<DiGraphNode<Node, Branch>>(){ [CONTEXT] <extra_id_0> @Override public int compare( DiGraphNode<Node, Branch> a, DiGraphNode<Node, Branch> b) { return astPosition.get(a.getValue()) - astPosition.get(b.getValue()); } }; [CLASS] ... |
163,622 | temp = Double.doubleToLongBits( this.right); | temp = this.right != +0.0d ? Double.doubleToLongBits(this.right): 0L; | [BUG] temp = Double.doubleToLongBits( this.right); [CONTEXT] public int hashCode() { int result; long temp; result =(this.unitType != null ? this.unitType.hashCode() : 0); temp = this.top != +0.0d ? Double.doubleToLongBits(this.top) : 0L; result = 29 * result +(int)(temp ^(temp >>> 32)); temp = this.bottom != +0.0d ?... |
205,250 | for(int item = 0; item <= itemCount; item++) { | for(int item = 0; item < itemCount; item++){ | [BUG] for(int item = 0; item <= itemCount; item++) { [CONTEXT] public Range findDomainBounds(XYDataset dataset) { if(dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.get... |
27,803 | result.append(" +"); | [BUG] [CONTEXT] break; case Token.NEG: result.append('-'); break; case Token.INC: result.append("++"); break; case Token.DEC: result.append("--"); break; case Token.ADD: <extra_id_0> break; case Token.SUB: result.append(" -"); break; case Token.MUL: result.append(" *"); break; case Token.DIV: result.append(" /"); ... | |
389,746 | Iterator<?> it = keySet().iterator(); | [BUG] [CONTEXT] public boolean equals(Object obj) { if(this == obj) { return true; } if(obj == null) { return false; } if(obj instanceof SetValuedMap == false) { return false; } SetValuedMap<?, ?> other =(SetValuedMap<?, ?>) obj; if(other.size() != size()) { return false; } <extra_id_0> while(it.hasNext()) { Objec... | |
27,951 | result.append(" <<");result.append(" -"); | result.append(" -"); | [BUG] result.append(" <<");result.append(" -"); [CONTEXT] break; case Token.INC: result.append("++"); break; case Token.DEC: result.append("--"); break; case Token.ADD: result.append(" +"); break; case Token.SUB: <extra_id_0> break; case Token.MUL: result.append(" *"); break; case Token.DIV: result.append(" /"); br... |
250,821 | OptionBuilder.hasArg( type != null);OptionBuilder.withType( type); | OptionBuilder.withType(type); | [BUG] OptionBuilder.hasArg( type != null);OptionBuilder.withType( type); [CONTEXT] if(opt != ' ') { OptionBuilder.hasArg(type != null); OptionBuilder.isRequired(required); <extra_id_0> options.addOption(OptionBuilder.create(opt)); } [CLASS] PatternOptionBuilder [METHOD] parsePattern [RETURN_TYPE] Options String ... |
132,548 | .append(Integer.toHexString(System.identityHashCode(object))); | [BUG] [CONTEXT] public static StringBuffer appendIdentityToString(StringBuffer buffer, Object object) { if(object == null) { return null; } if(buffer == null) { buffer = new StringBuffer(); } return buffer.append(object.getClass().getName()).append('@') <extra_id_0> [CLASS] ObjectUtils Null [METHOD] appendIdent... | |
219,012 | max = area.getMinY();min = area.getX(); | min = area.getX(); | [BUG] max = area.getMinY();min = area.getX(); [CONTEXT] RectangleEdge edge) { Range range = getRange(); double axisMin = range.getLowerBound(); double axisMax = range.getUpperBound(); double min = 0.0; double max = 0.0; if(RectangleEdge.isTopOrBottom(edge)) { <extra_id_0> max = area.getMaxX(); } else if(RectangleEd... |
154,750 | int offset = n; | int offset = 0; | [BUG] int offset = n; [CONTEXT] double first = source.getXValue(series, 0) + skip; for(int i = source.getItemCount(series) - 1; i >= 0; i--) { double x = source.getXValue(series, i); if(x >= first) { int n = 0; double sum = 0.0; double limit = x - period; <extra_id_0> boolean finished = false; while(!finished) { i... |
196,384 | right.moveTo( transYRight , transYRight); | right.lineTo(transXRight, transStackRight); | [BUG] right.moveTo( transYRight , transYRight); [CONTEXT] if(y2 >= 0.0) { right.moveTo(transX1, transStack1); right.lineTo(transX1, transY1); right.lineTo(transXRight, transStackRight); right.closePath(); } else { double yright =(y1 + y2) / 2.0 + stackRight[0]; float transYRight =(float) rangeAxis.valueToJava2D(yrigh... |
397,897 | result.append("SK");result.append( 'F'); | result.append('F'); | [BUG] result.append("SK");result.append( 'F'); [CONTEXT] result.append('P'); index = charAt(value, index + 1) == 'B' ? index + 2 : index + 1; break; case '\u00C7': result.append('S'); index++; break; case 'C': index = handleC(value, result, index); break; case 'D': index = handleD(value, result, index); break; case '... |
377,708 | map.register( Date.class, wrapDeserializer( DATE_TYPE_ADAPTER));map.register( long.class, wrapDeserializer( LONG_DESERIALIZER)); | map.register(long.class, wrapDeserializer(LONG_DESERIALIZER)); | [BUG] map.register( Date.class, wrapDeserializer( DATE_TYPE_ADAPTER));map.register( long.class, wrapDeserializer( LONG_DESERIALIZER)); [CONTEXT] map.register(Boolean.class, wrapDeserializer(BOOLEAN_TYPE_ADAPTER)); map.register(boolean.class, wrapDeserializer(BOOLEAN_TYPE_ADAPTER)); map.register(Byte.class, wrapDeseri... |
87,053 | irNode.getJSDocInfo(); | irNode.setJSDocInfo(fileOverviewInfo); | [BUG] irNode.getJSDocInfo(); [CONTEXT] fileLevelJsDocBuilder, fileOverviewInfo); if(info != null && fileOverviewInfo == null) { fileOverviewInfo = info; } } } if(fileOverviewInfo != null) { if((irNode.getJSDocInfo() != null) &&(irNode.getJSDocInfo().getLicense() != null)) { fileOverviewInfo.setLicense(irNode.getJSDo... |
31,791 | add(")");add( first); | add(first); | [BUG] add(")");add( first); [CONTEXT] if(next != null) { add("("); addList(next); add(")"); } break; case Token.STRING: Preconditions.checkState(childCount == 0); add(jsString(n.getString(), outputCharsetEncoder)); break; case Token.DELPROP: Preconditions.checkState(childCount == 1); add("delete"); <extra_id_0> bre... |
290,101 | w.write( _inputBuffer, count, origPtr); | w.write(_inputBuffer, origPtr, count); | [BUG] w.write( _inputBuffer, count, origPtr); [CONTEXT] public int releaseBuffered(Writer w) throws IOException { int count = _inputEnd - _inputPtr; if(count < 1) { return 0; } int origPtr = _inputPtr; <extra_id_0> return count; } [CLASS] ReaderBasedJsonParser [METHOD] releaseBuffered [RETURN_TYPE] int Writer w ... |
216,435 | addEntity( info, new Rectangle2D.Float( yy, xx, w, h) , rendererIndex, toolTip, url); | addEntity(info, new Rectangle2D.Float(xx, yy, w, h), rendererIndex, toolTip, url); | [BUG] addEntity( info, new Rectangle2D.Float( yy, xx, w, h) , rendererIndex, toolTip, url); [CONTEXT] yy = j2DY; } int w = this.image.getWidth(null); int h = this.image.getHeight(null); Rectangle2D imageRect = new Rectangle2D.Double(0, 0, w, h); Point2D anchorPoint = RectangleAnchor.coordinates(imageRect, this.anchor... |
148,911 | if(nullText == null) { | if(str == null){ | [BUG] if(nullText == null) { [CONTEXT] public StrBuilder append(String str, int startIndex, int length) { <extra_id_0> return appendNull(); } if(startIndex < 0 || startIndex > str.length()) { throw new StringIndexOutOfBoundsException("startIndex must be valid"); } if(length < 0 ||(startIndex + length) > str.length(... |
381,508 | sb.append("},map:{");sb.append( ','); | sb.append(','); | [BUG] sb.append("},map:{");sb.append( ','); [CONTEXT] public String toString() { StringBuilder sb = new StringBuilder("{mapForTypeHierarchy:{"); boolean first = true; for(Pair<Class<?>, T> entry : typeHierarchyList) { if(first) { first = false; } else { sb.append(','); } sb.append(typeToString(entry.first)).append(':... |
176,063 | this.paint = defaultPaint; | this.paint = paint; | [BUG] this.paint = defaultPaint; [CONTEXT] public PaintItem(double value, Paint paint) { this.value = value; <extra_id_0> } [CLASS] LookupPaintScale PaintItem [METHOD] <init> [RETURN_TYPE] Paint) double value Paint paint [ERROR] null testDrawWithNullInfo |
140,163 | appendSummary( buffer, fieldName,(short[]) value);appendSummary( buffer, fieldName, value); | appendSummary(buffer, fieldName, value); | [BUG] appendSummary( buffer, fieldName,(short[]) value);appendSummary( buffer, fieldName, value); [CONTEXT] } else if(value.getClass().isArray()) { if(detail) { appendDetail(buffer, fieldName,(Object[]) value); } else { appendSummary(buffer, fieldName,(Object[]) value); } } else { if(detail) { appendDetail(buffer, fi... |
170,506 | if(!ObjectUtilities.equal( this.title, that.title)){ | if(!ObjectUtilities.equal(this.plot, that.plot)) { | [BUG] if(!ObjectUtilities.equal( this.title, that.title)){ [CONTEXT] if(!ObjectUtilities.equal(this.borderStroke, that.borderStroke)) { return false; } if(!PaintUtilities.equal(this.borderPaint, that.borderPaint)) { return false; } if(!this.padding.equals(that.padding)) { return false; } if(!ObjectUtilities.equal(thi... |
20,654 | append((char)(lbits >> 24)); | append(( char)(lbits >> 16)); | [BUG] append((char)(lbits >> 24)); [CONTEXT] if(lbits != n) { lbits = Double.doubleToLongBits(n); append('D'); append((char)(lbits >> 48)); append((char)(lbits >> 32)); append((char)(lbits >> 16)); append((char)lbits); } else { if(lbits < 0) Kit.codeBug(); if(lbits <= Character.MAX_VALUE) { append('S'); append((ch... |
296,259 | _outputTail = b64variant.encodeBase64Partial( _outputTail, inputLeft, _outputBuffer, b24); | _outputTail = b64variant.encodeBase64Partial(b24, inputLeft, _outputBuffer, _outputTail); | [BUG] _outputTail = b64variant.encodeBase64Partial( _outputTail, inputLeft, _outputBuffer, b24); [CONTEXT] _outputBuffer[_outputTail++] = 'n'; chunksBeforeLF = b64variant.getMaxLineLength() >> 2; } } int inputLeft = inputEnd - inputPtr; // 0, 1 or 2 if(inputLeft > 0) { // yes, but do we have room for output? if(_outp... |
213,415 | dataset.addValue( 30.0, series2, category3); | dataset.addValue(6.0, series2, category3); | [BUG] dataset.addValue( 30.0, series2, category3); [CONTEXT] String category3 ="Category 3"; String category4 ="Category 4"; String category5 ="Category 5"; DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(1.0, series1, category1); dataset.addValue(4.0, series1, category2); dataset.addV... |
221,358 | if(base == null) { throw new IllegalArgumentException("Null 'base' argument."); } | [Delete] | [BUG] if(base == null) { throw new IllegalArgumentException("Null 'base' argument."); } [CONTEXT] public static CategoryLabelPositions replaceRightPosition( CategoryLabelPositions base, CategoryLabelPosition right) { if(base == null) { throw new IllegalArgumentException("Null 'base' argument."); } if(right == null) ... |
344,162 | long millis = getYearMillis( year);long firstWeekMillis1 = getFirstWeekOfYearMillis( year); | long firstWeekMillis1 = getFirstWeekOfYearMillis(year); | [BUG] long millis = getYearMillis( year);long firstWeekMillis1 = getFirstWeekOfYearMillis( year); [CONTEXT] int getWeeksInYear(int year) { <extra_id_0> long firstWeekMillis2 = getFirstWeekOfYearMillis(year + 1); return(int)((firstWeekMillis2 - firstWeekMillis1) / DateTimeConstants.MILLIS_PER_WEEK); } [CLASS] Basi... |
323,913 | buf.append('0'); | [BUG] [CONTEXT] public static void appendPaddedInteger(StringBuffer buf, int value, int size) { if(value < 0) { buf.append('-'); if(value != Integer.MIN_VALUE) { value = -value; } else { for(; size > 10; size--) { buf.append('0'); } buf.append("" + -(long)Integer.MIN_VALUE); return; } } if(value < 10) { for(; size >... | |
81,349 | if(referencedBy.size() - 0 > 0) { | if(referencedBy.size() > 0){ | [BUG] if(referencedBy.size() - 0 > 0) { [CONTEXT] public String toString() { StringBuilder out = new StringBuilder(); out.append(name); if(prototypeNames.size() > 0) { out.append("(CLASS)\n"); out.append(" - FUNCTIONS:"); Iterator<String> pIter = prototypeNames.iterator(); while(pIter.hasNext()) { out.append(pIter.ne... |
227,207 | double logFloor;double logCeil; | double logCeil; | [BUG] double logFloor;double logCeil; [CONTEXT] return logFloor; } protected double computeLogCeil(double upper) { <extra_id_0> if(this.allowNegativesFlag) { if(upper > 10.0) { logCeil = Math.log(upper) / LOG10_VALUE; logCeil = Math.ceil(logCeil); logCeil = Math.pow(10, logCeil); } else if(upper < -10.0) { l... |
389,201 | comparatorChain.add(comparator); | [BUG] [CONTEXT] public ComparatorChain(final Comparator<E> comparator, final boolean reverse) { comparatorChain = new ArrayList<Comparator<E>>(1); <extra_id_0> orderingBits = new BitSet(1); if(reverse == true) { orderingBits.set(0); } [CLASS] ComparatorChain [METHOD] <init> [RETURN_TYPE] Comparator,boolean) Comp... | |
175,388 | if(dataset.getDomainOrder()!= DomainOrder.ASCENDING) { | if(dataset.getDomainOrder() == DomainOrder.ASCENDING){ | [BUG] if(dataset.getDomainOrder()!= DomainOrder.ASCENDING) { [CONTEXT] public static int findLiveItemsLowerBound(XYDataset dataset, int series, double xLow, double xHigh) { int itemCount = dataset.getItemCount(series); if(itemCount <= 1) { return 0; } <extra_id_0> int low = 0; int high = itemCount - 1; int mid... |
174,428 | if(getClass()!= obj.getClass()) { | if(obj == null || getClass() != obj.getClass()){ | [BUG] if(getClass()!= obj.getClass()) { [CONTEXT] public boolean equals(Object obj) { if(this == obj) { return true; } <extra_id_0> return false; } Library library =(Library) obj; if(this.name != null ? !this.name.equals(library.name) : library.name != null) { return false; } return true; } [CLASS] Library [METHO... |
18,849 | if(type != Node.NON_SPECIALCALL) { type = Node.SPECIALCALL_EVAL; } | type = Node.SPECIALCALL_EVAL; | [BUG] if(type != Node.NON_SPECIALCALL) { type = Node.SPECIALCALL_EVAL; } [CONTEXT] Node createCallOrNew(int nodeType, Node child, int lineno, int charno) { int type = Node.NON_SPECIALCALL; if(child.getType() == Token.NAME) { String name = child.getString(); if(name.equals("eval")) { <extra_id_0> } else if(name.equa... |
279,008 | written += name.limit(); | written += commentB.limit(); | [BUG] written += name.limit(); [CONTEXT] writeOut((byte[]) offsets.get(ze)); written += WORD; writeOut(name.array(), name.arrayOffset(), name.limit()); written += name.limit(); writeOut(extra); written += extra.length; writeOut(commentB.array(), commentB.arrayOffset(), commentB.limit()); <extra_id_0> } protected ... |
259,904 | x0 = x2 < x1 ? x0 : x1; | x0 = x < x1 ? x0 : x1; | [BUG] x0 = x2 < x1 ? x0 : x1; [CONTEXT] setResult(x, i); return result; } if(Math.abs(y) <= functionValueAccuracy) { setResult(x, i); return result; } boolean bisect =(x < x1 &&(x1 - x0) > 0.95 *(x2 - x0)) ||(x > x1 &&(x2 - x1) > 0.95 *(x2 - x0)) ||(x == x1); if(!bisect) { <extra_id_0> y0 = x < x1 ? y0 : y1; x2 = ... |
226,420 | if(RectangleEdge.isLeftOrRight( edge)){ | if(RectangleEdge.isTopOrBottom(edge)) { | [BUG] if(RectangleEdge.isLeftOrRight( edge)){ [CONTEXT] public List refreshTicks(Graphics2D g2, AxisState state, Rectangle2D dataArea, RectangleEdge edge) { List result = null; <extra_id_0> result = refreshTicksHorizontal(g2, dataArea, edge); } else if(RectangleEdge.isLeftOrRight(edge)) { result = refreshTicksVerti... |
376,058 | map.register( String.class, STRING_TYPE_ADAPTER);map.register( Integer.class, INTEGER_TYPE_ADAPTER); | map.register(Integer.class, INTEGER_TYPE_ADAPTER); | [BUG] map.register( String.class, STRING_TYPE_ADAPTER);map.register( Integer.class, INTEGER_TYPE_ADAPTER); [CONTEXT] map.register(java.sql.Date.class, JAVA_SQL_DATE_TYPE_ADAPTER); map.register(Timestamp.class, DATE_TYPE_ADAPTER); map.register(Time.class, TIME_TYPE_ADAPTER); map.register(Calendar.class, GREGORIAN_CALE... |
326,740 | iRight.printTo( out, value);iLeft.printTo( out, value); | iLeft.printTo(out, value); | [BUG] iRight.printTo( out, value);iLeft.printTo( out, value); [CONTEXT] public void printTo(Writer out, int value) throws IOException { <extra_id_0> iRight.printTo(out, value); } [CLASS] PeriodFormatterBuilder SimpleAffix PluralAffix CompositeAffix FieldFormatter Literal Separator Composite [METHOD] printTo [RETU... |
92,669 | if(set == null) { | if(set != null){ | [BUG] if(set == null) { [CONTEXT] public static <T> HashSet<T> setAndArray(Set<T> set, T[] elements) { HashSet<T> result = new HashSet<T>(); <extra_id_0> result.addAll(set); } if(elements != null) { for(T value : elements) { result.add(value); } } return result; } [CLASS] ArrayBuilders BooleanBuilder ByteBuilder ... |
223,059 | outside = new Line2D.Double( y0, xx0, xx0, y0 - this.minorTickMarkOutsideLength); | outside = new Line2D.Double(xx0, y0, xx0, y0 - this.minorTickMarkOutsideLength); | [BUG] outside = new Line2D.Double( y0, xx0, xx0, y0 - this.minorTickMarkOutsideLength); [CONTEXT] g2.draw(inside); g2.draw(outside); } if(this.minorTickMarksVisible) { RegularTimePeriod tminor = RegularTimePeriod.createInstance( this.minorTickTimePeriodClass, new Date(t0), getTimeZone()); long tt0 = tminor.getFirstMi... |
351,305 | Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicym"); | Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicy"); | [BUG] Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicym"); [CONTEXT] public void setMockitoNamingPolicy(MethodProxy methodProxy) { try { Field createInfoField = reflectOnCreateInfo(methodProxy); createInfoField.setAccessible(true); Object createInfo = createInfoField.get(methodProxy); <... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.