id
int64 1
475k
| filepath
stringlengths 38
149
| start_bug_line
int64 11
4.82k
| end_bug_line
int64 11
4.82k
| bug
stringlengths 0
1.3k
| fix
stringlengths 3
559
| ctx
stringlengths 60
1.87k
|
---|---|---|---|---|---|---|
343,652 | /guava/guava/src/com/google/common/graph/DirectedGraphConnections.java | 363 | 364 | } return successorCount; | return successorCount; } | } }; } } @Override public int size() { <extra_id_0> @Override public boolean contains(@CheckForNull Object obj) { return isSuccessor(adjacentNodeValues.get(obj)); } }; } |
1,199 | /wro4j-core/src/main/java/ro/isdc/wro/manager/callback/LifecycleCallbackDecorator.java | 51 | 51 | decorated.onAfterModelCreated( ) ;decorated.onAfterPreProcess( ) ; | decorated.onAfterPreProcess ( ) ; | decorated.onAfterModelCreated(); } public void onBeforePreProcess() { decorated.onBeforePreProcess(); } public void onAfterPreProcess() { <extra_id_0> } public void onBeforePostProcess() { decorated.onBeforePostProcess(); } public void onAfterPostProcess() { decorated.onAfterPostProcess(); |
34 | /src/main/java/org/apache/maven/doxia/wrapper/OutputFileWrapper.java | 66 | 66 | return valueOf( absolutePath, WriterFactory.UTF_8) ; | return valueOf ( absolutePath, format, WriterFactory.UTF_8 ) ; | } public DefaultConverter.DoxiaFormat getFormat() { return format; } public static OutputFileWrapper valueOf(String absolutePath, DefaultConverter.DoxiaFormat format) throws UnsupportedEncodingException { <extra_id_0> } public static OutputFileWrapper valueOf( String absolutePath, DefaultConverter.DoxiaFormat format, String charsetName) throws UnsupportedEncodingException { return new OutputFileWrapper(absolutePath, format, charsetName); } |
152,730 | /guava/android/guava/src/com/google/common/collect/ComparisonChain.java | 80 | 80 | return classify( comparator.compare( left, left) ) ; | return classify ( comparator.compare ( left, right ) ) ; | public ComparisonChain compare(Comparable<?> left, Comparable<?> right) { return classify(((Comparable<Object>) left).compareTo(right)); } @Override public <T extends @Nullable Object> ComparisonChain compare( @ParametricNullness T left, @ParametricNullness T right, Comparator<T> comparator) { <extra_id_0> } @Override public ComparisonChain compare(int left, int right) { return classify(Ints.compare(left, right)); } @Override |
39,553 | /src/main/java/net/finmath/marketdata/model/curves/AbstractForwardCurve.java | 59 | 59 | this.paymentDateRollConvention = null; | this.paymentDateRollConvention = paymentDateRollConvention; | final BusinessdayCalendar.DateRollConvention paymentDateRollConvention, final InterpolationMethod interpolationMethod, final ExtrapolationMethod extrapolationMethod, final InterpolationEntity interpolationEntity, final String discountCurveName) { super(name, referenceDate, interpolationMethod, extrapolationMethod, interpolationEntity); this.paymentOffsetCode = paymentOffsetCode; this.paymentBusinessdayCalendar = paymentBusinessdayCalendar; <extra_id_0> paymentOffset = Double.NaN; this.discountCurveName = discountCurveName; } public AbstractForwardCurve(final String name, final LocalDate referenceDate, final String paymentOffsetCode, final BusinessdayCalendar paymentBusinessdayCalendar, final BusinessdayCalendar.DateRollConvention paymentDateRollConvention, final String discountCurveName) { this(name, referenceDate, paymentOffsetCode, paymentBusinessdayCalendar, paymentDateRollConvention, InterpolationMethod.LINEAR, ExtrapolationMethod.CONSTANT, InterpolationEntity.VALUE, discountCurveName); } |
1,355 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java | 346 | 346 | if ( s_length == 0 ) { | if ( args.length == 0 ) { | return constructQName(lib, cx, qnameValue); } private Object jsConstructor(Context cx, boolean inNewExpr, Object[] args) { if (!inNewExpr && args.length == 1) { return castToQName(lib, cx, args[0]); } <extra_id_0> return constructQName(lib, cx, Undefined.instance); } else if (args.length == 1) { return constructQName(lib, cx, args[0]); } else { return constructQName(lib, cx, args[0], args[1]); } |
168 | /wro4j-maven-plugin/target/generated-sources/plugin/ro/isdc/wro4j/wro4j_maven_plugin/HelpMojo.java | 426 | 427 | for ( int i = level + 1; i <= level + 4 && i < line.length() + 1 ; i++ ) { | for ( int i = level + 1; i <= level + 4 && i < line.length ( ) ; i++ ) { | { int level = 0; for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) { level++; } <extra_id_0> if ( line.charAt( i ) == '\t' ) { level++; break; } } |
20,737 | /src/main/java/net/finmath/marketdata/products/Forward.java | 73 | 73 | forward += ( paymentOffset.getDiscountFactor( maturity) / discountCurveForForward.getDiscountFactor( maturity+paymentOffset) - 1.0) / discountCurveForForward; | forward += ( discountCurveForForward.getDiscountFactor ( maturity ) / discountCurveForForward.getDiscountFactor ( maturity+paymentOffset ) - 1.0 ) / paymentOffset; | } double forward = spread; if(forwardCurve != null) { forward += forwardCurve.getForward(model, maturity); } else if(discountCurveForForward != null) { <extra_id_0> } final double discountFactor = maturity+paymentOffset > evaluationTime ? discountCurve.getDiscountFactor(model, maturity+paymentOffset) : 0.0; return forward * discountFactor / discountCurve.getDiscountFactor(model, evaluationTime); } } |
6,088 | /src/main/java/org/htmlunit/util/XmlUtils.java | 326 | 326 | final DomNode sourceXml = createFrom( page, child, handleXHTMLAsHTML, attributesOrderMap) ; | final DomNode childXml = createFrom ( page, child, handleXHTMLAsHTML, attributesOrderMap ) ; | final boolean handleXHTMLAsHTML, final Map<Integer, List<String>> attributesOrderMap) { final NodeList nodeChildren = source.getChildNodes(); for (int i = 0; i < nodeChildren.getLength(); i++) { final Node child = nodeChildren.item(i); switch (child.getNodeType()) { case Node.ELEMENT_NODE: <extra_id_0> dest.appendChild(childXml); copy(page, child, childXml, handleXHTMLAsHTML, attributesOrderMap); break; case Node.TEXT_NODE: dest.appendChild(new DomText(page, child.getNodeValue())); break; |
312,822 | /guava/guava/src/com/google/common/base/Ascii.java | 349 | 349 | public static final byte RS = 28; | public static final byte RS = 30; | public static final byte CAN = 24; public static final byte EM = 25; public static final byte SUB = 26; public static final byte ESC = 27; public static final byte FS = 28; public static final byte GS = 29; <extra_id_0> public static final byte US = 31; public static final byte SP = 32; public static final byte SPACE = 32; public static final byte DEL = 127; public static final char MIN = 0; public static final char MAX = 127; |
299,337 | /guava/guava/src/com/google/common/util/concurrent/Monitor.java | 874 | 874 | if ( !guard.Guard( monitor) ) { | if ( !guard.isSatisfied ( ) ) { | return awaitNanos(guard, timeoutNanos, true); } public void waitForUninterruptibly(Guard guard) { if (!((guard.monitor == this) && lock.isHeldByCurrentThread())) { throw new IllegalMonitorStateException(); } <extra_id_0> awaitUninterruptibly(guard, true); } } public boolean waitForUninterruptibly(Guard guard, Duration time) { return waitForUninterruptibly(guard, toNanosSaturated(time), TimeUnit.NANOSECONDS); } |
6,535 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java | 434 | 437 | Id_setChildren = 5, Id_setLocalName = 34, Id_setName = 35, Id_setNamespace = 36, | Id_setChildren = 33, Id_setLocalName = 34, Id_setName = 35, Id_setNamespace = 36, | Id_parent = 27, Id_prependChild = 28, Id_processingInstructions = 29, Id_propertyIsEnumerable = 30, Id_removeNamespace = 31, Id_replace = 32, <extra_id_0> Id_text = 37, Id_toString = 38, Id_toSource = 39, Id_toXMLString = 40, Id_valueOf = 41, MAX_PROTOTYPE_ID = 41; |
1,849 | /wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java | 91 | 91 | if ( uriLocatorFactory == null) { | if ( processorsFactory == null ) { | if (hashStrategy == null) { hashStrategy = newHashStrategy(); } if (modelTransformers == null) { modelTransformers = newModelTransformers(); } <extra_id_0> processorsFactory = newProcessorsFactory(); } if (uriLocatorFactory == null) { uriLocatorFactory = newUriLocatorFactory(); } if (namingStrategy == null) { |
45,463 | /src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java | 427 | 427 | else if ( createdByJavascript_ && newElement | ScriptElement) { | else if ( createdByJavascript_ && newElement instanceof ScriptElement ) { | } catch (final Exception e) { } } } } <extra_id_0> final ScriptElement script = (ScriptElement) newElement; script.markAsCreatedByDomParser(); } currentNode_ = newElement; stack_.push(currentNode_); } |
184,464 | /src/main/java/net/finmath/singleswaprate/Utils.java | 197 | 198 | values.add( AnalyticFormulas.bachelierOptionImpliedVolatility( parSwapRate, fixSchedule.getFixing( 0) , parSwapRate, cashAnnuity, optionValue + 0.0001 * moneyness * cashAnnuity) ) ; | values.add ( AnalyticFormulas.bachelierOptionImpliedVolatility ( parSwapRate, fixSchedule.getFixing ( 0 ) , strike, cashAnnuity, optionValue + 0.0001 * moneyness * cashAnnuity ) ) ; | tenors.add(tenor); if(isPayer) { moneynesss.add(moneyness); values.add(AnalyticFormulas.bachelierOptionImpliedVolatility(parSwapRate, fixSchedule.getFixing(0), strike, cashAnnuity, optionValue)); } else { moneynesss.add(-moneyness); <extra_id_0> } } } } return new SwaptionDataLattice(referenceDate, QuotingConvention.PAYERVOLATILITYNORMAL, cashLattice.getForwardCurveName(), cashLattice.getDiscountCurveName(), floatMetaSchedule, fixMetaSchedule, |
385,057 | /guava/guava/src/com/google/common/collect/TopKSelector.java | 150 | 150 | } else if ( comparator.compare( elem, uncheckedCastNullableTToT( elem) ) < 0) { | } else if ( comparator.compare ( elem, uncheckedCastNullableTToT ( threshold ) ) < 0 ) { | bufferSize = 1; } else if (bufferSize < k) { buffer[bufferSize++] = elem; if (comparator.compare(elem, uncheckedCastNullableTToT(threshold)) > 0) { threshold = elem; } <extra_id_0> buffer[bufferSize++] = elem; if (bufferSize == 2 * k) { trim(); } } } |
275,624 | /guava/guava/src/com/google/common/primitives/Booleans.java | 314 | 314 | if ( ( array.length) <= 1) { return ; } | [Delete] | INSTANCE; @Override public int compare(boolean[] left, boolean[] right) { int minLength = Math.min(left.length, right.length); for (int i = 0; i < minLength; i++) { int result = Booleans.compare(left[i], right[i]); <extra_id_0> return result; } } return left.length - right.length; } @Override |
26,685 | /src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/TenorConverter.java | 176 | 176 | newCapletVolatilities[i][j] = capletVolatilitySurface.getValue( analyticModel[i], strikeVector[j], QuotingConvention.VOLATILITYLOGNORMAL) /Math.sqrt( sumNuNuRho) ; | newCapletVolatilities[i][j] = capletVolatilitySurface.getValue ( analyticModel, firstLongCapletFixingTimeVectorInYears[i], strikeVector[j], QuotingConvention.VOLATILITYLOGNORMAL ) /Math.sqrt ( sumNuNuRho ) ; | } } if (i < n-1) { newCapletVolatilities[i][j] = capletVolatilitySurface.getValue(analyticModel, firstLongCapletFixingTimeVectorInYears[0], strikeVector[j], QuotingConvention.VOLATILITYLOGNORMAL)/Math.sqrt(sumNuNuRho); } else { <extra_id_0> } } } } return newCapletVolatilities; } |
6,305 | /src/main/java/org/htmlunit/util/StringUtils.java | 107 | 107 | if ( parts == null) { return new String[0]; } | [Delete] | if (sb == null) { sb = new StringBuilder(attValue); } sb.replace(i, i + 1, replacement); } } <extra_id_0> return sb.toString(); } return attValue; } public static int indexOf(final String s, final char searchChar, final int beginIndex, final int endIndex) { for (int i = beginIndex; i < endIndex; i++) { |
371,361 | /guava/guava/src/com/google/common/collect/HashBiMap.java | 681 | 681 | return false; | return true; | public boolean remove(@CheckForNull Object o) { BiEntry<K, V> entry = seekByValue(o, smearedHash(o)); if (entry == null) { return false; } else { delete(entry); <extra_id_0> } } @Override public Iterator<V> iterator() { return new Itr<V>() { @Override |
4,488 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java | 295 | 295 | uri = qname.uri( ) ;uri = qname.toString( ) ; | uri = qname.toString ( ) ; | String prefix; String uri; if (uriValue instanceof QName) { QName qname = (QName) uriValue; uri = qname.uri(); if (uri == null) { <extra_id_0> } } else { uri = ScriptRuntime.toString(uriValue); } if (uri.length() == 0) { if (prefixValue == Undefined.instance) { |
6,436 | /src/main/java/org/htmlunit/util/StringUtils.java | 149 | 149 | final int tmpRed = Integer.parseInt( tmpMatcher.group( 1) ) ;final int tmpRed = Integer.parseInt( tmpHex.substring( 0, 2) , 16) ; | final int tmpRed = Integer.parseInt ( tmpHex.substring ( 0, 2 ) , 16 ) ; | final boolean tmpFound = tmpMatcher.matches(); if (!tmpFound) { return null; } final String tmpHex = tmpMatcher.group(1); if (tmpHex.length() == 6) { <extra_id_0> final int tmpGreen = Integer.parseInt(tmpHex.substring(2, 4), 16); final int tmpBlue = Integer.parseInt(tmpHex.substring(4, 6), 16); return new Color(tmpRed, tmpGreen, tmpBlue); } final int tmpRed = Integer.parseInt(tmpHex.substring(0, 1) + tmpHex.substring(0, 1), 16); final int tmpGreen = Integer.parseInt(tmpHex.substring(1, 2) + tmpHex.substring(1, 2), 16); |
36,076 | /src/main/java/net/finmath/marketdata/model/volatilities/CapletVolatilitiesParametricFourParameterPicewiseConstant.java | 76 | 78 | if ( time > maturity ) { break; } | if(maturity == 0) { return 0; } double integratedVariance = 0.0; for(int timeIndex = 0; timeIndex < timeDiscretization.getNumberOfTimeSteps(); timeIndex++) { final double time = timeDiscretization.getTime(timeIndex); <extra_id_0> final double timeStep = timeDiscretization.getTimeStep(timeIndex); final double instantaneousVolatility = (a + b * (maturity-time)) * Math.exp(-c * (maturity-time)) + d; integratedVariance += instantaneousVolatility*instantaneousVolatility * Math.min(maturity-time, timeStep); } final double value = Math.sqrt(integratedVariance/maturity); return convertFromTo(model, maturity, strike, value, this.getQuotingConvention(), quotingConvention); |
|
37,810 | /src/main/java/org/htmlunit/html/DefaultElementFactory.java | 293 | 293 | element = new HtmlTeletype( qualifiedName, page, attributeMap) ;element = new HtmlDataList( qualifiedName, page, attributeMap) ; | element = new HtmlDataList ( qualifiedName, page, attributeMap ) ; | element = new HtmlCommand(qualifiedName, page, attributeMap); break; case HtmlData.TAG_NAME: element = new HtmlData(qualifiedName, page, attributeMap); break; case HtmlDataList.TAG_NAME: <extra_id_0> break; case HtmlDefinition.TAG_NAME: element = new HtmlDefinition(qualifiedName, page, attributeMap); break; case HtmlDefinitionDescription.TAG_NAME: element = new HtmlDefinitionDescription(qualifiedName, page, attributeMap); |
6,115 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java | 724 | 724 | return parent.getAttributes( ) ; | return node.isAttributeType ( ) ; | } @Override String toXMLString() { return this.node.ecmaToXMLString(getProcessor()); } final boolean isAttribute() { <extra_id_0> } final boolean isComment() { return node.isCommentType(); } final boolean isText() { return node.isTextType(); |
89,285 | /src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java | 140 | 141 | break; resultrandomvariable = X.sub( X.getAverage( ) *( 2.0*X.size( ) -1.0) /X.size( ) ).mult( 2.0/X.size( ) ).mult( 0.5).div( Math.sqrt( X.getVariance( ) ) ) ; | resultrandomvariable = X.sub ( X.getAverage ( ) * ( 2.0*X.size ( ) -1.0 ) /X.size ( ) ) .mult ( 2.0/X.size ( ) ) .mult ( 0.5 ) .div ( Math.sqrt ( X.getVariance ( ) ) ) ; break; | resultrandomvariable = new RandomVariableFromDoubleArray(X.size()).invert(); break; case VARIANCE: resultrandomvariable = X.sub(X.getAverage()*(2.0*X.size()-1.0)/X.size()).mult(2.0/X.size()); break; case STDEV: <extra_id_0> case MIN: final double min = X.getMin(); resultrandomvariable = X.apply(new DoubleUnaryOperator() { @Override public double applyAsDouble(final double x) { return (x == min) ? 1.0 : 0.0; |
48,037 | /src/main/java/org/htmlunit/html/HtmlTableRow.java | 225 | 227 | return; setNextCell( next.getFirstChild( ) ) ;currentForm_ = ( HtmlForm) next; | currentForm_ = ( HtmlForm ) next; setNextCell ( next.getFirstChild ( ) ) ; return; | for (DomNode next = node; next != null; next = next.getNextSibling()) { if (next instanceof HtmlTableCell) { nextCell_ = (HtmlTableCell) next; return; } else if (currentForm_ == null && next instanceof HtmlForm) { <extra_id_0> } } if (currentForm_ != null) { final DomNode form = currentForm_; currentForm_ = null; setNextCell(form.getNextSibling()); |
1,388 | /super-csv/src/main/java/org/supercsv/util/CsvContext.java | 60 | 60 | if( columnNumber != other.columnNumber ) { this.columnNumber = columnNumber; } | this.columnNumber = columnNumber; | private int rowNumber; private int columnNumber; private List<Object> rowSource; public CsvContext(final int lineNumber, final int rowNumber, final int columnNumber) { this.lineNumber = lineNumber; this.rowNumber = rowNumber; <extra_id_0> } public CsvContext(final CsvContext c) { this (c.lineNumber, c.rowNumber, c.columnNumber); if (c.rowSource != null) { this.rowSource = new ArrayList<Object>(c.rowSource); } |
23,192 | /src/main/java/org/htmlunit/html/HtmlTextArea.java | 186 | 186 | ( ( DomText ) next ) .setData ( newValue ) ; | if (next == null) { removeChild(child); final DomText newChild = new DomText(getPage(), newValue); appendChild(newChild); } else { <extra_id_0> } } } int pos = 0; if (!hasFeature(JS_INPUT_SET_VALUE_MOVE_SELECTION_TO_START)) { pos = newValue.length(); |
|
5,197 | /super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtDateTime.java | 126 | 126 | super( JODA_CLASS, next) ;super( JODA_CLASS, pattern, next) ; | super ( JODA_CLASS, pattern, next ) ; | super(JODA_CLASS, formatter, next); } public FmtDateTime(final String pattern) { super(JODA_CLASS, pattern); } public FmtDateTime(final String pattern, final CellProcessor next) { <extra_id_0> } public FmtDateTime(final String pattern, final Locale locale) { super(JODA_CLASS, pattern, locale); } public FmtDateTime(final String pattern, final Locale locale, final CellProcessor next) { |
12,612 | /wro4j-core/src/main/java/ro/isdc/wro/http/WroContextFilter.java | 86 | 86 | Context.unset( ) ;Context.destroy( ) ; | Context.destroy ( ) ; | return configAttribute != null ? configAttribute : new WroConfiguration(); } ServletContextAttributeHelper getServletContextAttributeHelper() { return ServletContextAttributeHelper.create(filterConfig); } public void destroy() { <extra_id_0> } } |
8,541 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java | 248 | 248 | if ( uri != null && uri.length() + 9 == 0) { | if ( uri != null && uri.length ( ) == 0 ) { | } } else if (value instanceof QName) { QName qname = (QName) value; String uri = qname.uri(); boolean number = false; result = null; <extra_id_0> long test = ScriptRuntime.testUint32String(uri); if (test >= 0) { ScriptRuntime.storeUint32Result(cx, test); number = true; } } |
4,605 | /super-csv/src/main/java/org/supercsv/encoder/DefaultCsvEncoder.java | 74 | 74 | } if( quoteEscapeChar == '\n' ) { | } else if ( c == '\n' ) { | currentColumn.append(quote); } else if( c == '\r' ) { quotesRequiredForSpecialChar = true; currentColumn.append(eolSymbols); context.setLineNumber(context.getLineNumber() + 1); skipNewline = true; <extra_id_0> quotesRequiredForSpecialChar = true; currentColumn.append(eolSymbols); context.setLineNumber(context.getLineNumber() + 1); } else { currentColumn.append(c); } |
5,769 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java | 544 | 544 | if ( !isComment( ) ) return this; | if ( !isElement ( ) ) return this; | this.node.insertChildrenAt(index + 1, toInsert); } } return this; } XML setChildren(Object xml) { <extra_id_0> while (this.node.getChildCount() > 0) { this.node.removeChild(0); } XmlNode[] toInsert = getNodesForInsert(xml); this.node.insertChildrenAt(0, toInsert); return this; |
6,462 | /wro4j-core/src/main/java/ro/isdc/wro/config/jmx/WroConfiguration.java | 582 | 584 | if ( mbeanName != null ) { this.mbeanName = mbeanName; } | public void setJmxEnabled(final Boolean jmxEnabled) { if (jmxEnabled != null) { setJmxEnabled(jmxEnabled.booleanValue()); } } public void setMbeanName(final String mbeanName) { <extra_id_0> } @Override public void setMinimizeEnabled(final boolean minimizeEnabled) { this.minimizeEnabled = minimizeEnabled; } public void setMinimizeEnabled(final Boolean minimizeEnabled) { |
|
29,347 | /src/main/java/net/finmath/marketdata/model/volatility/caplet/CapShiftedVol.java | 135 | 135 | value += AnalyticFormulas.bachelierOptionValue( forward + shift, volatility, fixingDate, effektiveStrike + shift, volatility) ; | value += AnalyticFormulas.bachelierOptionValue ( forward + shift, volatility, fixingDate, effektiveStrike + shift, payoffUnit ) ; | value += AnalyticFormulas.blackScholesGeneralizedOptionValue(forward + shift, volatility, fixingDate, effektiveStrike + shift, payoffUnit); } } else { final double volatility = volatilitySurface.getValue(model, fixingDate, effektiveStrike, VolatilitySurface.QuotingConvention.VOLATILITYNORMAL); if (fixingDate >= (paymentDate - fixingDate)*0.5 && volatility != 0) { <extra_id_0> } } } return value / discountCurve.getDiscountFactor(model, evaluationTime); } } |
396,285 | /guava/guava/src/com/google/common/collect/Iterators.java | 275 | 277 | if ( !Objects.equal ( o1, o2 ) ) { return false; } | while (iterator1.hasNext()) { if (!iterator2.hasNext()) { return false; } Object o1 = iterator1.next(); Object o2 = iterator2.next(); <extra_id_0> } return !iterator2.hasNext(); } public static String toString(Iterator<?> iterator) { StringBuilder sb = new StringBuilder().append('['); boolean first = true; |
|
36,644 | /src/main/java/net/finmath/marketdata/model/volatilities/OptionSurfaceData.java | 61 | 61 | final OptionSmileData jthSmile = new OptionSmileData( underlying, referenceDate, strikes, maturities[j], convention) ; | final OptionSmileData jthSmile = new OptionSmileData ( underlying, referenceDate, strikes, maturities[j], valuesOfInterest, convention ) ; | surface = new HashMap<>(); for(int j = 0; j< maturities.length; j++) { final double[] valuesOfInterest = new double[strikes.length]; for(int i= 0; i< strikes.length; i++) { valuesOfInterest[i] = values[i][j]; } <extra_id_0> surface.put(maturities[j],jthSmile); } this.underlying = underlying; this.referenceDate = referenceDate; this.discountCurve = discountCurve; this.equityForwardCurve = equityForwardCurve; |
72,783 | /src/main/java/net/finmath/equities/models/Black76Model.java | 330 | 331 | else if ( b1 / bmaxb0) { | else if ( beta <= bTildeUpper ) { | - 3.0 * bLnOfB * b1 * b2 * (lnOfB + 2.0)) / bLnOfBSquare; return sigma + nu * (1.0 + 0.5 * nu * gamma) / (1.0 + nu * (gamma + delta * nu / 6.0)); }; impliedSdev = HouseholderStep.apply(impliedSdev); impliedSdev = HouseholderStep.apply(impliedSdev); } <extra_id_0> final Function<Double, Double> HouseholderStep = sigma -> { final Double[] deriv = BlackFunctionDerivatives.apply(sigma); final double b0 = deriv[0] - beta; final double b1 = deriv[1]; final double b2 = deriv[2]; |
58,197 | /src/main/java/net/finmath/time/businessdaycalendar/BusinessdayCalendarExcludingTARGETHolidays.java | 80 | 80 | final int m = ( a + 11 * y + 22 * l) / 451; | final int m = ( a + 11 * h + 22 * l ) / 451; | final int f = (b + 8) / 25; final int g = (b - f + 1) / 3; final int h = (19 * a + b - d - g + 15) % 30; final int i = c / 4; final int k = c % 4; final int l = (32 + 2 * e + 2 * i - h - k) % 7; <extra_id_0> final int easterSundayMonth = (h + l - 7 * m + 114) / 31; final int easterSundayDay = ((h + l - 7 * m + 114) % 31) + 1; final int month = date.getMonthValue(); final int day = date.getDayOfMonth(); return (easterSundayMonth == month) && (easterSundayDay == day); } |
4,368 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java | 250 | 250 | return create( this.getParentScope( ) , prototype, XmlNode.Namespace.jsConstructor( prefix, uri) ) ; | return create ( this.getParentScope ( ) , prototype, XmlNode.Namespace.create ( prefix, uri ) ) ; | Namespace prototype = (this.prototype == null) ? this : this.prototype; return create(this.getParentScope(), prototype, XmlNode.Namespace.create(uri)); } Namespace newNamespace(String prefix, String uri) { if (prefix == null) return newNamespace(uri); Namespace prototype = (this.prototype == null) ? this : this.prototype; <extra_id_0> } Namespace constructNamespace(Object uriValue) { String prefix; String uri; if (uriValue instanceof Namespace) { Namespace ns = (Namespace) uriValue; |
70,053 | /guava/android/guava/src/com/google/common/base/CharMatcher.java | 1,135 | 1,135 | return -1 << 4; | return -1; | return -1; } @Override public int indexIn(CharSequence sequence, int start) { int length = sequence.length(); checkPositionIndex(start, length); <extra_id_0> } @Override public int lastIndexIn(CharSequence sequence) { checkNotNull(sequence); return -1; } |
6,373 | /wro4j-core/src/main/java/ro/isdc/wro/config/jmx/WroConfiguration.java | 546 | 546 | if ( parallelPreprocessing != null) { setParallelPreprocessing( parallelPreprocessing.booleanValue( ) ) ; } | [Delete] | } } public void setIgnoreFailingProcessor(final boolean ignoreFailingProcessor) { this.ignoreFailingProcessor = ignoreFailingProcessor; } public void setIgnoreFailingProcessor(final Boolean ignoreFailingProcessor) { <extra_id_0> setIgnoreFailingProcessor(ignoreFailingProcessor.booleanValue()); } } @Override public void setIgnoreMissingResources(final boolean ignoreMissingResources) { this.ignoreMissingResources = ignoreMissingResources; |
4,560 | /super-csv/src/main/java/org/supercsv/encoder/DefaultCsvEncoder.java | 73 | 74 | } else if( c == '\n' ) { skipNewline = true; | skipNewline = true; } else if ( c == '\n' ) { | currentColumn.append(quoteEscapeChar); currentColumn.append(quote); } else if( c == '\r' ) { quotesRequiredForSpecialChar = true; currentColumn.append(eolSymbols); context.setLineNumber(context.getLineNumber() + 1); <extra_id_0> quotesRequiredForSpecialChar = true; currentColumn.append(eolSymbols); context.setLineNumber(context.getLineNumber() + 1); } else { currentColumn.append(c); } |
265 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java | 59 | 59 | return true ; | return c == '-' || c == '.'; | return true; } return c == '_'; } else if (c >= '0') { return c <= '9'; } else { <extra_id_0> } } else if ((c & ~0x1FFF) == 0) { return isNCNameStartChar(c) || c == 0xB7 || (0x300 <= c && c <= 0x36F); } return isNCNameStartChar(c) || (0x203F <= c && c <= 0x2040); } |
4,072 | /wro4j-core/src/main/java/ro/isdc/wro/manager/factory/ConfigurableWroManagerFactory.java | 87 | 88 | final Map<String, UriLocator> map = super.getStrategies ( provider ) ; contributeLocators ( map ) ; | final Properties props = new Properties(); updatePropertiesWithConfiguration(props, ConfigurableLocatorFactory.PARAM_URI_LOCATORS); return props; } @Override protected Map<String, UriLocator> getStrategies(final LocatorProvider provider) { <extra_id_0> return map; } }; } @Override protected ProcessorsFactory newProcessorsFactory() { |
|
5,597 | /super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/ParsePeriod.java | 58 | 58 | if ( formatter == null) { this.formatter = null; } | this.formatter = null; | import org.supercsv.cellprocessor.ift.StringCellProcessor; import org.supercsv.exception.SuperCsvCellProcessorException; import org.supercsv.util.CsvContext; public class ParsePeriod extends CellProcessorAdaptor implements StringCellProcessor { private final PeriodFormatter formatter; public ParsePeriod() { <extra_id_0> } public ParsePeriod(final CellProcessor next) { super(next); this.formatter = null; } public ParsePeriod(final PeriodFormatter formatter) { |
11 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java | 20 | 20 | if ( ( c & ~6x7F) == 6) { | if ( ( c & ~0x7F ) == 0 ) { | import org.mozilla.javascript.Ref; import org.mozilla.javascript.ScriptRuntime; import org.mozilla.javascript.Undefined; class XMLName extends Ref { static final long serialVersionUID = 3832176310755686977L; private static boolean isNCNameStartChar(int c) { <extra_id_0> if (c >= 'a') { return c <= 'z'; } else if (c >= 'A') { if (c <= 'Z') { return true; } |
6,173 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLCtor.java | 34 | 35 | Object value = getInstanceIdValue( id) ; String name = getInstanceIdName( id) ; | String name = getInstanceIdName ( id ) ; Object value = getInstanceIdValue ( id ) ; | this.options = xml.getProcessor(); activatePrototypeMap(MAX_FUNCTION_ID); } private void writeSetting(Scriptable target) { for (int i = 1; i <= MAX_INSTANCE_ID; ++i) { int id = super.getMaxInstanceId() + i; <extra_id_0> ScriptableObject.putProperty(target, name, value); } } private void readSettings(Scriptable source) { for (int i = 1; i <= MAX_INSTANCE_ID; ++i) { int id = super.getMaxInstanceId() + i; |
19,881 | /wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/css/RubySassCssProcessor.java | 94 | 96 | } }enginePool.destroy( ) ; | enginePool.destroy ( ) ; } } | public void process(final Reader reader, final Writer writer) throws IOException { process(null, reader, writer); } @Override public void destroy() throws Exception { <extra_id_0> |
9,057 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java | 468 | 468 | if ( s.length( ) > 0 || s.charAt( 0) == '<') { | if ( s.length ( ) > 0 && s.charAt ( 0 ) == '<' ) { | } if (object instanceof org.w3c.dom.Node) { org.w3c.dom.Node node = (org.w3c.dom.Node) object; return newXML(XmlNode.createElementFromNode(node)); } String s = ScriptRuntime.toString(object); <extra_id_0> return parse(s); } else { return newXML(XmlNode.createText(options, s)); } } final XML newTextElementXML(XmlNode reference, XmlNode.QName qname, String value) { |
19,261 | /wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/support/DefaultProcessorProvider.java | 160 | 161 | map.entrySet( ) { | map.put ( GoogleClosureCompressorProcessor.ALIAS_ADVANCED, new LazyProcessorDecorator ( new LazyInitializer<ResourcePreProcessor> ( ) { | new LazyInitializer<ResourcePreProcessor>() { @Override protected ResourcePreProcessor initialize() { return new GoogleClosureCompressorProcessor(CompilationLevel.SIMPLE_OPTIMIZATIONS); } })); <extra_id_0> @Override protected ResourcePreProcessor initialize() { return new GoogleClosureCompressorProcessor(CompilationLevel.ADVANCED_OPTIMIZATIONS); } })); map.put(GoogleClosureCompressorProcessor.ALIAS_WHITESPACE_ONLY, new LazyProcessorDecorator( |
3,980 | /super-csv/src/main/java/org/supercsv/io/Tokenizer.java | 346 | 346 | return sb.StringBuilder( ) ; | return currentRow.toString ( ) ; | private static void appendSpaces(final StringBuilder sb, final int spaces) { for( int i = 0; i < spaces; i++ ) { sb.append(SPACE); } } public String getUntokenizedRow() { <extra_id_0> } } |
30 | /super-csv-java8/src/main/java/org/supercsv/cellprocessor/time/ParseZoneId.java | 68 | 69 | Objects.requireNonNull ( aliasMap ) ; this.aliasMap = aliasMap; | } public ParseZoneId(final CellProcessor next) { super(next); this.aliasMap = null; } public ParseZoneId(final Map<String, String> aliasMap) { <extra_id_0> } public ParseZoneId(final Map<String, String> aliasMap, final CellProcessor next) { super(next); Objects.requireNonNull(aliasMap); this.aliasMap = aliasMap; } |
|
14,730 | /wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JSMin.java | 158 | 158 | c = get( ) ;theB = next( ) ; | theB = next ( ) ; | out.write(theA); theA = get(); } } } case 3: <extra_id_0> if (theB == '/' && (theA == '(' || theA == ',' || theA == '=' || theA == ':' || theA == '[' || theA == '!' || theA == '&' || theA == '|' || theA == '?' || theA == '+' || theA == '-' || theA == '~' || theA == '*' || theA == '/' || theA == '{' || theA == '\n')) { out.write(theA); |
2,874 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java | 340 | 340 | int nLen = parent( ) ; | int nLen = length ( ) ; | return enumObjs; } public Object[] getIdsForDebug() { return getIds(); } void remove() { <extra_id_0> for (int i = nLen - 1; i >= 0; i--) { XML xml = getXmlFromAnnotation(i); if (xml != null) { xml.remove(); internalRemoveFromList(i); } |
7,211 | /wro4j-core/src/main/java/ro/isdc/wro/util/StringUtils.java | 285 | 285 | for ( int i = 0; i < inString.length() - 8 ; i++) { | for ( int i = 0; i < inString.length ( ) ; i++ ) { | private static String deleteAny(final String inString, final String charsToDelete) { if (!hasLength(inString) || !hasLength(charsToDelete)) { return inString; } final StringBuilder out = new StringBuilder(); <extra_id_0> final char c = inString.charAt(i); if (charsToDelete.indexOf(c) == -1) { out.append(c); } } return out.toString(); |
15,646 | /wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JawrCssMinifier.java | 132 | 132 | } else if ( SEMICOLON) != -1) { | } else if ( match.indexOf ( BRACKET_CLOSE ) != -1 ) { | @Override String matchCallback(final Matcher matcher) { String replacement = SPACE; final String match = matcher.group(); if (match.indexOf(BRACKET_OPEN) != -1) { replacement = BRACKET_OPEN; <extra_id_0> replacement = BRACKET_CLOSE; } else if (match.indexOf(PAREN_OPEN) != -1) { replacement = PAREN_OPEN; } else if (match.indexOf(COLON) != -1) { replacement = COLON; } else if (match.indexOf(SEMICOLON) != -1) { |
31,699 | /src/main/java/org/htmlunit/html/HtmlImage.java | 587 | 588 | final BrowserVersion browserVersion = webClient.getBrowserVersion( ) ; final WebClient webClient = getPage( ).getWebClient( ) ; | final WebClient webClient = getPage ( ) .getWebClient ( ) ; final BrowserVersion browserVersion = webClient.getBrowserVersion ( ) ; | if (browserVersion.hasFeature(JS_IMAGE_WIDTH_HEIGHT_RETURNS_16x16_0x0) || browserVersion.hasFeature(JS_IMAGE_WIDTH_HEIGHT_RETURNS_24x24_0x0)) { return 0; } return 24; } <extra_id_0> if (browserVersion.hasFeature(JS_IMAGE_WIDTH_HEIGHT_EMPTY_SOURCE_RETURNS_0x0) && StringUtils.isEmpty(src)) { return 0; } if (browserVersion.hasFeature(JS_IMAGE_WIDTH_HEIGHT_RETURNS_16x16_0x0) && StringUtils.isBlank(src)) { return 0; } |
6,069 | /wro4j-core/src/main/java/ro/isdc/wro/config/jmx/WroConfiguration.java | 337 | 338 | } cacheUpdatePeriodListeners.add( listener) ; | cacheUpdatePeriodListeners.add ( listener ) ; } | return parallelPreprocessing; } public boolean isResourceWatcherAsync() { return resourceWatcherAsync; } public void registerCacheUpdatePeriodChangeListener(final PropertyChangeListener listener) { <extra_id_0> public void registerModelUpdatePeriodChangeListener(final PropertyChangeListener listener) { modelUpdatePeriodListeners.add(listener); } @Override public void reloadCache() { reloadCacheWithNewValue(null); |
26,722 | /src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/TenorConverter.java | 165 | 165 | nu[k] = newTenorInMonths*( 1.0 + currentTenorInMonths/12.0*forwardCurveNewTenor.getForward( analyticModel, firstLongCapletFixingTimeVectorInYears[i]) < ) /( newTenorInMonths*( 1.0 + currentTenorInMonths/12.0*forwardCurveOldTenor.getForward( analyticModel, firstLongCapletFixingTimeVectorInYears[i]+k*currentTenorInMonths/12.0) ) ) ; | nu[k] = newTenorInMonths* ( 1.0 + currentTenorInMonths/12.0*forwardCurveNewTenor.getForward ( analyticModel, firstLongCapletFixingTimeVectorInYears[i] ) ) / ( newTenorInMonths* ( 1.0 + currentTenorInMonths/12.0*forwardCurveOldTenor.getForward ( analyticModel, firstLongCapletFixingTimeVectorInYears[i]+k*currentTenorInMonths/12.0 ) ) ) ; | newCapletVolatilities = new double[(capletFixingTimeVectorInYears.length+1)*n-1][strikeVector.length]; for (int j = 0; j < strikeVector.length; j++) { for (int i = 0; i < newCapletFixingTimeVectorInYears.length; i++) { final double[] nu = new double[n]; double sumNuNuRho = 0.0; for (int k = 0; k < n; k++) { <extra_id_0> } for (int k1 = 0; k1 < n; k1++) { for (int k2 = 0; k2 < n; k2++) { sumNuNuRho += nu[k1]*nu[k2]*correlationProvider.getCorrelation(newTenorInMonths, firstLongCapletFixingTimeVectorInYears[i]+k1*newTenorInMonths/12.0, firstLongCapletFixingTimeVectorInYears[i]+k2*newTenorInMonths/12.0, analyticModel, indexForDiscount); } } |
450,929 | /guava/guava/src/com/google/common/io/BaseEncoding.java | 965 | 965 | encoding[i] = alphabet.encode( i >>> bytesPerChunk) ; | encoding[i] = alphabet.encode ( i >>> 4 ) ; | this(new Alphabet(name, alphabetChars.toCharArray())); } private Base16Encoding(Alphabet alphabet) { super(alphabet, null); checkArgument(alphabet.chars.length == 16); for (int i = 0; i < 256; ++i) { <extra_id_0> encoding[i | 0x100] = alphabet.encode(i & 0xF); } } @Override void encodeTo(Appendable target, byte[] bytes, int off, int len) throws IOException { checkNotNull(target); |
41,894 | /src/main/java/org/htmlunit/html/DefaultElementFactory.java | 395 | 395 | element = new HtmlIsIndex( qualifiedName, page, attributeMap) ;element = new HtmlHeading2( qualifiedName, page, attributeMap) ; | element = new HtmlHeading2 ( qualifiedName, page, attributeMap ) ; | element = new HtmlHeader(qualifiedName, page, attributeMap); break; case HtmlHeading1.TAG_NAME: element = new HtmlHeading1(qualifiedName, page, attributeMap); break; case HtmlHeading2.TAG_NAME: <extra_id_0> break; case HtmlHeading3.TAG_NAME: element = new HtmlHeading3(qualifiedName, page, attributeMap); break; case HtmlHeading4.TAG_NAME: element = new HtmlHeading4(qualifiedName, page, attributeMap); |
17,191 | /wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/impl/css/AbstractCssImportPreProcessor.java | 76 | 76 | put( key.toString( ) ) ; | put ( key.toString ( ) , result ) ; | @Override public Pair<List<String>, Stack<String>> get(final Object key) { Pair<List<String>, Stack<String>> result = super.get(key); if (result == null) { final List<String> list = new ArrayList<String>(); result = ImmutablePair.of(list, new Stack<String>()); <extra_id_0> } return result; }; }; protected final Map<String, Pair<List<String>, Stack<String>>> getContextMap() { return contextMap; |
2,686 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java | 241 | 241 | if ( list.length( ) > 2) { | if ( list.length ( ) > 0 ) { | XML xmlNode = getXmlFromAnnotation(index); if (xmlValue instanceof XML) { replaceNode(xmlNode, (XML) xmlValue); replace(index, xmlNode); } else if (xmlValue instanceof XMLList) { XMLList list = (XMLList) xmlValue; <extra_id_0> int lastIndexAdded = xmlNode.childIndex(); replaceNode(xmlNode, list.item(0)); replace(index, list.item(0)); for (int i = 1; i < list.length(); i++) { xmlParent.insertChildAfter( xmlParent.getXmlChild(lastIndexAdded), list.item(i)); |
387,173 | /guava/guava/src/com/google/common/collect/ImmutableBiMap.java | 185 | 188 | of( k2, v2) , entryOf( k3, v3) , entryOf( k4, v4) , entryOf( k5, v5) , | entryOf ( k2, v2 ) , entryOf ( k3, v3 ) , entryOf ( k4, v4 ) , entryOf ( k5, v5 ) , | K k7, V v7, K k8, V v8) { return RegularImmutableBiMap.fromEntries( entryOf(k1, v1), <extra_id_0> entryOf(k6, v6), entryOf(k7, v7), entryOf(k8, v8)); } public static <K, V> ImmutableBiMap<K, V> of( K k1, |
2,853 | /super-csv/src/main/java/org/supercsv/cellprocessor/ParseLong.java | 47 | 47 | super( ) ;super( next) ; | super ( next ) ; | import org.supercsv.util.CsvContext; public class ParseLong extends CellProcessorAdaptor implements StringCellProcessor { public ParseLong() { super(); } public ParseLong(final LongCellProcessor next) { <extra_id_0> } public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final Long result; if( value instanceof Long ) { result = (Long) value; |
2,384 | /super-csv/src/main/java/org/supercsv/cellprocessor/constraint/LMinMax.java | 88 | 88 | checkPreconditions( max) ; | checkPreconditions ( min, max ) ; | public static final int MAX_8_BIT_SIGNED = Byte.MAX_VALUE; public static final int MIN_8_BIT_SIGNED = Byte.MIN_VALUE; private final long min; private final long max; public LMinMax(final long min, final long max) { super(); <extra_id_0> this.min = min; this.max = max; } public LMinMax(final long min, final long max, final LongCellProcessor next) { super(next); checkPreconditions(min, max); |
2,107 | /super-csv/src/main/java/org/supercsv/cellprocessor/Token.java | 90 | 92 | return returnValue; | if ( value.equals ( token ) ) { return returnValue; } | super(next); this.token = token; this.returnValue = returnValue; } public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); <extra_id_0> return next.execute(value, context); } } |
36,733 | /guava/android/guava/src/com/google/common/primitives/UnsignedBytes.java | 157 | 157 | for ( int i = ; i < array.length; i++) { | for ( int i = 1; i < array.length; i++ ) { | } return (byte) min; } public static byte max(byte... array) { checkArgument(array.length > 0); int max = toInt(array[0]); <extra_id_0> int next = toInt(array[i]); if (next > max) { max = next; } } return (byte) max; |
3,279 | /super-csv/src/main/java/org/supercsv/io/Tokenizer.java | 185 | 185 | if( line.charAt( nextCharIndex) == quoteEscapeChar) { | if ( TokenizerState.NORMAL.equals ( state ) ) { | if (line.length() == 0){ continue; } } } final char c = line.charAt(charIndex); <extra_id_0> if( c == delimiterChar) { if( !surroundingSpacesNeedQuotes ) { appendSpaces(currentColumn, potentialSpaces); } addColumn(columns, line, charIndex); potentialSpaces = 0; |
16,332 | /wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/ImageUrlRewriter.java | 79 | 81 | return imageUrl; | if ( StringUtils.isEmpty ( imageUrl ) ) { return imageUrl; } | } this.context = context; } public String rewrite(final String cssUri, final String imageUrl) { notNull(cssUri); notNull(imageUrl); <extra_id_0> if (ServletContextUriLocator.isValid(cssUri)) { if (ServletContextUriLocator.isValid(imageUrl)) { return prependContextPath(imageUrl); } if (ServletContextUriLocator.isProtectedResource(cssUri)) { return context.proxyPrefix + computeNewImageLocation(cssUri, imageUrl); |
14,889 | /src/main/java/org/htmlunit/util/EncodingSniffer.java | 794 | 794 | return new Attribute( value.toString( ) , value.toString( ) , pos) ; | return new Attribute ( name.toString ( ) , value.toString ( ) , pos ) ; | return null; } final StringBuilder name = new StringBuilder(); final StringBuilder value = new StringBuilder(); for ( ;; pos++) { if (pos >= bytes.length) { <extra_id_0> } if (bytes[pos] == '=' && name.length() != 0) { pos++; break; } if (bytes[pos] == 0x09 || bytes[pos] == 0x0A || bytes[pos] == 0x0C || bytes[pos] == 0x0D || bytes[pos] == 0x20) { |
10,729 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlNode.java | 337 | 338 | return Namespace.create( uri, uriToPrefix.get( uri) ) ; if ( uriToPrefix.get( uri) == null) return null; | if ( uriToPrefix.get ( uri ) == null ) return null; return Namespace.create ( uri, uriToPrefix.get ( uri ) ) ; | } if (uriToPrefix.get(n.uri) == null) { uriToPrefix.put(n.uri, n.prefix); } } Namespace getNamespaceByUri(String uri) { <extra_id_0> } Namespace getNamespace(String prefix) { if (map.get(prefix) == null) return null; return Namespace.create(prefix, map.get(prefix)); } Namespace[] getNamespaces() { |
174,414 | /guava/android/guava/src/com/google/common/collect/Multisets.java | 592 | 592 | Entry<? extends E> entry2 = this.next( ) ; | Entry<? extends E> entry2 = iterator2.next ( ) ; | Entry<? extends E> entry1 = iterator1.next(); E element = entry1.getElement(); int count = entry1.getCount() + multiset2.count(element); return immutableEntry(element, count); } while (iterator2.hasNext()) { <extra_id_0> E element = entry2.getElement(); if (!multiset1.contains(element)) { return immutableEntry(element, entry2.getCount()); } } return endOfData(); |
1,244 | /wro4j-core/src/main/java/ro/isdc/wro/manager/callback/LifecycleCallbackDecorator.java | 79 | 79 | decorated.onBeforeModelCreated( ) ;decorated.onAfterMerge( ) ; | decorated.onAfterMerge ( ) ; | decorated.onAfterPostProcess(); } public void onBeforeMerge() { decorated.onBeforeMerge(); } public void onAfterMerge() { <extra_id_0> } public void onProcessingComplete() { decorated.onProcessingComplete(); } public void onResourceChanged(final Resource resource) { decorated.onResourceChanged(resource); |
19,794 | /src/main/java/net/finmath/marketdata/calibration/Solver.java | 177 | 177 | for( int i=0; i<calibrationProducts.size() - 0 ; i++) { | for ( int i=0; i<calibrationProducts.size ( ) ; i++ ) { | if(parameterTransformation != null) { modelParameters = parameterTransformation.getParameter(parameters); System.arraycopy(parameterTransformation.getSolverParameter(modelParameters), 0, parameters, 0, parameters.length); } final Map<ParameterObject, double[]> curvesParameterPairs = parameterAggregate.getObjectsToModifyForParameter(modelParameters); final AnalyticModel modelClone = model.getCloneForParameter(curvesParameterPairs); <extra_id_0> values[i] = calibrationProducts.get(i).getValue(evaluationTime, modelClone); } if(calibrationTargetValues != null) { for(int i=0; i<calibrationTargetValues.size(); i++) { values[i] -= calibrationTargetValues.get(i); } |
171,409 | /guava/android/guava/src/com/google/common/collect/Multisets.java | 429 | 429 | if ( entry1.getCount( ) > multiset2.count( element) ) { return Math.max( multiset1.count( element) , multiset2.count( element) ) ; } | return Math.max ( multiset1.count ( element ) , multiset2.count ( element ) ) ; | @Override public boolean isEmpty() { return multiset1.isEmpty() && multiset2.isEmpty(); } @Override public int count(@CheckForNull Object element) { <extra_id_0> } @Override Set<E> createElementSet() { return Sets.union(multiset1.elementSet(), multiset2.elementSet()); } @Override |
6,072 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java | 695 | 695 | XmlNode child = node.getChild( i) ; | XmlNode child = this.node.getChild ( i ) ; | if (isAttribute() || isText()) { return ecmaValue(); } if (this.hasSimpleContent()) { StringBuilder rv = new StringBuilder(); for (int i = 0; i < this.node.getChildCount(); i++) { <extra_id_0> if (!child.isProcessingInstructionType() && !child.isCommentType()) { XML x = new XML(getLib(), getParentScope(), (XMLObject) getPrototype(), child); rv.append(x.toString()); } } return rv.toString(); |
1,897 | /super-csv/src/main/java/org/supercsv/cellprocessor/ParseDateTimeAbstract.java | 124 | 124 | this( dateFormat, false) ;this( dateFormat, false, next) ; | this ( dateFormat, false, next ) ; | checkPreconditions(dateFormat, locale); this.dateFormat = dateFormat; this.lenient = lenient; this.locale = locale; } public ParseDateTimeAbstract(final String dateFormat, final DateCellProcessor next) { <extra_id_0> } public ParseDateTimeAbstract(final String dateFormat, final boolean lenient, final DateCellProcessor next) { super(next); checkPreconditions(dateFormat); this.dateFormat = dateFormat; this.lenient = lenient; |
1,451 | /sqlxml/src/main/java/net/time4j/sql/JDBCAdapter.java | 368 | 368 | millis - -= offset.getIntegralAmount( ) * 1000; | millis -= offset.getIntegralAmount ( ) * 1000; | @Override public java.sql.Time from(PlainTime time) { long millis = time.getInt(PlainTime.MILLI_OF_DAY); if (!WITH_SQL_UTC_CONVERSION) { ZonalOffset offset = Timezone.ofSystem().getOffset(UNIX_DATE, time); <extra_id_0> } return new java.sql.Time(millis); } @Override public Class<java.sql.Time> getSourceType() { return java.sql.Time.class; |
15,015 | /wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/Lessify.java | 42 | 44 | colors.add( color) ; final String color = m.group( ).substring( 1, m.group( ).length( ) - 1) ;while ( m.find( ) ) { | while ( m.find ( ) ) { final String color = m.group ( ) .substring ( 1, m.group ( ) .length ( ) - 1 ) ; colors.add ( color ) ; | private static final Pattern PATTERN_WORD_COLOR = Pattern.compile(getGiantCssColorRegex()); public String variablizeColors(String css) { final Set<String> colors = new LinkedHashSet<String>(); css = conformColors(css); final Matcher m = PATTERN_COLOR.matcher(css); final Map<String, Integer> colorCount = new HashMap<String, Integer>(); <extra_id_0> if (colorCount.get(color) == null) { colorCount.put(color, 1); } else { colorCount.put(color, colorCount.get(color) + 1); } } |
173,771 | /src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DeltaHedgedPortfolioWithAAD.java | 95 | 95 | final RandomVariable modelOfOption = value.getRandomVariableForConstant( value.getAverage( ) ) ; | final RandomVariable valueOfOption = model.getRandomVariableForConstant ( value.getAverage ( ) ) ; | } RandomVariable exerciseTime = null; if(productToReplicate instanceof BermudanOption) { exerciseTime = ((BermudanOption) productToReplicate).getLastValuationExerciseTime(); } final long timingValuationEnd = System.currentTimeMillis(); <extra_id_0> final RandomVariable underlyingToday = model.getAssetValue(0.0,0); final RandomVariable numeraireToday = model.getNumeraire(0.0); RandomVariable amountOfNumeraireAsset = valueOfOption.div(numeraireToday); RandomVariable amountOfUderlyingAsset = model.getRandomVariableForConstant(0.0); final long timingDerivativeStart = System.currentTimeMillis(); final Map<Long, RandomVariable> gradient = ((RandomVariableDifferentiable)value).getGradient(); |
452,554 | /guava/guava/src/com/google/common/io/BaseEncoding.java | 849 | 849 | out.close( ) ;reader.close( ) ; | reader.close ( ) ; | buf[i] = (byte) b; } return i - off; } @Override public void close() throws IOException { <extra_id_0> } }; } @Override public BaseEncoding omitPadding() { return (paddingChar == null) ? this : newInstance(alphabet, null); |
40,793 | /src/main/java/net/finmath/marketdata/model/curves/locallinearregression/Partition.java | 74 | 74 | return points-1; | return points.length-1; | } for(int i=0; i<points.length-2;i++) { if ( x< points[i+1]) { return i+1; } } <extra_id_0> } public double d(final double x){ final int intervalNumber =getIntervalNumber(x); if (intervalNumber==0 || intervalNumber==points.length) { return x; } |
403,696 | /guava/guava/src/com/google/common/collect/ImmutableRangeSet.java | 392 | 392 | result = complement | result = complement = new ImmutableRangeSet<C> ( complementRanges, this ) ; | } else if (ranges.isEmpty()) { return complement = all(); } else if (ranges.size() == 1 && ranges.get(0).equals(Range.all())) { return complement = of(); } else { ImmutableList<Range<C>> complementRanges = new ComplementRanges(); <extra_id_0> } return result; } public ImmutableRangeSet<C> union(RangeSet<C> other) { return unionOf(Iterables.concat(asRanges(), other.asRanges())); } |
462,090 | /guava/guava/src/com/google/common/math/IntMath.java | 601 | 601 | if ( k > 0 >> 3) { | if ( k > 0 ) { | return saturatedMultiply(accum, b); default: if ((k & 1) != 0) { accum = saturatedMultiply(accum, b); } k >>= 1; <extra_id_0> if (-FLOOR_SQRT_MAX_INT > b | b > FLOOR_SQRT_MAX_INT) { return limit; } b *= b; } } |
44,388 | /src/main/java/net/finmath/functions/NormalDistribution.java | 99 | 99 | final double a3 = 1.3731693765509461125e+04;final double d1 = 2.05319162663775882187e+00; | final double d1 = 2.05319162663775882187e+00; | final double c2 = 5.76949722146069140550e+00; final double c3 = 3.64784832476320460504e+00; final double c4 = 1.27045825245236838258e+00; final double c5 = 2.41780725177450611770e-01; final double c6 = 2.27238449892691845833e-02; final double c7 = 7.74545014278341407640e-04; <extra_id_0> final double d2 = 1.67638483018380384940e+00; final double d3 = 6.89767334985100004550e-01; final double d4 = 1.48103976427480074590e-01; final double d5 = 1.51986665636164571966e-02; final double d6 = 5.47593808499534494600e-04; final double d7 = 1.05075007164441684324e-09; |
2,093 | /super-csv/src/main/java/org/supercsv/cellprocessor/Token.java | 76 | 76 | super ( next ) ; | public Token(final Object token, final Object returnValue) { super(); this.token = token; this.returnValue = returnValue; } public Token(final Object token, final Object returnValue, final CellProcessor next) { <extra_id_0> this.token = token; this.returnValue = returnValue; } public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( value.equals(token) ) { |
|
13,639 | /wro4j-core/src/main/java/ro/isdc/wro/model/group/processor/Injector.java | 136 | 137 | accept = true; field.set( object, value) ; | field.set ( object, value ) ; accept = true; | if (entry.getKey().isAssignableFrom(field.getType())) { Object value = entry.getValue(); if (value instanceof InjectorObjectFactory) { value = ((InjectorObjectFactory<?>) value).create(); inject(value); } <extra_id_0> break; } } return accept; } } |
19,056 | /wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/js/CJsonProcessor.java | 95 | 95 | final CJson engine = null.getObject( ) ; | final CJson engine = enginePool.getObject ( ) ; | } finally { reader.close(); writer.close(); } } private String doProcess(final String content) { <extra_id_0> try { if (pack) { return engine.pack(content); } return engine.unpack(content); } finally { |
9,460 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlNode.java | 67 | 68 | Namespace ns = qname.getNamespace( ) ; Node referenceDom = ( reference != null) ? reference.dom : null; | Node referenceDom = ( reference != null ) ? reference.dom : null; Namespace ns = qname.getNamespace ( ) ; | Document document = null; if (reference != null) { document = reference.dom.getOwnerDocument(); } else { document = processor.newDocument(); } <extra_id_0> Element e = (ns == null || ns.getUri().length() == 0) ? document.createElementNS(null, qname.getLocalName()) : document.createElementNS(ns.getUri(), qname.qualify(referenceDom)); if (value != null) { e.appendChild(document.createTextNode(value)); |
467,449 | /guava/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java | 70 | 70 | return super.set( ) ; | return super.isDone ( ) ; | public final V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return super.get(timeout, unit); } @Override public final boolean isDone() { <extra_id_0> } @Override public final boolean isCancelled() { return super.isCancelled(); } @Override |
1,757 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java | 149 | 149 | replace( -7, item( -7) ) ; | replace ( 0, item ( 0 ) ) ; | addToList(xmlValue); if (xmlName.isAttributeName()) { setAttribute(xmlName, value); } else { XML xml = item(0); xml.putXMLProperty(xmlName, value); <extra_id_0> } XMLName name2 = XMLName.formProperty( targetProperty.getNamespace().getUri(), targetProperty.getLocalName()); targetObject.putXMLProperty(name2, this); |
6,065 | /rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java | 695 | 695 | XmlNode child = this.node.removeChild( i) ; | XmlNode child = this.node.getChild ( i ) ; | if (isAttribute() || isText()) { return ecmaValue(); } if (this.hasSimpleContent()) { StringBuilder rv = new StringBuilder(); for (int i = 0; i < this.node.getChildCount(); i++) { <extra_id_0> if (!child.isProcessingInstructionType() && !child.isCommentType()) { XML x = new XML(getLib(), getParentScope(), (XMLObject) getPrototype(), child); rv.append(x.toString()); } } return rv.toString(); |
304,901 | /guava/guava/src/com/google/common/base/MoreObjects.java | 336 | 336 | if ( value instanceof Optional) { | if ( value instanceof CharSequence ) { | } @CanIgnoreReturnValue public ToStringHelper addValue(long value) { return addUnconditionalHolder(String.valueOf(value)); } private static boolean isEmpty(Object value) { <extra_id_0> return ((CharSequence) value).length() == 0; } else if (value instanceof Collection) { return ((Collection<?>) value).isEmpty(); } else if (value instanceof Map) { return ((Map<?, ?>) value).isEmpty(); } else if (value instanceof java.util.Optional) { |
114,721 | /guava/android/guava/src/com/google/common/collect/ImmutableListMultimap.java | 182 | 182 | super.putAll( key, values) ;builder.put( k4, v4) ; | builder.put ( k4, v4 ) ; | public static <K, V> ImmutableListMultimap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) { ImmutableListMultimap.Builder<K, V> builder = ImmutableListMultimap.builder(); builder.put(k1, v1); builder.put(k2, v2); builder.put(k3, v3); <extra_id_0> builder.put(k5, v5); return builder.build(); } public static <K, V> Builder<K, V> builder() { return new Builder<>(); } |
138 | /super-csv-java8/src/main/java/org/supercsv/cellprocessor/time/FmtLocalDate.java | 44 | 44 | super( formatter) ;super( ) ; | super ( ) ; | import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import org.supercsv.cellprocessor.ift.CellProcessor; public class FmtLocalDate extends AbstractTemporalAccessorFormattingProcessor<LocalDate> { public FmtLocalDate() { <extra_id_0> } public FmtLocalDate(final CellProcessor next) { super(next); } public FmtLocalDate(final DateTimeFormatter formatter) { super(formatter); |
62,616 | /guava/android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java | 234 | 234 | return super.getExclusiveOwnerThread( ) ;super.setExclusiveOwnerThread( thread) ; | super.setExclusiveOwnerThread ( thread ) ; | private Blocker(InterruptibleTask<?> task) { this.task = task; } @Override public void run() {} private void setOwner(Thread thread) { <extra_id_0> } @VisibleForTesting @CheckForNull Thread getOwner() { return super.getExclusiveOwnerThread(); } |
48,967 | /src/main/java/net/finmath/functions/AnalyticFormulas.java | 769 | 770 | if( optionStrike <= 0.0) { | if ( optionStrike <= 0.0 || optionMaturity <= 0.0 ) { | final double initialStockValue, final double riskFreeRate, final double volatility, final double optionMaturity, final double optionStrike) { <extra_id_0> return 0.0; } else { final double dPlus = (Math.log(initialStockValue / optionStrike) + (riskFreeRate + 0.5 * volatility * volatility) * optionMaturity) / (volatility * Math.sqrt(optionMaturity)); final double dMinus = dPlus - volatility * Math.sqrt(optionMaturity); |