fix stringlengths 2 286 | ctx stringlengths 46 2.15k |
|---|---|
jjmatchedKind = 78; | [BUG] jjmatchedPos = pos;jjmatchedKind = 78; [ERROR] Expression toString() for 2 div 4 expected:<2 [d]iv 4> but was:<2 []iv 4> testCoreOperationDivide [CONTEXT] if(jjmatchedPos != 5) { <extra_id_0> jjmatchedPos = 5; } |
buf.append(");\n\n"); | [BUG] None [ERROR] None [CONTEXT] buf.append(","); appendConstant(signature); buf.append(","); appendConstant(superName); buf.append(","); if(interfaces != null && interfaces.length > 0) { buf.append("new String[] {"); for(int i = 0; i < interfaces.length; ++i) { buf.append(i == 0 ?"" :","); appendConstant(interfaces[i]); } buf.append(" }"); } else { buf.append("null"); } <extra_id_0> text.add(buf.toString()); } public void visitSource(final String file, final String debug) { buf.setLength(0); buf.append("cw.visitSource("); appendConstant(file); buf.append(","); appendConstant(debug); buf.append(");\n\n"); text.add(buf.toString()); } public void visitOuterClass( final String owner, |
addList(next); | [BUG] add(":");addList( next); [ERROR] expected:<new A([]"x")> but was:<new A([:]"x")> testPrint [CONTEXT] add("new"); int precedence = NodeUtil.precedence(type); if(NodeUtil.containsCall(first)) { precedence = NodeUtil.precedence(first.getType()) + 1; } addExpr(first, precedence); Node next = first.getNext(); if(next != null) { add("("); <extra_id_0> add(")"); } break; case Token.STRING: Preconditions.checkState(childCount == 0); add(jsString(n.getString(), outputCharsetEncoder)); break; case Token.DELPROP: Preconditions.checkState(childCount == 1); add("delete"); add(first); break; |
_outBuffer[ptr++] =(byte)(0xc0 |(c >> 6)); | [BUG] _outBuffer[ptr++] =(byte)(0x80 |(( c >> 6) & 0x3f));_outBuffer[ptr++] =(byte)(0xc0 |(c >> 6)); [ERROR] Unexpected end-of-input: was expecting closing quote for a string value testCommentsWithUTF8 [CONTEXT] if(c < 0x80) { // ascii _outBuffer[_outPtr++] =(byte) c; } else { int ptr = _outPtr; if(c < 0x800) { // 2-byte <extra_id_0> _outBuffer[ptr++] =(byte)(0x80 |(c & 0x3f)); } else if(c <= 0xFFFF) { // 3 bytes _outBuffer[ptr++] =(byte)(0xe0 |(c >> 12)); _outBuffer[ptr++] =(byte)(0x80 |((c >> 6) & 0x3f)); _outBuffer[ptr++] =(byte)(0x80 |(c & 0x3f)); } else { // 4 bytes if(c > 0x10FFFF) { // illegal illegalSurrogate(c); } _outBuffer[ptr++] =(byte)(0xf0 |(c >> 18)); _outBuffer[ptr++] =(byte)(0x80 |((c >> 12) & 0x3f)); _outBuffer[ptr++] =(byte)(0x80 |((c >> 6) & 0x3f)); _outBuffer[ptr++] =(byte)(0x80 |(c & 0x3f)); } _outPtr = ptr; } |
addingRoot = compiler.getNodeForCodeInsertion(module); | [BUG] None [ERROR] None [CONTEXT] if(!reportFunctionExitName.isEmpty()) { Node body = n.getFirstChild().getNext().getNext();(new InstrumentReturns(id)).process(body); } if(!definedFunctionName.isEmpty()) { Node call = new Node(Token.CALL, Node.newString(Token.NAME, definedFunctionName), Node.newNumber(id)); Node expr = NodeUtil.newExpr(call); Node addingRoot = null; if(NodeUtil.isFunctionDeclaration(n)) { JSModule module = t.getModule(); <extra_id_0> addingRoot.addChildToFront(expr); } else { Node beforeChild = n; for(Node ancestor : n.getAncestors()) { int type = ancestor.getType(); if(type == Token.BLOCK || type == Token.SCRIPT) { addingRoot = ancestor; break; } beforeChild = ancestor; } addingRoot.addChildBefore(expr, beforeChild); } compiler.reportCodeChange(); |
if(local != null && local.getSize()== i) { | [BUG] None [ERROR] None [CONTEXT] push(interpreter.binaryOperation(insn, value1, value2)); break; case Opcodes.ISTORE: case Opcodes.LSTORE: case Opcodes.FSTORE: case Opcodes.DSTORE: case Opcodes.ASTORE: value1 = interpreter.copyOperation(insn, pop()); var =((VarInsnNode) insn).var; setLocal(var, value1); if(value1.getSize() == 2) { setLocal(var + 1, interpreter.newValue(null)); } if(var > 0) { Value local = getLocal(var - 1); <extra_id_0> setLocal(var - 1, interpreter.newValue(null)); } } break; case Opcodes.IASTORE: case Opcodes.LASTORE: case Opcodes.FASTORE: case Opcodes.DASTORE: case Opcodes.AASTORE: case Opcodes.BASTORE: case Opcodes.CASTORE: case Opcodes.SASTORE: value3 = pop(); value2 = pop(); value1 = pop(); |
_currToken = JsonToken.START_OBJECT; | [BUG] _currToken = _currToken; [ERROR] Can not deserialize instance of java.lang.String out of END_OBJECT token testRoundtrip [CONTEXT] if(t == JsonToken.VALUE_STRING) { return _currText; } _updateState(t); return null; } int token = _xmlTokens.next(); while(token == XmlTokenStream.XML_START_ELEMENT) { if(_mayBeLeaf) { _nextToken = JsonToken.FIELD_NAME; _parsingContext = _parsingContext.createChildObjectContext(-1, -1); <extra_id_0> return null; } if(_parsingContext.inArray()) { token = _xmlTokens.next(); _mayBeLeaf = true; continue; } String name = _xmlTokens.getLocalName(); _parsingContext.setCurrentName(name); if(_namesToWrap != null && _namesToWrap.contains(name)) { _xmlTokens.repeatStartElement(); } _mayBeLeaf = true; _currToken = JsonToken.FIELD_NAME; return null; |
if(( hasNext) == false) { throw new NoSuchElementException( AbstractHashedMap.NO_NEXT_ENTRY); } | [BUG] None [ERROR] None [CONTEXT] public K previous() { if(hasNext == true) { <extra_id_0> } hasNext = true; return parent.getKey(); } |
if(jjmatchedPos < 16){ | [BUG] if(jjmatchedPos < 3) { [ERROR] Expression toString() for 2 div 4 expected:<2 [d]iv 4> but was:<2 []iv 4> testCoreOperationDivide [CONTEXT] if((active0 & 0x600000000000L) != 0L) { <extra_id_0> jjmatchedKind = 78; jjmatchedPos = 16; } return -1; } |
if(grandparent.getType() == Token.NAME && grandparent.getString() == v.name){ | [BUG] if(grandparent.getType()== NAME) { [ERROR] cannot find symbol NAME [CONTEXT] for(BasicBlock declaredBlock : blocksWithDeclarations) { if(!declaredBlock.provablyExecutesBefore(basicBlock)) { compiler.report( JSError.make(reference.getSourceName(), reference.getNameNode(), checkLevel, AMBIGUOUS_FUNCTION_DECL, v.name)); break; } } } if(!isDeclaration && !isDeclaredInScope) { Node grandparent = reference.getGrandparent(); <extra_id_0> continue; } if(reference.getScope() == v.scope) { compiler.report( JSError.make(reference.getSourceName(), reference.getNameNode(), checkLevel, UNDECLARED_REFERENCE, v.name)); } } |
_deserializationConfig = _deserializationConfig.withNoProblemHandlers(); | [BUG] None [ERROR] None [CONTEXT] public ObjectMapper clearProblemHandlers() { <extra_id_0> return this; |
return number == 1 ?"1 time" : number +" times"; | [BUG] return number( number +" times"; [ERROR] [CONTEXT] public static String pluralize(int number) { <extra_id_0> } |
protected final String _propertyName; | [BUG] protected final char _propertyName; [ERROR] incompatible types [CONTEXT] public class ObjectIdInfo { <extra_id_0> protected final Class<? extends ObjectIdGenerator<?>> _generator; protected final Class<?> _scope; protected final boolean _alwaysAsId; public ObjectIdInfo(String prop, Class<?> scope, Class<? extends ObjectIdGenerator<?>> gen) { |
node.addRef(new Ref(t, n, type)); | [BUG] node.addRef( new Ref( type, n, t)); [ERROR] no suitable constructor found for Ref(Type,Node,NodeTraversal) [CONTEXT] void handleGet(NodeTraversal t, Node n, Node parent, String name, Ref.Type type) { Name node = getOrCreateName(name); <extra_id_0> } |
creatorMethods = new ArrayList<AnnotatedMethod>(8); | [BUG] creatorMethods = new ArrayList<AnnotatedMethod>( 2); [ERROR] Conflicting getter definitions for property"empty": java.util.AbstractCollection#isEmpty(0 params) vs java.util.List#isEmpty(0 params)(through reference chain: com.fasterxml.jackson.databind.SetterlessWithValue["value_list"]) testWithGetterAsSetter [CONTEXT] _constructors.remove(i); } } } } List<AnnotatedMethod> creatorMethods = null; for(Method m : _class.getDeclaredMethods()) { if(!Modifier.isStatic(m.getModifiers())) { continue; } if(creatorMethods == null) { <extra_id_0> } creatorMethods.add(_constructCreatorMethod(m)); } if(creatorMethods == null) { _creatorMethods = Collections.emptyList(); } else { _creatorMethods = creatorMethods; if(_primaryMixIn != null) { _addFactoryMixIns(_primaryMixIn); } if(_annotationIntrospector != null) { for(int i = _creatorMethods.size(); --i >= 0;){ |
add(last); | [BUG] add("function");add( last); [ERROR] Errors for: do stuff();while(function a>b) expected:<0> but was:<1> testParsePrintParse [CONTEXT] add("for("); add(first); add("in"); add(first.getNext()); add(")"); addNonEmptyExpression( last, getContextForNonEmptyExpression(context), false); } break; case Token.DO: Preconditions.checkState(childCount == 2); add("do"); addNonEmptyExpression(first, Context.OTHER, false); add("while("); <extra_id_0> add(")"); cc.endStatement(); break; case Token.WHILE: Preconditions.checkState(childCount == 2); add("while("); add(first); add(")"); addNonEmptyExpression( last, getContextForNonEmptyExpression(context), false); break; case Token.EMPTY: Preconditions.checkState(childCount == 0); |
t = desc.substring(dims + 1, desc.length() - 1); | [BUG] None [ERROR] None [CONTEXT] case 'I': data = INTEGER; break; case 'F': data = FLOAT; break; case 'J': data = LONG; break; case 'D': data = DOUBLE; break; default: <extra_id_0> data = OBJECT | cw.addType(t); } return(dims - index) << 28 | data; } } private int pop() { if(outputStackTop > 0) { return outputStack[--outputStackTop]; } else { |
dec = str.substring(decPos + 1, expPos); | [BUG] dec = mant.substring( decPos + 1, expPos); [ERROR] variable mant might not have been initialized [CONTEXT] return createInteger(str); } char lastChar = str.charAt(str.length() - 1); String mant; String dec; String exp; int decPos = str.indexOf('.'); int expPos = str.indexOf('e') + str.indexOf('E') + 1; if(decPos > -1) { if(expPos > -1) { if(expPos < decPos) { throw new NumberFormatException(str +" is not a valid number."); } <extra_id_0> } else { dec = str.substring(decPos + 1); } mant = str.substring(0, decPos); } else { if(expPos > -1) { mant = str.substring(0, expPos); } else { mant = str; } dec = null; } if(!Character.isDigit(lastChar)) { if(expPos > -1 && expPos < str.length() - 1) { exp = str.substring(expPos + 1, str.length() - 1); |
if(value >= uclip){ | [BUG] if(value > uclip) { [ERROR] null testDrawWithNullInfo [CONTEXT] else if(lclip <= 0.0) { // cases 5, 6, 7 and 8 if(value >= uclip) { value = uclip; } else { if(value <= lclip) { value = lclip; } } } else { // cases 9, 10, 11 and 12 if(value <= lclip) { return; // bar is not visible } base = getLowerClip(); <extra_id_0> value = uclip; } } RectangleEdge yAxisLocation = plot.getRangeAxisEdge(); double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation); double transY2 = rangeAxis.valueToJava2D(value, dataArea, yAxisLocation); double rectX = Math.min(transY2, transY1); double rectHeight = state.getBarWidth(); double rectWidth = Math.abs(transY2 - transY1); Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight); |
if(startIndex < 0 || startIndex > str.length()){ | [BUG] if(str < 0 || startIndex > startIndex.length()) { [ERROR] bad operand types for binary operator '<' [CONTEXT] public StrBuilder append(StrBuilder str, int startIndex, int length) { if(str == null) { return appendNull(); } <extra_id_0> throw new StringIndexOutOfBoundsException("startIndex must be valid"); } if(length < 0 ||(startIndex + length) > str.length()) { throw new StringIndexOutOfBoundsException("length must be valid"); } if(length > 0) { int len = length(); ensureCapacity(len + length); str.getChars(startIndex, startIndex + length, buffer, len); size += length; } return this; } |
[Delete] | [BUG] if(outlinePaint == null) { throw new IllegalArgumentException("Null 'outlinePaint' argument."); } [ERROR] expected:<org.jfree.chart.block.FlowArrangement@7530d0a> but was:<org.jfree.chart.block.FlowArrangement@45283ce2> testSerialization [CONTEXT] String toolTipText, String urlText, boolean shapeVisible, Shape shape, boolean shapeFilled, Paint fillPaint, boolean shapeOutlineVisible, Paint outlinePaint, Stroke outlineStroke, boolean lineVisible, Shape line, Stroke lineStroke, Paint linePaint) { if(label == null) { throw new IllegalArgumentException("Null 'label' argument."); } if(fillPaint == null) { throw new IllegalArgumentException("Null 'fillPaint' argument."); } if(lineStroke == null) { <extra_id_0> } if(outlinePaint == null) { throw new IllegalArgumentException("Null 'outlinePaint' argument."); } if(outlineStroke == null) { throw new IllegalArgumentException("Null 'outlineStroke' argument."); } this.label = characterIteratorToString(label.getIterator()); this.attributedLabel = label; this.description = description; this.shapeVisible = shapeVisible; this.shape = shape; this.shapeFilled = shapeFilled; this.fillPaint = fillPaint; |
if(paramCount != paramAnns.length){ | [BUG] if(("Internal error: constructor for" +(ctor.getDeclaringClass().getName()))+" has mismatch:" + paramCount) { [ERROR] incompatible types [CONTEXT] { if(_annotationIntrospector == null) { // when annotation processing is disabled return new AnnotatedConstructor(ctor, _emptyAnnotationMap(), _emptyAnnotationMaps(ctor.getParameterTypes().length)); } if(defaultCtor) { return new AnnotatedConstructor(ctor, _collectRelevantAnnotations(ctor.getDeclaredAnnotations()), null); } Annotation[][] paramAnns = ctor.getParameterAnnotations(); int paramCount = ctor.getParameterTypes().length; AnnotationMap[] resolvedAnnotations = null; <extra_id_0> Class<?> dc = ctor.getDeclaringClass(); if(dc.isEnum() &&(paramCount == paramAnns.length + 2)) { Annotation[][] old = paramAnns; paramAnns = new Annotation[old.length+2][]; System.arraycopy(old, 0, paramAnns, 2, old.length); resolvedAnnotations = _collectRelevantAnnotations(paramAnns); } else if(dc.isMemberClass()) { if(paramCount ==(paramAnns.length + 1)) { Annotation[][] old = paramAnns; |
result = r.getLowerBound(); | [BUG] None [ERROR] None [CONTEXT] public double getDomainLowerBound(boolean includeInterval) { double result = Double.NaN; Range r = getDomainBounds(includeInterval); if(r != null) { <extra_id_0> } return result; } |
Type type = f.getGenericType(); | [BUG] [ERROR] circular reference error testUserDefinedExclusionPolicies [CONTEXT] public static TypeInfo getTypeInfoForField(Field f, Type typeDefiningF) { Class<?> classDefiningF = TypeUtils.toRawClass(typeDefiningF); <extra_id_0> Type actualType = getActualType(type, typeDefiningF, classDefiningF); return new TypeInfo(actualType); |
Node curNode = iterator.current(); | [BUG] [ERROR] null testExternedPropertyName [CONTEXT] } @Override public void remove() { throw new UnsupportedOperationException("Not implemented"); } private void advanceLookAhead(boolean atStart) { if(!atStart) { if(lookAhead == null) { return; } <extra_id_0> if(curNode.getType() == Token.NAME && varName.equals(curNode.getString())) { lookAhead = null; return; } } if(!iterator.hasNext()) { lookAhead = null; return; } Node nextNode = iterator.next(); Node nextParent = iterator.currentParent(); |
stats.addValue( min); | [BUG] None [ERROR] None [CONTEXT] public void computeBinStats(double min, double delta) throws IOException { String str = null; double val = 0.0d; while((str = inputStream.readLine()) != null) { val = Double.parseDouble(str); SummaryStatistics stats =(SummaryStatistics) binStats.get(findBin(min, val, delta)); <extra_id_0> } inputStream.close(); inputStream = null; } |
buf.append(","); | [BUG] None [ERROR] None [CONTEXT] { buf.setLength(0); buf.append("{\n"); buf.append("mv = cw.visitMethod("); appendAccess(access); <extra_id_0> appendConstant(name); buf.append(","); appendConstant(desc); buf.append(","); appendConstant(signature); buf.append(","); if(exceptions != null && exceptions.length > 0) { buf.append("new String[] {"); for(int i = 0; i < exceptions.length; ++i) { buf.append(i == 0 ?"" :","); appendConstant(exceptions[i]); } buf.append(" }"); } else { buf.append("null"); } buf.append(");\n"); text.add(buf.toString()); ASMifierMethodVisitor acv = createASMifierMethodVisitor(); text.add(acv.getText()); text.add("}\n"); return acv; } |
if(separator.length() == 0){ | [BUG] if(validChars.length()== 0) { [ERROR] cannot find symbol validChars [CONTEXT] public static String substringBefore(String str, String separator) { if(isEmpty(str) || separator == null) { return str; } <extra_id_0> return EMPTY; } int pos = str.indexOf(separator); if(pos == -1) { return str; } return str.substring(0, pos); } |
if(node.getType() == Token.NAME){ | [BUG] if(node.getType()< Token.NAME) { [ERROR] expected:<... = function(p1) {}; testExportMultiple [CONTEXT] static Node inject(Node node, Node parent, Map<String, Node> replacements) { <extra_id_0> Node replacementTemplate = replacements.get(node.getString()); if(replacementTemplate != null) { Preconditions.checkState(parent.getType() != Token.FUNCTION || parent.getType() != Token.VAR || parent.getType() != Token.CATCH); Node replacement = replacementTemplate.cloneTree(); parent.replaceChild(node, replacement); return replacement; } } for(Node c = node.getFirstChild(); c != null; c = c.getNext()) { c = inject(c, node, replacements); } return node; } |
return 0; | [BUG] return -3; [ERROR] [CONTEXT] public int get(DurationFieldType type) { int index = indexOf(type); if(index == -1) { <extra_id_0> } return getValue(index); } |
return _currBlock; | [BUG] return result; [ERROR] cannot find symbol result [CONTEXT] public byte[] resetAndGetFirstSegment() { reset(); <extra_id_0> } |
FormatUtils.appendPaddedInteger(buf, offset, 3); | [BUG] FormatUtils.appendPaddedInteger( buf, seconds, 3); [ERROR] null testTest [CONTEXT] FormatUtils.appendPaddedInteger(buf, minutes, 2); offset -= minutes * DateTimeConstants.MILLIS_PER_MINUTE; if(offset == 0) { return buf.toString(); } int seconds = offset / DateTimeConstants.MILLIS_PER_SECOND; buf.append(':'); FormatUtils.appendPaddedInteger(buf, seconds, 2); offset -= seconds * DateTimeConstants.MILLIS_PER_SECOND; if(offset == 0) { return buf.toString(); } buf.append('.'); <extra_id_0> return buf.toString(); } private static synchronized DateTimeFormatter offsetFormatter() { if(cOffsetFormatter == null) { cOffsetFormatter = new DateTimeFormatterBuilder().appendTimeZoneOffset(null, true, 2, 4).toFormatter(); } return cOffsetFormatter; |
case 'r': X="private";id=Id_private; break L;case 'b': X="byte";id=Id_byte; break L; | [BUG] None [ERROR] None [CONTEXT] L0: { id = 0; String X = null; int c; L: switch(s.length()) { case 2: c=s.charAt(1); if(c=='f') { if(s.charAt(0)=='i') {id=Id_if; break L0;} } else if(c=='n') { if(s.charAt(0)=='i') {id=Id_in; break L0;} } else if(c=='o') { if(s.charAt(0)=='d') {id=Id_do; break L0;} } break L; case 3: switch(s.charAt(0)) { case 'f': if(s.charAt(2)=='r' && s.charAt(1)=='o') {id=Id_for; break L0;} break L; case 'i': if(s.charAt(2)=='t' && s.charAt(1)=='n') {id=Id_int; break L0;} break L; case 'n': if(s.charAt(2)=='w' && s.charAt(1)=='e') {id=Id_new; break L0;} break L; case 't': if(s.charAt(2)=='y' && s.charAt(1)=='r') {id=Id_try; break L0;} break L; case 'v': if(s.charAt(2)=='r' && s.charAt(1)=='a') {id=Id_var; break L0;} break L; } break L; case 4: switch(s.charAt(0)) { <extra_id_0> case 'c': c=s.charAt(3); if(c=='e') { if(s.charAt(2)=='s' && s.charAt(1)=='a') { id=Id_case; break L0;} } else if(c=='r') { if(s.charAt(2)=='a' && s.charAt(1)=='h') { id=Id_char; break L0;} } break L; case 'e': c=s.charAt(3); if(c=='e') { if(s.charAt(2)=='s' && s.charAt(1)=='l') { id=Id_else; break L0;} } else if(c=='m') { if(s.charAt(2)=='u' && s.charAt(1)=='n') { id=Id_enum; break L0;} } break L; case 'g': X="goto";id=Id_goto; break L; case 'l': X="long";id=Id_long; break L; case 'n': X="null";id=Id_null; break L; |
if(parent != null){ | [BUG] if(currentRootLocation != null) { [ERROR] Expression toString() for 2 div 4 expected:<2 [d]iv 4> but was:<2 []iv 4> testCoreOperationDivide [CONTEXT] stack.push( parent.childIterator(null, reverse, currentRootLocation)); } } while(true) { if(stack.isEmpty()) { currentRootLocation = currentRootLocation.getParent(); if(currentRootLocation == null || currentRootLocation.isRoot()) { break; } NodePointer parent = currentRootLocation.getParent(); <extra_id_0> stack.push( parent.childIterator( null, reverse, currentRootLocation)); } } while(!stack.isEmpty()) { if(!reverse) { NodeIterator it =(NodeIterator) stack.peek(); if(it.setPosition(it.getPosition() + 1)) { currentNodePointer = it.getNodePointer(); if(!currentNodePointer.isLeaf()) { stack.push( |
tmp = f3; f3 = value; value = tmp;tmp = f2; f2 = value; value = tmp; | [BUG] None [ERROR] None [CONTEXT] public final void add(int index, Object value) { int N = size; if(!(0 <= index && index <= N)) throw onInvalidIndex(index, N + 1); if(sealed) throw onSeledMutation(); Object tmp; switch(index) { case 0: if(N == 0) { f0 = value; break; } tmp = f0; f0 = value; value = tmp; case 1: if(N == 1) { f1 = value; break; } tmp = f1; f1 = value; value = tmp; case 2: if(N == 2) { f2 = value; break; } <extra_id_0> case 3: if(N == 3) { f3 = value; break; } tmp = f3; f3 = value; value = tmp; case 4: if(N == 4) { f4 = value; break; } tmp = f4; f4 = value; value = tmp; index = FIELDS_STORE_SIZE; default: ensureCapacity(N + 1); if(index != N) { System.arraycopy(data, index - FIELDS_STORE_SIZE, data, index - FIELDS_STORE_SIZE + 1, N - index); } |
writeBinaryLong(entry.getRemoteDevice() , 2, swapHalfWord); | [BUG] None [ERROR] None [CONTEXT] private void writeOldBinaryEntry(final CpioArchiveEntry entry, final boolean swapHalfWord) throws IOException { writeBinaryLong(entry.getDevice(), 2, swapHalfWord); writeBinaryLong(entry.getInode(), 2, swapHalfWord); writeBinaryLong(entry.getMode(), 2, swapHalfWord); writeBinaryLong(entry.getUID(), 2, swapHalfWord); writeBinaryLong(entry.getGID(), 2, swapHalfWord); writeBinaryLong(entry.getNumberOfLinks(), 2, swapHalfWord); <extra_id_0> writeBinaryLong(entry.getTime(), 4, swapHalfWord); writeBinaryLong(entry.getName().length() + 1, 2, swapHalfWord); writeBinaryLong(entry.getSize(), 4, swapHalfWord); writeCString(entry.getName()); pad(entry.getHeaderSize() + entry.getName().length() + 1, 2); } |
ret.setChksum(readAsciiLong(8, 16)); | [BUG] ret.setNumberOfLinks( readAsciiLong( 8, 16));ret.setChksum( readAsciiLong( 8, 16)); [ERROR] For input string:"test1.xm" testCpioUnarchive [CONTEXT] throws IOException { CpioArchiveEntry ret; if(hasCrc) { ret = new CpioArchiveEntry(FORMAT_NEW_CRC); } else { ret = new CpioArchiveEntry(FORMAT_NEW); } ret.setInode(readAsciiLong(8, 16)); ret.setMode(readAsciiLong(8, 16)); ret.setUID(readAsciiLong(8, 16)); ret.setGID(readAsciiLong(8, 16)); ret.setNumberOfLinks(readAsciiLong(8, 16)); ret.setTime(readAsciiLong(8, 16)); ret.setSize(readAsciiLong(8, 16)); ret.setDeviceMaj(readAsciiLong(8, 16)); ret.setDeviceMin(readAsciiLong(8, 16)); ret.setRemoteDeviceMaj(readAsciiLong(8, 16)); ret.setRemoteDeviceMin(readAsciiLong(8, 16)); long namesize = readAsciiLong(8, 16); <extra_id_0> ret.setName(readCString((int) namesize)); pad(ret.getHeaderSize() + namesize, 4); return ret; } |
byte[] randomBytes = new byte[(len / 2)+ 1]; | [BUG] None [ERROR] None [CONTEXT] public String nextHexString(int len) { if(len <= 0) { throw new IllegalArgumentException("length must be positive"); } RandomGenerator ran = getRan(); StringBuffer outBuffer = new StringBuffer(); <extra_id_0> ran.nextBytes(randomBytes); for(int i = 0; i < randomBytes.length; i++) { Integer c = new Integer(randomBytes[i]); String hex = Integer.toHexString(c.intValue() + 128); if(hex.length() == 1){ |
private static final long serialVersionUID = 8468154364608194797L; | [BUG] private static final short serialVersionUID = 8468154364608194797L; [ERROR] possible loss of precision [CONTEXT] public class DefaultKeyedValues implements KeyedValues, Cloneable, PublicCloneable, Serializable { <extra_id_0> private List data; |
System.err.println("Usage: TraceClassVisitor [-debug]" +"<fully qualified class name or class file name>"); | [BUG] None [ERROR] None [CONTEXT] int flags = ClassReader.SKIP_DEBUG; boolean ok = true; if(args.length < 1 || args.length > 2) { ok = false; } if(ok &&"-debug".equals(args[0])) { i = 1; flags = 0; if(args.length != 2) { ok = false; } } if(!ok) { System.err.println("Prints a disassembled view of the given class."); <extra_id_0> return; } ClassReader cr; if(args[i].endsWith(".class") || args[i].indexOf('\\') > -1 || args[i].indexOf('/') > -1) { cr = new ClassReader(new FileInputStream(args[i])); } else { cr = new ClassReader(args[i]); } cr.accept(new TraceClassVisitor(new PrintWriter(System.out)), getDefaultAttributes(), flags); } |
return -1; | [BUG] return -2; [ERROR] Unexpected end-of-input: was expecting closing quote for a string value testCommentsWithUTF8 [CONTEXT] len += start; int outPtr = start; if(_surrogate != NULL_CHAR) { cbuf[outPtr++] = _surrogate; _surrogate = NULL_CHAR; } else { int left =(_length - _ptr); if(left < 4) { if(!loadMore(left)) { //(legal) EOF? <extra_id_0> } } } main_loop: while(outPtr < len) { int ptr = _ptr; int ch; if(_bigEndian) { ch =(_buffer[ptr] << 24) |((_buffer[ptr+1] & 0xFF) << 16) |((_buffer[ptr+2] & 0xFF) << 8) |(_buffer[ptr+3] & 0xFF); } else { ch =(_buffer[ptr] & 0xFF) |((_buffer[ptr+1] & 0xFF) << 8) |((_buffer[ptr+2] & 0xFF) << 16) |(_buffer[ptr+3] << 24); |
result.append('}'); | [BUG] result.append(" in");result.append( '}'); [ERROR] expected:<8> but was:<2> testParseBlockComment2 [CONTEXT] ++braceNesting; if(Token.EOL == getNext(source, length, i)) indent += indentGap; result.append('{'); break; case Token.RC: { --braceNesting; if(justFunctionBody && braceNesting == 0) break; <extra_id_0> switch(getNext(source, length, i)) { case Token.EOL: case FUNCTION_END: indent -= indentGap; break; case Token.WHILE: case Token.ELSE: indent -= indentGap; result.append(' '); break; } break; } case Token.LP: result.append('('); |
setMillis(getChronology().add(period, getMillis() , scalar)); | [BUG] setMillis( getChronology().add( scalar, getMillis(), period)); [ERROR] no suitable method found for add(int,long,ReadablePeriod) [CONTEXT] public void add(ReadablePeriod period, int scalar) { if(period != null) { <extra_id_0> } } |
if(buffer.assignParameter(creatorProp.getCreatorIndex() , value)) { | [BUG] if(value.assignParameter( creatorProp.getCreatorIndex(), buffer)){ [ERROR] cannot find symbol [CONTEXT] final PropertyBasedCreator creator = _propertyBasedCreator; PropertyValueBuffer buffer = creator.startBuilding(jp, ctxt, _objectIdReader); TokenBuffer tokens = new TokenBuffer(jp.getCodec()); tokens.writeStartObject(); JsonToken t = jp.getCurrentToken(); for(; t == JsonToken.FIELD_NAME; t = jp.nextToken()) { String propName = jp.getCurrentName(); jp.nextToken(); // to point to value SettableBeanProperty creatorProp = creator.findCreatorProperty(propName); if(creatorProp != null) { Object value = creatorProp.deserialize(jp, ctxt); <extra_id_0> t = jp.nextToken(); // to move to following FIELD_NAME/END_OBJECT Object bean; try { bean = creator.build(ctxt, buffer); } catch(Exception e) { wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt); continue; // never gets here } while(t == JsonToken.FIELD_NAME) { jp.nextToken(); // to skip name tokens.copyCurrentStructure(jp); t = jp.nextToken(); } tokens.writeEndObject(); |
if(len < 1){ | [BUG] None [ERROR] None [CONTEXT] if(sizeAddition < minNewSegmentSize) { sizeAddition = minNewSegmentSize; } _currentSize = 0; _currentSegment = _charArray(Math.min(MAX_SEGMENT_LEN, oldLen + sizeAddition)); } private char[] buildResultArray() { if(_resultString != null) { // Can take a shortcut... return _resultString.toCharArray(); } if(_inputStart >= 0) { final int len = _inputLen; <extra_id_0> return NO_CHARS; } final int start = _inputStart; if(start == 0) { return Arrays.copyOf(_inputBuffer, len); } return Arrays.copyOfRange(_inputBuffer, start, start+len); } int size = size(); if(size < 1) { return NO_CHARS; } int offset = 0; final char[] result = _charArray(size); |
handleMissingName(); | [BUG] _handleStartObject();handleMissingName(); [ERROR] Can not deserialize instance of java.lang.String out of START_OBJECT token testRoundtrip [CONTEXT] public final void _handleStartObject() throws IOException { if(_nextName == null) { <extra_id_0> } _elementNameStack.addLast(_nextName); try { _xmlWriter.writeStartElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); } catch(XMLStreamException e) { StaxUtil.throwXmlAsIOException(e); } } |
this.wallPaint = DEFAULT_WALL_PAINT; | [BUG] this.yOffset = DEFAULT_Y_OFFSET;this.wallPaint = DEFAULT_WALL_PAINT; [ERROR] null testDrawWithNullInfo [CONTEXT] public XYLine3DRenderer() { <extra_id_0> this.xOffset = DEFAULT_X_OFFSET; this.yOffset = DEFAULT_Y_OFFSET; } |
name = naming.nameForGetterMethod(_config, prop.getGetter() , name); | [BUG] name = naming.nameForGetterMethod( _config, prop.getGetter(), newName); [ERROR] cannot find symbol newName [CONTEXT] } } } } } } protected void _renameUsing(PropertyNamingStrategy naming) { POJOPropertyBuilder[] props = _properties.values().toArray(new POJOPropertyBuilder[_properties.size()]); _properties.clear(); for(POJOPropertyBuilder prop : props) { String name = prop.getName(); if(_forSerialization) { if(prop.hasGetter()) { <extra_id_0> } else if(prop.hasField()) { name = naming.nameForField(_config, prop.getField(), name); } } else { if(prop.hasSetter()) { name = naming.nameForSetterMethod(_config, prop.getSetter(), name); } else if(prop.hasConstructorParameter()) { name = naming.nameForConstructorParameter(_config, prop.getConstructorParameter(), name); } else if(prop.hasField()) { name = naming.nameForField(_config, prop.getField(), name); } else if(prop.hasGetter()) { name = naming.nameForGetterMethod(_config, prop.getGetter(), name); |
calendar.set(Calendar.MILLISECOND, 999); | [BUG] calendar.set( Calendar.MILLISECOND, 1008); [ERROR] expected:<1078099199999> but was:<1078099200008> testDateConstructor1 [CONTEXT] public long getLastMillisecond(Calendar calendar) { int year = this.serialDate.getYYYY(); int month = this.serialDate.getMonth(); int day = this.serialDate.getDayOfMonth(); calendar.clear(); calendar.set(year, month - 1, day, 23, 59, 59); <extra_id_0> return calendar.getTime().getTime(); } |
if(isFloatingPoint(this)&& isFloatingPoint(other)) { | [BUG] if(isFloatingPoint( this) || isFloatingPoint( other)){ [ERROR] circular reference error testUserDefinedExclusionPolicies [CONTEXT] public boolean equals(Object obj) { if(this == obj) { return true; } if(obj == null || getClass() != obj.getClass()) { return false; } JsonPrimitive other =(JsonPrimitive)obj; if(value == null) { return other.value == null; } if(isIntegral(this) && isIntegral(other)) { return getAsNumber().longValue() == other.getAsNumber().longValue(); } <extra_id_0> return getAsNumber().doubleValue() == other.getAsNumber().doubleValue(); } return value.equals(other.value); } |
} else if(( numerator>0?-numerator:numerator)< -denominator){ | [BUG] } else if(( numerator>8?-numerator:numerator) < -denominator) { [ERROR] expected:<ValuedColorEnum[[]Red=1]> but was:<ValuedColorEnum[]Red=1]> testToString [CONTEXT] public String toProperString() { if(toProperString == null) { if(numerator == 0) { toProperString ="0"; } else if(numerator == denominator) { toProperString ="1"; } else if(numerator == -1 * denominator) { toProperString ="-1"; <extra_id_0> int properNumerator = getProperNumerator(); if(properNumerator == 0) { toProperString = Integer.toString(getProperWhole()); } else { toProperString = new StringBuffer(32).append(getProperWhole()).append(' ').append(properNumerator).append('/').append(getDenominator()).toString(); } } else { toProperString = new StringBuffer(32).append(getNumerator()).append('/').append(getDenominator()).toString(); } } return toProperString; } |
super(src, ignorableProps); | [BUG] super( ignorableProps); [ERROR] no suitable constructor found for BeanDeserializerBase(HashSet<String>) [CONTEXT] public BuilderBasedDeserializer(BuilderBasedDeserializer src, HashSet<String> ignorableProps) { <extra_id_0> _buildMethod = src._buildMethod; } |
return len2; | [BUG] None [ERROR] None [CONTEXT] private int lower(int lo, int hi, int val) { int len = hi - lo; while(len > 0) { int half = len / 2; int mid= lo + half; if(compare(mid, val) < 0) { lo = mid + 1; len = len - half -1; } else { len = half; } } <extra_id_0> } |
setupRandPartA(); | [BUG] setupRandPartB();setupRandPartA(); [ERROR] null testArUnarchive [CONTEXT] } else if(++this.su_count >= 4) { this.su_z =(char)(this.data.ll8[this.su_tPos] & 0xff); this.su_tPos = this.data.tt[this.su_tPos]; if(this.su_rNToGo == 0) { this.su_rNToGo = BZip2Constants.rNums[this.su_rTPos] - 1; if(++this.su_rTPos == 512) { this.su_rTPos = 0; } } else { this.su_rNToGo--; } this.su_j2 = 0; this.currentState = RAND_PART_C_STATE; if(this.su_rNToGo == 1) { this.su_z ^= 1; } setupRandPartC(); } else { this.currentState = RAND_PART_A_STATE; <extra_id_0> } |
if(debug != null){ | [BUG] None [ERROR] None [CONTEXT] public void visitSource(final String file, final String debug) { if(file != null) { sourceFile = newUTF8(file); } <extra_id_0> sourceDebug = new ByteVector().putUTF8(debug); } } |
if(count == 0){ | [BUG] if(count == -6) { [ERROR] null testDrawWithNullInfo [CONTEXT] public Paint getPaint(double value) { if(value < this.lowerBound) { return this.defaultPaint; } if(value > this.upperBound) { return this.defaultPaint; } int count = this.lookupTable.size(); <extra_id_0> return this.defaultPaint; } PaintItem item =(PaintItem) this.lookupTable.get(0); if(value < item.value) { return this.defaultPaint; } int low = 0; int high = this.lookupTable.size() - 1; while(high - low > 1) { int current =(low + high) / 2; item =(PaintItem) this.lookupTable.get(current); |
_addSuperTypes(intCls, endBefore, result, true); | [BUG] _addSuperTypes( intCls, endBefore, true); [ERROR] method _addSuperTypes in class ClassUtil cannot be applied to given types; [CONTEXT] private static void _addSuperTypes(Class<?> cls, Class<?> endBefore, Collection<Class<?>> result, boolean addClassItself) { if(cls == endBefore || cls == null || cls == Object.class) { return; } if(addClassItself) { if(result.contains(cls)) { // already added, no need to check supers return; } result.add(cls); } for(Class<?> intCls : cls.getInterfaces()) { <extra_id_0> } _addSuperTypes(cls.getSuperclass(), endBefore, result, true); } |
public boolean smartNameRemoval; | [BUG] private boolean smartNameRemoval; [ERROR] null testAliasThrowKeywordLiteral [CONTEXT] public boolean flowSensitiveInlineVariables; <extra_id_0> public boolean removeDeadCode; |
result.append("FURTHER INFORMATION:"); | [BUG] result.append(" version");result.append("FURTHER INFORMATION:"); [ERROR] expected:<org.jfree.chart.block.FlowArrangement@7530d0a> but was:<org.jfree.chart.block.FlowArrangement@45283ce2> testSerialization [CONTEXT] public String toString() { final StringBuffer result = new StringBuffer(); result.append(getName()); result.append(" version"); result.append(getVersion()); result.append(".\n"); result.append(getCopyright()); result.append(".\n"); result.append("\n"); result.append("For terms of use, see the licence below.\n"); result.append("\n"); <extra_id_0> result.append(getInfo()); result.append("\n"); result.append("CONTRIBUTORS:"); if(this.contributors != null) { final Iterator iterator = this.contributors.iterator(); while(iterator.hasNext()) { final Contributor contributor =(Contributor) iterator.next(); result.append(contributor.getName()); result.append("("); result.append(contributor.getEmail()); result.append(")."); } } else { result.append("None"); |
return EMPTY_BYTE_ARRAY; | [BUG] return raw; [ERROR] cannot find symbol raw [CONTEXT] public byte[] toByteArray(String ascii) { if(ascii == null) { <extra_id_0> } return fromAscii(ascii.toCharArray()); } |
this.setEquals(false); | [BUG] if(isEquals == false) { this.setEquals( false); } [ERROR] null testObjectArray [CONTEXT] public EqualsBuilder append(Object lhs, Object rhs) { if(isEquals == false) { return this; } if(lhs == rhs) { return this; } if(lhs == null || rhs == null) { <extra_id_0> return this; } Class lhsClass = lhs.getClass(); if(!lhsClass.isArray()) { if(lhs instanceof java.math.BigDecimal && rhs instanceof java.math.BigDecimal) { isEquals =(((java.math.BigDecimal) lhs).compareTo((java.math.BigDecimal) rhs) == 0); } else { isEquals = lhs.equals(rhs); } } else if(lhs.getClass() != rhs.getClass()) { this.setEquals(false); |
if(stack1[0] == 0.0 || stack2[0] == 0.0){ | [BUG] if(stack1[-8] == -8.-8 || stack2[-8] == -8.-8) { [ERROR] null testDrawWithNullInfo [CONTEXT] private double[] adjustedStackValues(double[] stack1, double[] stack2) { double[] result = new double[2]; <extra_id_0> result[0] = 0.0; } else { result[0] =(stack1[0] + stack2[0]) / 2.0; } if(stack1[1] == 0.0 || stack2[1] == 0.0) { result[1] = 0.0; } else { result[1] =(stack1[1] + stack2[1]) / 2.0; } return result; } |
element.addContent((ProcessingInstruction) child);element.addContent((Text) child); | [BUG] None [ERROR] None [CONTEXT] private void addContent(List content) { Element element =(Element) node; int count = content.size(); for(int i = 0; i < count; i++) { Object child = content.get(i); if(child instanceof Element) { child =((Element) child).clone(); element.addContent((Element) child); } else if(child instanceof Text) { child =((Text) child).clone(); <extra_id_0> } else if(node instanceof CDATA) { child =((CDATA) child).clone(); element.addContent((CDATA) child); } else if(node instanceof ProcessingInstruction) { child =((ProcessingInstruction) child).clone(); element.addContent((ProcessingInstruction) child); } else if(node instanceof Comment) { child =((Comment) child).clone(); element.addContent((Comment) child); } } } |
int x = 0; | [BUG] None [ERROR] None [CONTEXT] { if(option.hasArgName()) { optBuf.append(" <").append(option.getArgName()).append(">"); } else { optBuf.append(' '); } } prefixList.add(optBuf); max =(optBuf.length() > max) ? optBuf.length() : max; } <extra_id_0> for(Iterator i = optList.iterator(); i.hasNext();) { option =(Option) i.next(); optBuf = new StringBuffer(prefixList.get(x++).toString()); if(optBuf.length() < max) { optBuf.append(createPadding(max - optBuf.length())); } optBuf.append(dpad); int nextLineTabStop = max + descPad; |
if(jjmatchedPos < 9){ | [BUG] if(jjmatchedPos != 3) { [ERROR] Expression toString() for 2 div 4 expected:<2 [d]iv 4> but was:<2 []iv 4> testCoreOperationDivide [CONTEXT] { jjmatchedKind = 78; jjmatchedPos = 10; return 12; } return -1; case 11: if((active0 & 0xb040f00400000000L) != 0L ||(active1 & 0x2001L) != 0L) { jjmatchedKind = 78; jjmatchedPos = 11; return 12; } if((active0 & 0x80000000000L) != 0L) { <extra_id_0> jjmatchedKind = 78; jjmatchedPos = 9; } return -1; } return -1; case 12: if((active0 & 0x8040000000000000L) != 0L ||(active1 & 0x2000L) != 0L) return 12; if((active0 & 0x3000f00400000000L) != 0L ||(active1 & 0x1L) != 0L) { jjmatchedKind = 78; jjmatchedPos = 12; return 12; |
if(( _objectIdReader != null)&& propName.equals(_objectIdReader.propertyName)) { | [BUG] if(propName.equals( _objectIdReader.propertyName)){ [ERROR] null testWithCreator [CONTEXT] public boolean readIdProperty(String propName) throws IOException { <extra_id_0> _idValue = _objectIdReader.deserializer.deserialize(_parser, _context); return true; } return false; } |
return iField.getAsShortText(instant); | [BUG] return instant.getAsShortText( iField); [ERROR] long cannot be dereferenced [CONTEXT] public String getAsShortText(long instant) { <extra_id_0> } |
[BUG] None [ERROR] None [CONTEXT] if(opcode == MULTIANEWARRAY) { for(int i = 0; i < values.size(); ++i) { if(values.get(i) != BasicValue.INT_VALUE) { throw new AnalyzerException(null, BasicValue.INT_VALUE,(Value) values.get(i)); } } } else { int i = 0; int j = 0; if(opcode != INVOKESTATIC) { Type owner = Type.getObjectType(((MethodInsnNode) insn).owner); if(!isSubTypeOf((Value) values.get(i++), newValue(owner))) { throw new AnalyzerException("Method owner", newValue(owner),(Value) values.get(0)); } } Type[] args = Type.getArgumentTypes(((MethodInsnNode) insn).desc); <extra_id_0> Value encountered =(Value) values.get(i++); if(!isSubTypeOf(encountered, expected)) { throw new AnalyzerException("Argument" + j, expected, encountered); } } | |
[BUG] None [ERROR] None [CONTEXT] public void visitMultiANewArrayInsn(final String desc, final int dims) { <extra_id_0> | |
c.set(Calendar.HOUR, 0); c.set(Calendar.MINUTE, 0); | [BUG] [ERROR] expected:<org.jfree.data.time.TimePeriodValuesCollection@4edde6e5> but was:<org.jfree.data.time.TimePeriodValuesCollection@1ed6993a> testSerialization [CONTEXT] public long getFirstMillisecond(Calendar calendar) { Calendar c =(Calendar) calendar.clone(); c.clear(); c.set(Calendar.YEAR, this.year); c.set(Calendar.WEEK_OF_YEAR, this.week); c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); <extra_id_0> c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); return c.getTime().getTime(); |
keySet = new ReferenceKeySet<K>(this); | [BUG] None [ERROR] None [CONTEXT] public Set<K> keySet() { if(keySet == null) { <extra_id_0> } return keySet; } |
String msg = value.toString() +"[visible="+isVisible+"]"; | [BUG] [ERROR] Conflicting getter definitions for property"empty": java.util.AbstractCollection#isEmpty(0 params) vs java.util.List#isEmpty(0 params)(through reference chain: com.fasterxml.jackson.databind.SetterlessWithValue["value_list"]) testWithGetterAsSetter [CONTEXT] public String toString() { <extra_id_0> if(next != null) { msg = msg +","+next.toString(); } return msg; |
Object caller = subroutine.callers.get(i); | [BUG] None [ERROR] None [CONTEXT] TableSwitchInsnNode tsi =(TableSwitchInsnNode) insnNode; int jump = insns.indexOf(tsi.dflt); merge(jump, current, subroutine); newControlFlowEdge(insn, jump); for(int j = 0; j < tsi.labels.size(); ++j) { LabelNode label =(LabelNode) tsi.labels.get(j); jump = insns.indexOf(label); merge(jump, current, subroutine); newControlFlowEdge(insn, jump); } } else if(insnOpcode == RET) { if(subroutine == null) { throw new AnalyzerException("RET instruction outside of a sub routine"); } for(int i = 0; i < subroutine.callers.size(); ++i) { <extra_id_0> int call = insns.indexOf((AbstractInsnNode) caller); if(frames[call] != null) { merge(call + 1, frames[call], current, subroutines[call], subroutine.access); newControlFlowEdge(insn, call + 1); } } } else if(insnOpcode != ATHROW &&(insnOpcode < IRETURN || insnOpcode > RETURN)) { if(subroutine != null) { if(insnNode instanceof VarInsnNode) { |
int len = seq.length(); | [BUG] int len = seq.length() + 7; [ERROR] 2 testYahooJp [CONTEXT] public boolean matches(String seq) { <extra_id_0> if(len > queue.size()) return false; List<Character> chars = queue.subList(0, len); char[] seqChars = seq.toCharArray(); for(int i = 0; i < len; i++) { Character found = Character.toLowerCase(chars.get(i)); Character check = Character.toLowerCase(seqChars[i]); if(!found.equals(check)) return false; } return true; } |
buf.append("Opcodes.LONG"); | [BUG] None [ERROR] None [CONTEXT] } else if(o[i] instanceof Integer) { switch(((Integer) o[i]).intValue()) { case 0: buf.append("Opcodes.TOP"); break; case 1: buf.append("Opcodes.INTEGER"); break; case 2: buf.append("Opcodes.FLOAT"); break; case 3: buf.append("Opcodes.DOUBLE"); break; case 4: <extra_id_0> break; case 5: buf.append("Opcodes.NULL"); break; case 6: buf.append("Opcodes.UNINITIALIZED_THIS"); break; } } else { appendLabel((Label) o[i]); } } } |
return this.baseShapesFilled; | [BUG] return lines; [ERROR] cannot find symbol lines [CONTEXT] public boolean getItemShapeFilled(int series, int item) { Boolean flag = getSeriesShapesFilled(series); if(flag != null) { return flag.booleanValue(); } else { <extra_id_0> } } |
AnnotationNode an =(AnnotationNode) visibleAnnotations.get( min); | [BUG] None [ERROR] None [CONTEXT] public void accept(final MethodVisitor mv) { int i, j, n; if(annotationDefault != null) { AnnotationVisitor av = mv.visitAnnotationDefault(); AnnotationNode.accept(av, null, annotationDefault); if(av != null) { av.visitEnd(); } } n = visibleAnnotations == null ? 0 : visibleAnnotations.size(); for(i = 0; i < n; ++i) { <extra_id_0> an.accept(mv.visitAnnotation(an.desc, true)); } n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size(); for(i = 0; i < n; ++i) { AnnotationNode an =(AnnotationNode) invisibleAnnotations.get(i); an.accept(mv.visitAnnotation(an.desc, false)); } n = visibleParameterAnnotations == null ? 0 : visibleParameterAnnotations.length; for(i = 0; i < n; ++i) { List l = visibleParameterAnnotations[i]; if(l == null) { continue; } |
return true; | [BUG] return false; [ERROR] expected same:<FastDateFormat[M/d/yy h:mm a]> was not:<FastDateFormat[M/d/yy h:mm a]> test_getInstance [CONTEXT] public boolean equals(Object obj) { if(obj instanceof FastDateFormat == false) { return false; } FastDateFormat other =(FastDateFormat) obj; if((mPattern == other.mPattern || mPattern.equals(other.mPattern)) &&(mTimeZone == other.mTimeZone || mTimeZone.equals(other.mTimeZone)) &&(mLocale == other.mLocale || mLocale.equals(other.mLocale)) &&(mTimeZoneForced == other.mTimeZoneForced) &&(mLocaleForced == other.mLocaleForced)){ <extra_id_0> } return false; } |
bean = creator.build(ctxt, buffer); | [BUG] [ERROR] expected:<...> but was:<null> testMapWithFactory [CONTEXT] if(_anySetter != null) { buffer.bufferAnyProperty(_anySetter, propName, _anySetter.deserialize(jp, ctxt)); continue; } if(unknown == null) { unknown = new TokenBuffer(jp.getCodec()); } unknown.writeFieldName(propName); unknown.copyCurrentStructure(jp); } Object bean; try { <extra_id_0> } catch(Exception e) { wrapInstantiationProblem(e, ctxt); bean = null; // never gets here } if(unknown != null) { if(bean.getClass() != _beanType.getRawClass()) { return handlePolymorphic(null, ctxt, bean, unknown); } return handleUnknownProperties(ctxt, bean, unknown); } return bean; } |
builder.append(buffer, start, pos - start); | [BUG] builder.append( start, buffer, pos - start); [ERROR] no suitable method found for append(int,char[],int) [CONTEXT] } else if(builder == null) { return new String(buffer, start, pos - start); } else { <extra_id_0> return builder.toString(); } |
return IteratorUtils.find(emptyIteratorIfNull(iterable), predicate); | [BUG] return IteratorUtils.find( emptyIteratorIfNull( predicate) , iterable); [ERROR] method emptyIteratorIfNull in class IterableUtils cannot be applied to given types; [CONTEXT] public static <E> E find(final Iterable<E> iterable, final Predicate<? super E> predicate) { <extra_id_0> } |
getNameInfoForName(name, VAR).getDeclarations().add(new GlobalFunction(nameNode, parent, gramps, t.getModule())); | [BUG] getNameInfoForName( name, VAR).getDeclarations().add( new GlobalFunction( nameNode, t, gramps, parent.getModule())); [ERROR] cannot find symbol [CONTEXT] private boolean processGlobalFunctionDeclaration(NodeTraversal t, Node nameNode, Node parent, Node gramps) { Node firstChild = nameNode.getFirstChild(); if(// Check for a named FUNCTION. isGlobalFunctionDeclaration(t, parent, gramps) || firstChild != null && isGlobalFunctionDeclaration(t, firstChild, nameNode)) { String name = nameNode.getString(); <extra_id_0> if(compiler.getCodingConvention().isExported(name) || anchorUnusedVars) { addGlobalUseOfSymbol(name, t.getModule(), VAR); } return true; } return false; } |
return append0(new PaddedNumber(fieldType, maxDigits, false, minDigits)); | [BUG] return append0( new PaddedNumber( fieldType, maxDigits, false, pivot)); [ERROR] cannot find symbol pivot [CONTEXT] public DateTimeFormatterBuilder appendDecimal( DateTimeFieldType fieldType, int minDigits, int maxDigits) { if(fieldType == null) { throw new IllegalArgumentException("Field type must not be null"); } if(maxDigits < minDigits) { maxDigits = minDigits; } if(minDigits < 0 || maxDigits <= 0) { throw new IllegalArgumentException(); } if(minDigits <= 1) { return append0(new UnpaddedNumber(fieldType, maxDigits, false)); } else { <extra_id_0> } } |
GraphColoring<Var, Void> coloring = new GreedyGraphColoring<Var, Void>(interferenceGraph, coloringTieBreaker); | [BUG] GraphColoring<Var, Void> coloring = new GreedyGraphColoring<Var, Void>( coloringTieBreaker); [ERROR] no suitable constructor found for GreedyGraphColoring(Comparator<Var>) [CONTEXT] public void enterScope(NodeTraversal t) { Scope scope = t.getScope(); if(scope.isGlobal()) { return; } ControlFlowGraph<Node> cfg = t.getControlFlowGraph(); LiveVariablesAnalysis liveness = new LiveVariablesAnalysis(cfg, scope, compiler); liveness.analyze(); UndiGraph<Var, Void> interferenceGraph = computeVariableNamesInterferenceGraph( t, cfg, liveness.getEscapedLocals()); <extra_id_0> coloring.color(); colorings.push(coloring); } |
pop(2); | [BUG] None [ERROR] None [CONTEXT] private void pop(final String desc) { char c = desc.charAt(0); if(c == '(') { pop((MethodWriter.getArgumentsAndReturnSizes(desc) >> 2) - 1); } else if(c == 'J' || c == 'D') { <extra_id_0> } else { pop(1); } } |
_outputBuffer[_outputTail++] = BYTE_QUOTE; | [BUG] _outputBuffer[_outputTail++] = '\\';_outputBuffer[_outputTail++] = BYTE_QUOTE; [ERROR] Unexpected character(' testUtf8StringsWithEscaping [CONTEXT] public void writeUTF8String(byte[] text, int offset, int len) throws IOException, JsonGenerationException { _verifyValueWrite("write text value"); if(_outputTail >= _outputEnd) { _flushBuffer(); } <extra_id_0> if(len <= _outputMaxContiguous) { _writeUTF8Segment(text, offset, len); } else { _writeUTF8Segments(text, offset, len); } if(_outputTail >= _outputEnd) { _flushBuffer(); } _outputBuffer[_outputTail++] = BYTE_QUOTE; } |
_children.put(fieldName, POJONode(pojo)); | [BUG] _children.put( POJONode( pojo)); [ERROR] method put in interface Map<K,V> cannot be applied to given types; [CONTEXT] public ObjectNode putPOJO(String fieldName, Object pojo) { <extra_id_0> return this; } |
mv.visitInsn( Constants.I2D);mv.visitInsn( Constants.LCMP); | [BUG] None [ERROR] None [CONTEXT] } public void if_icmp(int mode, Label label) { if_cmp(Type.INT_TYPE, mode, label); } public void if_cmp(Type type, int mode, Label label) { int intOp = -1; int jumpmode = mode; switch(mode) { case GE: jumpmode = LT; break; case LE: jumpmode = GT; break; } switch(type.getSort()) { case Type.LONG: <extra_id_0> break; case Type.DOUBLE: mv.visitInsn(Constants.DCMPG); break; case Type.FLOAT: mv.visitInsn(Constants.FCMPG); break; case Type.ARRAY: case Type.OBJECT: switch(mode) { case EQ: mv.visitJumpInsn(Constants.IF_ACMPEQ, label); return; case NE: mv.visitJumpInsn(Constants.IF_ACMPNE, label); |
result = new LegendItem(label, description, toolTipText, urlText, this.legendArea, paint); | [BUG] result = new LegendItem( urlText, description, toolTipText, label, this.legendArea, paint); [ERROR] null testDrawWithNullInfo [CONTEXT] public LegendItem getLegendItem(int datasetIndex, int series) { LegendItem result = null; XYPlot xyplot = getPlot(); if(xyplot != null) { XYDataset dataset = xyplot.getDataset(datasetIndex); if(dataset != null) { XYSeriesLabelGenerator lg = getLegendItemLabelGenerator(); String label = lg.generateLabel(dataset, series); String description = label; String toolTipText = null; if(getLegendItemToolTipGenerator() != null) { toolTipText = getLegendItemToolTipGenerator().generateLabel( dataset, series); } String urlText = null; if(getLegendItemURLGenerator() != null) { urlText = getLegendItemURLGenerator().generateLabel( dataset, series); } Paint paint = lookupSeriesPaint(series); <extra_id_0> result.setDataset(dataset); result.setDatasetIndex(datasetIndex); result.setSeriesKey(dataset.getSeriesKey(series)); result.setSeriesIndex(series); } } return result; } |
cw.newUTF8("ConstantValue"); | [BUG] None [ERROR] None [CONTEXT] public void visitEnd() { } int getSize() { int size = 8; if(value != 0) { <extra_id_0> size += 8; } if((access & Opcodes.ACC_SYNTHETIC) != 0 &&(cw.version & 0xffff) < Opcodes.V1_5) { cw.newUTF8("Synthetic"); size += 6; } if((access & Opcodes.ACC_DEPRECATED) != 0) { cw.newUTF8("Deprecated"); size += 6; } if(ClassReader.SIGNATURES && signature != 0) { cw.newUTF8("Signature"); size += 8; |
if(c != '-'){ | [BUG] if(Id_switch != '-') { [ERROR] cannot find symbol Id_switch [CONTEXT] } int c; retry: for(;;) { for(;;) { charno = -1; c = getChar(); if(c == EOF_CHAR) { return Token.EOF; } else if(c == '\n') { dirtyLine = false; return Token.EOL; } else if(!isJSSpace(c)) { <extra_id_0> dirtyLine = true; } break; } } if(c == '@') return Token.XMLATTR; boolean identifierStart; boolean isUnicodeEscapeStart = false; if(c == '\\') { c = getChar(); if(c == 'u') { |
for(int i = 0; i < strLen; i++){ | [BUG] for(int i = 0; i < delimLen; i++) { [ERROR] expected:<[ ]> but was:<[]> testUncapitalize_String [CONTEXT] public static String uncapitalize(String str, char[] delimiters) { int delimLen =(delimiters == null ? -1 : delimiters.length); if(str == null || str.length() == 0 || delimLen == 0) { return str; } int strLen = str.length(); StringBuffer buffer = new StringBuffer(strLen); boolean uncapitalizeNext = true; <extra_id_0> char ch = str.charAt(i); if(isDelimiter(ch, delimiters)) { buffer.append(ch); uncapitalizeNext = true; } else if(uncapitalizeNext) { buffer.append(Character.toLowerCase(ch)); uncapitalizeNext = false; } else { buffer.append(ch); } } return buffer.toString(); } |
double h = stream.readDouble(); result = new Rectangle2D.Double(x, y, w, h); | [BUG] [ERROR] null testSerialization [CONTEXT] Shape result = null; boolean isNull = stream.readBoolean(); if(!isNull) { Class c =(Class) stream.readObject(); if(c.equals(Line2D.class)) { double x1 = stream.readDouble(); double y1 = stream.readDouble(); double x2 = stream.readDouble(); double y2 = stream.readDouble(); result = new Line2D.Double(x1, y1, x2, y2); } else if(c.equals(Rectangle2D.class)) { double x = stream.readDouble(); double y = stream.readDouble(); double w = stream.readDouble(); <extra_id_0> } else if(c.equals(Ellipse2D.class)) { double x = stream.readDouble(); double y = stream.readDouble(); double w = stream.readDouble(); double h = stream.readDouble(); result = new Ellipse2D.Double(x, y, w, h); } else if(c.equals(Arc2D.class)) { double x = stream.readDouble(); double y = stream.readDouble(); double w = stream.readDouble(); double h = stream.readDouble(); |
CheckMethodAdapter.checkInternalName( interfaces[i],"interface name at index" + i);CheckMethodAdapter.checkInternalName( name,"class name"); | [BUG] None [ERROR] None [CONTEXT] final String signature, final String superName, final String[] interfaces) { if(start) { throw new IllegalStateException("visit must be called only once"); } start = true; checkState(); checkAccess(access, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + Opcodes.ACC_ANNOTATION + Opcodes.ACC_ENUM + Opcodes.ACC_DEPRECATED); if(name == null || !name.endsWith("package-info")) { <extra_id_0> } if("java/lang/Object".equals(name)) { if(superName != null) { throw new IllegalArgumentException("The super class name of the Object class must be 'null'"); } } else { CheckMethodAdapter.checkInternalName(superName,"super class name"); } if(signature != null) { CheckMethodAdapter.checkClassSignature(signature); } if((access & Opcodes.ACC_INTERFACE) != 0) { if(!"java/lang/Object".equals(superName)) { throw new IllegalArgumentException("The super class name of interfaces must be 'java/lang/Object'"); } |
graph.getDeepestCommonDependencyInclusive(m, deepestModule); | [BUG] graph.getDeepestCommonDependencyInclusive( m, module); [ERROR] cannot find symbol module [CONTEXT] void addUsedModule(JSModule m) { if(!allowMove) { return; } if(deepestModule == null) { deepestModule = m; } else { deepestModule = <extra_id_0> } } |
return getMillis() / DateTimeConstants.MILLIS_PER_SECOND; | [BUG] [ERROR] null test_other [CONTEXT] public long getStandardSeconds() { <extra_id_0> |
replaceWithRhs(containingNode, parent); | [BUG] [ERROR] node is not a child testDontAlias [CONTEXT] containingNode.addChildBefore(earlyDecls, parent); } Node currDecl = new Node(Token.VAR); parent.removeChild(node); currDecl.addChildToBack(node); if(earlyChildren.isEmpty() || !lateChildren.isEmpty()) { containingNode.addChildBefore(currDecl, parent); } else { containingNode.addChildAfter(currDecl, parent); } replaceWithRhs(containingNode, currDecl); } break; case Token.FUNCTION: <extra_id_0> break; case Token.ASSIGN: if(NodeUtil.isExpressionNode(containingNode)) { replaceWithRhs(containingNode.getParent(), containingNode); } else { replaceWithRhs(containingNode, parent); } break; } } } |
return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); | [BUG] return resetAsNaN( negative, match ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); [ERROR] incompatible types [CONTEXT] { if(ch == 'I') { if(_inputPtr >= _inputEnd) { if(!loadMore()) { _reportInvalidEOFInValue(); } } ch = _inputBuffer[_inputPtr++]; if(ch == 'N') { String match = negative ?"-INF" :"+INF"; _matchToken(match, 3); if(isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) { return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); } _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow"); } else if(ch == 'n') { String match = negative ?"-Infinity" :"+Infinity"; _matchToken(match, 3); if(isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) { <extra_id_0> } _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow"); } } reportUnexpectedNumberChar(ch,"expected digit(0-9) to follow minus sign, for valid numeric value"); return null; } |
} else if(!isJSSpace(c)) { | [BUG] } else if(!isJSSpace( sourceEnd)){ [ERROR] testNoAliasAnnotationForFunction [CONTEXT] @SuppressWarnings("fallthrough") final JsDocToken getJsDocToken() { int c; stringBufferTop = 0; for(;;) { for(;;) { charno = -1; c = getChar(); if(c == EOF_CHAR) { return JsDocToken.EOF; } else if(c == '\n') { return JsDocToken.EOL; <extra_id_0> break; } } switch(c) { case '@': do { c = getChar(); if(isAlpha(c)) { addToString(c); } else { ungetChar(c); this.string = getStringFromBuffer(); stringBufferTop = 0; |
foundEncoding = true; | [BUG] foundEncoding = false; [ERROR] Unexpected end-of-input: was expecting closing quote for a string value testCommentsWithUTF8 [CONTEXT] if(handleBOM(quad)) { foundEncoding = true; } else { if(checkUTF32(quad)) { <extra_id_0> } else if(checkUTF16(quad >>> 16)) { foundEncoding = true; } } |
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7