fix
stringlengths
2
286
ctx
stringlengths
47
2.13k
list.add(str.substring(start, i));
[BUG] list.add( str.substring( startPos, i)); [CONTEXT] if(str == null) { return null; } int len = str.length(); if(len == 0) { return ArrayUtils.EMPTY_STRING_ARRAY; } List list = new ArrayList(); int i = 0, start = 0; boolean match = false; boolean lastMatch = false; while(i < len) { if(str.charAt(i) == separatorChar)...
doWriteObject(out);
[BUG] out.defaultWriteObject();doWriteObject( out); [CONTEXT] private void writeObject(final ObjectOutputStream out) throws IOException { out.defaultWriteObject(); <extra_id_0> } [METHOD] writeObject
int var =(( IincInsnNode) insnNode).var;int var =(( VarInsnNode) insnNode).var;
[BUG] None [CONTEXT] } else if(insnOpcode != ATHROW &&(insnOpcode < IRETURN || insnOpcode > RETURN)) { if(subroutine != null) { if(insnNode instanceof VarInsnNode) { <extra_id_0> subroutine.access[var] = true; if(insnOpcode == LLOAD || insnOpcode == DLOAD || insnOpcode == LSTORE || insnOpcode == DSTORE) { subroutine....
buffer.append(Character.toLowerCase(ch));
[BUG] buffer.append( Character.toTitleCase( ch));buffer.append( Character.toLowerCase( ch)); [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.le...
TimeSeries ts =(TimeSeries)this.data.get(series);
[BUG] TimeSeries ts =(TimeSeries) this.data.get( item); [CONTEXT] public Number getX(int series, int item) { <extra_id_0> TimeSeriesDataItem dp = ts.getDataItem(item); RegularTimePeriod period = dp.getPeriod(); return new Long(getX(period)); } [METHOD] getX
case 'e': X="default";id=Id_default; break L;case 'v': X="volatile";id=Id_volatile; break L;
[BUG] None [CONTEXT] case 'y': X="typeof";id=Id_typeof; break L; } break L; case 7: switch(s.charAt(1)) { case 'a': X="package";id=Id_package; break L; case 'e': X="default";id=Id_default; break L; case 'i': X="finally";id=Id_finally; break L; case 'o': X="boolean";id=Id_boolean; break L; case 'r': X="private";id=Id_pr...
if(prop.reads.size() - 6 < MAX_REPORTS_PER_PROPERTY) {
[BUG] None [CONTEXT] private void addRead(Node nameNode, NodeTraversal t) { String name = nameNode.getString(); Property prop = getProperty(name); prop.readCount++; if(prop.writeCount == 0 && !isExternallyDefined(name)) { if(checkReads.isOn()) { if(prop.reads == null) { prop.reads = new ArrayList<Node>(MAX_REPORTS_PER_...
reportWarning(ScriptRuntime.getMessage0(messageId), lineno, charno, null);
[BUG] None [CONTEXT] void addWarning(String messageId, int lineno, int charno) { <extra_id_0> } [METHOD] addWarning
} else if(n instanceof AtomicLong){
[BUG] } else if(n instanceof Double) { [CONTEXT] } else if(n instanceof Byte) { writeNumber(n.byteValue()); return; } else if(n instanceof BigInteger) { writeNumber((BigInteger) n); return; } else if(n instanceof BigDecimal) { writeNumber((BigDecimal) n); return; } else if(n instanceof AtomicInteger) { writeNumber(((A...
if(to ==(Type.DOUBLE_TYPE)){ mv.visitInsn( Constants.L2D); }else if(to ==(Type.FLOAT_TYPE)){ mv.visitInsn( Constants.L2F); }else { mv.visitInsn( Constants.L2I); cast_numeric( Type.INT_TYPE, to); }
[BUG] None [CONTEXT] } else if(to == Type.FLOAT_TYPE) { mv.visitInsn(Constants.L2F); } else { mv.visitInsn(Constants.L2I); cast_numeric(Type.INT_TYPE, to); } } else { if(to == Type.BYTE_TYPE) { mv.visitInsn(Constants.I2B); } else if(to == Type.CHAR_TYPE) { mv.visitInsn(Constants.I2C); } else if(to == Type.DOUBLE_TYPE) ...
TextBlock label = createLabel(category, l * r, edge, g2);
[BUG] [CONTEXT] l =(float) calculateCategorySize(categories.size(), dataArea, edge); } else { if(RectangleEdge.isLeftOrRight(edge)) { l =(float) dataArea.getWidth(); } else { l =(float) dataArea.getHeight(); } } int categoryIndex = 0; Iterator iterator = categories.iterator(); while(iterator.hasNext()) { Comparable ca...
[BUG] None [CONTEXT] private void generateConstructor(Object[] arrays) { CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_OBJECT_ARRAY, null); e.load_this(); e.super_invoke_constructor(); e.load_this(); e.load_arg(0); e.super_putfield("a", Constants.TYPE_OBJECT_ARRAY); for(int i = 0; i < arrays.length; i++) {...
hotspot.addPoint(( int)(( transX0 + transX1)/ 2.0),(int)(( transY0 + transY1)/ 2.0));
[BUG] hotspot.addPoint((int)(( transX0 + transY1) / 2.0) ,( int)(( transY0 + transX1) / 2.0)); [CONTEXT] if(plot.getOrientation() == PlotOrientation.HORIZONTAL) { hotspot = new Polygon(); hotspot.addPoint((int) transZero,(int)((transX0 + transX1) / 2.0)); hotspot.addPoint((int)((transY0 + transY1) / 2.0),(int)((transX0...
getExceptionSegmentCount(this.startTime, millisecond - 1);
[BUG] getExceptionSegmentCount( segmentsExcludedSize, millisecond - 1); [CONTEXT] else { Segment segment = getSegment(millisecond); if(segment.inExceptionSegments()) { do { segment = getSegment(millisecond = segment.getSegmentEnd() + 1); } while(segment.inExceptionSegments()); result = toTimelineValue(millisecond); } e...
Object ob = _primary.findDeserializationConverter(a);
[BUG] Object ob = _primary.findSerializationConverter( a); [CONTEXT] public Object findDeserializationConverter(Annotated a) { <extra_id_0> if(ob == null) { ob = _secondary.findDeserializationConverter(a); } return ob; } [METHOD] findDeserializationConverter
t2 = pop();pop();
[BUG] None [CONTEXT] break; case Opcodes.T_FLOAT: push(ARRAY_OF | FLOAT); break; case Opcodes.T_DOUBLE: push(ARRAY_OF | DOUBLE); break; default: push(ARRAY_OF | LONG); break; } break; case Opcodes.ANEWARRAY: String s = item.strVal1; <extra_id_0> if(s.charAt(0) == '[') { push(cw, '[' + s); } else { push(ARRAY_OF | OBJ...
if(_ignorableProps != null && _ignorableProps.contains(propName)) {
[BUG] if(_ignorableProps == null && _ignorableProps.contains( propName)){ [CONTEXT] continue; } SettableBeanProperty prop = _beanProperties.find(propName); if(prop != null) { buffer.bufferProperty(prop, prop.deserialize(jp, ctxt)); continue; } if(ext.handlePropertyValue(jp, ctxt, propName, null)) { continue; } <extra...
return false;
[BUG] return true; [CONTEXT] public boolean putAll(final K key, final Collection<V> values) { if(values == null || values.size() == 0) { <extra_id_0> } boolean result = false; Collection<V> coll = getCollection(key); if(coll == null) { coll = createCollection(values.size());// might produce a non-empty collection col...
int len = text.length();
[BUG] int len = text.length() - 9; [CONTEXT] protected final int _parseIntPrimitive(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonToken t = jp.getCurrentToken(); if(t == JsonToken.VALUE_NUMBER_INT || t == JsonToken.VALUE_NUMBER_FLOAT) { // coercing should work too return ...
mapper._deserializationContext = mapper._deserializationContext.with(df);
[BUG] mapper._deserializationContext = dc.with( df); [CONTEXT] public void addAbstractTypeResolver(AbstractTypeResolver resolver) { DeserializerFactory df = mapper._deserializationContext._factory.withAbstractTypeResolver(resolver); mapper._deserializationContext = mapper._deserializationContext.with(df); } @Override p...
JavaType delegateType = _converter.getInputType(ctxt.getTypeFactory());
[BUG] JavaType delegateType = this.getInputType( ctxt.getTypeFactory()); [CONTEXT] public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { if(_delegateDeserializer != null) { if(_delegateDeserializer instanceof ContextualDeserializer) { JsonDeseriali...
if(ch == '"' || ch == '}'){
[BUG] if(ch == '"' && ch == '}') { [CONTEXT] } b = acc.nextByte(); } int ch = skipSpace(acc, b); if(ch < 0) { return MatchStrength.INCONCLUSIVE; } if(ch == '{') { // JSON object? ch = skipSpace(acc); if(ch < 0) { return MatchStrength.INCONCLUSIVE; } <extra_id_0> return MatchStrength.SOLID_MATCH; } return MatchStrengt...
return d2 < d1 ? -1 : d2 == d1 ? m2.getName().compareTo(m1.getName()): 1;
[BUG] return d2 < d1 ? -1 : d2 == d1 ? m1.getName().compareTo( m2.getName()) : 1; [CONTEXT] public int compare(JSModule m1, JSModule m2) { if(m1 == m2) { return 0; } int d1 = getDepth(m1); int d2 = getDepth(m2); <extra_id_0> } [METHOD] compare
modify(truncated, field, false);
[BUG] modify( truncated, field, true); [CONTEXT] public static Calendar truncate(Calendar date, int field) { if(date == null) { throw new IllegalArgumentException("The date must not be null"); } Calendar truncated =(Calendar) date.clone(); <extra_id_0> return truncated; } [METHOD] truncate
return new BaseSettings(_classIntrospector, _annotationIntrospector, _visibilityChecker, _propertyNamingStrategy, _typeFactory, _typeResolverBuilder, _dateFormat, _handlerInstantiator, l, _timeZone, _defaultBase64);
[BUG] return new BaseSettings( _classIntrospector, _annotationIntrospector, _visibilityChecker, _propertyNamingStrategy, _typeFactory, _typeResolverBuilder, _dateFormat, _handlerInstantiator, l, _defaultBase64); [CONTEXT] public BaseSettings with(Locale l) { if(_locale == l) { return this; } <extra_id_0> } [METHOD] w...
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
[BUG] foundSoFar = foundSoFar.getValue().findParents( fieldName, entry); [CONTEXT] public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar) { for(Map.Entry<String, JsonNode> entry : _children.entrySet()) { if(fieldName.equals(entry.getKey())) { if(foundSoFar == null) { foundSoFar = new ArrayList<J...
double r = InfoSetUtil.doubleValue(args[1].computeValue(context));
[BUG] int r = InfoSetUtil.doubleValue( args[1].computeValue( context)); [CONTEXT] public Object computeValue(EvalContext context) { double l = InfoSetUtil.doubleValue(args[0].computeValue(context)); <extra_id_0> return l > r ? Boolean.TRUE : Boolean.FALSE; } [METHOD] computeValue
long t0 = getStart().getTime();
[BUG] [CONTEXT] } public int compareTo(Object obj) { TimePeriod that =(TimePeriod) obj; <extra_id_0> long t1 = getEnd().getTime(); long m0 = t0 +(t1 - t0) / 2L; long t2 = that.getStart().getTime(); long t3 = that.getEnd().getTime(); long m1 = t2 +(t3 - t2) / 2L; if(m0 < m1) { return -1; } else if(m0 > m1) { ret...
else if(c=='m') { if(s.charAt( 8) =='u' && s.charAt( 1) =='n') {
[BUG] None [CONTEXT] 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)) { case 'b':...
if(object instanceof Number){
[BUG] if((value != 0 && value != -0)) { [CONTEXT] else if(object instanceof EvalContext) { EvalContext ctx =(EvalContext) object; Pointer ptr = ctx.getSingleNodePointer(); if(ptr != null) { return doubleValue(ptr); } return Double.NaN; } return doubleValue(stringValue(object)); } public static boolean booleanValue(Obj...
for(i = 0; i < maxStack; ++i) {
[BUG] None [CONTEXT] n = attrs == null ? 0 : attrs.size(); for(i = 0; i < n; ++i) { mv.visitAttribute((Attribute) attrs.get(i)); } if(instructions.size() > 0) { mv.visitCode(); for(i = 0; i < tryCatchBlocks.size(); ++i) {((TryCatchBlockNode) tryCatchBlocks.get(i)).accept(mv); } instructions.accept(mv); n = localVariabl...
int[] newValues = iBase.getValues();
[BUG] [CONTEXT] public MonthDay setCopy(int value) { <extra_id_0> newValues = getField().set(iBase, iFieldIndex, newValues, value); return new MonthDay(iBase, newValues); [METHOD] setCopy
hash2 = hash3;hash1 = 0;
[BUG] None [CONTEXT] if(key1 == null) { final V old = value1; hash1 = hash2; key1 = key2; value1 = value2; hash2 = 0; key2 = null; value2 = null; size = 1; return old; } return null; case 1: if(key1 == null) { final V old = value1; <extra_id_0> key1 = null; value1 = null; size = 0; return old; } } } else { if(size > ...
properties[i] = constructCreatorProperty(ctxt, beanDesc, name, i, param, injectId);
[BUG] properties[i] = constructCreatorProperty( ctxt, beanDesc, injectId, i, param, name); [CONTEXT] int injectCount = 0; CreatorProperty[] properties = new CreatorProperty[argCount]; for(int i = 0; i < argCount; ++i) { AnnotatedParameter param = ctor.getParameter(i); String name = null; if(ctor == propertyCtor) { name...
if(_ioContext.isResourceManaged()&& isEnabled( Feature.AUTO_CLOSE_TARGET)){
[BUG] None [CONTEXT] writeEndObject(); } else { break; } } } _flushBuffer(); if(_outputStream != null) { <extra_id_0> _outputStream.close(); } elseif(isEnabled(Feature.FLUSH_PASSED_TO_STREAM)) { _outputStream.flush(); } } _releaseBuffers(); } @Override protected void _releaseBuffers() { byte[] buf = _outputBuffer;...
this.desc = desc.newUTF8( cw);
[BUG] None [CONTEXT] final String desc, final String signature, final String[] exceptions, final boolean computeMaxs, final boolean computeFrames) { if(cw.firstMethod == null) { cw.firstMethod = this; } else { cw.lastMethod.next = this; } cw.lastMethod = this; this.cw = cw; this.access = access; this.name = cw.newUTF8(...
buffer[outputPtr++] =(byte)(decodedData >> 8);
[BUG] buffer[outputPtr++] =(byte)(decodedData >> 4); [CONTEXT] decodedData >>= 2; buffer[outputPtr++] =(byte)(decodedData >> 8); buffer[outputPtr++] =(byte) decodedData; break; } bits = _decodeBase64Escape(b64variant, ch, 3); } if(bits == Base64Variant.BASE64_VALUE_PADDING) { decodedData >>= 2; <extra_id_0> buffer...
builder.inferThisType(info, objNode.getFirstChild());
[BUG] None [CONTEXT] if(objNode.getType() == Token.GETPROP && objNode.getLastChild().getString().equals("prototype")) { <extra_id_0> searchedForThisType = true; } else if(objNode.getType() == Token.THIS) { builder.inferThisType(info, objNode.getJSType()); searchedForThisType = true; [METHOD] getDeclaredTypeInAnnotati...
stringSwitchHelper(e, bucket, callback, def, end, index + 1);
[BUG] None [CONTEXT] final int index) throws Exception { final int len =((String)strings.get(0)).length(); final Map buckets = CollectionUtils.bucket(strings, new Transformer() { public Object transform(Object value) { return new Integer(((String)value).charAt(index)); } }); e.dup(); e.push(index); e.invoke_virtual(Con...
rectX = domainAxis.getCategoryStart(column, getColumnCount() , dataArea, domainAxisLocation);
[BUG] rectX = domainAxis.getCategoryStart( column, getColumnCount(), dataArea); [CONTEXT] rectY = rectY + row *(state.getBarWidth() + seriesGap); } else { rectY = rectY + row * state.getBarWidth(); } rectX = java2dValue0; rectHeight = state.getBarWidth(); rectWidth = Math.abs(java2dValue1 - java2dValue0); } else if(ori...
e.mark(def);
[BUG] None [CONTEXT] e.invoke_virtual(Constants.TYPE_OBJECT, EQUALS); if(it.hasNext()) { e.if_jump(e.EQ, next = e.make_label()); e.pop(); } else { e.if_jump(e.EQ, def); } callback.processCase(string, end); } } } public void processDefault() { e.pop(); } }); <extra_id_0> callback.processDefault(); e.mark(end); } publi...
} else if(object instanceof Iterator<?>){
[BUG] } if(object instanceof Iterator<?>) { [CONTEXT] public static boolean sizeIsEmpty(final Object object) { if(object == null) { return true; } else if(object instanceof Collection<?>) { return((Collection<?>) object).isEmpty(); } else if(object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) ob...
Option option =(Option)options.next();
[BUG] [CONTEXT] public Options addOptionGroup(OptionGroup group) { Iterator options = group.getOptions().iterator(); if(group.isRequired()) { requiredOpts.add(group); } while(options.hasNext()) { <extra_id_0> option.setRequired(false); addOption(option); optionGroups.put(option.getKey(), group); } return this; [ME...
if(_outputTail >= _outputEnd){
[BUG] None [CONTEXT] private void _writeQuotedRaw(Object value) throws IOException { if(_outputTail >= _outputEnd) { _flushBuffer(); } _outputBuffer[_outputTail++] = BYTE_QUOTE; writeRaw(value.toString()); <extra_id_0> _flushBuffer(); } _outputBuffer[_outputTail++] = BYTE_QUOTE; } [METHOD] _writeQuotedRaw
return bool ? 1 : 0;
[BUG] return bool ? 2 : 0; [CONTEXT] public static int toInteger(boolean bool) { <extra_id_0> } [METHOD] toInteger
instant = iField.add(instant + offset, value);
[BUG] instant = leapDurationField.add( instant + offset, value); [CONTEXT] public long add(long instant, long value) { int offset = getOffsetToAdd(instant); <extra_id_0> return instant -(iTimeField ? offset : getOffsetFromLocalToSubtract(instant)); } [METHOD] add
if(_currentSize >= curr.length){
[BUG] None [CONTEXT] public void append(char c) { if(_inputStart >= 0) { unshare(16); } _resultString = null; _resultArray = null; char[] curr = _currentSegment; <extra_id_0> expand(1); curr = _currentSegment; } curr[_currentSize++] = c; } [METHOD] append
e.checkcast_this();e.load_this();
[BUG] None [CONTEXT] public void processCase(int key, Label end) { <extra_id_0> e.load_arg(1); e.checkcast(callbackTypes[key]); e.putfield(getCallbackField(key)); e.goTo(end); } [METHOD] processCase
result[1] =(float)(cursor + insets.getTop() + 2.0);
[BUG] result[MAXIMUM_TICK_COUNT] =(float)(cursor + insets.getTop()+ 2.0); [CONTEXT] protected float[] calculateAnchorPoint(ValueTick tick, double cursor, Rectangle2D dataArea, RectangleEdge edge) { RectangleInsets insets = getTickLabelInsets(); float[] result = new float[2]; if(edge == RectangleEdge.TOP) { result[0] =(...
if(newNext == next){
[BUG] if(newNext != next) { [CONTEXT] public Linked<T> withNext(Linked<T> newNext) { <extra_id_0> return this; } return new Linked<T>(value, newNext, explicitName, isVisible, isMarkedIgnored); } [METHOD] withNext
if(( injectId == null) &&(name == null || name.length()== 3)){
[BUG] None [CONTEXT] int argCount = factory.getParameterCount(); if(argCount == 0) { if(isCreator) { creators.setDefaultCreator(factory); } continue; } if(argCount == 1) { AnnotatedParameter param = factory.getParameter(0); PropertyName pn =(param == null) ? null : intr.findNameForDeserialization(param); String name =(...
} else if(to >= Type.SHORT_TYPE) {
[BUG] None [CONTEXT] } else if(from == Type.LONG_TYPE) { if(to == Type.DOUBLE_TYPE) { mv.visitInsn(Constants.L2D); } else if(to == Type.FLOAT_TYPE) { mv.visitInsn(Constants.L2F); } else { mv.visitInsn(Constants.L2I); cast_numeric(Type.INT_TYPE, to); } } else { if(to == Type.BYTE_TYPE) { mv.visitInsn(Constants.I2B); } e...
return iField.getAsShortText(instant);
[BUG] return iField.getAsText( instant); [CONTEXT] public String getAsShortText(long instant) { <extra_id_0> } [METHOD] getAsShortText
shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
[BUG] shape = ShapeUtilities.createTranslatedShape( y1, x1); [CONTEXT] =(StatisticalCategoryDataset) dataset; Number meanValue = statData.getMeanValue(row, column); PlotOrientation orientation = plot.getOrientation(); double x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot.getDomainAxisEdge())...
registerNativeType(JSTypeNative.DATE_TYPE, DATE_TYPE);
[BUG] register( getNativeType( JSTypeNative.BOOLEAN_OBJECT_TYPE));registerNativeType( JSTypeNative.DATE_TYPE, DATE_TYPE); [CONTEXT] ObjectType BOOLEAN_OBJECT_TYPE = BOOLEAN_OBJECT_FUNCTION_TYPE.getInstanceType(); registerNativeType(JSTypeNative.BOOLEAN_OBJECT_TYPE, BOOLEAN_OBJECT_TYPE); FunctionType DATE_FUNCTION_TYPE ...
typeCode <<=(index << 2);
[BUG] typeCode <<=(index | 2); [CONTEXT] private void set(int index, int rawTokenType, Object value) { _tokens[index] = value; long typeCode =(long) rawTokenType; if(index > 0) { <extra_id_0> } _tokenTypes |= typeCode; } [METHOD] set
private int baseLineno = -1;
[BUG] None [CONTEXT] } private int encodedSourceStart; private int encodedSourceEnd; private String sourceName; <extra_id_0> private int endLineno = -1; private ObjArray functions; private ObjArray regexps; [METHOD] None
SimpleDateFormat formatter =(SimpleDateFormat)DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale);
[BUG] SimpleDateFormat formatter =(SimpleDateFormat) DateFormat.getDateTimeInstance( dateStyle, mField, locale); [CONTEXT] Locale locale) { Object key = new Pair(new Integer(dateStyle), new Integer(timeStyle)); if(timeZone != null) { key = new Pair(key, timeZone); } if(locale != null) { key = new Pair(key, locale); } F...
if(Math.abs(yy - previousDrawnTickLabelPos)< avgTickLabelLength){
[BUG] None [CONTEXT] tickLabel = formatter.format(currentTickValue); } else { tickLabel = valueToString(currentTickValue); } Rectangle2D bounds = TextUtilities.getTextBounds(tickLabel, g2, g2.getFontMetrics()); double tickLabelLength = isVerticalTickLabels() ? bounds.getWidth() : bounds.getHeight(); boolean tickLabelsO...
y = cursor;
[BUG] y = upperMargin; [CONTEXT] AffineTransform transformer = new AffineTransform(); transformer.setToTranslation(x, y); Shape shape = transformer.createTransformedShape(arrow); g2.fill(shape); g2.draw(shape); } if(drawDownOrLeft) { double x = 0.0; double y = 0.0; Shape arrow = null; if(edge == RectangleEdge.TOP || ed...
result.append('A');
[BUG] result.append( 'M');result.append( 'A'); [CONTEXT] private int handleAEIOUY(String value, DoubleMetaphoneResult result, int index) { if(index == 0) { <extra_id_0> } return index + 1; } [METHOD] handleAEIOUY
size +=;
[BUG] None [CONTEXT] } int getSize() { int size = 8; if(value != 0) { cw.newUTF8("ConstantValue"); <extra_id_0> } 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 += ...
cache.put(years() , years());
[BUG] cache.put( yearWeekDay(), yearWeekDay());cache.put( years(), years()); [CONTEXT] if(types[i] == null) { throw new IllegalArgumentException("Types array must not contain null"); } } Map<PeriodType, Object> cache = cTypes; if(cache.isEmpty()) { cache.put(standard(), standard()); cache.put(yearMonthDayTime(), yearMo...
singlequote ="\'";quote = '\"';
[BUG] None [CONTEXT] if(singleq < doubleq) { quote = '\''; doublequote ="\""; singlequote ="\\\'"; } else { <extra_id_0> doublequote ="\\\""; singlequote ="\'"; } [METHOD] jsString
private static final long serialVersionUID = 1L;
[BUG] private static final short serialVersionUID = 1L; [CONTEXT] @JacksonStdImpl public class ObjectArrayDeserializer extends ContainerDeserializerBase<Object[]> implements ContextualDeserializer { <extra_id_0> [METHOD] None
bv.put12( null);
[BUG] None [CONTEXT] boolean[] v =(boolean[]) value; bv.put12('[', v.length); for(int i = 0; i < v.length; i++) { bv.put12('Z', cw.newInteger(v[i] ? 1 : 0).index); } } else if(value instanceof short[]) { short[] v =(short[]) value; bv.put12('[', v.length); for(int i = 0; i < v.length; i++) { bv.put12('S', cw.newInteger...
ax1 = domainAxis.valueToJava2D(x.doubleValue() , plotArea, domainAxisLocation);
[BUG] ax1 = domainAxisLocation.valueToJava2D( x.doubleValue(), plotArea, domainAxis); [CONTEXT] g2.setStroke(seriesStroke); Number x = windData.getX(series, item); Number windDir = windData.getWindDirection(series, item); Number wforce = windData.getWindForce(series, item); double windForce = wforce.doubleValue(); dou...
if(typeParams == null){
[BUG] if(typeParams.length != 2) { [CONTEXT] private JavaType _mapType(Class<?> rawClass) { JavaType[] typeParams = findTypeParameters(rawClass, Map.class); <extra_id_0> return MapType.construct(rawClass, _unknownType(), _unknownType()); } if(typeParams.length != 2) { throw new IllegalArgumentException("Strange Map t...
int maxDay = iChronology.getDaysInYearMonth(i_yearToUse, i_monthToUse);
[BUG] int maxDay = iChronology.getDaysInYearMonth( thisYear, i_monthToUse); [CONTEXT] yearToUse += 1; } } if(yearToUse < iChronology.getMinYear() || yearToUse > iChronology.getMaxYear()) { throw new IllegalArgumentException("Magnitude of add amount is too large:" + months); } int i_yearToUse =(int)yearToUse; int i_mont...
return valueToJava2D(value, area, edge);
[BUG] return valueToJava2D( area, edge); [CONTEXT] public double dateToJava2D(Date date, Rectangle2D area, RectangleEdge edge) { double value = date.getTime(); <extra_id_0> } [METHOD] dateToJava2D
deflateUntilInputIsNeeded();
[BUG] deflate(); [CONTEXT] public void write(byte[] b, int offset, int length) throws IOException { if(entry.getMethod() == DEFLATED) { if(length > 0) { if(!def.finished()) { if(length <= DEFLATER_BLOCK_SIZE) { def.setInput(b, offset, length); deflateUntilInputIsNeeded(); } else { final int fullblocks = length / DEFLAT...
for(int i = 0; i < series; i++){
[BUG] for(int i = index; i < series; i++) { [CONTEXT] private double[] getStackValues(TableXYDataset dataset, int series, int index) { double[] result = new double[2]; <extra_id_0> double v = dataset.getYValue(i, index); if(!Double.isNaN(v)) { if(v >= 0.0) { result[1] += v; } else { result[0] += v; } } } return resul...
this.cv = cv;
[BUG] None [CONTEXT] public void setTarget(ClassVisitor cv) { <extra_id_0> fieldInfo = new HashMap(); staticInit = staticHook = null; staticHookSig = null; } [METHOD] setTarget
s2 += k;
[BUG] None [CONTEXT] If k_check is zero, we're guaranteed that k = floor(log10(d)). */ j = bbits[0] - i - 1; if(j >= 0) { b2 = 0; s2 = j; } else { b2 = -j; s2 = 0; } if(k >= 0) { b5 = 0; s5 = k; <extra_id_0> } else { b2 -= k; b5 = -k; s5 = 0; } b2 >= 0, b5 >= 0, s2 >= 0, and s5 >= 0. */ if(mode < 0 || mode > 9) mode ...
compiler.report(JSError.make(t, n, reportMissingOverride, HIDDEN_INTERFACE_PROPERTY, propertyName, interfaceType.getTopMostDefiningType(propertyName).toString()));
[BUG] compiler.report( JSError.make( t, n, reportMissingOverride, propertyName, interfaceType.getTopMostDefiningType( propertyName).toString())); [CONTEXT] if(reportMissingOverride.isOn() && !declaredOverride && interfaceHasProperty) { <extra_id_0> } [METHOD] checkDeclaredPropertyInheritance
return(getKey() == null ? other.getKey() == null : getKey().equals(other.getKey())) &&(getValue() == null ? other.getValue() == null : getValue().equals(other.getValue()));
[BUG] return( getKey()!= null ? other.getKey()== null : getKey().equals( other.getKey()))&&( getValue()== null ? other.getValue()== null : getValue().equals( other.getValue())); [CONTEXT] public boolean equals(final Object obj) { if(obj == this) { return true; } if(obj instanceof DefaultKeyValue == false) { return fals...
buf.append("ACC_VOLATILE");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...
int newIndex = toFetch + this.oldestAt;
[BUG] int newIndex = this.oldestAt + toFetch; [CONTEXT] protected int translateGet(int toFetch) { if(this.oldestAt == 0) { return toFetch;// no translation needed } <extra_id_0> if(newIndex >= this.historyCount) { newIndex -= this.historyCount; } return newIndex; } [METHOD] translateGet
appendTo(buffer, calendar.get(mField));
[BUG] appendTo( buffer, calendar.get( Calendar.MONTH) + 1);appendTo( buffer, calendar.get( mField)); [CONTEXT] public void appendTo(StringBuffer buffer, Calendar calendar) { <extra_id_0> } [METHOD] appendTo
data[len++] =(byte)(0xC0 | c >> 6 & 0x1F);
[BUG] None [CONTEXT] data[length + 1] =(byte) byteLength; if(length + 2 + byteLength > data.length) { length = len; enlarge(2 + byteLength); data = this.data; } for(int j = i; j < charLength; ++j) { c = s.charAt(j); if(c >= '\001' && c <= '\177') { data[len++] =(byte) c; } else if(c > '\u07FF') { data[len++] =(byte)(0x...
return appendSignedDecimal(DateTimeFieldType.year() , minDigits, maxDigits);
[BUG] [CONTEXT] public DateTimeFormatterBuilder appendYear(int minDigits, int maxDigits) { <extra_id_0> [METHOD] appendYear
if(_classMappings == null){
[BUG] if(4 == null) { [CONTEXT] private void _addSerializer(Class<?> cls, JsonSerializer<?> ser) { ClassKey key = new ClassKey(cls); if(cls.isInterface()) { if(_interfaceMappings == null) { _interfaceMappings = new HashMap<ClassKey,JsonSerializer<?>>(); } _interfaceMappings.put(key, ser); } else { // nope, class: <ext...
return Years.years(FieldUtils.safeMultiply(getValue() , scalar));
[BUG] [CONTEXT] public Years multipliedBy(int scalar) { <extra_id_0> [METHOD] multipliedBy
token = null;
[BUG] token = JsonToken.NULL;token = null; [CONTEXT] public void close() throws IOException { hasToken = false; value = null; <extra_id_0> stack.clear(); stack.add(JsonScope.CLOSED); in.close(); } [METHOD] close
if(( jp.getCurrentToken() == JsonToken.VALUE_STRING)&& ctxt.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)) {
[BUG] if(( JsonToken.VALUE_STRING.getCurrentToken()== jp) && ctxt.isEnabled( DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)){ [CONTEXT] private final double[] handleNonArray(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { <extra_id_0> if(jp.getText().length() == 0...
h[2] = constraint.getHeight() - h[1] - h[0];
[BUG] w[0] = constraint.getWidth();h[2] = constraint.getHeight()- h[1] - h[0]; [CONTEXT] LengthConstraintType.RANGE); Size2D size = this.topBlock.arrange(g2, c1); h[0] = size.height; } w[1] = w[0]; if(this.bottomBlock != null) { RectangleConstraint c2 = new RectangleConstraint( w[0], null, LengthConstraintType.FIXED, 0...
jgen.writeNumber(( BigInteger)n);
[BUG] jgen.writeNumber((( Float) n).floatValue());jgen.writeNumber((BigInteger) n); [CONTEXT] { Object ob = segment.get(ptr); if(ob instanceof SerializableString) { jgen.writeString((SerializableString) ob); } else { jgen.writeString((String) ob); } } break; case VALUE_NUMBER_INT: { Object n = segment.get(ptr); if(n in...
double lowerOutlierThreshold = q1 -(interQuartileRange * 1.5);
[BUG] float lowerOutlierThreshold = q1 -(interQuartileRange * 1.5); [CONTEXT] } } else { vlist = values; } Collections.sort(vlist); double mean = Statistics.calculateMean(vlist, false); double median = Statistics.calculateMedian(vlist, false); double q1 = calculateQ1(vlist); double q3 = calculateQ3(vlist); double inter...
_textBuffer.resetWithShared(_inputBuffer, startPtr, len);
[BUG] _textBuffer.resetWithShared( startPtr, len); [CONTEXT] if(ptr >= inputLen) { break dummy_loop; } ch =(int) _inputBuffer[ptr++]; } if(expLen == 0) { reportUnexpectedNumberChar(ch,"Exponent indicator not followed by a digit"); } } --ptr; // need to push back following separator _inputPtr = ptr; int len = ptr-startP...
divdiff[j] =(divdiff[j+1] - divdiff[j])/ denominator;
[BUG] divdiff[j] =(divdiff[j+1 + 3] - divdiff[j]) / denominator; [CONTEXT] throws MathException { int i, j, n; double divdiff[], a[], denominator; PolynomialFunctionLagrangeForm.verifyInterpolationArray(x, y); n = x.length; divdiff = new double[n]; for(i = 0; i < n; i++) { divdiff[i] = y[i];// initialization } a = new ...
line.setLine(x0, start2d, x1, start2d);
[BUG] line.setLine( value, start2d, x1, start2d); [CONTEXT] } else { g2.setPaint(p); } g2.fill(rect); if(im.getOutlinePaint() != null && im.getOutlineStroke() != null) { if(orientation == PlotOrientation.VERTICAL) { Line2D line = new Line2D.Double(); double x0 = dataArea.getMinX(); double x1 = dataArea.getMaxX(); g2.se...
super(chart);
[BUG] [CONTEXT] public ChartMouseEvent(JFreeChart chart, MouseEvent trigger, ChartEntity entity) { <extra_id_0> this.chart = chart; this.trigger = trigger; this.entity = entity; [METHOD] <init>
return(ret == Integer.MAX_VALUE)? -1 : ret;
[BUG] return(ret != Integer.MAX_VALUE) ? -1 : ret; [CONTEXT] public static int indexOfAny(String str, String[] searchStrs) { if((str == null) ||(searchStrs == null)) { return -1; } int sz = searchStrs.length; int ret = Integer.MAX_VALUE; int tmp = 0; for(int i = 0; i < sz; i++) { String search = searchStrs[i]; if(searc...
[Delete]
[BUG] None [CONTEXT] { buf.setLength(0); buf.append(tab2).append("LOCALVARIABLE").append(name).append(' '); appendDescriptor(FIELD_DESCRIPTOR, desc); buf.append(' '); appendLabel(start); buf.append(' '); appendLabel(end); buf.append(' ').append(index).append('\n'); if(signature != null) { buf.append(tab2); appendDescri...
decompiler.addToken(Token.RC);
[BUG] None [CONTEXT] tt = peekToken(); switch(tt) { case Token.IF: { consumeToken(); decompiler.addToken(Token.IF); int lineno = ts.getLineno(); int charno = ts.getCharno(); Node cond = condition(); decompiler.addEOL(Token.LC); Node ifTrue = statement(); Node ifFalse = null; if(matchToken(Token.ELSE)) { <extra_id_0> ...
_xmlWriter.writeEndElement();
[BUG] writeEndObject();_xmlWriter.writeEndElement(); [CONTEXT] if(_nextIsAttribute) { byte[] fullBuffer = toFullBuffer(data, offset, len); _xmlWriter.writeBinaryAttribute("", _nextName.getNamespaceURI(), _nextName.getLocalPart(), fullBuffer); } else if(checkNextIsUnwrapped()) { _xmlWriter.writeBinary(data, offset, len)...
File file = new File(new File(debugLocation), dirs +".class");
[BUG] None [CONTEXT] } public byte[] toByteArray() { return(byte[]) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { public Object run() { byte[] b = DebuggingClassWriter.super.toByteArray(); if(debugLocation != null) { String dirs = className.replace('.', File.separatorChar); try { n...
if(childCount == 1){
[BUG] if(childCount == 2) { [CONTEXT] add(last, Context.PRESERVE_BLOCK); break; case Token.THROW: Preconditions.checkState(childCount == 1); add("throw"); add(first); cc.endStatement(true); break; case Token.RETURN: add("return"); <extra_id_0> add(first); } else { Preconditions.checkState(childCount == 0); } cc.endS...
return localizationResources.getString("No_Font_Selected");
[BUG] return localizationResources.getString("o_Fon"); [CONTEXT] private String fontToString(Font font) { if(font != null) { return font.getFontName() +"," + font.getSize(); } else { <extra_id_0> } } [METHOD] fontToString
argMap.put(uniquePlaceholder, cArg);
[BUG] [CONTEXT] for(Node fnArg : NodeUtil.getFnParameters(fnNode).children()) { if(cArg != null) { argMap.put(fnArg.getString(), cArg); cArg = cArg.getNext(); } else { argMap.put(fnArg.getString(), NodeUtil.newUndefinedNode()); } } int anonArg = 0; while(cArg != null) { String uniquePlaceholder = getUniqueAnonymousPa...