fix stringlengths 2 286 | ctx stringlengths 47 2.13k |
|---|---|
emitSetCallback(e, keys); | [BUG] None [CONTEXT] e.declare_field(Constants.ACC_PRIVATE, getCallbackField(i), callbackTypes[i], null); } emitMethods(e, methods, actualMethods); emitConstructors(e, constructorInfo); emitSetThreadCallbacks(e); emitSetStaticCallbacks(e); emitBindCallbacks(e); if(useFactory) { int[] keys = getCallbackKeys(); emitNewIn... |
answer.put(key, value); | [BUG] None [CONTEXT] public static <K, V> Properties toProperties(final Map<K, V> map) { final Properties answer = new Properties(); if(map != null) { for(final Entry<K, V> entry2 : map.entrySet()) { final Map.Entry<?, ?> entry = entry2; final Object key = entry.getKey(); final Object value = entry.getValue(); <extra_... |
mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx); | [BUG] mark = new Line2D.Double( cursor + vmin, xx, cursor - il, xx); [CONTEXT] ol = fm.getHeight(); } double il = 0; if(isTickMarksVisible()) { float xx =(float) valueToJava2D( getRange().getUpperBound(), dataArea, edge); Line2D mark = null; g2.setStroke(getTickMarkStroke()); g2.setPaint(getTickMarkPaint()); if(edge ==... |
if(this.displayStart < this.displayEnd){ | [BUG] if(getUpperBound()- this.displayStart) { [CONTEXT] private double getDisplayLength() { <extra_id_0> return(this.displayEnd - this.displayStart); } else { return(this.fixedRange.getUpperBound() - this.displayStart) +(this.displayEnd - this.fixedRange.getLowerBound()); } } [METHOD] getDisplayLength |
g2.draw(body); | [BUG] g2.fill( body);g2.draw( body); [CONTEXT] else { if(this.downPaint != null) { g2.setPaint(this.downPaint); } else { g2.setPaint(p); } g2.fill(body); } if(this.useOutlinePaint) { g2.setPaint(outlinePaint); } else { g2.setPaint(p); } <extra_id_0> addEntity(entities, body, dataset, series, item, 0.0, 0.0); } pub... |
d += d;d *= 10.; | [BUG] None [CONTEXT] else if((j1 = -k) != 0) { d *= tens[j1 & 0xf]; for(j = j1 >> 4;(j != 0); j >>= 1, i++) if((j & 1) != 0) { ieps++; d *= bigtens[i]; } } if(k_check && d < 1.0 && ilim > 0) { if(ilim1 <= 0) fast_failed = true; else { ilim = ilim1; k--; <extra_id_0> ieps++; } } eps = ieps*d + 7.0; eps = setWord0(eps... |
attrs = new ArrayList( 4); | [BUG] None [CONTEXT] public void visitAttribute(final Attribute attr) { if(attrs == null) { <extra_id_0> } attrs.add(attr); } [METHOD] visitAttribute |
buf.append(" {{\n\n"); | [BUG] None [CONTEXT] } appendDescriptor(INTERNAL_NAME, name); if(superName != null && !"java/lang/Object".equals(superName)) { buf.append(" extends"); appendDescriptor(INTERNAL_NAME, superName); buf.append(' '); } if(interfaces != null && interfaces.length > 0) { buf.append(" implements"); for(int i = 0; i < interfaces... |
return toArray(new Object[size() ]); | [BUG] return toArray( new Object[size() + 8 ]); [CONTEXT] public Object[] toArray() { <extra_id_0> } [METHOD] toArray |
fields.secondOfDay = convertField(fields.secondOfDay); | [BUG] fields.dayOfWeek = convertField( fields.dayOfWeek);fields.secondOfDay = convertField( fields.secondOfDay); [CONTEXT] protected void assemble(Fields fields) { fields.year = convertField(fields.year); fields.yearOfEra = convertField(fields.yearOfEra); fields.yearOfCentury = convertField(fields.yearOfCentury); field... |
public static final int EXPAND_FRAMES = 3; | [BUG] None [CONTEXT] <extra_id_0> [METHOD] None |
jp.getCodec(); | [BUG] None [CONTEXT] SettableBeanProperty prop = _beanProperties.find(propName); if(prop != null) { // normal case if(activeView != null && !prop.visibleInView(activeView)) { jp.skipChildren(); continue; } try { bean = prop.deserializeSetAndReturn(jp, ctxt, bean); } catch(Exception e) { wrapAndThrow(e, bean, propName, ... |
throw new UnrecognizedOptionException("Unrecognized option:" + arg); | [BUG] None [CONTEXT] private void processOption(String arg, ListIterator iter) throws ParseException { boolean hasOption = options.hasOption(arg); if(!hasOption) { <extra_id_0> } final Option opt = options.getOption(arg); if(opt.isRequired()) { requiredOptions.remove(opt.getKey()); } [METHOD] processOption |
reportProblem("Multiple 'any-getters' defined("+_anyGetters.get(0)+" vs" +_anyGetters.get(1)+")"); | [BUG] reportProblem("Multiple 'any-getters' defined ||("+_anyGetters.get( 0) +" vs" +_anyGetters.get( 1) +")"); [CONTEXT] public AnnotatedMember getAnyGetter() { if(_anyGetters != null) { if(_anyGetters.size() > 1) { <extra_id_0> } return _anyGetters.getFirst(); } return null; } [METHOD] getAnyGetter |
[BUG] None [CONTEXT] public void remove(int key) { if(key < 0) Kit.codeBug(); <extra_id_0> if(0 <= index) { keys[index] = DELETED; --keyCount; if(values != null) { values[index] = null; } if(ivaluesShift != 0) { keys[ivaluesShift + index] = 0; } } [METHOD] remove | |
value = ValueUtils.getValue(getBean() , pd, index); | [BUG] value = ValueUtils.getValue( getBean(), propertyDescriptor, index); [CONTEXT] public Object getImmediateNode() { if(value == UNINITIALIZED) { if(index == WHOLE_COLLECTION) { value = ValueUtils.getValue(getBaseValue()); } else { PropertyDescriptor pd = getPropertyDescriptor(); if(pd == null) { value = null; } else... |
if(inputEnd < 3){ | [BUG] if(inputEnd <= 3) { [CONTEXT] { int inputPtr = 0; int inputEnd = 0; int lastFullOffset = -3; int bytesDone = 0; int safeOutputEnd = _outputEnd - 6; int chunksBeforeLF = b64variant.getMaxLineLength() >> 2; while(true) { if(inputPtr > lastFullOffset) { // need to load more inputEnd = _readMore(data, readBuffer, inp... |
for(int i = 0; i < col; i++){ | [BUG] for(int i = -3; i < col; i++) { [CONTEXT] for(int row = 0; row < col; row++) { sum = lu[row][col]; for(int i = 0; i < row; i++) { sum -= lu[row][i] * lu[i][col]; } lu[row][col] = sum; } int max = col; // permutation row double largest = 0d; for(int row = col; row < nRows; row++) { sum = lu[row][col]; <extra_id_0... |
FlowScope output = flowThrough(source, input); | [BUG] FlowScope output = flowThrough( source, leftScope); [CONTEXT] } FlowScope output = input.createChildFlowScope(); output = traverse(n, output); return output; } @Override @SuppressWarnings("fallthrough") List<FlowScope> branchedFlowThrough(Node source, FlowScope input) { <extra_id_0> Node condition = null; Flo... |
if(buf.length() == 0){ | [BUG] None [CONTEXT] else { eps *= tens[ilim-1]; for(i = 1;; i++, d *= 10.0) { L =(long)d; d -= L; buf.append((char)('0' + L)); if(i == ilim) { if(d > 0.5 + eps) { char lastCh; while(true) { lastCh = buf.charAt(buf.length() - 1); buf.setLength(buf.length() - 1); if(lastCh != '9') break; <extra_id_0> k++; lastCh = '0'... |
for(int i = 0; i < lhs.length && isEquals; ++i){ | [BUG] None [CONTEXT] public EqualsBuilder append(double[] lhs, double[] rhs) { if(isEquals == false) { return this; } if(lhs == rhs) { return this; } if(lhs == null || rhs == null) { this.setEquals(false); return this; } if(lhs.length != rhs.length) { this.setEquals(false); return this; } <extra_id_0> append(lhs[i], ... |
n.setJSType(getJSType(n.getLastChild())); | [BUG] n.setJSType( scope.getTypeOfThis());n.setJSType( getJSType( n.getLastChild())); [CONTEXT] case Token.INC: case Token.BITNOT: case Token.NUMBER: scope = traverseChildren(n, scope); n.setJSType(getNativeType(NUMBER_TYPE)); break; case Token.LP: case Token.GET_REF: scope = traverse(n.getFirstChild(), scope); n.setJS... |
Number meanValue = statData.getMeanValue(row, column); | [BUG] Number meanValue = statData.getMeanValue( row, row); [CONTEXT] if(v == null) { return; } if(!(dataset instanceof StatisticalCategoryDataset)) { super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); return; } StatisticalCategoryDataset statData =(StatisticalCategoryDataset)... |
return new Std(_name, type, _wrapperName, _contextAnnotations, _member, _isRequired); | [BUG] return new Std( _name, type, _contextAnnotations, _member, _isRequired); [CONTEXT] public Std withType(JavaType type) { <extra_id_0> } [METHOD] withType |
while(_inputPtr < _inputEnd || loadMore()){ | [BUG] None [CONTEXT] { if(_inputPtr >= _inputEnd && !loadMore()) { return INT_0; } int ch = _inputBuffer[_inputPtr] & 0xFF; if(ch < INT_0 || ch > INT_9) { return INT_0; } if(!isEnabled(Feature.ALLOW_NUMERIC_LEADING_ZEROS)) { reportInvalidNumber("Leading zeroes not allowed"); } ++_inputPtr; // Leading zero to be skipped... |
if(varModule != currModule && varModule != null && currModule != null){ | [BUG] if(currModule != null) { [CONTEXT] } return; } CompilerInput currInput = t.getInput(); CompilerInput varInput = var.input; if(currInput == varInput || currInput == null || varInput == null) { return; } JSModule currModule = currInput.getModule(); JSModule varModule = varInput.getModule(); JSModuleGraph moduleGrap... |
plot.setRenderer( renderer);plot.setOrientation( orientation); | [BUG] None [CONTEXT] ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel); CategoryItemRenderer renderer = new StackedBarRenderer3D(); if(tooltips) { renderer.setBaseToolTipGenerator( new StandardCategoryToolTipGenerator()); } if(urls) { renderer.setBaseURLGenerator(new StandardCategoryURLGenerator()); } CategoryPlot... |
if(!ObjectUtilities.equal(this.seriesLinesVisible, that.seriesLinesVisible)) { | [BUG] if(!ObjectUtilities.equal( this.seriesLinesVisible, seriesShapesVisible)){ [CONTEXT] public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof XYLineAndShapeRenderer)) { return false; } if(!super.equals(obj)) { return false; } XYLineAndShapeRenderer that =(XYLineAndShapeRenderer) ob... |
} else if(index >= 0){ | [BUG] } else if(index > 0) { [CONTEXT] public synchronized double getElement(int index) { if(index >= numElements) { String msg ="The index specified:" + index +" is larger than the current number of elements"; throw new ArrayIndexOutOfBoundsException(msg); <extra_id_0> return internalArray[startIndex + index]; } els... |
addAction(new FunctionCallBuilder(receiver, receiver.getNext()).setIsNewCall(n.getType() == Token.NEW).build()); | [BUG] addAction( new FunctionCallBuilder( jsRoot, receiver.getNext()).setIsNewCall( n.getType()== Token.NEW).build()); [CONTEXT] .build()); } else { addAction(new FunctionCallBuilder( first, receiver.getNext()).setIsCallFunction().build()); } } else { addAction(new FunctionCallBuilder(first, receiver.getNext()).setProp... |
_flushBuffer(); | [BUG] None [CONTEXT] public void writeRaw(char ch) throws IOException, JsonGenerationException { if((_outputTail + 3) >= _outputEnd) { <extra_id_0> } final byte[] bbuf = _outputBuffer; if(ch <= 0x7F) { bbuf[_outputTail++] =(byte) ch; } elseif(ch < 0x800) { // 2-byte? bbuf[_outputTail++] =(byte)(0xc0 |(ch >> 6)); bbuf... |
super(src, config, f); | [BUG] super( f, config, src); [CONTEXT] public XmlSerializerProvider(XmlSerializerProvider src, SerializationConfig config, SerializerFactory f) { <extra_id_0> _rootNameLookup= src._rootNameLookup; } [METHOD] <init> |
if(value < 10){ | [BUG] if(value < 10L) { [CONTEXT] public static void appendUnpaddedInteger(StringBuffer buf, int value) { if(value < 0) { buf.append('-'); if(value != Integer.MIN_VALUE) { value = -value; } else { buf.append("" + -(long)Integer.MIN_VALUE); return; } } <extra_id_0> buf.append((char)(value + '0')); } else if(value < 10... |
bv.put12('J', cw.newLong(v[i]).index); | [BUG] None [CONTEXT] char[] v =(char[]) value; bv.put12('[', v.length); for(int i = 0; i < v.length; i++) { bv.put12('C', cw.newInteger(v[i]).index); } } else if(value instanceof int[]) { int[] v =(int[]) value; bv.put12('[', v.length); for(int i = 0; i < v.length; i++) { bv.put12('I', cw.newInteger(v[i]).index); } } e... |
if(instant - iGapDuration >= iCutover){ | [BUG] if(instant - iGapDuration >= serialVersionUID) { [CONTEXT] if(instant >= iCutover) { instant = iGregorianField.set(instant, value); if(instant < iCutover) { if(instant + iGapDuration < iCutover) { instant = gregorianToJulian(instant); } if(get(instant) != value) { throw new IllegalFieldValueException(iGregorianFi... |
if(count % 2 == 1){ | [BUG] if(count % 8 == 1) { [CONTEXT] public static double calculateQ3(List values) { if(values == null) { throw new IllegalArgumentException("Null 'values' argument."); } double result = Double.NaN; int count = values.size(); if(count > 0) { <extra_id_0> if(count > 1) { result = Statistics.calculateMedian(values, cou... |
ret = innerCumulativeProbability(domain[0], x, 1, n, m, k); | [BUG] ret = innerCumulativeProbability( domain[0], x, 5, n, m, k); [CONTEXT] public double cumulativeProbability(int x) { double ret; int n = getPopulationSize(); int m = getNumberOfSuccesses(); int k = getSampleSize(); int[] domain = getDomain(n, m, k); if(x < domain[0]) { ret = 0.0; } else if(x >= domain[1]) { ret = ... |
if(NodeUtil.nodeTypeMayHaveSideEffects(nextNode)&& type != Token.NAME || type == Token.NAME && nextParent.getType() == Token.CATCH){ | [BUG] if(NodeUtil.nodeTypeMayHaveSideEffects( nextNode) && type != Token.NAME) { [CONTEXT] } if(blocked) { lookAhead = null; return; } } } <extra_id_0> lookAhead = null; return; } lookAhead = nextNode; } } } [METHOD] advanceLookAhead |
Point2D p03 = new Point2D.Double(p00.getX() + getXOffset() , p00.getY() - getYOffset()); | [BUG] Point2D p03 = new Point2D.Double( p3.getX()+ getXOffset(), p00.getY()- getYOffset()); [CONTEXT] private Shape[] createHorizontalBlock(double x0, double width, double y0, double y1, boolean inverted) { Shape[] result = new Shape[6]; Point2D p00 = new Point2D.Double(y0, x0); Point2D p01 = new Point2D.Double(y0, x0 ... |
if(child == last) last = next; | [BUG] None [CONTEXT] public void replaceChildAfter(Node prevChild, Node newChild) { Preconditions.checkArgument(prevChild.parent == this,"prev is not a child of this node."); Preconditions.checkArgument(newChild.next == null,"The new child node has siblings."); Preconditions.checkArgument(newChild.parent == null,"The n... |
if(comment.getCommentType() == JSDOC &&(comment.getValue().contains("@fileoverview")|| comment.getValue().contains("@preserve")|| comment.getValue().contains("@license"))){ | [BUG] if(comment.getCommentType()== JSDOC &&( comment.getValue().contains("@fileoverview") || comment.getValue().contains("@preserve") || comment.getValue().contains("@licen"))) { [CONTEXT] ErrorReporter errorReporter) { IRFactory irFactory = new IRFactory(sourceString, node.getSourceName(), config, errorReporter); Nod... |
b = c; | [BUG] None [CONTEXT] private static byte[] readClass(final InputStream is) throws IOException { if(is == null) { throw new IOException("Class not found"); } byte[] b = new byte[is.available()]; int len = 0; while(true) { int n = is.read(b, len, b.length - len); if(n == -1) { if(len < b.length) { byte[] c = new byte[len... |
if(!config.cleansStackTrace()){ | [BUG] if(config.cleansStackTrace()) { [CONTEXT] public void filter(Throwable throwable) { <extra_id_0> return; } StackTraceElement[] filtered = filter.filter(throwable.getStackTrace(), true); throwable.setStackTrace(filtered); } [METHOD] filter |
type = DIR_FLAG; | [BUG] None [CONTEXT] protected int getMode(int mode) { int type = FILE_FLAG; if(isLink()) { type = LINK_FLAG; } else if(isDirectory()) { <extra_id_0> } return type |(mode & PERM_MASK); } [METHOD] getMode |
++attributeCount; | [BUG] None [CONTEXT] void put(final ByteVector out) { out.putShort(access).putShort(name).putShort(desc); int attributeCount = 0; if(value != 0) { ++attributeCount; } if((access & Opcodes.ACC_SYNTHETIC) != 0 &&(cw.version & 0xffff) < Opcodes.V1_5) { ++attributeCount; } if((access & Opcodes.ACC_DEPRECATED) != 0) { ++att... |
right.moveTo(( float)xx1, transStack1); | [BUG] left.lineTo((float) xx1, transStack1);right.moveTo((float) xx1, transStack1); [CONTEXT] } float transStackRight =(float) rangeAxis.valueToJava2D( adjStackRight[0], dataArea, edge1); if(y2 >= 0.0) { right.moveTo((float) xx1, transStack1); right.lineTo((float) xx1, transY1); right.lineTo((float) xxRight, transStack... |
accept( array, null, v.get( j)); | [BUG] None [CONTEXT] static void accept( final AnnotationVisitor av, final String name, final Object value) { if(av != null) { if(value instanceof String[]) { String[] typeconst =(String[]) value; av.visitEnum(name, typeconst[0], typeconst[1]); } else if(value instanceof AnnotationNode) { AnnotationNode an =(Annotation... |
resultMap.put(var, aDef); | [BUG] None [CONTEXT] if(b.reachingDef.containsKey(var)) { Definition bDef = b.reachingDef.get(var); if(aDef.equals(bDef)) { resultMap.put(var, aDef); } else { resultMap.put(var, null); } } else { <extra_id_0> } [METHOD] apply |
functionType = new FunctionTypeBuilder(name, compiler, errorRoot, sourceName, scope).setSourceNode(fnRoot) | [BUG] functionType = new FunctionTypeBuilder( name, compiler, errorRoot, scope, sourceName).setSourceNode( fnRoot) [CONTEXT] if(lvalueNode != null && lvalueNode.getType() == Token.GETPROP && lvalueNode.isQualifiedName()) { Var var = scope.getVar( lvalueNode.getFirstChild().getQualifiedName()); if(var != null) { ObjectT... |
AbstractInsnNode result = next;AbstractInsnNode ilast = insns.last; | [BUG] None [CONTEXT] public void insert(final AbstractInsnNode location, final InsnList insns) { if(check && !(contains(location) && insns != this)) { throw new IllegalArgumentException(); } if(insns.size == 0) { return; } size += insns.size; AbstractInsnNode ifirst = insns.first; <extra_id_0> AbstractInsnNode next =... |
if(reuse == null){ | [BUG] if(((((((("reuse=null, header.after=" +(header.after))+" header.before") +(header.before))+" key=") + key) +" value=") + value) +" size=" + size) { [CONTEXT] } reuse = reuse.after; } if(reuse == null) { throw new IllegalStateException("Entry.after=null, header.after" + header.after +" header.before" + header.befo... |
data[reference - 1] =(byte)(opcode + 20);data[reference - 1] =(byte)(opcode + 49); | [BUG] None [CONTEXT] if(source >= 0) { offset = position - source; if(offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { int opcode = data[reference - 1] & 0xFF; if(opcode <= Opcodes.JSR) { <extra_id_0> } else { data[reference - 1] =(byte)(opcode + 20); } needUpdate = true; } data[reference++] =(byte)(offset... |
writeAsciiLong(entry.getRemoteDeviceMaj() , 8, 16); | [BUG] writeAsciiLong( entry.getTime(), 8, 16);writeAsciiLong( entry.getRemoteDeviceMaj(), 8, 16); [CONTEXT] private void writeNewEntry(final CpioArchiveEntry entry) throws IOException { writeAsciiLong(entry.getInode(), 8, 16); writeAsciiLong(entry.getMode(), 8, 16); writeAsciiLong(entry.getUID(), 8, 16); writeAsciiLong... |
if(_nextIsCData){ | [BUG] if( defaultState) { [CONTEXT] if(_nextIsAttribute) { _xmlWriter.writeAttribute(_nextName.getNamespaceURI(), _nextName.getLocalPart(), new String(text, offset, len)); } else if(checkNextIsUnwrapped()) { if(_nextIsCData) { _xmlWriter.writeCData(text, offset, len); } else { _xmlWriter.writeCharacters(text, offset, l... |
map.register(short.class, SHORT_TYPE_ADAPTER); | [BUG] map.register( boolean.class, BOOLEAN_TYPE_ADAPTER);map.register( short.class, SHORT_TYPE_ADAPTER); [CONTEXT] map.register(GregorianCalendar.class, GREGORIAN_CALENDAR_TYPE_ADAPTER); map.register(BigDecimal.class, BIG_DECIMAL_TYPE_ADAPTER); map.register(BigInteger.class, BIG_INTEGER_TYPE_ADAPTER); map.register(Bool... |
buf[offset + idx] =(byte)'0'; | [BUG] buf[offset + length - 2] = 0;buf[offset + idx] =(byte) '0'; [CONTEXT] public static int getOctalBytes(long value, byte[] buf, int offset, int length) { intidx = length - 1; buf[offset + idx] = 0; --idx; buf[offset + idx] =(byte) ' '; --idx; if(value == 0) { <extra_id_0> --idx; } else { for(long val = value; idx... |
return 1; | [BUG] return -2; [CONTEXT] public int compareTo(DurationField otherField) { long otherMillis = otherField.getUnitMillis(); long thisMillis = getUnitMillis(); if(thisMillis == otherMillis) { return 0; } if(thisMillis < otherMillis) { return -1; } else { <extra_id_0> } } [METHOD] compareTo |
if(iBegCount == iEndCount && iBegCount > 0 && Math.pow(10, iBegCount)> lowerBoundVal){ | [BUG] if(j == iEndCount && iBegCount > 0 && Math.pow( 10, iBegCount) > lowerBoundVal) { [CONTEXT] double lowerBoundVal = range.getLowerBound(); if(this.smallLogFlag && lowerBoundVal < SMALL_LOG_VALUE) { lowerBoundVal = SMALL_LOG_VALUE; } double upperBoundVal = range.getUpperBound(); int iBegCount =(int) Math.rint(swit... |
int whole = Integer.parseInt(str.substring(0, pos)); | [BUG] int whole = Integer.parseInt( str.substring( 3, pos)); [CONTEXT] public static Fraction getFraction(String str) { if(str == null) { throw new IllegalArgumentException("The string must not be null"); } int pos = str.indexOf('.'); if(pos >= 0) { return getFraction(Double.parseDouble(str)); } pos = str.indexOf(' ');... |
double y1 = dataset.getYValue(series, item); | [BUG] int y1 = dataset.getYValue( series, item); [CONTEXT] PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { if(!getItemVisible(series, item)) { return; } double x1 = dataset.getXValue(series, item); <extr... |
if(++offset < len){ | [BUG] if(++offset == len) { [CONTEXT] { int num = digitChars[offset] - '0'; len += offset; if(++offset < len) { num =(num * 10) +(digitChars[offset] - '0'); if(++offset < len) { num =(num * 10) +(digitChars[offset] - '0'); if(++offset < len) { num =(num * 10) +(digitChars[offset] - '0'); if(++offset < len) { num =(num ... |
return attrCount; | [BUG] return len; [CONTEXT] { int attrCount = 0; for(int i = 0, len = properties.length; i < len; ++i) { BeanPropertyWriter bpw = properties[i]; if(!_isAttribute(bpw)) { continue; } int moveBy = i - attrCount; if(moveBy > 0) { System.arraycopy(properties, attrCount, properties, attrCount + 1, moveBy); properties[attrCo... |
this.builder = builder; | [BUG] this.builder = new StringBuilder();this.builder = builder; [CONTEXT] private DotFormatter(Node n, ControlFlowGraph<Node> cfg, Appendable builder, boolean printAnnotations) throws IOException { this.cfg = cfg; <extra_id_0> this.printAnnotations = printAnnotations; formatPreamble(); traverseNodes(n); formatConclu... |
if(value < 0){ | [BUG] if(value <= 0) { [CONTEXT] public static int calculateDigitCount(long value) { <extra_id_0> if(value != Long.MIN_VALUE) { return calculateDigitCount(-value) + 1; } else { return 20; } } return(value < 10 ? 1 :(value < 100 ? 2 :(value < 1000 ? 3 :(value < 10000 ? 4 :((int)(Math.log(value) / LOG_10) + 1))))); } [... |
if(isInstanceObject || fnName.equals("Function")) { | [BUG] if(existingFn.getSource() == null) { [CONTEXT] private FunctionType getOrCreateConstructor() { FunctionType fnType = typeRegistry.createConstructorType( fnName, sourceNode, parametersNode, returnType); JSType existingType = typeRegistry.getType(fnName); if(existingType != null) { boolean isInstanceObject = existi... |
TextUtilities.drawAlignedString(label, g2,(float)coordinates.getX() ,(float)coordinates.getY() , marker.getLabelTextAnchor()); | [BUG] TextUtilities.drawAlignedString( marker, g2,( float) coordinates.getX(),(float) coordinates.getY(), label.getLabelTextAnchor()); [CONTEXT] } g2.setPaint(marker.getPaint()); g2.fill(area); bounds = area; } String label = marker.getLabel(); RectangleAnchor anchor = marker.getLabelAnchor(); if(label != null) { Font ... |
newValues = getField().set(iTimeOfDay, iFieldIndex, newValues, text, locale); | [BUG] newValues = getField().set( iTimeOfDay, iFieldIndex, locale, text, newValues); [CONTEXT] public TimeOfDay setCopy(String text, Locale locale) { int[] newValues = iTimeOfDay.getValues(); <extra_id_0> return new TimeOfDay(iTimeOfDay, newValues); } [METHOD] setCopy |
for(int i = 0, len = pendingIx; i < len; i += 2){ | [BUG] for(pendingnt i = 0, len = iIx; i < len; i += 2) { [CONTEXT] if(pending == null) { int len = _beanProperties.size(); pending = new Object[len + len]; } pending[pendingIx++] = prop; pending[pendingIx++] = prop.deserialize(jp, ctxt); continue; } if(PROP_NAME_MESSAGE.equals(propName)) { if(hasStringCreator) { throwa... |
[BUG] None [CONTEXT] public void visitMultiANewArrayInsn(final String desc, final int dims) { buf.setLength(0); buf.append(tab2).append("MULTIANEWARRAY"); appendDescriptor(FIELD_DESCRIPTOR, desc); <extra_id_0> text.add(buf.toString()); if(mv != null) { mv.visitMultiANewArrayInsn(desc, dims); } [METHOD] visitMultiANew... | |
mLocale.equals(other.mLocale); | [BUG] mLocale.equals( other.locale); [CONTEXT] public boolean equals(Object obj) { if(this == obj) { return true; } if(obj instanceof TimeZoneDisplayKey) { TimeZoneDisplayKey other =(TimeZoneDisplayKey)obj; return mTimeZone.equals(other.mTimeZone) && mStyle == other.mStyle && <extra_id_0> } return false; } [METHOD] e... |
int rowCount = this.getRowDimension(); | [BUG] int nCols = this.getColumnDimension();int rowCount = this.getRowDimension(); [CONTEXT] public RealMatrix scalarAdd(double d) { <extra_id_0> int columnCount = this.getColumnDimension(); double[][] outData = new double[rowCount][columnCount]; for(int row = 0; row < rowCount; row++) { for(int col = 0; col < column... |
yy2 = valueToJava2D(tick.getValue() - 0.5d, plotArea, RectangleEdge.LEFT); | [BUG] yy2 = valueToJava2D( plotArea.getValue()- 0.5d, tick, RectangleEdge.LEFT); [CONTEXT] Stroke outlineStroke = getPlot().getOutlineStroke(); if(outlineStroke != null && outlineStroke instanceof BasicStroke) { outlineStrokeWidth =((BasicStroke) outlineStroke).getLineWidth(); } else { outlineStrokeWidth = 1d; } Iterat... |
e.getfield(BOUND_FIELD); | [BUG] None [CONTEXT] e.getfield(getCallbackField(index)); e.mark(end); } private void emitBindCallbacks(ClassEmitter ce) { CodeEmitter e = ce.begin_method(Constants.PRIVATE_FINAL_STATIC, BIND_CALLBACKS, null); Local me = e.make_local(); e.load_arg(0); e.checkcast_this(); e.store_local(me); Label end = e.make_label(); e... |
data[reference - 1] =(byte)(opcode + 49); | [BUG] None [CONTEXT] if(source >= 0) { offset = position - source; if(offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { int opcode = data[reference - 1] & 0xFF; if(opcode <= Opcodes.JSR) { <extra_id_0> } else { data[reference - 1] =(byte)(opcode + 20); } needUpdate = true; } data[reference++] =(byte)(offset... |
char[] buf = new char[maxStringLength]; | [BUG] None [CONTEXT] for(int i = 0; i < n; ++i) { index += 2; interfaces[i] = readClass(index, buf); } } return interfaces; } void copyPool(final ClassWriter classWriter) { <extra_id_0> int ll = items.length; Item[] items2 = new Item[ll]; for(int i = 1; i < ll; i++) { int index = items[i]; int tag = b[index - 1]; ... |
methodNames = methodNames; | [BUG] None [CONTEXT] public static Throwable getCause(Throwable throwable, String[] methodNames) { if(throwable == null) { return null; } Throwable cause = getCauseUsingWellKnownTypes(throwable); if(cause == null) { if(methodNames == null) { <extra_id_0> } for(int i = 0; i < methodNames.length; i++) { String methodNa... |
result.append(" <<"); | [BUG] result.append(" /=");result.append(" <<"); [CONTEXT] break; case Token.GE: result.append(" >="); break; case Token.GT: result.append(" >"); break; case Token.INSTANCEOF: result.append(" instanceof"); break; case Token.LSH: <extra_id_0> break; case Token.RSH: result.append(" >>"); break; case Token.URSH: result.... |
if(dataset != null){ | [BUG] if(dataset == null) { [CONTEXT] public CategoryItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info) { CategoryItemRendererState state = super.initialise(g2, dataArea, plot, rendererIndex, info); CategoryAxis domainAxis = getDomainAxis(plot... |
encoded +="_" + id; | [BUG] encoded +="_" + sizeOfAliases; [CONTEXT] return sb.toString(); } CRC32 crc32 = new CRC32(); crc32.update(s.getBytes()); long hash = crc32.getValue() & unitTestHashReductionMask; sb.append('_'); sb.append(Long.toHexString(hash)); String encoded = sb.toString(); if(!usedHashedAliases.add(encoded)) { <extra_id_0>... |
e.push( 1);e.push( i); | [BUG] None [CONTEXT] public void processCase(Object key, Label end) { MethodInfo constructor =(MethodInfo)key; Type types[] = constructor.getSignature().getArgumentTypes(); for(int i = 0; i < types.length; i++) { e.load_arg(1); <extra_id_0> e.aaload(); e.unbox(types[i]); } e.invoke_constructor_this(constructor.getSig... |
if(currentClass != null && u.getType( currentClass)){ | [BUG] None [CONTEXT] protected boolean isAssignableFrom(final Type t, final Type u) { if(t.equals(u)) { return true; } if(currentClass != null && t.equals(currentClass)) { if(getSuperClass(u) == null) { return false; } else { return isAssignableFrom(t, getSuperClass(u)); } } <extra_id_0> if(isAssignableFrom(t, curren... |
private final SignatureVisitor sv; | [BUG] None [CONTEXT] <extra_id_0> [METHOD] None |
throw new IllegalArgumentException("Could not find method '"+_serialization.name +"' from Class '"+clazz.getName()); | [BUG] throw new IllegalArgumentException("Could not find method '"+name +"' from Class '"+clazz.getName()); [CONTEXT] Object readResolve() { Class<?> clazz = _serialization.clazz; try { Method m = clazz.getDeclaredMethod(_serialization.name, _serialization.args); if(!m.isAccessible()) { ClassUtil.checkAndFixAccess(m); ... |
buf.append("mv.visitLdcInsn(");buf.append(");\n"); | [BUG] None [CONTEXT] case Opcodes.F_CHOP: buf.append("mv.visitFrame(Opcodes.F_CHOP,").append(nLocal).append(", null, 0, null"); break; case Opcodes.F_SAME: buf.append("mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null"); break; case Opcodes.F_SAME1: declareFrameTypes(1, stack); buf.append("mv.visitFrame(Opcodes.F_SAME1, 0... |
DateTimeParser parser =(DateTimeParser)parserList.get(i); | [BUG] DateTimePrinter printer =(DateTimePrinter) printerList.get( i);DateTimeParser parser =(DateTimeParser) parserList.get( i); [CONTEXT] DateTimePrinter printer =(DateTimePrinter) printerList.get(i); printEst += printer.estimatePrintedLength(); iPrinters[i] = printer; } iPrintedLengthEstimate = printEst; } if(parserL... |
if(f.enabledByDefault()){ | [BUG] if(QUOTE_FIELD_NAMES.enabledByDefault()) { [CONTEXT] public static int collectDefaults() { int flags = 0; for(Feature f : values()) { <extra_id_0> flags |= f.getMask(); } } return flags; } [METHOD] collectDefaults |
data = BOOLEAN;data = INTEGER; | [BUG] None [CONTEXT] } switch(desc.charAt(dims)) { case 'Z': data = BOOLEAN; break; case 'C': data = CHAR; break; case 'B': data = BYTE; break; case 'S': data = SHORT; break; case 'I': <extra_id_0> break; case 'F': data = FLOAT; break; case 'J': data = LONG; break; case 'D': data = DOUBLE; break; default: t = desc.su... |
if(sizePlus1++ == max){ | [BUG] if(sizePlus1++ == sizePlus1) { [CONTEXT] } start = ++i; continue; } else { lastMatch = false; } match = true; i++; } } else { while(i < len) { if(separatorChars.indexOf(str.charAt(i)) >= 0) { if(match || preserveAllTokens) { lastMatch = true; <extra_id_0> i = len; lastMatch = false; } list.add(str.substring(sta... |
d -= L; | [BUG] None [CONTEXT] buf.setLength(0); buf.append('0');/* copy"0" to buffer */ return 1; } fast_failed = true; } if(!fast_failed) { fast_failed = true; if(leftright) { eps = 0.5/tens[ilim-1] - eps; for(i = 0;;) { L =(long)d; <extra_id_0> buf.append((char)('0' + L)); if(d < eps) { return k + 1; } if(1.0 - d < eps) { ... |
super(years, months, weeks, days, hours, minutes, seconds, millis, type); | [BUG] super( years, months, seconds, days, hours, minutes, weeks, millis, type); [CONTEXT] public Period(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, PeriodType type) { <extra_id_0> } [METHOD] <init> |
} else if(value instanceof double[]){ | [BUG] None [CONTEXT] for(int i = 0; i < v.length; i++) { bv.put12('I', cw.newInteger(v[i]).index); } } else if(value instanceof long[]) { long[] v =(long[]) value; bv.put12('[', v.length); for(int i = 0; i < v.length; i++) { bv.put12('J', cw.newLong(v[i]).index); } } else if(value instanceof float[]) { float[] v =(floa... |
double tolerance = Math.max(relativeAccuracy * z.abs() , absoluteAccuracy); | [BUG] double tolerance = Math.max( absoluteAccuracy * z.abs(), relativeAccuracy); [CONTEXT] Complex oldz = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); while(i <= maximalIterationCount) { pv = coefficients[n]; dv = Complex.ZERO; d2v = Complex.ZERO; for(int j = n-1; j >= 0; j--) { d2v = dv.add(z.mul... |
if(ch2 == ':' &&(( ch1 >= 'a' && ch1 <= 'z')||(ch1 >= 'A' && ch1 <= 'Z'))){ | [BUG] if(ch1 == ':' &&(( ch1 >= 'a' && ch1 <= 'z') ||(ch1 >= 'A' && ch1 <= 'Z'))) { [CONTEXT] private static String normalizeFileName(String fileName) { String osname = System.getProperty("os.name").toLowerCase(Locale.US); if(osname != null) { if(osname.startsWith("windows")) { if(fileName.length() > 2) { char ch1 = f... |
} else if(str.equals(falseString)) { | [BUG] } else if(str.equals( nullString)){ [CONTEXT] public static Boolean toBooleanObject(String str, String trueString, String falseString, String nullString) { if(str == null) { if(trueString == null) { return Boolean.TRUE; } else if(falseString == null) { return Boolean.FALSE; } else if(nullString == null) { return ... |
if(!ObjectUtilities.equal(this.baseItemLabelGenerator, that.baseItemLabelGenerator)) { | [BUG] if(!ObjectUtilities.equal( generator, that.baseItemLabelGenerator)){ [CONTEXT] public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof AbstractCategoryItemRenderer)) { return false; } AbstractCategoryItemRenderer that =(AbstractCategoryItemRenderer) obj; if(!ObjectUtilities.equal(... |
w = 0;u += 2; | [BUG] None [CONTEXT] int anns = 0; int ianns = 0; Attribute cattrs = null; u = header; access = readUnsignedShort(u); name = readClass(u + 2, c); v = items[readUnsignedShort(u + 4)]; String superClassName = v == 0 ? null : readUTF8(v, c); String[] implementedItfs = new String[readUnsignedShort(u + 6)]; w = 0; u += 8; f... |
return new CheckAnnotationAdapter(mv.visitAnnotation(desc, visible)); | [BUG] None [CONTEXT] public AnnotationVisitor visitAnnotation( final String desc, final boolean visible) { checkEndMethod(); checkDesc(desc, false); <extra_id_0> } [METHOD] visitAnnotation |
double q2 = a * q1 + b * q0; | [BUG] int q2 = a * q1 + b * q0; [CONTEXT] public double evaluate(double x, double epsilon, int maxIterations) throws MathException { double p0 = 1.0; double p1 = getA(0, x); double q0 = 0.0; double q1 = 1.0; double c = p1 / q1; int n = 0; double relativeError = Double.MAX_VALUE; while(n < maxIterations && relativeError... |
double barX1 = barX0 + seriesBarWidth; | [BUG] double barX1 = seriesBarWidth + barX0; [CONTEXT] int numSeries = dataset.getSeriesCount(); double seriesBarWidth = intervalW / numSeries;// may be negative Rectangle2D bar = null; if(orientation == PlotOrientation.HORIZONTAL) { double barY0 = baseX +(seriesBarWidth * series); double barY1 = barY0 + seriesBarWidth... |
return(value != null)? value : defaultValue; | [BUG] return(defaultValue != null) ? value : value; [CONTEXT] public String getValue(String defaultValue) { String value = getValue(); <extra_id_0> } [METHOD] getValue |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.