Dataset Viewer
Auto-converted to Parquet Duplicate
fix
stringlengths
2
286
ctx
stringlengths
47
2.13k
jjmatchedKind = 78;
[BUG] jjmatchedPos = pos;jjmatchedKind = 78; [CONTEXT] if(jjmatchedPos != 5) { <extra_id_0> jjmatchedPos = 5; } [METHOD] jjStopStringLiteralDfa_0
buf.append(");\n\n");
[BUG] 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, [METHOD] visit
addList(next);
[BUG] add(":");addList( next); [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; [METHOD] add
_outBuffer[ptr++] =(byte)(0xc0 |(c >> 6));
[BUG] _outBuffer[ptr++] =(byte)(0x80 |(( c >> 6) & 0x3f));_outBuffer[ptr++] =(byte)(0xc0 |(c >> 6)); [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; } [METHOD] write
addingRoot = compiler.getNodeForCodeInsertion(module);
[BUG] 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(); [METHOD] visit
if(local != null && local.getSize()== i) {
[BUG] 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(); [METHOD] execute
_currToken = JsonToken.START_OBJECT;
[BUG] _currToken = _currToken; [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; [METHOD] nextTextValue
if(( hasNext) == false) { throw new NoSuchElementException( AbstractHashedMap.NO_NEXT_ENTRY); }
[BUG] None [CONTEXT] public K previous() { if(hasNext == true) { <extra_id_0> } hasNext = true; return parent.getKey(); } [METHOD] previous
if(jjmatchedPos < 16){
[BUG] if(jjmatchedPos < 3) { [CONTEXT] if((active0 & 0x600000000000L) != 0L) { <extra_id_0> jjmatchedKind = 78; jjmatchedPos = 16; } return -1; } [METHOD] jjStopStringLiteralDfa_0
if(grandparent.getType() == Token.NAME && grandparent.getString() == v.name){
[BUG] if(grandparent.getType()== 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)); } } [METHOD] checkVar
_deserializationConfig = _deserializationConfig.withNoProblemHandlers();
[BUG] None [CONTEXT] public ObjectMapper clearProblemHandlers() { <extra_id_0> return this; [METHOD] clearProblemHandlers
return number == 1 ?"1 time" : number +" times";
[BUG] return number( number +" times"; [CONTEXT] public static String pluralize(int number) { <extra_id_0> } [METHOD] pluralize
protected final String _propertyName;
[BUG] protected final char _propertyName; [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) { [METHOD] None
node.addRef(new Ref(t, n, type));
[BUG] node.addRef( new Ref( type, n, t)); [CONTEXT] void handleGet(NodeTraversal t, Node n, Node parent, String name, Ref.Type type) { Name node = getOrCreateName(name); <extra_id_0> } [METHOD] handleGet
creatorMethods = new ArrayList<AnnotatedMethod>(8);
[BUG] creatorMethods = new ArrayList<AnnotatedMethod>( 2); [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;){ [METHOD] resolveCreators
add(last);
[BUG] add("function");add( last); [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); [METHOD] add
t = desc.substring(dims + 1, desc.length() - 1);
[BUG] 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 { [METHOD] type
dec = str.substring(decPos + 1, expPos);
[BUG] dec = mant.substring( decPos + 1, expPos); [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); [METHOD] createNumber
if(value >= uclip){
[BUG] if(value > uclip) { [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); [METHOD] drawHorizontalItem
if(startIndex < 0 || startIndex > str.length()){
[BUG] if(str < 0 || startIndex > startIndex.length()) { [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; } [METHOD] append
[Delete]
[BUG] if(outlinePaint == null) { throw new IllegalArgumentException("Null 'outlinePaint' argument."); } [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; [METHOD] <init>
if(paramCount != paramAnns.length){
[BUG] if(("Internal error: constructor for" +(ctor.getDeclaringClass().getName()))+" has mismatch:" + paramCount) { [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; [METHOD] _constructConstructor
result = r.getLowerBound();
[BUG] None [CONTEXT] public double getDomainLowerBound(boolean includeInterval) { double result = Double.NaN; Range r = getDomainBounds(includeInterval); if(r != null) { <extra_id_0> } return result; } [METHOD] getDomainLowerBound
Type type = f.getGenericType();
[BUG] [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); [METHOD] getTypeInfoForField
Node curNode = iterator.current();
[BUG] [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(); [METHOD] advanceLookAhead
stats.addValue( min);
[BUG] 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; } [METHOD] computeBinStats
buf.append(",");
[BUG] 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; } [METHOD] visitMethod
if(separator.length() == 0){
[BUG] if(validChars.length()== 0) { [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); } [METHOD] substringBefore
if(node.getType() == Token.NAME){
[BUG] if(node.getType()< Token.NAME) { [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; } [METHOD] inject
return 0;
[BUG] return -3; [CONTEXT] public int get(DurationFieldType type) { int index = indexOf(type); if(index == -1) { <extra_id_0> } return getValue(index); } [METHOD] get
return _currBlock;
[BUG] return result; [CONTEXT] public byte[] resetAndGetFirstSegment() { reset(); <extra_id_0> } [METHOD] resetAndGetFirstSegment
FormatUtils.appendPaddedInteger(buf, offset, 3);
[BUG] FormatUtils.appendPaddedInteger( buf, seconds, 3); [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; [METHOD] printOffset
case 'r': X="private";id=Id_private; break L;case 'b': X="byte";id=Id_byte; break L;
[BUG] 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; [METHOD] stringToKeyword
if(parent != null){
[BUG] if(currentRootLocation != null) { [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( [METHOD] nextNode
tmp = f3; f3 = value; value = tmp;tmp = f2; f2 = value; value = tmp;
[BUG] 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); } [METHOD] add
writeBinaryLong(entry.getRemoteDevice() , 2, swapHalfWord);
[BUG] 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); } [METHOD] writeOldBinaryEntry
ret.setChksum(readAsciiLong(8, 16));
[BUG] ret.setNumberOfLinks( readAsciiLong( 8, 16));ret.setChksum( readAsciiLong( 8, 16)); [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; } [METHOD] readNewEntry
byte[] randomBytes = new byte[(len / 2)+ 1];
[BUG] 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){ [METHOD] nextHexString
private static final long serialVersionUID = 8468154364608194797L;
[BUG] private static final short serialVersionUID = 8468154364608194797L; [CONTEXT] public class DefaultKeyedValues implements KeyedValues, Cloneable, PublicCloneable, Serializable { <extra_id_0> private List data; [METHOD] None
System.err.println("Usage: TraceClassVisitor [-debug]" +"<fully qualified class name or class file name>");
[BUG] 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); } [METHOD] main
return -1;
[BUG] return -2; [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); [METHOD] read
result.append('}');
[BUG] result.append(" in");result.append( '}'); [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('('); [METHOD] decompile
setMillis(getChronology().add(period, getMillis() , scalar));
[BUG] setMillis( getChronology().add( scalar, getMillis(), period)); [CONTEXT] public void add(ReadablePeriod period, int scalar) { if(period != null) { <extra_id_0> } } [METHOD] add
if(buffer.assignParameter(creatorProp.getCreatorIndex() , value)) {
[BUG] if(value.assignParameter( creatorProp.getCreatorIndex(), buffer)){ [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(); [METHOD] deserializeUsingPropertyBasedWithUnwrapped
if(len < 1){
[BUG] 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); [METHOD] buildResultArray
handleMissingName();
[BUG] _handleStartObject();handleMissingName(); [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); } } [METHOD] _handleStartObject
this.wallPaint = DEFAULT_WALL_PAINT;
[BUG] this.yOffset = DEFAULT_Y_OFFSET;this.wallPaint = DEFAULT_WALL_PAINT; [CONTEXT] public XYLine3DRenderer() { <extra_id_0> this.xOffset = DEFAULT_X_OFFSET; this.yOffset = DEFAULT_Y_OFFSET; } [METHOD] <init>
name = naming.nameForGetterMethod(_config, prop.getGetter() , name);
[BUG] name = naming.nameForGetterMethod( _config, prop.getGetter(), 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); [METHOD] _renameUsing
calendar.set(Calendar.MILLISECOND, 999);
[BUG] calendar.set( Calendar.MILLISECOND, 1008); [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(); } [METHOD] getLastMillisecond
if(isFloatingPoint(this)&& isFloatingPoint(other)) {
[BUG] if(isFloatingPoint( this) || isFloatingPoint( other)){ [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); } [METHOD] equals
} else if(( numerator>0?-numerator:numerator)< -denominator){
[BUG] } else if(( numerator>8?-numerator:numerator) < -denominator) { [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; } [METHOD] toProperString
super(src, ignorableProps);
[BUG] super( ignorableProps); [CONTEXT] public BuilderBasedDeserializer(BuilderBasedDeserializer src, HashSet<String> ignorableProps) { <extra_id_0> _buildMethod = src._buildMethod; } [METHOD] <init>
return len2;
[BUG] 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> } [METHOD] lower
setupRandPartA();
[BUG] setupRandPartB();setupRandPartA(); [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> } [METHOD] setupRandPartB
if(debug != null){
[BUG] 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); } } [METHOD] visitSource
if(count == 0){
[BUG] if(count == -6) { [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); [METHOD] getPaint
_addSuperTypes(intCls, endBefore, result, true);
[BUG] _addSuperTypes( intCls, endBefore, true); [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); } [METHOD] _addSuperTypes
public boolean smartNameRemoval;
[BUG] private boolean smartNameRemoval; [CONTEXT] public boolean flowSensitiveInlineVariables; <extra_id_0> public boolean removeDeadCode; [METHOD] None
result.append("FURTHER INFORMATION:");
[BUG] result.append(" version");result.append("FURTHER INFORMATION:"); [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"); [METHOD] toString
return EMPTY_BYTE_ARRAY;
[BUG] return raw; [CONTEXT] public byte[] toByteArray(String ascii) { if(ascii == null) { <extra_id_0> } return fromAscii(ascii.toCharArray()); } [METHOD] toByteArray
this.setEquals(false);
[BUG] if(isEquals == false) { this.setEquals( false); } [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); [METHOD] append
if(stack1[0] == 0.0 || stack2[0] == 0.0){
[BUG] if(stack1[-8] == -8.-8 || stack2[-8] == -8.-8) { [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; } [METHOD] adjustedStackValues
element.addContent((ProcessingInstruction) child);element.addContent((Text) child);
[BUG] 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); } } } [METHOD] addContent
int x = 0;
[BUG] 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; [METHOD] renderOptions
if(jjmatchedPos < 9){
[BUG] if(jjmatchedPos != 3) { [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; [METHOD] jjStopStringLiteralDfa_0
if(( _objectIdReader != null)&& propName.equals(_objectIdReader.propertyName)) {
[BUG] if(propName.equals( _objectIdReader.propertyName)){ [CONTEXT] public boolean readIdProperty(String propName) throws IOException { <extra_id_0> _idValue = _objectIdReader.deserializer.deserialize(_parser, _context); return true; } return false; } [METHOD] readIdProperty
return iField.getAsShortText(instant);
[BUG] return instant.getAsShortText( iField); [CONTEXT] public String getAsShortText(long instant) { <extra_id_0> } [METHOD] getAsShortText
[BUG] 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); } } [METHOD] naryOperation
[BUG] None [CONTEXT] public void visitMultiANewArrayInsn(final String desc, final int dims) { <extra_id_0> [METHOD] visitMultiANewArrayInsn
c.set(Calendar.HOUR, 0); c.set(Calendar.MINUTE, 0);
[BUG] [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(); [METHOD] getFirstMillisecond
keySet = new ReferenceKeySet<K>(this);
[BUG] None [CONTEXT] public Set<K> keySet() { if(keySet == null) { <extra_id_0> } return keySet; } [METHOD] keySet
String msg = value.toString() +"[visible="+isVisible+"]";
[BUG] [CONTEXT] public String toString() { <extra_id_0> if(next != null) { msg = msg +","+next.toString(); } return msg; [METHOD] toString
Object caller = subroutine.callers.get(i);
[BUG] 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) { [METHOD] analyze
int len = seq.length();
[BUG] int len = seq.length() + 7; [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; } [METHOD] matches
buf.append("Opcodes.LONG");
[BUG] 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]); } } } [METHOD] appendFrameTypes
return this.baseShapesFilled;
[BUG] return lines; [CONTEXT] public boolean getItemShapeFilled(int series, int item) { Boolean flag = getSeriesShapesFilled(series); if(flag != null) { return flag.booleanValue(); } else { <extra_id_0> } } [METHOD] getItemShapeFilled
AnnotationNode an =(AnnotationNode) visibleAnnotations.get( min);
[BUG] 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; } [METHOD] accept
return true;
[BUG] return false; [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; } [METHOD] equals
bean = creator.build(ctxt, buffer);
[BUG] [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; } [METHOD] _deserializeUsingPropertyBased
builder.append(buffer, start, pos - start);
[BUG] builder.append( start, buffer, pos - start); [CONTEXT] } else if(builder == null) { return new String(buffer, start, pos - start); } else { <extra_id_0> return builder.toString(); } [METHOD] nextLiteral
return IteratorUtils.find(emptyIteratorIfNull(iterable), predicate);
[BUG] return IteratorUtils.find( emptyIteratorIfNull( predicate) , iterable); [CONTEXT] public static <E> E find(final Iterable<E> iterable, final Predicate<? super E> predicate) { <extra_id_0> } [METHOD] find
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())); [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; } [METHOD] processGlobalFunctionDeclaration
return append0(new PaddedNumber(fieldType, maxDigits, false, minDigits));
[BUG] return append0( new PaddedNumber( fieldType, maxDigits, false, 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> } } [METHOD] appendDecimal
GraphColoring<Var, Void> coloring = new GreedyGraphColoring<Var, Void>(interferenceGraph, coloringTieBreaker);
[BUG] GraphColoring<Var, Void> coloring = new GreedyGraphColoring<Var, Void>( coloringTieBreaker); [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); } [METHOD] enterScope
pop(2);
[BUG] 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); } } [METHOD] pop
_outputBuffer[_outputTail++] = BYTE_QUOTE;
[BUG] _outputBuffer[_outputTail++] = '\\';_outputBuffer[_outputTail++] = BYTE_QUOTE; [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; } [METHOD] writeUTF8String
_children.put(fieldName, POJONode(pojo));
[BUG] _children.put( POJONode( pojo)); [CONTEXT] public ObjectNode putPOJO(String fieldName, Object pojo) { <extra_id_0> return this; } [METHOD] putPOJO
mv.visitInsn( Constants.I2D);mv.visitInsn( Constants.LCMP);
[BUG] 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); [METHOD] if_cmp
result = new LegendItem(label, description, toolTipText, urlText, this.legendArea, paint);
[BUG] result = new LegendItem( urlText, description, toolTipText, label, this.legendArea, paint); [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; } [METHOD] getLegendItem
cw.newUTF8("ConstantValue");
[BUG] 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; [METHOD] getSize
if(c != '-'){
[BUG] if(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') { [METHOD] getToken
for(int i = 0; i < strLen; i++){
[BUG] for(int i = 0; i < delimLen; i++) { [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(); } [METHOD] uncapitalize
double h = stream.readDouble(); result = new Rectangle2D.Double(x, y, w, h);
[BUG] [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(); [METHOD] readShape
CheckMethodAdapter.checkInternalName( interfaces[i],"interface name at index" + i);CheckMethodAdapter.checkInternalName( name,"class name");
[BUG] 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'"); } [METHOD] visit
graph.getDeepestCommonDependencyInclusive(m, deepestModule);
[BUG] graph.getDeepestCommonDependencyInclusive( m, module); [CONTEXT] void addUsedModule(JSModule m) { if(!allowMove) { return; } if(deepestModule == null) { deepestModule = m; } else { deepestModule = <extra_id_0> } } [METHOD] addUsedModule
return getMillis() / DateTimeConstants.MILLIS_PER_SECOND;
[BUG] [CONTEXT] public long getStandardSeconds() { <extra_id_0> [METHOD] getStandardSeconds
replaceWithRhs(containingNode, parent);
[BUG] [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; } } } [METHOD] remove
return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY);
[BUG] return resetAsNaN( negative, match ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); [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; } [METHOD] _handleInvalidNumberStart
} else if(!isJSSpace(c)) {
[BUG] } else if(!isJSSpace( sourceEnd)){ [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; [METHOD] getJsDocToken
foundEncoding = true;
[BUG] foundEncoding = false; [CONTEXT] if(handleBOM(quad)) { foundEncoding = true; } else { if(checkUTF32(quad)) { <extra_id_0> } else if(checkUTF16(quad >>> 16)) { foundEncoding = true; } } [METHOD] detectEncoding
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7