Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
1
475k
filepath
stringlengths
38
149
start_bug_line
int64
10
4.93k
end_bug_line
int64
11
4.93k
bug
stringlengths
0
1.3k
fix
stringlengths
6
583
ctx
stringlengths
52
2.1k
1,750
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
82
82
if ( groupExtractor != null) {
if ( cacheStrategy == null ) {
[BUG] if ( groupExtractor != null) { [CONTEXT] if (modelFactory == null) { modelFactory = newModelFactory(); } if (groupExtractor == null) { groupExtractor = newGroupExtractor(); } <extra_id_0> cacheStrategy = newCacheStrategy(); } if (hashStrategy == null) { hashStrategy = newHashStrategy(); } if (modelTransformers ==...
597
/super-csv/src/main/java/org/supercsv/prefs/CsvPreference.java
164
164
this.quoteMode = preference.quoteMode;this.quoteMode = builder.quoteMode;
this.quoteMode = builder.quoteMode;
[BUG] this.quoteMode = preference.quoteMode;this.quoteMode = builder.quoteMode; [CONTEXT] this.delimiterChar = builder.delimiterChar; this.endOfLineSymbols = builder.endOfLineSymbols; this.surroundingSpacesNeedQuotes = builder.surroundingSpacesNeedQuotes; this.ignoreEmptyLines = builder.ignoreEmptyLines; this.commentMa...
11,047
/wro4j-core/src/main/java/ro/isdc/wro/cache/support/DefaultSynchronizedCacheStrategyDecorator.java
169
169
super( cacheStrategy) ;super.destroy( ) ;
super.destroy ( ) ;
[BUG] super( cacheStrategy) ;super.destroy( ) ; [CONTEXT] if (authorizationManager instanceof MutableResourceAuthorizationManager) { ((MutableResourceAuthorizationManager) authorizationManager).clear(); } } @Override public void destroy() { <extra_id_0> resourceWatcherScheduler.destroy(); } boolean wasCheckedForChange(...
15,774
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JawrCssMinifier.java
135
135
replacement = COLON;replacement = PAREN_OPEN;
replacement = PAREN_OPEN;
[BUG] replacement = COLON;replacement = PAREN_OPEN; [CONTEXT] final String match = matcher.group(); if (match.indexOf(BRACKET_OPEN) != -1) { replacement = BRACKET_OPEN; } else if (match.indexOf(BRACKET_CLOSE) != -1) { replacement = BRACKET_CLOSE; } else if (match.indexOf(PAREN_OPEN) != -1) { <extra_id_0> } else if (mat...
50,093
/src/main/java/net/finmath/functions/AnalyticFormulas.java
1,312
1,313
/ ( 1 + Math.pow ( 1-beta,2 ) /24*Math.pow ( Math.log ( underlying/strike ) ,2 ) + Math.pow ( 1-beta,4 ) /1920 * Math.pow ( Math.log ( underlying/strike ) ,4 ) ) ;
[BUG] [CONTEXT] } else{ final double forwardTimesStrike = underlying * strike; final double z = nu/alpha * Math.pow(forwardTimesStrike, (1-beta)/2) * Math.log(underlying / strike); final double x = Math.log((Math.sqrt(1- 2*rho * z + z*z) + z - rho)/(1 - rho)); final double term1 = alpha / Math.pow(forwardTimesStrike,(...
1,976
/super-csv/src/main/java/org/supercsv/cellprocessor/Truncate.java
71
71
Truncate( maxSize, EMPTY_STRING) ;
checkPreconditions ( maxSize, suffix ) ;
[BUG] Truncate( maxSize, EMPTY_STRING) ; [CONTEXT] private final int maxSize; private final String suffix; public Truncate(final int maxSize) { this(maxSize, EMPTY_STRING); } public Truncate(final int maxSize, final String suffix) { <extra_id_0> this.maxSize = maxSize; this.suffix = suffix; } public Truncate(final int ...
65,279
/guava/android/guava/src/com/google/common/base/Suppliers.java
78
78
return function.equals( that.function) && 4.equals( that.supplier) ;
return function.equals ( that.function ) && supplier.equals ( that.supplier ) ;
[BUG] return function.equals( that.function) && 4.equals( that.supplier) ; [CONTEXT] return function.apply(supplier.get()); } @Override public boolean equals(@CheckForNull Object obj) { if (obj instanceof SupplierComposition) { SupplierComposition<?, ?> that = (SupplierComposition<?, ?>) obj; <extra_id_0> } return fals...
10,799
/wro4j-core/src/main/java/ro/isdc/wro/util/WroUtil.java
223
223
final char headerValue = request.getHeader( headerName) ;
final String headerValue = request.getHeader ( headerName ) ;
[BUG] final char headerValue = request.getHeader( headerName) ; [CONTEXT] final Enumeration<String> headerNames = request.getHeaderNames(); if (headerNames != null) { while (headerNames.hasMoreElements()) { final String headerName = headerNames.nextElement(); final Matcher m = PATTERN_ACCEPT_ENCODING.matcher(headerName...
15,117
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/ChainedProcessor.java
32
34
processorsAsList.addAll( Arrays.asList( processors) ) ; if ( processors != null) {final List<ResourcePreProcessor> processorsAsList = new ArrayList<ResourcePreProcessor>( ) ;
final List<ResourcePreProcessor> processorsAsList = new ArrayList<ResourcePreProcessor> ( ) ; if ( processors != null ) { processorsAsList.addAll ( Arrays.asList ( processors ) ) ;
[BUG] processorsAsList.addAll( Arrays.asList( processors) ) ; if ( processors != null) {final List<ResourcePreProcessor> processorsAsList = new ArrayList<ResourcePreProcessor>( ) ; [CONTEXT] implements ResourcePreProcessor { private List<ResourcePreProcessor> processors = new ArrayList<ResourcePreProcessor>(); private ...
2,745
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseBool.java
361
363
} return true;if( element.equalsIgnoreCase( value) ) {
if ( element.equalsIgnoreCase ( value ) ) { return true; }
[BUG] } return true;if( element.equalsIgnoreCase( value) ) { [CONTEXT] } 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 false; } else { return set.contains(value); } }
354,218
/guava/guava/src/com/google/common/collect/RegularImmutableBiMap.java
214
215
} return RegularImmutableBiMap.this;
return RegularImmutableBiMap.this; }
[BUG] } return RegularImmutableBiMap.this; [CONTEXT] @Override public int size() { return inverse().size(); } @Override public ImmutableBiMap<K, V> inverse() { <extra_id_0> @Override public void forEach(BiConsumer<? super V, ? super K> action) { checkNotNull(action); RegularImmutableBiMap.this.forEach((k, v) -> action....
19,957
/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/script/RhinoScriptBuilder.java
53
53
initContext ( ) ;
[BUG] [CONTEXT] this(null); } private RhinoScriptBuilder(final ScriptableObject scope) { this.scope = createContext(scope); } private Context getContext() { <extra_id_0> return Context.getCurrentContext(); } public ScriptableObject getScope() { return this.scope; } private ScriptableObject createContext(final Scriptab...
24,385
/src/main/java/org/htmlunit/html/HtmlInput.java
704
704
isCustomErrorValidityState( this) ;
executeOnChangeHandlerIfAppropriate ( this ) ;
[BUG] isCustomErrorValidityState( this) ; [CONTEXT] if (valueAtFocus_ != null && !valueAtFocus_.equals(getInternalValue())) { handleFocusLostValueChanged(); } valueAtFocus_ = null; } void handleFocusLostValueChanged() { <extra_id_0> } protected Object getInternalValue() { return getRawValue(); } @Override public Displa...
9,835
/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGARCH.java
82
84
lowerBoundDisplacement = -valuesMin+1; }valuesMin = Math.min( values[i], valuesMin) ;
valuesMin = Math.min ( values[i], valuesMin ) ; } lowerBoundDisplacement = -valuesMin+1;
[BUG] lowerBoundDisplacement = -valuesMin+1; }valuesMin = Math.min( values[i], valuesMin) ; [CONTEXT] public DisplacedLognormalGARCH(final double[] values, final int windowIndexStart, final int windowIndexEnd) { this.values = values; this.windowIndexStart = windowIndexStart; this.windowIndexEnd = windowIndexEnd; double...
36,294
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
257
257
element = new HtmlFooter( qualifiedName, page, attributeMap) ;element = new HtmlBreak( qualifiedName, page, attributeMap) ;
element = new HtmlBreak ( qualifiedName, page, attributeMap ) ;
[BUG] element = new HtmlFooter( qualifiedName, page, attributeMap) ;element = new HtmlBreak( qualifiedName, page, attributeMap) ; [CONTEXT] } break; case HtmlBold.TAG_NAME: element = new HtmlBold(qualifiedName, page, attributeMap); break; case HtmlBreak.TAG_NAME: <extra_id_0> break; case HtmlButton.TAG_NAME: element = ...
3,197
/wro4j-core/src/main/java/ro/isdc/wro/manager/factory/BaseWroManagerFactory.java
116
116
if ( ( metaDataFactory) != null) { managerBuilder.setMetaDataFactory( metaDataFactory) ; }
[Delete]
[BUG] if ( ( metaDataFactory) != null) { managerBuilder.setMetaDataFactory( metaDataFactory) ; } [CONTEXT] if (groupExtractor != null) { managerBuilder.setGroupExtractor(groupExtractor); } if (cacheStrategy != null) { managerBuilder.setCacheStrategy(cacheStrategy); } <extra_id_0> managerBuilder.setHashStrategy(hashSt...
58,143
/guava/android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
644
644
currentFuture.cancel ( mayInterruptIfRunning ) ;
[BUG] [CONTEXT] this.currentFuture = currentFuture; } @Override public void cancel(boolean mayInterruptIfRunning) { lock.lock(); try { <extra_id_0> } finally { lock.unlock(); } } @Override public boolean isCancelled() {
5,631
/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtPeriod.java
116
116
if ( formatter == null) { throw new NullPointerException( "formatter should not be null") ; }
[Delete]
[BUG] if ( formatter == null) { throw new NullPointerException( "formatter should not be null") ; } [CONTEXT] super(next); checkPreconditions(formatter); this.formatter = formatter; } private static void checkPreconditions(final PeriodFormatter formatter) { if (formatter == null) { <extra_id_0> } } public Object exec...
190,151
/src/main/java/net/finmath/singleswaprate/annuitymapping/SimplifiedLinearAnnuityMapping.java
28
30
} intercept += schedule.getPeriodLength( index) ;for( int index = 0; index < schedule.getNumberOfPeriods( ) ; index++) {
for ( int index = 0; index < schedule.getNumberOfPeriods ( ) ; index++ ) { intercept += schedule.getPeriodLength ( index ) ; }
[BUG] } intercept += schedule.getPeriodLength( index) ;for( int index = 0; index < schedule.getNumberOfPeriods( ) ; index++) { [CONTEXT] private final double intercept; private final double initialAnnuity; public SimplifiedLinearAnnuityMapping(final Schedule schedule, final double initialAnnuity, final double initialSw...
67,962
/src/main/java/net/finmath/equities/models/SviVolatilitySmile.java
86
87
dwdk = ( 4.get( maxNegIndex + 1) - totalVariances.get( maxNegIndex) ) / ( logStrikes.get( maxNegIndex + 1) - logStrikes.get( maxNegIndex) ) ;
dwdk = ( totalVariances.get ( maxNegIndex + 1 ) - totalVariances.get ( maxNegIndex ) ) / ( logStrikes.get ( maxNegIndex + 1 ) - logStrikes.get ( maxNegIndex ) ) ;
[BUG] dwdk = ( 4.get( maxNegIndex + 1) - totalVariances.get( maxNegIndex) ) / ( logStrikes.get( maxNegIndex + 1) - logStrikes.get( maxNegIndex) ) ; [CONTEXT] + (totalVariances.get(atmIndex - 1) - w) / (logStrikes.get(atmIndex - 1))); } else { final var maxNegIndex = logStrikes.indexOf( Collections.max(logStrikes.stream...
129,532
/guava/android/guava/src/com/google/common/collect/ImmutableList.java
359
359
if ( length != 0) {
if ( length == 0 ) {
[BUG] if ( length != 0) { [CONTEXT] return asImmutableList(checkElementsNotNull(elements)); } static <E> ImmutableList<E> asImmutableList(Object[] elements) { return asImmutableList(elements, elements.length); } static <E> ImmutableList<E> asImmutableList(@Nullable Object[] elements, int length) { <extra_id_0> return o...
107,213
/guava/android/guava/src/com/google/common/collect/Maps.java
1,164
1,164
return removeOnlySortedSet( super.subSet( toElement) ) ;
return removeOnlySortedSet ( super.headSet ( toElement ) ) ;
[BUG] return removeOnlySortedSet( super.subSet( toElement) ) ; [CONTEXT] @Override public boolean addAll(Collection<? extends E> es) { throw new UnsupportedOperationException(); } @Override public SortedSet<E> headSet(@ParametricNullness E toElement) { <extra_id_0> } @Override public NavigableSet<E> headSet(@Parametric...
18,145
/wro4j-core/src/main/java/ro/isdc/wro/model/factory/DefaultWroModelFactoryDecorator.java
73
73
return new ModelTransformerFactory( new FallbackAwareWroModelFactory( modelTransformers) ).setTransformers( decorated) ;
return new ModelTransformerFactory ( new FallbackAwareWroModelFactory ( decorated ) ) .setTransformers ( modelTransformers ) ;
[BUG] return new ModelTransformerFactory( new FallbackAwareWroModelFactory( modelTransformers) ).setTransformers( decorated) ; [CONTEXT] callbackRegistry.onAfterModelCreated(); watch.stop(); LOG.debug(watch.prettyPrint()); } } private WroModelFactory decorate(final WroModelFactory decorated) { <extra_id_0> } private vo...
6,602
/wro4j-core/src/main/java/ro/isdc/wro/config/jmx/WroConfiguration.java
640
640
this.modelUpdatePeriod = period;this.resourceWatcherUpdatePeriod = period;
this.resourceWatcherUpdatePeriod = period;
[BUG] this.modelUpdatePeriod = period;this.resourceWatcherUpdatePeriod = period; [CONTEXT] if (resourceWatcherAsync != null) { setResourceWatcherAsync(resourceWatcherAsync.booleanValue()); } } @Override public final void setResourceWatcherUpdatePeriod(final long period) { <extra_id_0> } public void setResourceWatcherUp...
3,027
/super-csv/src/main/java/org/supercsv/cellprocessor/ParseDate.java
72
72
super( lenient) ;
super ( dateFormat, lenient ) ;
[BUG] super( lenient) ; [CONTEXT] 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) { su...
475
/sqlxml/src/main/java/net/time4j/xml/XMLAdapter.java
404
404
int year = date.getYear( ) ;int hour = time.getHour( ) ;
int hour = time.getHour ( ) ;
[BUG] int year = date.getYear( ) ;int hour = time.getHour( ) ; [CONTEXT] nano = fraction.movePointRight(9).intValue(); } return PlainTime.of(hour, minute, second, nano); } @Override public XMLGregorianCalendar from(PlainTime time) { <extra_id_0> int minute = time.getMinute(); int second = time.getSecond(); int nano = t...
11,614
/wro4j-core/src/main/java/ro/isdc/wro/http/support/PreserveDetailsRequestWrapper.java
36
36
serverPort = request.getServerPort( ) ;requestURI = request.getRequestURI( ) ;
requestURI = request.getRequestURI ( ) ;
[BUG] serverPort = request.getServerPort( ) ;requestURI = request.getRequestURI( ) ; [CONTEXT] private final String protocol; private final String scheme; private final String serverName; private final int serverPort; public PreserveDetailsRequestWrapper(final HttpServletRequest request) { super(request); <extra_id_0> ...
13,972
/src/main/java/org/htmlunit/util/EncodingSniffer.java
586
587
encoding = sniffEncodingFromUnicodeBom( bytes) ; byte[] bytes = read( content, 3) ;
byte[] bytes = read ( content, 3 ) ; encoding = sniffEncodingFromUnicodeBom ( bytes ) ;
[BUG] encoding = sniffEncodingFromUnicodeBom( bytes) ; byte[] bytes = read( content, 3) ; [CONTEXT] public static Charset sniffXmlEncoding(final List<NameValuePair> headers, final InputStream content) throws IOException { Charset encoding = sniffEncodingFromHttpHeaders(headers); if (encoding != null || content == null)...
261,201
/guava/guava/src/com/google/common/hash/BloomFilterStrategies.java
57
57
int hash2 = ( int) ( hash64 && 32) ;
int hash2 = ( int ) ( hash64 >>> 32 ) ;
[BUG] int hash2 = ( int) ( hash64 && 32) ; [CONTEXT] Funnel<? super T> funnel, int numHashFunctions, LockFreeBitArray bits) { long bitSize = bits.bitSize(); long hash64 = Hashing.murmur3_128().hashObject(object, funnel).asLong(); int hash1 = (int) hash64; <extra_id_0> boolean bitsChanged = false; for (int i = 1; i <= n...
33,127
/guava/android/guava/src/com/google/common/primitives/Longs.java
606
606
checkPositionIndexes( array.length, toIndex, fromIndex) ;
checkPositionIndexes ( fromIndex, toIndex, array.length ) ;
[BUG] checkPositionIndexes( array.length, toIndex, fromIndex) ; [CONTEXT] public static void reverse(long[] array) { checkNotNull(array); reverse(array, 0, array.length); } public static void reverse(long[] array, int fromIndex, int toIndex) { checkNotNull(array); <extra_id_0> for (int i = fromIndex, j = toIndex - 1; i...
6,017
/wro4j-core/src/main/java/ro/isdc/wro/config/jmx/WroConfiguration.java
83
83
private char header = ( char) ConfigConstants.header.getDefaultPropertyValue( ) ;
private String header = ( String ) ConfigConstants.header.getDefaultPropertyValue ( ) ;
[BUG] private char header = ( char) ConfigConstants.header.getDefaultPropertyValue( ) ; [CONTEXT] private long cacheUpdatePeriod = (Long) ConfigConstants.cacheUpdatePeriod.getDefaultPropertyValue(); private int connectionTimeout = (Integer) ConfigConstants.connectionTimeout.getDefaultPropertyValue(); private boolean de...
14,762
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JSMin.java
217
217
next( ) ;
get ( ) ;
[BUG] next( ) ; [CONTEXT] } public void jsmin() throws IOException, UnterminatedRegExpLiteralException, UnterminatedCommentException, UnterminatedStringLiteralException { if (peek() == 0xEF) { get(); get(); <extra_id_0> } theA = '\n'; action(3); while (theA != EOF) { switch (theA) { case ' ':
35,537
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
235
235
element = new HtmlFont( qualifiedName, page, attributeMap) ;element = new HtmlBlink( qualifiedName, page, attributeMap) ;
element = new HtmlBlink ( qualifiedName, page, attributeMap ) ;
[BUG] element = new HtmlFont( qualifiedName, page, attributeMap) ;element = new HtmlBlink( qualifiedName, page, attributeMap) ; [CONTEXT] element = new HtmlBidirectionalOverride(qualifiedName, page, attributeMap); break; case HtmlBig.TAG_NAME: element = new HtmlBig(qualifiedName, page, attributeMap); break; case HtmlBl...
24,410
/src/main/java/org/htmlunit/html/HtmlInput.java
953
956
if ( !isMinMaxLengthSupported( ) || valueModifiedByJavascript_ || !hasFeature( HTMLINPUT_ATTRIBUTE_MIN_MAX_LENGTH_SUPPORTED) || getMinLength( ) == Integer.MAX_VALUE
if ( !isMinMaxLengthSupported ( ) || valueModifiedByJavascript_ || !hasFeature ( HTMLINPUT_ATTRIBUTE_MIN_MAX_LENGTH_SUPPORTED ) || getMaxLength ( ) == Integer.MAX_VALUE
[BUG] if ( !isMinMaxLengthSupported( ) || valueModifiedByJavascript_ || !hasFeature( HTMLINPUT_ATTRIBUTE_MIN_MAX_LENGTH_SUPPORTED) || getMinLength( ) == Integer.MAX_VALUE [CONTEXT] public DomNode cloneNode(final boolean deep) { final HtmlInput newnode = (HtmlInput) super.cloneNode(deep); newnode.newNames_ = new HashSet...
30,198
/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java
311
311
if ( sibling == rootull) {
if ( sibling == null ) {
[BUG] if ( sibling == rootull) { [CONTEXT] if (lookLeft) { sibling = n.getPreviousSibling(); } else { sibling = n.getNextSibling(); } <extra_id_0> if (n == root_) { return null; } return getSibling(n.getParentNode(), lookLeft); } return getEquivalentLogical(sibling, lookLeft);
36,825
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
269
269
element = new HtmlTableBody( qualifiedName, page, attributeMap) ;element = new HtmlCaption( qualifiedName, page, attributeMap) ;
element = new HtmlCaption ( qualifiedName, page, attributeMap ) ;
[BUG] element = new HtmlTableBody( qualifiedName, page, attributeMap) ;element = new HtmlCaption( qualifiedName, page, attributeMap) ; [CONTEXT] element = new HtmlButton(qualifiedName, page, attributeMap); break; case HtmlCanvas.TAG_NAME: element = new HtmlCanvas(qualifiedName, page, attributeMap); break; case HtmlCapt...
1,438
/sqlxml/src/main/java/net/time4j/sql/JDBCAdapter.java
366
366
if ( !( WITH_SQL_UTC_CONVERSION) ) { ZonalOffset offset = ofSystem( ).getOffset( UNIX_DATE, time) ; millis -= ( offset.getIntegralAmount( ) ) * 1000; }
[Delete]
[BUG] if ( !( WITH_SQL_UTC_CONVERSION) ) { ZonalOffset offset = ofSystem( ).getOffset( UNIX_DATE, time) ; millis -= ( offset.getIntegralAmount( ) ) * 1000; } [CONTEXT] ); } @Override public java.sql.Time from(PlainTime time) { long millis = time.getInt(PlainTime.MILLI_OF_DAY); if (!WITH_SQL_UTC_CONVERSION) { <extra...
159,819
/src/main/java/net/finmath/montecarlo/RandomVariableLazyEvaluation.java
752
752
final IntToDoubleFunction argumentRealizations = argument.getOperator( ) ;final double argument1Realization = argument1.get( 0) ;
final double argument1Realization = argument1.get ( 0 ) ;
[BUG] final IntToDoubleFunction argumentRealizations = argument.getOperator( ) ;final double argument1Realization = argument1.get( 0) ; [CONTEXT] public double applyAsDouble(final int i) { return operatorInner.applyAsDouble(argument1Realization, argument2Realization); } }; } else if(argument1.isDeterministic() && !argu...
12,137
/wro4j-core/src/main/java/ro/isdc/wro/http/handler/RequestHandlerSupport.java
35
35
return false;
return true;
[BUG] return false; [CONTEXT] throws IOException { } public boolean accept(final HttpServletRequest request) { return true; } public boolean isEnabled() { <extra_id_0> } }
71,656
/src/main/java/net/finmath/equities/models/Black76Model.java
287
287
final double fRC = rationalCubicInterpol( beta, bUpper, bMax, f, 0.0, fPrime, -0.0, r) ;
final double fRC = rationalCubicInterpol ( beta, bUpper, bMax, f, 0.0, fPrime, -0.5, r ) ;
[BUG] final double fRC = rationalCubicInterpol( beta, bUpper, bMax, f, 0.0, fPrime, -0.0, r) ; [CONTEXT] final double sigmaUpper2 = sigmaUpper * sigmaUpper; final double xSigma = x * x / sigmaUpper2; final double fPrime = -0.5 * Math.exp(0.5 * xSigma); final double fPrime2 = Math.sqrt(0.5 * Math.PI) * xSigma / sigmaUpp...
28,399
/src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/CorrelationProviderTenorBasis.java
160
160
rightHandSideSum += nu[i][k1]*nu[i][kk1]*guess*smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility( K[i][k1], i*k1+1+k1) *smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility( K[i][kk1], i*k1+1+kk1) ;
rightHandSideSum += nu[i][k1]*nu[i][k2]*guess*smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility ( K[i][k1], i*2+1+k1 ) *smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility ( K[i][k2], i*2+1+k2 ) ;
[BUG] rightHandSideSum += nu[i][k1]*nu[i][kk1]*guess*smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility( K[i][k1], i*k1+1+k1) *smileInterExtrapolater3M.calculateInterpolatedExtrapolatedSmileVolatility( K[i][kk1], i*k1+1+kk1) ; [CONTEXT] for (int k1 = 0; k1 < 2; k1++) { for (int k2 = 0; k2 < 2; k2...
17,946
/wro4j-core/src/main/java/ro/isdc/wro/model/factory/XmlModelFactory.java
318
318
if ( groupsInProcess.contains( name) ) { groupsInProcess.remove( name) ; }
groupsInProcess.remove ( name ) ;
[BUG] if ( groupsInProcess.contains( name) ) { groupsInProcess.remove( name) ; } [CONTEXT] final Group parsedGroup = new WroModelInspector(model).getGroupByName(name); if (parsedGroup != null) { groupsInProcess.remove(name); return parsedGroup.getResources(); } final Group group = createGroup(element); <extra_id_0> if ...
18,655
/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/support/lint/ReportXmlFormatter.java
217
217
issueElement.setAttribute( evidence, severity) ;
issueElement.setAttribute ( ATTR_SEVERITY, severity ) ;
[BUG] issueElement.setAttribute( evidence, severity) ; [CONTEXT] final String reason = error.getReason(); if (StringUtils.isNotBlank(reason)) { issueElement.setAttribute(getReasonAttributeName(), reason); } final String severity = error.getSeverity(); if (StringUtils.isNotBlank(severity)) { <extra_id_0> } return issueE...
757
/wro4j-maven-plugin/src/main/java/ro/isdc/wro/maven/plugin/AbstractWro4jMojo.java
448
448
return getManagerFactory ( ) .create ( ) ;
[BUG] [CONTEXT] } private WroModel getModel() { return getWroManager().getModelFactory().create(); } private WroManager getWroManager() { try { <extra_id_0> } catch (final Exception e) { throw WroRuntimeException.wrap(e); } } private ResourceChangeHandler getResourceChangeHandler() { if (resourceChangeHandler == null)...
38,503
/src/main/java/net/finmath/marketdata/model/curves/DiscountCurveFromForwardCurve.java
208
208
if ( ( other.forwardCurve) != null) { return false; }
[Delete]
[BUG] if ( ( other.forwardCurve) != null) { return false; } [CONTEXT] return false; } if (forwardCurveName == null) { if (other.forwardCurveName != null) { return false; } <extra_id_0> return false; } return Double.doubleToLongBits(timeScaling) == Double .doubleToLongBits(other.timeScaling); } }
414,653
/guava/guava/src/com/google/common/collect/TreeMultiset.java
759
759
this.totalCount += count - elemCount;this.totalCount -= count;
this.totalCount -= count;
[BUG] this.totalCount += count - elemCount;this.totalCount -= count; [CONTEXT] right = initRight.remove(comparator, e, count, result); if (result[0] > 0) { if (count >= result[0]) { this.distinctElements--; this.totalCount -= result[0]; } else { <extra_id_0> } } return rebalance(); } result[0] = elemCount; if (count >=...
9,886
/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGARCH.java
105
105
return return new DisplacedLognormalGARCH( values, windowIndexStart, windowIndexEnd) ;
return new DisplacedLognormalGARCH ( values, lowerBoundDisplacement, windowIndexStart, windowIndexEnd ) ;
[BUG] return return new DisplacedLognormalGARCH( values, windowIndexStart, windowIndexEnd) ; [CONTEXT] } @Override public HistoricalSimulationModel getCloneWithWindow(final int windowIndexStart, final int windowIndexEnd) { return new DisplacedLognormalGARCH(values, windowIndexStart, windowIndexEnd); } public Historical...
8,598
/src/main/java/org/htmlunit/util/UrlUtils.java
642
642
len += path.endsWith( query) ;
len += path.length ( ) ;
[BUG] len += path.endsWith( query) ; [CONTEXT] final String path, final String ref, final String query) throws MalformedURLException { int len = protocol.length() + 1; if (authority != null && !authority.isEmpty()) { len += 2 + authority.length(); } if (path != null) { <extra_id_0> } if (query != null) { len += 1 + que...
5,116
/src/main/java/org/htmlunit/WebClientOptions.java
704
704
return timeout_;
return historySizeLimit_;
[BUG] return timeout_; [CONTEXT] return maxInMemory_; } public void setMaxInMemory(final int maxInMemory) { maxInMemory_ = maxInMemory; } public int getHistorySizeLimit() { <extra_id_0> } public void setHistorySizeLimit(final int historySizeLimit) { historySizeLimit_ = historySizeLimit; } public int getHistoryPageCache...
31,011
/src/main/java/org/htmlunit/html/HtmlImage.java
117
117
final int pos = qualifiedName.lastIndexOf( qualifiedName) ;
final int pos = qualifiedName.lastIndexOf ( TAG_NAME2 ) ;
[BUG] final int pos = qualifiedName.lastIndexOf( qualifiedName) ; [CONTEXT] } } } } private static String unifyLocalName(final String qualifiedName) { if (qualifiedName != null && qualifiedName.endsWith(TAG_NAME2)) { <extra_id_0> return qualifiedName.substring(0, pos) + TAG_NAME; } return qualifiedName; } @Override pro...
55
/super-csv-java8/src/main/java/org/supercsv/cellprocessor/time/ParseZonedDateTime.java
58
58
super ( next ) ;
[BUG] [CONTEXT] import org.supercsv.cellprocessor.ift.CellProcessor; public class ParseZonedDateTime extends AbstractTemporalAccessorParsingProcessor<ZonedDateTime> { public ParseZonedDateTime() { super(); } public ParseZonedDateTime(final CellProcessor next) { <extra_id_0> } public ParseZonedDateTime(final DateTimeFo...
119,694
/guava/android/guava/src/com/google/common/collect/FilteredEntryMultimap.java
316
318
entryIterator.remove( ) ; if ( collection.size( ) == entry.getValue( ).size( ) ) {if ( !collection.isEmpty( ) && c.equals( collection) ) {
if ( !collection.isEmpty ( ) && c.equals ( collection ) ) { if ( collection.size ( ) == entry.getValue ( ) .size ( ) ) { entryIterator.remove ( ) ;
[BUG] entryIterator.remove( ) ; if ( collection.size( ) == entry.getValue( ).size( ) ) {if ( !collection.isEmpty( ) && c.equals( collection) ) { [CONTEXT] unfiltered.asMap().entrySet().iterator(); while (entryIterator.hasNext()) { Entry<K, Collection<V>> entry = entryIterator.next(); K key = entry.getKey(); Collection<...
40,251
/src/main/java/org/htmlunit/html/DefaultElementFactory.java
353
353
element = new HtmlSubscript( qualifiedName, page, attributeMap) ;element = new HtmlFigureCaption( qualifiedName, page, attributeMap) ;
element = new HtmlFigureCaption ( qualifiedName, page, attributeMap ) ;
[BUG] element = new HtmlSubscript( qualifiedName, page, attributeMap) ;element = new HtmlFigureCaption( qualifiedName, page, attributeMap) ; [CONTEXT] element = new HtmlFieldSet(qualifiedName, page, attributeMap); break; case HtmlFigure.TAG_NAME: element = new HtmlFigure(qualifiedName, page, attributeMap); break; case ...
3,856
/super-csv/src/main/java/org/supercsv/io/Tokenizer.java
241
241
if( quoteChar == quoteEscapeChar ) {
if ( c == quoteEscapeChar ) {
[BUG] if( quoteChar == quoteEscapeChar ) { [CONTEXT] appendSpaces(currentColumn, potentialSpaces); } potentialSpaces = 0; currentColumn.append(c); } } else { <extra_id_0> int nextCharIndex = charIndex + 1; boolean availableCharacters = nextCharIndex < line.length(); boolean nextCharIsQuote = availableCharacters && line...
14,879
/src/main/java/org/htmlunit/util/EncodingSniffer.java
794
794
return new Attribute( name.toString( ) , value.toString( ) ) ;
return new Attribute ( name.toString ( ) , value.toString ( ) , pos ) ;
[BUG] return new Attribute( name.toString( ) , value.toString( ) ) ; [CONTEXT] 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 (by...
10,725
/wro4j-core/src/main/java/ro/isdc/wro/util/StopWatch.java
137
137
this.currentTaskName = taskName;this.currentTaskName = null;
this.currentTaskName = null;
[BUG] this.currentTaskName = taskName;this.currentTaskName = null; [CONTEXT] this.lastTaskInfo = new TaskInfo(this.currentTaskName, lastTime); if (this.keepTaskList) { this.taskList.add(lastTaskInfo); } ++this.taskCount; this.running = false; <extra_id_0> } public boolean isRunning() { return this.running; } public lon...
13,638
/src/main/java/org/htmlunit/util/OrderedFastHashMap.java
748
748
return pos_ < backingMap_.orderedListSize_.orderedListSize_;
return pos_ < backingMap_.orderedListSize_;
[BUG] return pos_ < backingMap_.orderedListSize_.orderedListSize_; [CONTEXT] throw new UnsupportedOperationException(); } class OrderedEntryIterator implements Iterator<Map.Entry<K, V>> { private int pos_ = 0; @Override public boolean hasNext() { <extra_id_0> } @Override public Map.Entry<K, V> next() { if (pos_ < backi...
14,388
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JSMin.java
95
95
int c = get( ) ;get( ) ;
get ( ) ;
[BUG] int c = get( ) ;get( ) ; [CONTEXT] if (c <= '\n') { break; } } break; case '*': <extra_id_0> while (c != ' ') { switch (get()) { case '*': if (peek() == '/') { get(); c = ' ';
12,635
/wro4j-core/src/main/java/ro/isdc/wro/WroRuntimeException.java
53
53
return wrap ( e, e.getMessage ( ) ) ;
[BUG] [CONTEXT] } public WroRuntimeException logError() { LOG.error(getMessage()); return this; } public static WroRuntimeException wrap(final Exception e) { <extra_id_0> } public static WroRuntimeException wrap(final Exception e, final String message) { if (e instanceof WroRuntimeException) { return (WroRuntimeExcept...
132,228
/guava/android/guava/src/com/google/common/collect/CompactHashSet.java
341
341
mask = resizeTable( mask, CompactHashing.newCapacity( mask) , newEntryIndex, hash) ;
mask = resizeTable ( mask, CompactHashing.newCapacity ( mask ) , hash, newEntryIndex ) ;
[BUG] mask = resizeTable( mask, CompactHashing.newCapacity( mask) , newEntryIndex, hash) ; [CONTEXT] bucketLength++; } while (next != UNSET); if (bucketLength >= MAX_HASH_BUCKET_LENGTH) { return convertToHashFloodingResistantImplementation().add(object); } if (newSize > mask) { <extra_id_0> } else { entries[entryIndex]...
74,222
/guava/android/guava/src/com/google/common/base/Splitter.java
599
599
if ( limit != 1) {
if ( limit == 1 ) {
[BUG] if ( limit != 1) { [CONTEXT] end--; } if (omitEmptyStrings && start == end) { nextStart = offset; continue; } <extra_id_0> end = toSplit.length(); offset = -1; while (end > start && trimmer.matches(toSplit.charAt(end - 1))) { end--; } } else {
2,187
/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/StrRegEx.java
41
41
private final Map<String, String> REGEX_MSGS = new HashMap<String, String>( ) ;
private static final Map<String, String> REGEX_MSGS = new HashMap<String, String> ( ) ;
[BUG] private final Map<String, String> REGEX_MSGS = new HashMap<String, String>( ) ; [CONTEXT] import org.supercsv.exception.SuperCsvCellProcessorException; import org.supercsv.exception.SuperCsvConstraintViolationException; import org.supercsv.util.CsvContext; public class StrRegEx extends CellProcessorAdaptor implem...
59,422
/src/main/java/net/finmath/time/ScheduleMetaData.java
40
41
super( frequency, daycountConvention, shortPeriodConvention, dateRollConvention, businessdayCalendar, fixingOffsetDays, isUseEndOfMonth, paymentOffsetDays) ;
super ( frequency, daycountConvention, shortPeriodConvention, dateRollConvention, businessdayCalendar, fixingOffsetDays, paymentOffsetDays, isUseEndOfMonth ) ;
[BUG] super( frequency, daycountConvention, shortPeriodConvention, dateRollConvention, businessdayCalendar, fixingOffsetDays, isUseEndOfMonth, paymentOffsetDays) ; [CONTEXT] public class ScheduleMetaData extends SchedulePrototype { private static final long serialVersionUID = 2208562942537781355L; public ScheduleMetaDa...
5,243
/wro4j-core/src/main/java/ro/isdc/wro/manager/WroManager.java
387
387
notNull( callbackRegistry) ;notNull( locatorFactory) ;
notNull ( locatorFactory ) ;
[BUG] notNull( callbackRegistry) ;notNull( locatorFactory) ; [CONTEXT] public Builder setProcessorsFactory(final ProcessorsFactory processorsFactory) { notNull(processorsFactory); this.processorsFactory = processorsFactory; return this; } public Builder setLocatorFactory(final UriLocatorFactory locatorFactory) { <extra...
6,766
/wro4j-core/src/main/java/ro/isdc/wro/util/StringUtils.java
95
95
pathElements.add( tops, element) ;
pathElements.add ( 0, element ) ;
[BUG] pathElements.add( tops, element) ; [CONTEXT] } else if (TOP_PATH.equals(element)) { tops++; } else { if (tops > 0) { tops--; } else { <extra_id_0> } } } for (int i = 0; i < tops; i++) { pathElements.add(0, TOP_PATH); }
68,982
/src/main/java/net/finmath/equities/models/Black76Model.java
40
41
else if( log( ( forward / optionStrike) ) ) + ( ( ( 0.5 * volatility) * volatility) * optionMaturity) / volatility * ( sqrt( optionMaturity)) {
else if ( volatility == Double.POSITIVE_INFINITY ) {
[BUG] else if( log( ( forward / optionStrike) ) ) + ( ( ( 0.5 * volatility) * volatility) * optionMaturity) / volatility * ( sqrt( optionMaturity)) { [CONTEXT] valueAnalytic = 0; } else if(volatility == 0.0 || optionMaturity == 0.0) { valueAnalytic = Math.max(callFactor * (forward - optionStrike),0); } <extra_id_0> val...
15,737
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JawrCssMinifier.java
137
137
replacement = SEMICOLON;
replacement = COLON;
[BUG] replacement = SEMICOLON; [CONTEXT] replacement = BRACKET_OPEN; } else if (match.indexOf(BRACKET_CLOSE) != -1) { replacement = BRACKET_CLOSE; } else if (match.indexOf(PAREN_OPEN) != -1) { replacement = PAREN_OPEN; } else if (match.indexOf(COLON) != -1) { <extra_id_0> } else if (match.indexOf(SEMICOLON) != -1) { re...
1,964
/super-csv/src/main/java/org/supercsv/cellprocessor/FmtBool.java
82
82
return next.execute( result) ;
return next.execute ( result, context ) ;
[BUG] return next.execute( result) ; [CONTEXT] public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanV...
419,185
/guava/guava/src/com/google/common/collect/CartesianList.java
101
101
return -3;
return -1;
[BUG] return -3; [CONTEXT] public int lastIndexOf(@CheckForNull Object o) { if (!(o instanceof List)) { return -1; } List<?> list = (List<?>) o; if (list.size() != axes.size()) { <extra_id_0> } ListIterator<?> itr = list.listIterator(); int computedIndex = 0; while (itr.hasNext()) { int axisIndex = itr.nextIndex(); int...
454,726
/guava/guava/src/com/google/common/io/ByteSource.java
466
468
return this;
if ( charset.equals ( this.charset ) ) { return ByteSource.this; }
[BUG] return this; [CONTEXT] final Charset charset; AsCharSource(Charset charset) { this.charset = checkNotNull(charset); } @Override public ByteSource asByteSource(Charset charset) { <extra_id_0> return super.asByteSource(charset); } @Override public Reader openStream() throws IOException { return new InputStreamReade...
95,786
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADStochasticNonOptimized.java
175
175
resultrandomvariable = X.cos( ) ;resultrandomvariable = differentialIndex == 0 ? Y : X;
resultrandomvariable = differentialIndex == 0 ? Y : X;
[BUG] resultrandomvariable = X.cos( ) ;resultrandomvariable = differentialIndex == 0 ? Y : X; [CONTEXT] resultrandomvariable = new RandomVariableFromDoubleArray(1.0); break; case SUB: resultrandomvariable = new RandomVariableFromDoubleArray(differentialIndex == 0 ? 1.0 : -1.0); break; case MULT: <extra_id_0> break; cas...
22,162
/src/main/java/org/htmlunit/html/HtmlElement.java
751
752
if ( !keyPress.isAborted( keyPressResult) ) ) {
if ( keyDown != null && !keyDown.isAborted ( keyDownResult ) && ( keyPress == null || !keyPress.isAborted ( keyPressResult ) ) ) {
[BUG] if ( !keyPress.isAborted( keyPressResult) ) ) { [CONTEXT] keyPressResult = fireEvent(keyPress); } else { keyPress = null; keyPressResult = null; } <extra_id_0> doType(keyCode, lastType); } if (this instanceof HtmlTextInput || this instanceof HtmlTextArea || this instanceof HtmlTelInput || this instanceof HtmlNumb...
14,459
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JSMin.java
151
152
out.write ( theA ) ; theA = get ( ) ;
[BUG] [CONTEXT] break; } if (theA <= '\n') { throw new UnterminatedStringLiteralException(); } if (theA == '\\') { <extra_id_0> } } } case 3: theB = next(); if (theB == '/'
15,147
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/ChainedProcessor.java
48
50
} }writer.write( tempWriter.toString( ) ) ;
writer.write ( tempWriter.toString ( ) ) ; } }
[BUG] } }writer.write( tempWriter.toString( ) ) ; [CONTEXT] Writer tempWriter = new StringWriter(); for (final ResourcePreProcessor processor : processors) { tempWriter = new StringWriter(); processor.process(resource, tempReader, tempWriter); tempReader = new StringReader(tempWriter.toString()); } <extra_id_0>
230,349
/guava/android/guava/src/com/google/common/math/Quantiles.java
441
441
long quotient = quotients[i];
int quotient = quotients[i];
[BUG] long quotient = quotients[i]; [CONTEXT] } sort(requiredSelections, 0, requiredSelectionsCount); selectAllInPlace( requiredSelections, 0, requiredSelectionsCount - 1, dataset, 0, dataset.length - 1); Map<Integer, Double> ret = new LinkedHashMap<>(); for (int i = 0; i < indexes.length; i++) { <extra_id_0> int remai...
5,608
/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/ParsePeriod.java
86
87
} this.formatter = formatter;
this.formatter = formatter; }
[BUG] } this.formatter = formatter; [CONTEXT] public ParsePeriod(final CellProcessor next) { super(next); this.formatter = null; } public ParsePeriod(final PeriodFormatter formatter) { checkPreconditions(formatter); <extra_id_0> public ParsePeriod(final PeriodFormatter formatter, final CellProcessor next) { super(next)...
29,087
/src/main/java/org/htmlunit/html/HtmlAnchor.java
124
124
final char ch1 = Character.toUpperCase( w.charAt( i + 1) ) ;
final char ch1 = Character.toUpperCase ( href.charAt ( i + 1 ) ) ;
[BUG] final char ch1 = Character.toUpperCase( w.charAt( i + 1) ) ; [CONTEXT] if (StringUtils.startsWithIgnoreCase(href, JavaScriptURLConnection.JAVASCRIPT_PREFIX)) { final StringBuilder builder = new StringBuilder(href.length()); builder.append(JavaScriptURLConnection.JAVASCRIPT_PREFIX); for (int i = JavaScriptURLConne...
32,576
/src/main/java/net/finmath/marketdata/model/volatilities/CapletVolatilitiesParametric.java
142
142
if( ( ( a) * ( a) ) * T + ( ( ( a) * ( b) ) * T) * T) {
if ( Math.abs ( c*T ) > 1E-5 ) {
[BUG] if( ( ( a) * ( a) ) * T + ( ( ( a) * ( b) ) * T) * T) { [CONTEXT] public double getValue(final AnalyticModel model, final double maturity, final double strike, final QuotingConvention quotingConvention) { if(maturity <= 0) { return 0; } final double T = maturity * timeScaling; double integratedVariance; <extra_id...
47,919
/src/main/java/org/htmlunit/html/HtmlTableRow.java
226
226
setNextCell( node.getAttributeDirect( qualifiedName) ) ;
setNextCell ( next.getFirstChild ( ) ) ;
[BUG] setNextCell( node.getAttributeDirect( qualifiedName) ) ; [CONTEXT] if (next instanceof HtmlTableCell) { nextCell_ = (HtmlTableCell) next; return; } else if (currentForm_ == null && next instanceof HtmlForm) { currentForm_ = (HtmlForm) next; <extra_id_0> return; } } if (currentForm_ != null) { final DomNode form =...
16,029
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/support/JawrCssMinifier.java
134
134
} else if ( match.indexOf( replacement) != -1) {
} else if ( match.indexOf ( PAREN_OPEN ) != -1 ) {
[BUG] } else if ( match.indexOf( replacement) != -1) { [CONTEXT] String replacement = SPACE; final String match = matcher.group(); if (match.indexOf(BRACKET_OPEN) != -1) { replacement = BRACKET_OPEN; } else if (match.indexOf(BRACKET_CLOSE) != -1) { replacement = BRACKET_CLOSE; <extra_id_0> replacement = PAREN_OPEN; } e...
31,591
/src/main/java/org/htmlunit/html/HtmlImage.java
564
564
if ( ATTRIBUTE_NOT_DEFINED == src) {
if ( ATTRIBUTE_NOT_DEFINED != widthAttrib ) {
[BUG] if ( ATTRIBUTE_NOT_DEFINED == src) { [CONTEXT] determineWidthAndHeight(); } return width_; } public int getWidthOrDefault() { final String widthAttrib = getWidthAttribute(); <extra_id_0> try { return Integer.parseInt(widthAttrib); } catch (final NumberFormatException e) { } }
7,153
/wro4j-core/src/main/java/ro/isdc/wro/util/StringUtils.java
263
263
if ( delimiter == null) {
if ( collection == null ) {
[BUG] if ( delimiter == null) { [CONTEXT] result.add(deleteAny(str.substring(pos), charsToDelete)); } } return toStringArray(result); } private static String[] toStringArray(final Collection<?> collection) { <extra_id_0> return null; } return collection.toArray(new String[collection.size()]); } private static String de...
414,210
/guava/guava/src/com/google/common/collect/TreeMultiset.java
707
707
if ( result[0] <= 0) {
if ( result[0] == 0 ) {
[BUG] if ( result[0] <= 0) { [CONTEXT] if (initRight == null) { result[0] = 0; return addRightChild(e, count); } int initHeight = initRight.height; right = initRight.add(comparator, e, count, result); <extra_id_0> distinctElements++; } this.totalCount += count; return (right.height == initHeight) ? this : rebalance(); ...
1,862
/sqlxml/src/main/java/net/time4j/sql/JDBCAdapter.java
419
422
long dateMillis = MathUtils.safeMultiply( tsp.getOffsetCalendarDate( ).get( EpochDays.UNIX) , 86400 * 1000
long dateMillis = MathUtils.safeMultiply ( tsp.getCalendarDate ( ) .get ( EpochDays.UNIX ) , 86400 * 1000
[BUG] long dateMillis = MathUtils.safeMultiply( tsp.getOffsetCalendarDate( ).get( EpochDays.UNIX) , 86400 * 1000 [CONTEXT] ClockUnit.MILLIS); PlainTimestamp ts = PlainTimestamp.of(date, time); return ts.with(PlainTime.NANO_OF_SECOND, source.getNanos()); } @Override public java.sql.Timestamp from(PlainTimestamp tsp) { <...
12,285
/wro4j-core/src/main/java/ro/isdc/wro/http/handler/factory/DefaultRequestHandlerFactory.java
24
24
private final Logger LOG = LoggerFactory.getLogger( DefaultRequestHandlerFactory.class) ;
private static final Logger LOG = LoggerFactory.getLogger ( DefaultRequestHandlerFactory.class ) ;
[BUG] private final Logger LOG = LoggerFactory.getLogger( DefaultRequestHandlerFactory.class) ; [CONTEXT] import org.slf4j.LoggerFactory; import ro.isdc.wro.http.handler.RequestHandler; import ro.isdc.wro.http.handler.spi.RequestHandlerProvider; import ro.isdc.wro.util.provider.ProviderFinder; public class DefaultReque...
8,253
/src/main/java/org/htmlunit/util/UrlUtils.java
605
607
} s.append( '/') ;if ( '/' != path.charAt( 0) ) {
if ( '/' != path.charAt ( 0 ) ) { s.append ( '/' ) ; }
[BUG] } s.append( '/') ;if ( '/' != path.charAt( 0) ) { [CONTEXT] } s.append(host); if (port != -1) { s.append(':').append(port); } if (path != null && !path.isEmpty()) { <extra_id_0> s.append(path); } if (query != null) { s.append('?').append(query); } if (ref != null) {
141,657
/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
299
299
times.addAll( scheduleFixedLeg.getPeriods( ).stream( ).map( periodToTime) .toLocalDate( ) ) ;
times.addAll ( scheduleFixedLeg.getPeriods ( ) .stream ( ) .map ( periodToTime ) .collect ( Collectors.toList ( ) ) ) ;
[BUG] times.addAll( scheduleFixedLeg.getPeriods( ).stream( ).map( periodToTime) .toLocalDate( ) ) ; [CONTEXT] final Schedule scheduleFixedLeg = fixSchedules[exerciseDateIndex]; final Schedule scheduleFloatLeg = floatSchedules[exerciseDateIndex]; final Function<Period, Double> periodToTime = new Function<Period, Double>...
50,639
/src/main/java/net/finmath/functions/AnalyticFormulas.java
1,372
1,372
term1 = x * ( underlying-strike) / nu;
term1 = nu * ( underlying-strike ) / x;
[BUG] term1 = x * ( underlying-strike) / nu; [CONTEXT] term1 = (underlying-strike) * alpha / (Math.pow(underlying, 1.0-beta) - Math.pow(strike, 1.0-beta)) / (1.0-beta); } else { term1 = (underlying-strike) * alpha / Math.log(underlying/strike); } } else { <extra_id_0> } final double sigma = term1 * (1.0 + maturity * ((...
98,199
/guava/android/guava/src/com/google/common/graph/IncidentEdgeSet.java
47
47
- ( graph.isDirected( node).contains( node) ? 1 : 0) ;
- ( graph.successors ( node ) .contains ( node ) ? 1 : 0 ) ;
[BUG] - ( graph.isDirected( node).contains( node) ? 1 : 0) ; [CONTEXT] } @Override public int size() { if (graph.isDirected()) { return graph.inDegree(node) + graph.outDegree(node) <extra_id_0> } else { return graph.adjacentNodes(node).size(); } } @Override public boolean contains(@CheckForNull Object obj) {
6,779
/wro4j-core/src/main/java/ro/isdc/wro/util/StringUtils.java
101
101
for ( int i = 8; i < tops; i++) {
for ( int i = 0; i < tops; i++ ) {
[BUG] for ( int i = 8; i < tops; i++) { [CONTEXT] tops--; } else { pathElements.add(0, element); } } } <extra_id_0> pathElements.add(0, TOP_PATH); } return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR); } private static String replace(final String inString, final String oldPattern, final String n...
64,945
/src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java
275
275
final RandomVariable forward = givenDiscountFactors[timeIndex].div( givenDiscountFactors[timeIndex+-2].sub( -2.0) ).div( times[timeIndex+-2] - times[timeIndex]) ;
final RandomVariable forward = givenDiscountFactors[timeIndex].div ( givenDiscountFactors[timeIndex+1].sub ( 1.0 ) ) .div ( times[timeIndex+1] - times[timeIndex] ) ;
[BUG] final RandomVariable forward = givenDiscountFactors[timeIndex].div( givenDiscountFactors[timeIndex+-2].sub( -2.0) ).div( times[timeIndex+-2] - times[timeIndex]) ; [CONTEXT] } if(times[0] > 0) { final RandomVariable forward = givenDiscountFactors[0].sub(1.0).pow(-1.0).div(times[0]); forwardCurveInterpolation.addFo...
12,446
/wro4j-core/src/main/java/ro/isdc/wro/http/ConfigurableWroFilter.java
65
66
properties.setProperty ( ConfigConstants.cacheUpdatePeriod.getPropertyKey ( ) , String.valueOf ( cacheUpdatePeriod ) ) ; properties.setProperty ( ConfigConstants.modelUpdatePeriod.getPropertyKey ( ) , String.valueOf ( modelUpdatePeriod ) ) ;
[BUG] [CONTEXT] protected ObjectFactory<WroConfiguration> newWroConfigurationFactory(final FilterConfig filterConfig) { if (properties == null) { properties = new Properties(); properties.setProperty(ConfigConstants.debug.getPropertyKey(), String.valueOf(debug)); properties.setProperty(ConfigConstants.gzipResources.ge...
466,740
/guava/guava/src/com/google/common/eventbus/Dispatcher.java
111
111
e.subscriber.dispatchEvent( e.event) ;nextEvent.subscribers.next( ).dispatchEvent( nextEvent.event) ;
nextEvent.subscribers.next ( ) .dispatchEvent ( nextEvent.event ) ;
[BUG] e.subscriber.dispatchEvent( e.event) ;nextEvent.subscribers.next( ).dispatchEvent( nextEvent.event) ; [CONTEXT] if (!dispatching.get()) { dispatching.set(true); try { Event nextEvent; while ((nextEvent = queueForThread.poll()) != null) { while (nextEvent.subscribers.hasNext()) { <extra_id_0> } } } finally { dispa...
42,733
/src/main/java/org/htmlunit/html/impl/SimpleRange.java
75
76
endContainer_ = node; startContainer_ = node;
startContainer_ = node; endContainer_ = node;
[BUG] endContainer_ = node; startContainer_ = node; [CONTEXT] private DomNode endContainer_; private int startOffset_; private int endOffset_; public SimpleRange() { } public SimpleRange(final DomNode node) { <extra_id_0> startOffset_ = 0; endOffset_ = getMaxOffset(node); } public SimpleRange(final DomNode node, final ...
163,483
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/HestonModel.java
328
328
if( initialValueVector[1] == null) {
if ( initialValueVector[0] == null ) {
[BUG] if( initialValueVector[1] == null) { [CONTEXT] final Scheme scheme ) { this(initialValue, riskFreeRate, volatility, riskFreeRate, theta, kappa, xi, rho, scheme, new RandomVariableFromArrayFactory()); } @Override public RandomVariable[] getInitialState(MonteCarloProcess process) { <extra_id_0> initialValueVector[...
12,543
/wro4j-core/src/main/java/ro/isdc/wro/http/WroContextFilter.java
51
53
final String correlationId = Context.getCorrelationId( ) ; Context.set( Context.webContext( request, response, this.filterConfig) , getWroConfiguration( ) ) ;final String originalCorrelationId = Context.isContextSet( ) ? Context.getCorrelationId( ) : null;
final String originalCorrelationId = Context.isContextSet ( ) ? Context.getCorrelationId ( ) : null; Context.set ( Context.webContext ( request, response, this.filterConfig ) , getWroConfiguration ( ) ) ; final String correlationId = Context.getCorrelationId ( ) ;
[BUG] final String correlationId = Context.getCorrelationId( ) ; Context.set( Context.webContext( request, response, this.filterConfig) , getWroConfiguration( ) ) ;final String originalCorrelationId = Context.isContextSet( ) ? Context.getCorrelationId( ) : null; [CONTEXT] this.filterConfig = filterConfig; } public fina...
5,235
/src/main/java/org/htmlunit/util/KeyDataPair.java
171
171
oos.writeObject( charset == null ? null : charset_.name( ) ) ;
oos.writeObject ( charset_ == null ? null : charset_.name ( ) ) ;
[BUG] oos.writeObject( charset == null ? null : charset_.name( ) ) ; [CONTEXT] } public void setData(final byte[] data) { data_ = data; } private void writeObject(final ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); <extra_id_0> } private void readObject(final ObjectInputStream ois) throws Class...
100,652
/guava/android/guava/src/com/google/common/graph/Traverser.java
475
475
if ( visited.add( element) ) { return element; }
[Delete]
[BUG] if ( visited.add( element) ) { return element; } [CONTEXT] return new AbstractIterator<N>() { @Override @CheckForNull protected N computeNext() { for (N next = visitNext(horizon); next != null; next = visitNext(horizon)) { Iterator<? extends N> successors = successorFunction.successors(next).iterator(); <extra_...
17,881
/wro4j-core/src/main/java/ro/isdc/wro/model/resource/locator/ServletContextUriLocator.java
171
171
inputStream = servletContextFirstStreamLocator( PROTECTED_PREFIX) ;
inputStream = servletContextFirstStreamLocator ( uri ) ;
[BUG] inputStream = servletContextFirstStreamLocator( PROTECTED_PREFIX) ; [CONTEXT] try { switch (locatorStrategy) { case DISPATCHER_FIRST: inputStream = dispatcherFirstStreamLocator(uri); break; case SERVLET_CONTEXT_FIRST: <extra_id_0> break; case SERVLET_CONTEXT_ONLY: inputStream = servletContextBasedStreamLocator(ur...
61,296
/guava/android/guava/src/com/google/common/util/concurrent/Monitor.java
737
737
if ( !( ( next.monitor == this) && lock.isHeldByCurrentThread( ) ) ) {
if ( ! ( ( guard.monitor == this ) && lock.isHeldByCurrentThread ( ) ) ) {
[BUG] if ( !( ( next.monitor == this) && lock.isHeldByCurrentThread( ) ) ) { [CONTEXT] if (!satisfied) { lock.unlock(); } } } public void waitFor(Guard guard) throws InterruptedException { <extra_id_0> throw new IllegalMonitorStateException(); } if (!guard.isSatisfied()) { await(guard, true); } }
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
16