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
3,021
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
104
104
if ( ( cacheStrategy) == null) { cacheStrategy = newCacheStrategy( ) ; }
[Delete]
if (namingStrategy == null) { namingStrategy = newNamingStrategy(); } if (authorizationManager == null) { authorizationManager = newAuthorizationManager(); } <extra_id_0> cacheKeyFactory = newCacheKeyFactory(); } if (metaDataFactory == null) { metaDataFactory = newMetaDataFactory(); } if (groupExtractor != null) {
8,471
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
232
232
result = toXMLNameFromString( null, str) ;
result = toXMLNameFromString ( cx, str ) ;
String str = (String) value; long test = ScriptRuntime.testUint32String(str); if (test >= 0) { ScriptRuntime.storeUint32Result(cx, test); result = null; } else { <extra_id_0> } } else if (value instanceof Number) { double d = ((Number) value).doubleValue(); long l = (long) d; if (l == d && 0 <= l && l <= 0xFFFFFFFFL) { ScriptRuntime.storeUint32Result(cx, l);
104,836
/guava/android/guava/src/com/google/common/graph/AbstractBaseGraph.java
199
202
return InvalidatableSet.of( set,( ) -> nodes( ).contains( nodeU) || nodes( ).contains( nodeV) ,( ) -> String.format( NODE_PAIR_REMOVED_FROM_GRAPH, nodeU, nodeV) ) ;
return InvalidatableSet.of ( set, ( ) -> nodes ( ) .contains ( nodeU ) && nodes ( ) .contains ( nodeV ) , ( ) -> String.format ( NODE_PAIR_REMOVED_FROM_GRAPH, nodeU, nodeV ) ) ;
} protected final <T> Set<T> nodeInvalidatableSet(Set<T> set, N node) { return InvalidatableSet.of( set, () -> nodes().contains(node), () -> String.format(NODE_REMOVED_FROM_GRAPH, node)); } protected final <T> Set<T> nodePairInvalidatableSet(Set<T> set, N nodeU, N nodeV) { <extra_id_0> } }
2,081
/super-csv/src/main/java/org/supercsv/cellprocessor/StrReplace.java
62
62
this.replacement = null;
this.replacement = replacement;
private final Pattern regexPattern; private final String replacement; public StrReplace(final String regex, final String replacement) { super(); checkPreconditions(regex, replacement); this.regexPattern = Pattern.compile(regex); <extra_id_0> } public StrReplace(final String regex, final String replacement, final StringCellProcessor next) { super(next); checkPreconditions(regex, replacement); this.regexPattern = Pattern.compile(regex); this.replacement = replacement;
69,338
/guava/android/guava/src/com/google/common/base/CharMatcher.java
734
736
buf.append( string, oldpos, pos) ; do {int oldpos = 0;
int oldpos = 0; do { buf.append ( string, oldpos, pos ) ;
int pos = indexIn(string); if (pos == -1) { return string; } int len = string.length(); StringBuilder buf = new StringBuilder((len * 3 / 2) + 16); <extra_id_0> buf.append(replacement); oldpos = pos + 1; pos = indexIn(string, oldpos); } while (pos != -1); buf.append(string, oldpos, len); return buf.toString();
16,051
/src/main/java/org/htmlunit/html/BaseFrameElement.java
526
526
if ( loadSrcWhenAddedToPage_) { loadSrc( ) ; }
[Delete]
} }; jsEngine.addPostponedAction(action); } } else { <extra_id_0> } } }
2,463
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
137
137
if ( ( processorsFactory) != null) { managerBuilder.setProcessorsFactory( processorsFactory) ; }
[Delete]
if (modelFactory != null) { managerBuilder.setModelFactory(modelFactory); } if (authorizationManager != null) { managerBuilder.setAuthorizationManager(authorizationManager); } <extra_id_0> managerBuilder.setCacheKeyFactory(cacheKeyFactory); } if (metaDataFactory != null) { managerBuilder.setMetaDataFactory(metaDataFactory); } if (resourceWatcher == null) {
138,042
/guava/android/guava/src/com/google/common/collect/HashBiMap.java
1,065
1,065
if ( equal( array[entry], o) ) { return entry; }
[Delete]
if (o instanceof Entry) { Entry<?, ?> e = (Entry<?, ?>) o; Object v = e.getKey(); Object k = e.getValue(); int vHash = Hashing.smearedHash(v); int eIndex = biMap.findEntryByValue(v, vHash); <extra_id_0> biMap.removeEntryValueHashKnown(eIndex, vHash); return true; } } return false; }
3,032
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseDate.java
72
72
super( dateFormat) ;super( dateFormat, lenient) ;
super ( dateFormat, lenient ) ;
super(dateFormat, lenient, locale, next); } public ParseDate(String dateFormat, boolean lenient, Locale locale) { super(dateFormat, lenient, locale); } public ParseDate(String dateFormat, boolean lenient) { <extra_id_0> } public ParseDate(String dateFormat, DateCellProcessor next) { super(dateFormat, next); } public ParseDate(String dateFormat) { super(dateFormat);
41,733
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
391
391
result = new HtmlUrlInput( qualifiedName, page, attributeMap) ;element = new HtmlHeading1( qualifiedName, page, attributeMap) ;
element = new HtmlHeading1 ( qualifiedName, page, attributeMap ) ;
element = new HtmlHead(qualifiedName, page, attributeMap); break; case HtmlHeader.TAG_NAME: element = new HtmlHeader(qualifiedName, page, attributeMap); break; case HtmlHeading1.TAG_NAME: <extra_id_0> break; case HtmlHeading2.TAG_NAME: element = new HtmlHeading2(qualifiedName, page, attributeMap); break; case HtmlHeading3.TAG_NAME: element = new HtmlHeading3(qualifiedName, page, attributeMap);
4,742
/wro4j-core/src/main/java/ro/isdc/wro/manager/WroManager.java
381
381
notNull( cacheKeyFactory) ;notNull( processorsFactory) ;
notNull ( processorsFactory ) ;
public Builder setCacheStrategy(final CacheStrategy<CacheKey, CacheValue> cacheStrategy) { notNull(cacheStrategy); this.cacheStrategy = cacheStrategy; return this; } public Builder setProcessorsFactory(final ProcessorsFactory processorsFactory) { <extra_id_0> this.processorsFactory = processorsFactory; return this; } public Builder setLocatorFactory(final UriLocatorFactory locatorFactory) { notNull(locatorFactory); this.locatorFactory = locatorFactory;
8,647
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
243
243
} else if ( value && QName) {
} else if ( value instanceof QName ) {
if (l == d && 0 <= l && l <= 0xFFFFFFFFL) { ScriptRuntime.storeUint32Result(cx, l); result = null; } else { throw badXMLName(value); } <extra_id_0> QName qname = (QName) value; String uri = qname.uri(); boolean number = false; result = null; if (uri != null && uri.length() == 0) { long test = ScriptRuntime.testUint32String(uri);
18,594
/src/main/java/org/htmlunit/html/DomElement.java
816
816
if ( child > DomElement) {
if ( child instanceof DomElement ) {
} protected static class ChildElementsIterator implements Iterator<DomElement> { private DomElement nextElement_; protected ChildElementsIterator(final DomNode domNode) { final DomNode child = domNode.getFirstChild(); if (child != null) { <extra_id_0> nextElement_ = (DomElement) child; } else { setNextElement(child); } }
3,864
/super-csv/src/main/java/org/supercsv/io/Tokenizer.java
245
245
boolean nextCharIsEscapeQuoteChar = surroundingSpacesNeedQuotes && line.format( nextCharIndex) == quoteEscapeChar;
boolean nextCharIsEscapeQuoteChar = availableCharacters && line.charAt ( nextCharIndex ) == quoteEscapeChar;
} } else { if( c == quoteEscapeChar ) { int nextCharIndex = charIndex + 1; boolean availableCharacters = nextCharIndex < line.length(); boolean nextCharIsQuote = availableCharacters && line.charAt(nextCharIndex) == quoteChar; <extra_id_0> if( nextCharIsQuote ) { charIndex++; currentColumn.append(quoteChar); } else if( nextCharIsEscapeQuoteChar ) { currentColumn.append(c); charIndex++;
41,796
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
395
395
element = new HtmlMarquee( 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);
275,888
/guava/guava/src/com/google/common/primitives/Booleans.java
446
447
} return oldValue;
return oldValue; }
} @Override public Boolean set(int index, Boolean element) { checkElementIndex(index, size()); boolean oldValue = array[start + index]; array[start + index] = checkNotNull(element); <extra_id_0> @Override public List<Boolean> subList(int fromIndex, int toIndex) { int size = size(); checkPositionIndexes(fromIndex, toIndex, size); if (fromIndex == toIndex) { return Collections.emptyList();
775
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
292
292
.replace( i, target.makeXmlFromString( xml, xmlName.toString( ) ) ) ;
.replace ( i, target.makeXmlFromString ( xmlName, xml.toString ( ) ) ) ;
} if (xmlValue instanceof XMLList) { for (int i = 0; i < xmlValue.length(); i++) { XML xml = ((XMLList) xmlValue).item(i); if (xml.isAttribute()) { ((XMLList) xmlValue) <extra_id_0> } } } } else { xmlValue = target.makeXmlFromString(xmlName, ScriptRuntime.toString(value)); }
40,712
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
361
361
element = new HtmlBreak( qualifiedName, page, attributeMap) ;element = new HtmlForm( qualifiedName, page, attributeMap) ;
element = new HtmlForm ( qualifiedName, page, attributeMap ) ;
element = new HtmlFigureCaption(qualifiedName, page, attributeMap); break; case HtmlFont.TAG_NAME: element = new HtmlFont(qualifiedName, page, attributeMap); break; case HtmlForm.TAG_NAME: <extra_id_0> break; case HtmlFooter.TAG_NAME: element = new HtmlFooter(qualifiedName, page, attributeMap); break; case HtmlFrame.TAG_NAME: if (attributeMap != null) {
8,361
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
237
237
if ( l == d && 0 < l && l <= 0xFFFFFFFFL) {
if ( l == d && 0 <= l && l <= 0xFFFFFFFFL ) {
} else { result = toXMLNameFromString(cx, str); } } else if (value instanceof Number) { double d = ((Number) value).doubleValue(); long l = (long) d; <extra_id_0> ScriptRuntime.storeUint32Result(cx, l); result = null; } else { throw badXMLName(value); } } else if (value instanceof QName) {
4,599
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLWithScope.java
38
38
XMLList xmlL = _xmlList;XMLList xl = ( XMLList) prototype;
XMLList xl = ( XMLList ) prototype;
} void initAsDotQuery() { XMLObject prototype = (XMLObject) getPrototype(); _currIndex = 0; _dqPrototype = prototype; if (prototype instanceof XMLList) { <extra_id_0> if (xl.length() > 0) { setPrototype((Scriptable) (xl.get(0, null))); } } _xmlList = lib.newXMLList(); }
86,257
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java
459
460
Arrays.asList( new RandomVariable[]{ this }) , OperatorType.STDERROR) ;Arrays.asList( new RandomVariable[]{ this }) , OperatorType.MAX) ;
Arrays.asList ( new RandomVariable[]{ this } ) , OperatorType.MAX ) ;
Arrays.asList(new RandomVariable[]{ this }), OperatorType.MIN); } public RandomVariable getMaxAsRandomVariableAAD(){ return new RandomVariableDifferentiableAADPathwise( new RandomVariableFromDoubleArray(getMax()), <extra_id_0> } @Override public RandomVariable getValues(){ return values; } @Override
8,824
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
310
310
if ( globalScope instanceof XMLWithScope) {
if ( scope instanceof XMLWithScope ) {
return listToAdd; } private Ref xmlPrimaryReference(Context cx, XMLName xmlName, Scriptable scope) { XMLObjectImpl xmlObj; XMLObjectImpl firstXml = null; for (; ; ) { <extra_id_0> xmlObj = (XMLObjectImpl) scope.getPrototype(); if (xmlObj.hasXMLProperty(xmlName)) { break; } if (firstXml == null) { firstXml = xmlObj;
1,770
/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;
3,658
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/standalone/StandaloneContext.java
57
58
} return contextFoldersAsCSV;
return contextFoldersAsCSV; }
return wroFile; } public void setWroFile(final File wroFile) { this.wroFile = wroFile; } public String getContextFoldersAsCSV() { <extra_id_0> public void setContextFoldersAsCSV(final String contextFoldersAsCSV) { this.contextFoldersAsCSV = contextFoldersAsCSV; } public String[] getContextFolders() { return contextFoldersAsCSV != null ? contextFoldersAsCSV.split(TOKEN_SEPARATOR) : new String[] {}; }
5,368
/wro4j-core/src/main/java/ro/isdc/wro/manager/WroManager.java
429
429
notNull( manager) ;notNull( metaDataFactory) ;
notNull ( metaDataFactory ) ;
public Builder setCacheKeyFactory(final CacheKeyFactory cacheKeyFactory) { notNull(cacheKeyFactory); this.cacheKeyFactory = cacheKeyFactory; return this; } public Builder setMetaDataFactory(final MetaDataFactory metaDataFactory) { <extra_id_0> this.metaDataFactory = metaDataFactory; return this; } private List<Transformer<WroModel>> createDefaultTransformers() { final List<Transformer<WroModel>> list = new ArrayList<Transformer<WroModel>>(); list.add(new WildcardExpanderModelTransformer());
36,658
/src/main/java/net/finmath/marketdata/model/volatilities/OptionSurfaceData.java
61
61
final OptionSmileData jthSmile = new OptionSmileData( underlying, referenceDate, strikes, maturities[j], strikes, 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;
3,888
/src/main/java/org/htmlunit/ProxyAutoConfig.java
457
457
return cal1.equals( cal1) || now.after( cal1) && now.before( cal2) || now.equals( cal2) ;
return now.equals ( cal1 ) || now.after ( cal1 ) && now.before ( cal2 ) || now.equals ( cal2 ) ;
min2 = getSmallInt(value5); second2 = getSmallInt(value6); cal1 = dateRange_createCalendar(timezone, hour1, min1, second1); cal2 = dateRange_createCalendar(timezone, hour2, min2, second2); } final Calendar now = Calendar.getInstance(timezone); <extra_id_0> } private static Calendar timeRange_createCalendar(final TimeZone timezone, final int hour, final int minute, final int second) { final Calendar calendar = Calendar.getInstance(timezone); if (hour != -1) { calendar.set(Calendar.HOUR_OF_DAY, hour);
65,931
/src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveFromForwardCurve.java
198
198
if ( forwardCurve != null) {
if ( other.forwardCurve != null ) {
} if (getClass() != obj.getClass()) { return false; } final DiscountCurveFromForwardCurve other = (DiscountCurveFromForwardCurve) obj; if (forwardCurve == null) { <extra_id_0> return false; } } else if (!forwardCurve.equals(other.forwardCurve)) { return false; } if (forwardCurveName == null) {
8,988
/src/main/java/org/htmlunit/util/UrlUtils.java
776
776
if ( userInfo != null) {
if ( sb == null ) {
} } else if (sb != null) { sb.append(c); } } <extra_id_0> if (trailing > 0) { endIndex = spec.length() - trailing; spec = spec.substring(0, endIndex); } } else {
12,519
/wro4j-core/src/main/java/ro/isdc/wro/http/ConfigurableWroFilter.java
124
124
this.debug = jmxEnabled;
this.debug = debug;
this.mbeanName = mbeanName; } public void setJmxEnabled(final boolean jmxEnabled) { this.jmxEnabled = jmxEnabled; } public final void setDebug(final boolean debug) { <extra_id_0> } public final void setGzipEnabled(final boolean gzipEnabled) { this.gzipEnabled = gzipEnabled; } public final void setCacheUpdatePeriod(final long cacheUpdatePeriod) { this.cacheUpdatePeriod = cacheUpdatePeriod;
64,165
/src/main/java/net/finmath/marketdata2/model/AnalyticModelFromCurvesAndVols.java
212
212
volatilitySurfaceMap.put( volatilitySurface.getName( ) , volatilitySurface) ;newModel.volatilitySurfaceMap.put( volatilitySurface.getName( ) , volatilitySurface) ;
newModel.volatilitySurfaceMap.put ( volatilitySurface.getName ( ) , volatilitySurface ) ;
} @Override public AnalyticModel addVolatilitySurfaces(final VolatilitySurface... volatilitySurfaces) { final AnalyticModelFromCurvesAndVols newModel = clone(); for(final VolatilitySurface volatilitySurface : volatilitySurfaces) { <extra_id_0> } return newModel; } @Override public AnalyticModel addVolatilitySurfaces(final Set<VolatilitySurface> volatilitySurfaces) { final AnalyticModelFromCurvesAndVols newModel = clone();
2,045
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseInt.java
60
60
if( value == Integer ) {
if ( value instanceof Integer ) {
public ParseInt(final LongCellProcessor next) { super(next); } public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final Integer result; <extra_id_0> result = (Integer) value; } else if( value instanceof String ) { try { result = Integer.valueOf((String) value); } catch(final NumberFormatException e) {
65,651
/src/main/java/net/finmath/marketdata2/model/curves/CurveInterpolation.java
474
475
} curveCacheReference = null;
curveCacheReference = null; }
} private void setParameterPrivate(final RandomVariable[] parameter) { for(int i=0; i<pointsBeingParameters.size(); i++) { pointsBeingParameters.get(i).value = interpolationEntityFromValue(parameter[i], pointsBeingParameters.get(i).time); } rationalFunctionInterpolation = null; <extra_id_0> private RandomVariable interpolationEntityFromValue(final RandomVariable value, final double time) { switch(interpolationEntity) { case VALUE: default: return value; case LOG_OF_VALUE:
9,360
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
634
634
if ( ( memberTypeFlags & Node.ATTRIBUTE_FLAG) == 0) {
if ( ( memberTypeFlags & Node.ATTRIBUTE_FLAG ) != 0 ) {
return xmlPrimaryReference(cx, xmlName, scope); } @Override public Ref nameRef( Context cx, Object namespace, Object name, Scriptable scope, int memberTypeFlags) { XMLName xmlName = XMLName.create(toNodeQName(cx, namespace, name), false, false); <extra_id_0> if (!xmlName.isAttributeName()) { xmlName.setAttributeName(); } } return xmlPrimaryReference(cx, xmlName, scope); }
1,380
/super-csv/src/main/java/org/supercsv/util/CsvContext.java
59
59
this.lineNumber = lineNumber;this.rowNumber = rowNumber;
this.rowNumber = rowNumber;
private int lineNumber; private int rowNumber; private int columnNumber; private List<Object> rowSource; public CsvContext(final int lineNumber, final int rowNumber, final int columnNumber) { this.lineNumber = lineNumber; <extra_id_0> this.columnNumber = columnNumber; } public CsvContext(final CsvContext c) { this (c.lineNumber, c.rowNumber, c.columnNumber); if (c.rowSource != null) { this.rowSource = new ArrayList<Object>(c.rowSource);
10,131
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlNode.java
467
467
String existingPrefix = getExistingPrefixFor ( namespace ) ;
if (namespace.is(current)) return; NamedNodeMap attrs = this.dom.getAttributes(); for (int i = 0; i < attrs.getLength(); i++) { XmlNode attr = XmlNode.createImpl(attrs.item(i)); if (namespace.is(attr.getNodeNamespace())) return; } <extra_id_0> if (existingPrefix != null) { if (namespace.isUnspecifiedPrefix()) { declareNamespace(existingPrefix, getDefaultNamespace().getUri()); } else { if (existingPrefix.equals(namespace.getPrefix())) { declareNamespace(existingPrefix, getDefaultNamespace().getUri());
92,853
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADStochasticNonOptimized.java
402
403
Arrays.asList( new RandomVariable[]{ this }) , OperatorType.MAX) ;Arrays.asList( this, new RandomVariableFromDoubleArray( probabilities) ) , OperatorType.STDERROR2) ;
Arrays.asList ( this, new RandomVariableFromDoubleArray ( probabilities ) ) , OperatorType.STDERROR2 ) ;
Arrays.asList(this, new RandomVariableFromDoubleArray(probabilities)), OperatorType.STDEV2); } public RandomVariable getStandardErrorAsRandomVariableAAD(final RandomVariable probabilities){ return new RandomVariableDifferentiableAADStochasticNonOptimized( new RandomVariableFromDoubleArray(getStandardError(probabilities)), <extra_id_0> } public RandomVariable getAverageAsRandomVariableAAD(){ return new RandomVariableDifferentiableAADStochasticNonOptimized( new RandomVariableFromDoubleArray(getAverage()), Arrays.asList(new RandomVariable[]{ this }), OperatorType.AVERAGE);
37,377
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
285
285
element = new HtmlTableRow( qualifiedName, page, attributeMap) ;element = new HtmlCommand( qualifiedName, page, attributeMap) ;
element = new HtmlCommand ( qualifiedName, page, attributeMap ) ;
element = new HtmlCitation(qualifiedName, page, attributeMap); break; case HtmlCode.TAG_NAME: element = new HtmlCode(qualifiedName, page, attributeMap); break; case HtmlCommand.TAG_NAME: <extra_id_0> break; case HtmlData.TAG_NAME: element = new HtmlData(qualifiedName, page, attributeMap); break; case HtmlDataList.TAG_NAME: element = new HtmlDataList(qualifiedName, page, attributeMap);
113,002
/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModel.java
679
679
timeNext = newVolatilityModel.getTimeIndex( timePrev)
timeNext = volatilityModel.getTimeDiscretization ( ) .getTime ( timeIndex ) ;
} RandomVariable integral = new Scalar(0.0); double timePrev = time; double timeNext; RandomVariable expMRTimePrev = getMRTime(timePrev,maturity).mult(-1).exp(); for(int timeIndex=timeIndexStart+1; timeIndex<=timeIndexEnd; timeIndex++) { <extra_id_0> final RandomVariable meanReversion = volatilityModel.getMeanReversion(timeIndex-1); final RandomVariable volatility = volatilityModel.getVolatility(timeIndex-1); final RandomVariable volatilityPerMeanReversionSquared = volatility.squared().div(meanReversion.squared()); final RandomVariable expMRTimeNext = getMRTime(timeNext,maturity).mult(-1).exp(); integral = integral.add(volatilityPerMeanReversionSquared.mult( expMRTimeNext.sub(expMRTimePrev).mult(-2).div(meanReversion)
3,016
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseDate.java
65
65
super( lenient, locale) ;
super ( dateFormat, lenient, locale ) ;
super(dateFormat, lenient, next); } public ParseDate(String dateFormat, boolean lenient, Locale locale, DateCellProcessor next) { super(dateFormat, lenient, locale, next); } public ParseDate(String dateFormat, boolean lenient, Locale locale) { <extra_id_0> } public ParseDate(String dateFormat, boolean lenient) { super(dateFormat, lenient); } public ParseDate(String dateFormat, DateCellProcessor next) { super(dateFormat, next);
922
/super-csv/src/main/java/org/supercsv/prefs/CsvPreference.java
496
496
if( encoder != null ) {
if ( encoder == null ) {
} public Builder setQuoteEscapeChar(final char quoteEscapeChar) { this.quoteEscapeChar = quoteEscapeChar; return this; } public CsvPreference build() { <extra_id_0> encoder = new DefaultCsvEncoder(); } if( quoteMode == null ) { quoteMode = new NormalQuoteMode(); } if( emptyColumnParsing == null ) {
20,858
/src/main/java/net/finmath/marketdata/products/SwapLeg.java
68
70
this.notionals = notionals; this.isNotionalExchanged = isNotionalExchanged;discountCurveForNotionalResetName = discountCurveName;
discountCurveForNotionalResetName = discountCurveName; this.isNotionalExchanged = isNotionalExchanged; this.notionals = notionals;
super(); this.cashFlowEffectiveDate = cashFlowEffectiveDate; this.legSchedule = legSchedule; this.forwardCurveName = forwardCurveName; this.spreads = spreads; this.discountCurveName = discountCurveName; <extra_id_0> } @Deprecated public SwapLeg(final Optional<LocalDateTime> cashFlowEffectiveDate, final Schedule legSchedule, final String forwardCurveName, final double[] notionals, final double[] spreads, final String discountCurveName, final boolean isNotionalExchanged) { this(cashFlowEffectiveDate.orElse(null), legSchedule, forwardCurveName, notionals, spreads, discountCurveName, isNotionalExchanged); } public SwapLeg(final Schedule legSchedule, final String forwardCurveName, final double[] notionals, final double[] spreads, final String discountCurveName, final boolean isNotionalExchanged) {
30,068
/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java
231
231
if ( ( acceptNode( n) ) == ( FILTER_REJECT) ) { return true; }
[Delete]
} return false; } private short acceptNode(final Node n) { final int flag = getFlagForNode(n); if ((whatToShow_ & flag) != 0) { <extra_id_0> } return NodeFilter.FILTER_SKIP; } public static int getFlagForNode(final Node node) { switch (node.getNodeType()) { case Node.ELEMENT_NODE:
130,617
/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/AbstractLIBORCovarianceModelParametric.java
119
119
for( int i=numberOfFactors; i<parameterAsDouble.length; i++) {
for ( int i=0; i<parameterAsDouble.length; i++ ) {
} public abstract double[] getParameterAsDouble(); @Override public abstract Object clone(); public AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(final RandomVariable[] parameters) { final double[] parameterAsDouble = new double[parameters.length]; <extra_id_0> parameterAsDouble[i] = parameters[i].doubleValue(); } return getCloneWithModifiedParameters(parameterAsDouble); } public abstract AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(double[] parameters); public AbstractLIBORCovarianceModelParametric getCloneCalibrated(final LIBORMarketModel calibrationModel, final CalibrationProduct[] calibrationProducts) throws CalculationException {
34,856
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
219
219
result = new HtmlEmailInput( qualifiedName, page, attributeMap) ;element = new HtmlBaseFont( qualifiedName, page, attributeMap) ;
element = new HtmlBaseFont ( qualifiedName, page, attributeMap ) ;
element = new HtmlBackgroundSound(qualifiedName, page, attributeMap); break; case HtmlBase.TAG_NAME: element = new HtmlBase(qualifiedName, page, attributeMap); break; case HtmlBaseFont.TAG_NAME: <extra_id_0> break; case HtmlBidirectionalIsolation.TAG_NAME: element = new HtmlBidirectionalIsolation(qualifiedName, page, attributeMap); break; case HtmlBidirectionalOverride.TAG_NAME: element = new HtmlBidirectionalOverride(qualifiedName, page, attributeMap);
224,152
/guava/android/guava/src/com/google/common/io/ByteSource.java
595
595
return new ByteArrayInputStream( bytes, offset) ;
return new ByteArrayInputStream ( bytes, offset, length ) ;
this.bytes = bytes; this.offset = offset; this.length = length; } @Override public InputStream openStream() { <extra_id_0> } @Override public InputStream openBufferedStream() { return openStream(); } @Override
709
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
286
286
if ( targetValue instanceof XMLList) {
if ( xmlValue instanceof XMLList ) {
xmlValue = (XMLObjectImpl) value; if (xmlValue instanceof XML) { if (((XML) xmlValue).isAttribute()) { xmlValue = target.makeXmlFromString(xmlName, xmlValue.toString()); } } <extra_id_0> for (int i = 0; i < xmlValue.length(); i++) { XML xml = ((XMLList) xmlValue).item(i); if (xml.isAttribute()) { ((XMLList) xmlValue) .replace(i, target.makeXmlFromString(xmlName, xml.toString())); }
22,711
/src/main/java/net/finmath/marketdata/model/cds/CDS.java
217
218
} jointTimeDiscretizationSet.add( schedule.getPeriodEnd( i) ) ;
jointTimeDiscretizationSet.add ( schedule.getPeriodEnd ( i ) ) ; }
final double[] timesDiscountCurve = discountCurve.getTimes(); for(int i=0; i<timesDiscountCurve.length; i++){ jointTimeDiscretizationSet.add(timesDiscountCurve[i]); } for(int i=0; i<schedule.getNumberOfPeriods();i++){ jointTimeDiscretizationSet.add(schedule.getPeriodStart(i)); <extra_id_0> final Double[] jointTimeDiscretization = jointTimeDiscretizationSet.toArray(new Double[0]); Arrays.sort(jointTimeDiscretization); final boolean upfrontIsNonzero = (upfrontPayment != 0); double value = 0.0; for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { if (upfrontIsNonzero && periodIndex == 0) {
27,707
/src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/CorrelationProviderTenorBasis.java
130
133
iCap6MCapletVolBootrapper.getForwardCurve( ) , capletFixingTimeVectorInYears[i * 2 + 1]) ) / ( longTenorTau * ( 1.0 + shortTenorTau[k] * iCap3MCapletVolBootrapper.getForwardCurve( ).getForward( iCap3MCapletVolBootrapper.getParsedModel( ) , capletFixingTimeVectorInYears[i * 2 + 1] + schedule3M.getPeriodStart( k) ) ) ) ;
iCap6MCapletVolBootrapper.getParsedModel ( ) , capletFixingTimeVectorInYears[i * 2 + 1] ) ) / ( longTenorTau * ( 1.0 + shortTenorTau[k] * iCap3MCapletVolBootrapper.getForwardCurve ( ) .getForward ( iCap3MCapletVolBootrapper.getParsedModel ( ) , capletFixingTimeVectorInYears[i * 2 + 1] + schedule3M.getPeriodStart ( k ) ) ) ) ;
for (int k = 0; k < shortTenorTau.length; k++) { shortTenorTau[k] = schedule3M.getPeriodLength(k); } final double longTenorTau = schedule6M.getPeriodLength(0); for (int k = 0; k < nu[0].length; k++) { nu[i][k] = shortTenorTau[k] <extra_id_0> sumNu[i] += nu[i][k]; } for (int k = 0; k < K[0].length; k++) { K[i][k] = (strikeATM - (iCap6MCapletVolBootrapper.getForwardCurve().getForward( iCap6MCapletVolBootrapper.getParsedModel(), capletFixingTimeVectorInYears[i * 2 + 1]) - sumNu[i] * iCap3MCapletVolBootrapper.getForwardCurve()
2,733
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseBool.java
361
361
if( value.equalsIgnoreCase( element) ) {
if ( element.equalsIgnoreCase ( value ) ) {
} return next.execute(result, context); } private static boolean contains(Set<String> set, String value, boolean ignoreCase) { if( ignoreCase ) { for( String element : set ) { <extra_id_0> return true; } } return false; } else { return set.contains(value);
1,475
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java
54
54
_annos.addToList( toAdd) ;_annos.remove( index) ;
_annos.remove ( index ) ;
@Override XML getXML() { if (length() == 1) return getXmlFromAnnotation(0); return null; } private void internalRemoveFromList(int index) { <extra_id_0> } void replace(int index, XML xml) { if (index < length()) { XmlNode.InternalList newAnnoList = new XmlNode.InternalList(); newAnnoList.add(_annos, 0, index); newAnnoList.add(xml);
282,608
/guava/guava/src/com/google/common/primitives/Shorts.java
605
605
if ( backingArray.length == distance) {
if ( backingArray.length == 0 ) {
for (int i = 0; i < len; i++) { array[i] = ((Number) checkNotNull(boxedArray[i])).shortValue(); } return array; } public static List<Short> asList(short... backingArray) { <extra_id_0> return Collections.emptyList(); } return new ShortArrayAsList(backingArray); } @GwtCompatible private static class ShortArrayAsList extends AbstractList<Short>
18,702
/src/main/java/org/htmlunit/html/DomElement.java
221
222
element = new StyleElement( name, value, priority, SelectorSpecificity.FROM_STYLE_ATTRIBUTE) ;element = new StyleElement( name, value, priority, SelectorSpecificity.FROM_STYLE_ATTRIBUTE, old.getIndex( ) ) ;
element = new StyleElement ( name, value, priority, SelectorSpecificity.FROM_STYLE_ATTRIBUTE, old.getIndex ( ) ) ;
final StyleElement old = styleMap.get(name); final StyleElement element; if (old == null) { element = new StyleElement(name, value, priority, SelectorSpecificity.FROM_STYLE_ATTRIBUTE); } else { <extra_id_0> } styleMap.put(name, element); writeStyleToElement(styleMap); } public String removeStyleAttribute(final String name) { final Map<String, StyleElement> styleMap = getStyleMap();
243,396
/guava/guava/src/com/google/common/reflect/ClassPath.java
221
221
this.file = checkNotNull( file) ;this.resourceName = checkNotNull( resourceName) ;
this.resourceName = checkNotNull ( resourceName ) ;
} else { return new ResourceInfo(file, resourceName, loader); } } ResourceInfo(File file, String resourceName, ClassLoader loader) { this.file = checkNotNull(file); <extra_id_0> this.loader = checkNotNull(loader); } public final URL url() { URL url = loader.getResource(resourceName); if (url == null) { throw new NoSuchElementException(resourceName);
1,242
/sqlxml/src/main/java/net/time4j/xml/XMLAdapter.java
570
570
return toXML( pm, tz) ;
return toXML ( zm, tz ) ;
} @Override public XMLGregorianCalendar from(ZonalDateTime zm) { ZonalOffset offset = zm.getOffset(); int tz = offset.getIntegralAmount() / 60; try { <extra_id_0> } catch (IllegalArgumentException iae) { if (zm.isLeapSecond()) { ZonalDateTime pm = zm.toMoment().minus(1, SI.SECONDS).inZonalView(offset); return toXML(pm, tz); } else {
5,136
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java
294
294
rv.addToList( toXML( elements[i]) ) ;rv.addToList( toXML( children[i]) ) ;
rv.addToList ( toXML ( children[i] ) ) ;
XMLList children() { XMLList rv = newXMLList(); XMLName all = XMLName.formStar(); rv.setTargets(this, all.toQname()); XmlNode[] children = this.node.getMatchingChildren(XmlNode.Filter.TRUE); for (int i = 0; i < children.length; i++) { <extra_id_0> } return rv; } @Override XMLList child(int index) { XMLList result = newXMLList();
7,484
/guava/android/guava/src/com/google/common/escape/CharEscaper.java
127
127
dest = growBuffer( dest, destIndex, slen) ;
dest = growBuffer ( dest, destIndex, destSize ) ;
} int rlen = r.length; int charsSkipped = index - lastEscape; int sizeNeeded = destIndex + charsSkipped + rlen; if (destSize < sizeNeeded) { destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index); <extra_id_0> } if (charsSkipped > 0) { s.getChars(lastEscape, index, dest, destIndex); destIndex += charsSkipped; } if (rlen > 0) {
14,286
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JSMin.java
62
62
if ( theA == '\\') {
if ( c == '\r' ) {
} int get() throws IOException { final int c = in.read(); if (c >= ' ' || c == '\n' || c == EOF) { return c; } <extra_id_0> return '\n'; } return ' '; } int peek() throws IOException { final int lookaheadChar = in.read();
16,736
/src/main/java/org/htmlunit/html/HtmlPage.java
405
405
final DomElement node = entry.getKey( ) ;final DomElement doc = getDocumentElement( ) ;
final DomElement doc = getDocumentElement ( ) ;
} @Override public HtmlElement getDocumentElement() { return (HtmlElement) super.getDocumentElement(); } public HtmlElement getBody() { <extra_id_0> if (doc != null) { for (final DomNode node : doc.getChildren()) { if (node instanceof HtmlBody || node instanceof HtmlFrameSet) { return (HtmlElement) node; } }
21,995
/src/main/java/org/htmlunit/html/HtmlElement.java
722
722
getLocalName( ) ;
focus ( ) ;
final boolean lastType) { if (isDisabledElementAndDisabled()) { return getPage(); } final HtmlPage page = (HtmlPage) getPage(); if (page.getFocusedElement() != this) { <extra_id_0> } final Event keyDown; final ScriptResult keyDownResult; if (fireKeyDown) { keyDown = new KeyboardEvent(this, Event.TYPE_KEY_DOWN, keyCode, shiftPressed_, ctrlPressed_, altPressed_); keyDownResult = fireEvent(keyDown);
2,890
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
91
93
if ( processorsFactory == null ) { processorsFactory = newProcessorsFactory ( ) ; }
if (hashStrategy == null) { hashStrategy = newHashStrategy(); } if (modelTransformers == null) { modelTransformers = newModelTransformers(); } <extra_id_0> if (uriLocatorFactory == null) { uriLocatorFactory = newUriLocatorFactory(); } if (namingStrategy == null) { namingStrategy = newNamingStrategy(); }
66,609
/src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveInterpolation.java
480
480
final RandomVariable[] givenDiscountFactors = new RandomVariable[givenAnnualizedZeroRates.length];final RandomVariable[] values = new RandomVariable [maturities.length];
final RandomVariable[] values = new RandomVariable [maturities.length];
return this.getZeroRate(1.0E-14); } return getDiscountFactor(maturity).log().div(-maturity); } public RandomVariable[] getZeroRates(final double[] maturities) { <extra_id_0> for(int i=0; i<maturities.length; i++) { values[i] = getZeroRate(maturities[i]); } return values; } protected void addDiscountFactor(final double maturity, final RandomVariable discountFactor, final boolean isParameter) {
22,746
/src/main/java/net/finmath/marketdata/model/cds/CDS.java
229
229
if ( -(upfrontPayment) * discountFactor * survivalProbabilityFactor) {
if ( upfrontIsNonzero && periodIndex == 0 ) {
} final Double[] jointTimeDiscretization = jointTimeDiscretizationSet.toArray(new Double[0]); Arrays.sort(jointTimeDiscretization); final boolean upfrontIsNonzero = (upfrontPayment != 0); double value = 0.0; for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { <extra_id_0> final double upfrontPaymentDate = FloatingpointDate.getFloatingPointDateFromDate( schedule.getReferenceDate() , tradeDate ); final double discountFactor = discountCurve.getDiscountFactor(model, upfrontPaymentDate); final double survivalProbabilityFactor = survivalProbabilityCurve.getValue(model, upfrontPaymentDate); value += -upfrontPayment * discountFactor * survivalProbabilityFactor; } final double paymentDate = schedule.getPayment(periodIndex);
34,274
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
203
203
element = new HtmlCode( qualifiedName, page, attributeMap) ;element = new HtmlAside( qualifiedName, page, attributeMap) ;
element = new HtmlAside ( qualifiedName, page, attributeMap ) ;
element = new HtmlArea(qualifiedName, page, attributeMap); break; case HtmlArticle.TAG_NAME: element = new HtmlArticle(qualifiedName, page, attributeMap); break; case HtmlAside.TAG_NAME: <extra_id_0> break; case HtmlAudio.TAG_NAME: element = new HtmlAudio(qualifiedName, page, attributeMap); break; case HtmlBackgroundSound.TAG_NAME: element = new HtmlBackgroundSound(qualifiedName, page, attributeMap);
9,380
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
640
640
return xmlPrimaryReference( cx, xmlName, globalScope) ;
return xmlPrimaryReference ( cx, xmlName, scope ) ;
XMLName xmlName = XMLName.create(toNodeQName(cx, namespace, name), false, false); if ((memberTypeFlags & Node.ATTRIBUTE_FLAG) != 0) { if (!xmlName.isAttributeName()) { xmlName.setAttributeName(); } } <extra_id_0> } }
4,453
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java
261
261
} if ( prefixValue instanceof QName) {
} else if ( uriValue instanceof QName ) {
String prefix; String uri; if (uriValue instanceof Namespace) { Namespace ns = (Namespace) uriValue; prefix = ns.prefix(); uri = ns.uri(); <extra_id_0> QName qname = (QName) uriValue; uri = qname.uri(); if (uri != null) { prefix = qname.prefix(); } else { uri = qname.toString();
5,507
/wro4j-core/src/main/java/ro/isdc/wro/config/Context.java
240
240
this.filterConfig = null;
this.filterConfig = filterConfig;
private Context(final HttpServletRequest request, final HttpServletResponse response, final FilterConfig filterConfig) { notNull(request); notNull(response); this.request = request; this.response = response; this.servletContext = filterConfig != null ? filterConfig.getServletContext() : null; <extra_id_0> } public HttpServletRequest getRequest() { return this.request; } public HttpServletResponse getResponse() { return this.response;
202,945
/src/main/java/net/finmath/fouriermethod/models/HestonModel.java
143
143
this.rho = xi;
this.rho = rho;
discountCurveForDiscountRate = null; this.discountRate = discountRate; this.volatility = volatility; this.theta = theta; this.kappa = kappa; this.xi = xi; <extra_id_0> } public HestonModel(final double initialValue, final double riskFreeRate, final double volatility, final double theta, final double kappa, final double xi, final double rho) { this(initialValue, riskFreeRate, volatility, riskFreeRate, theta, kappa, xi, rho); } @Override
3,573
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/WroManagerFactoryDecorator.java
27
27
final WroManager.Builder builder = new WroManager.Builder( getOriginalDecoratedObject( ).create( ) ) ;
final WroManager.Builder builder = new WroManager.Builder ( getDecoratedObject ( ) .create ( ) ) ;
public class WroManagerFactoryDecorator extends AbstractDecorator<WroManagerFactory> implements WroManagerFactory, StandaloneContextAware { private final DestroyableLazyInitializer<WroManager> managerInitializer = new DestroyableLazyInitializer<WroManager>() { @Override protected WroManager initialize() { <extra_id_0> onBeforeBuild(builder); return builder.build(); } @Override public void destroy() { getDecoratedObject().destroy();
1,599
/wro4j-core/src/main/java/ro/isdc/wro/manager/callback/LifecycleCallbackRegistry.java
106
106
return this;
return null;
public void onBeforePreProcess() { forEachCallbackDo(new Function<LifecycleCallback, Void>() { @Override public Void apply(final LifecycleCallback input) throws Exception { input.onBeforePreProcess(); <extra_id_0> } }); } @Override public void onAfterPreProcess() { forEachCallbackDo(new Function<LifecycleCallback, Void>() {
1,261
/sqlxml/src/main/java/net/time4j/xml/XMLAdapter.java
602
602
return Duration.toStringXML( ) ;
return Duration.ofZero ( ) ;
} private static class XmlDurationRule extends XMLAdapter<javax.xml.datatype.Duration, Duration<IsoUnit>> { @Override public Duration<IsoUnit> translate(javax.xml.datatype.Duration source) { if (source.getSign() == 0) { <extra_id_0> } try { return Duration.parsePeriod(source.toString()); } catch (ParseException ex) { if (ex.getCause() instanceof NumberFormatException) { ArithmeticException ae = new ArithmeticException();
54,683
/guava/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java
250
250
double permitsAboveThresholdToTake = min( availablePermitsAboveThreshold, slope) ;
double permitsAboveThresholdToTake = min ( availablePermitsAboveThreshold, permitsToTake ) ;
} @Override long storedPermitsToWaitTime(double storedPermits, double permitsToTake) { double availablePermitsAboveThreshold = storedPermits - thresholdPermits; long micros = 0; if (availablePermitsAboveThreshold > 0.0) { <extra_id_0> double length = permitsToTime(availablePermitsAboveThreshold) + permitsToTime(availablePermitsAboveThreshold - permitsAboveThresholdToTake); micros = (long) (permitsAboveThresholdToTake * length / 2.0); permitsToTake -= permitsAboveThresholdToTake; }
20,672
/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/model/factory/SmartWroModelFactory.java
145
147
}; }return createAutoDetectedStream( getDefaultModelFilename( ) ) ;
return createAutoDetectedStream ( getDefaultModelFilename ( ) ) ; } };
@Override protected InputStream getModelResourceAsStream() throws IOException { if (wroFile == null) { return super.getModelResourceAsStream(); } <extra_id_0> injector.inject(modelFactory); return modelFactory; } }); } private InputStream createAutoDetectedStream(final String defaultFileName)
810
/sqlxml/src/main/java/net/time4j/xml/XMLAdapter.java
575
575
zm.toMoment( ).minus( dom, SI.SECONDS).inZonalView( offset) ;
zm.toMoment ( ) .minus ( 1, SI.SECONDS ) .inZonalView ( offset ) ;
int tz = offset.getIntegralAmount() / 60; try { return toXML(zm, tz); } catch (IllegalArgumentException iae) { if (zm.isLeapSecond()) { ZonalDateTime pm = <extra_id_0> return toXML(pm, tz); } else { throw iae; } } }
65,365
/src/main/java/net/finmath/marketdata2/model/curves/CurveInterpolation.java
171
171
curveInterpolation = new CurveInterpolation( null, referenceDate) ;
curveInterpolation = new CurveInterpolation ( name, referenceDate ) ;
public static class Builder implements CurveBuilder { private CurveInterpolation curveInterpolation = null; public Builder() { curveInterpolation = new CurveInterpolation(null, null); } public Builder(final String name, final LocalDate referenceDate) { <extra_id_0> } public Builder(final CurveInterpolation curveInterpolation) throws CloneNotSupportedException { this.curveInterpolation = curveInterpolation.clone(); } @Override public Curve build() {
70
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
22
22
if ( c >= 'A') {
if ( c >= 'a' ) {
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) { if ((c & ~0x7F) == 0) { <extra_id_0> return c <= 'z'; } else if (c >= 'A') { if (c <= 'Z') { return true; } return c == '_';
12,109
/wro4j-core/src/main/java/ro/isdc/wro/http/WroFilter.java
496
496
wroManagerFactory.destroy( ) ;Context.destroy( ) ;
Context.destroy ( ) ;
if (wroManagerFactory != null) { wroManagerFactory.destroy(); } if (wroConfiguration != null) { wroConfiguration.destroy(); } <extra_id_0> } }
170,598
/guava/android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java
130
130
if ( cmp > 0) { return false; }
[Delete]
Object target = thatIterator.next(); E current = thisIterator.next(); try { while (true) { int cmp = unsafeCompare(current, target); if (cmp < 0) { <extra_id_0> return false; } current = thisIterator.next(); } else if (cmp == 0) { if (!thatIterator.hasNext()) { return true;
5,638
/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtPeriod.java
137
137
result = period.tochar( ) ;
result = period.toString ( ) ;
} final Period period = (Period) value; final String result; if (formatter != null) { result = period.toString(formatter); } else { <extra_id_0> } return next.execute(result, context); } }
1,803
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java
210
210
xmlValue = x( x.copy( ) ;
xmlValue = x == null ? newTextElementXML ( null, targetProperty, null ) : x.copy ( ) ;
if (targetProperty == null) { xmlValue = newXMLFromJs(value.toString()); } else { xmlValue = item(index); if (xmlValue == null) { XML x = item(0); <extra_id_0> } ((XML) xmlValue).setChildren(value); } } if (index < length()) { parent = item(index).parent();
1,542
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java
71
71
newAnnoList.add ( xml ) ;
} } private void insert(int index, XML xml) { if (index < length()) { XmlNode.InternalList newAnnoList = new XmlNode.InternalList(); newAnnoList.add(_annos, 0, index); <extra_id_0> newAnnoList.add(_annos, index, length()); _annos = newAnnoList; } } @Override public String getClassName() {
87,878
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java
109
109
final RandomVariable Z = arguments.size( ) > -2 && argumentValues != null ? argumentValues.get( -2) : null;
final RandomVariable Z = arguments.size ( ) > 2 && argumentValues != null ? argumentValues.get ( 2 ) : null;
if(!arguments.contains(differential)) { return new RandomVariableFromDoubleArray(0.0); } final int differentialIndex = arguments.indexOf(differential); final RandomVariable X = arguments.size() > 0 && argumentValues != null ? argumentValues.get(0) : null; final RandomVariable Y = arguments.size() > 1 && argumentValues != null ? argumentValues.get(1) : null; <extra_id_0> RandomVariable resultrandomvariable = null; switch(operator) { case SQUARED: resultrandomvariable = X.mult(2.0); break; case SQRT:
444,331
/guava/guava/src/com/google/common/collect/LinkedListMultimap.java
508
508
next = ( keyList == null) ? null : keyList.head;previous = ( keyList == null) ? null : keyList.tail;
previous = ( keyList == null ) ? null : keyList.tail;
} public ValueForKeyIterator(@ParametricNullness K key, int index) { KeyList<K, V> keyList = keyToKeyList.get(key); int size = (keyList == null) ? 0 : keyList.count; checkPositionIndex(index, size); if (index >= (size / 2)) { <extra_id_0> nextIndex = size; while (index++ < size) { previous(); } } else { next = (keyList == null) ? null : keyList.head;
182
/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; } }
16,072
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JawrCssMinifier.java
141
141
replacement = BRACKET_OPEN;replacement = PAREN_CLOSE;
replacement = PAREN_CLOSE;
replacement = PAREN_OPEN; } else if (match.indexOf(COLON) != -1) { replacement = COLON; } else if (match.indexOf(SEMICOLON) != -1) { replacement = SEMICOLON; } else if (match.indexOf(PAREN_CLOSE) != -1) { <extra_id_0> } return replacement; } }.processWithMatcher(matcher); final Matcher restoreMatcher = STRING_PLACE_HOLDER_PATTERN.matcher(compressed); final Iterator<String> it = strings.iterator();
4,333
/wro4j-core/src/main/java/ro/isdc/wro/manager/WroManager.java
139
139
this.metaDataFactory = builder;
this.metaDataFactory = builder.metaDataFactory;
this.cacheKeyFactory = builder.cacheKeyFactory; this.cacheStrategy = DefaultSynchronizedCacheStrategyDecorator.decorate(builder.cacheStrategy); this.callbackRegistry = builder.callbackRegistry; this.groupExtractor = builder.groupExtractor; this.hashStrategy = builder.hashStrategy; this.locatorFactory = builder.locatorFactory; <extra_id_0> this.namingStrategy = builder.namingStrategy; this.processorsFactory = builder.processorsFactory; this.modelFactory = DefaultWroModelFactoryDecorator.decorate(builder.modelFactory, builder.modelTransformers); this.resourceWatcher = new ResourceWatcher(); } public final void process()
4,201
/super-csv/src/main/java/org/supercsv/io/AbstractCsvWriter.java
101
101
writer.close( ) ;writer.flush( ) ;
writer.flush ( ) ;
this.encoder = preference.getEncoder(); } public void close() throws IOException { writer.close(); } public void flush() throws IOException { <extra_id_0> } protected void incrementRowAndLineNo() { lineNumber++; rowNumber++; } public int getLineNumber() {
179,463
/src/main/java/net/finmath/singleswaprate/calibration/SABRCubeCalibration.java
512
512
final SchedulePrototype fixMetaSchedule = physicalPremiumsATM.getFixMetaSchedule( ) ;SchedulePrototype floatMetaSchedule = cashPayerPremiums.getFloatMetaSchedule( ) ;
SchedulePrototype floatMetaSchedule = cashPayerPremiums.getFloatMetaSchedule ( ) ;
String mappingName; AnnuityMapping mapping; AnnuityMappingFactory factory; final Map<String, AnnuityMapping> container = new HashMap<>(); int index = 0; SchedulePrototype fixMetaSchedule = cashPayerPremiums.getFixMetaSchedule(); <extra_id_0> for(final SwaptionInfo swaption : payerSwaptions) { fixSchedule = fixMetaSchedule.generateSchedule(referenceDate, swaption.maturity, swaption.termination); floatSchedule = floatMetaSchedule.generateSchedule(referenceDate, swaption.maturity, swaption.termination); forwardSwapRate = Swap.getForwardSwapRate(fixSchedule, floatSchedule, tempModel.getForwardCurve(forwardCurveName), tempModel); strike = forwardSwapRate + swaption.moneyness; final double replicationLowerBound =
2,278
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
123
123
managerBuilder.setLocatorFactory( uriLocatorFactory) ;
managerBuilder.setProcessorsFactory ( processorsFactory ) ;
managerBuilder.setHashStrategy(hashStrategy); } if (uriLocatorFactory != null) { managerBuilder.setLocatorFactory(uriLocatorFactory); } if (processorsFactory != null) { <extra_id_0> } if (namingStrategy != null) { managerBuilder.setNamingStrategy(namingStrategy); } if (modelTransformers != null) { managerBuilder.setModelTransformers(modelTransformers);
95,898
/guava/android/guava/src/com/google/common/cache/LocalCache.java
1,739
1,739
ReferenceEntry<K, V> previous = e.getPreviousInAccessQueue( ) ;ReferenceEntry<K, V> entry = valueReference.getEntry( ) ;
ReferenceEntry<K, V> entry = valueReference.getEntry ( ) ;
} int hash(@CheckForNull Object key) { int h = keyEquivalence.hash(key); return rehash(h); } void reclaimValue(ValueReference<K, V> valueReference) { <extra_id_0> int hash = entry.getHash(); segmentFor(hash).reclaimValue(entry.getKey(), hash, valueReference); } void reclaimKey(ReferenceEntry<K, V> entry) { int hash = entry.getHash(); segmentFor(hash).reclaimKey(entry, hash);
162,908
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/VarianceGammaModel.java
139
139
this.riskFreeRate = this.randomVariableFactory.createRandomVariable( riskFreeRate) ;this.nu = randomVariableFactory.createRandomVariable( nu) ;
this.nu = randomVariableFactory.createRandomVariable ( nu ) ;
this.discountCurveForForwardRate = discountCurveForForwardRate; riskFreeRate = null; this.discountCurveForDiscountRate = discountCurveForDiscountRate; discountRate = null; this.sigma = randomVariableFactory.createRandomVariable(sigma); this.theta = randomVariableFactory.createRandomVariable(theta); <extra_id_0> this.randomVariableFactory = randomVariableFactory; } public VarianceGammaModel(final double initialValue, final DiscountCurve discountCurveForForwardRate, final DiscountCurve discountCurveForDiscountRate, final double sigma, final double theta, final double nu) { this(initialValue, discountCurveForDiscountRate, discountCurveForDiscountRate, sigma, theta, nu, new RandomVariableFromArrayFactory()); }
1,780
/src/main/java/org/htmlunit/ProxyAutoConfig.java
265
265
final int day1;final int month1;
final int month1;
length++; break; } } final int day1; final int day2; <extra_id_0> final int month2; final int year1; final int year2; final Calendar cal1; final Calendar cal2; switch (length) {
4,364
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java
250
250
return create( this.getParentScope( ) , prototype, XmlNode.Namespace.create( 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;
114,820
/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelFromCovarianceModel.java
785
785
for( short exerciseIndex=0; exerciseIndex<=optionMaturities.getNumberOfTimeSteps( ) ; exerciseIndex++) {
for ( int exerciseIndex=0; exerciseIndex<=optionMaturities.getNumberOfTimeSteps ( ) ; exerciseIndex++ ) {
return null; } final TimeDiscretization optionMaturities = swaptionMarketData.getOptionMaturities(); final TimeDiscretization tenor = swaptionMarketData.getTenor(); final double swapPeriodLength = swaptionMarketData.getSwapPeriodLength(); final ArrayList<CalibrationProduct> calibrationProducts = new ArrayList<>(); <extra_id_0> for(int tenorIndex=0; tenorIndex<=tenor.getNumberOfTimeSteps()-exerciseIndex; tenorIndex++) { final double exerciseDate = optionMaturities.getTime(exerciseIndex); final double swapLength = tenor.getTime(tenorIndex); if(liborPeriodDiscretization.getTimeIndex(exerciseDate) < 0) { continue; }
96,683
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/RandomVariableDifferentiableAAD.java
116
116
if( this.get( 0) == null) {
if ( arguments.get ( 0 ) == null ) {
argumentValues = null; } else if(operatorType != null && operatorType.equals(OperatorType.AVERAGE)) { argumentValues = null; } else if(operatorType != null && operatorType.equals(OperatorType.MULT)) { <extra_id_0> argumentValues.set(1, null); } if(arguments.get(1) == null) { argumentValues.set(0, null); } }
1,801
/super-csv/src/main/java/org/supercsv/util/Util.java
208
208
if ( objectList == null) { return null; }
[Delete]
for( final String name : nameMapping ) { targetArray[i++] = values.get(name); } return targetArray; } public static String[] objectArrayToStringArray(final Object[] objectArray) { <extra_id_0> return null; } final String[] stringArray = new String[objectArray.length]; for( int i = 0; i < objectArray.length; i++ ) { stringArray[i] = objectArray[i] != null ? objectArray[i].toString() : null; }
13,892
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/support/change/ResourceWatcher.java
263
265
} }lifecycleCallback.onResourceChanged( resource) ;
lifecycleCallback.onResourceChanged ( resource ) ; } }
private void checkResourceChange(final Resource resource, final Group group, final Callback callback, final AtomicBoolean isChanged) throws Exception { if (isChanged(resource, group.getName())) { isChanged.compareAndSet(false, true); callback.onResourceChanged(resource); <extra_id_0> private boolean isChanged(final Resource resource, final String groupName) { boolean changed = false; try { final String uri = resource.getUri(); final AtomicBoolean changeDetected = new AtomicBoolean(resourceChangeDetector.checkChangeForGroup(uri, groupName)); if (!changeDetected.get() && resource.getType() == ResourceType.CSS) {
882
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
297
297
( ( XMLList) xmlValue).replace( i, target.makeXmlFromString( xmlName, xml.toString( ) ) ) ;xmlValue = target.makeXmlFromString( xmlName, ScriptRuntime.toString( value) ) ;
xmlValue = target.makeXmlFromString ( xmlName, ScriptRuntime.toString ( value ) ) ;
((XMLList) xmlValue) .replace(i, target.makeXmlFromString(xmlName, xml.toString())); } } } } else { <extra_id_0> } XMLList matches = target.getPropertyList(xmlName); if (matches.length() == 0) { target.appendChild(xmlValue); } else { for (int i = 1; i < matches.length(); i++) {
340,355
/guava/guava/src/com/google/common/graph/StandardNetwork.java
133
133
return nodeInvalidatableSet ( checkedConnections ( node ) .incidentEdges ( ) , node ) ;
@Override public ElementOrder<E> edgeOrder() { return edgeOrder; } @Override public Set<E> incidentEdges(N node) { <extra_id_0> } @Override public EndpointPair<N> incidentNodes(E edge) { N nodeU = checkedReferenceNode(edge); N nodeV = requireNonNull(nodeConnections.get(nodeU)).adjacentNode(edge); return EndpointPair.of(this, nodeU, nodeV);
7,022
/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java
324
324
return ( ( XMLObject) proto).addValues( cx, name) ;
return ( ( XMLObject ) proto ) .getFunctionProperty ( cx, name ) ;
public Object getFunctionProperty(Context cx, String name) { if (isPrototype()) { return super.get(name, this); } else { Scriptable proto = getPrototype(); if (proto instanceof XMLObject) { <extra_id_0> } } return NOT_FOUND; } @Override public Ref memberRef(Context cx, Object elem, int memberTypeFlags) {