id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
7,601 | public class ZeroClipboardBehavior extends Behavior {
private static final long serialVersionUID = 2935399893580511345L;
private static final String ZERO_CLIPBOARD_LINK_JS = "ZeroClipboardLink.js";
private static final String ZERO_CLIPBOARD_FLASH_URL = "zeroClipboardFlashUrl";
public static IResourceLinkDescriptor linkZeroClipboardFlash() {
<BUG>return new LinkDescriptorBuilder()
.resource(ZeroClipboardFlashResourceReference.get())
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.resource(ZeroClipboardFlashResourceReference.get());
|
7,602 | import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
public class ButtonsPage extends MainTemplate {
private static final long serialVersionUID = -1538563562722555674L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(ButtonsPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(ButtonsPage.class);
|
7,603 | import org.apache.wicket.model.Model;
import com.google.common.base.Function;
import fr.openwide.core.basicapp.core.business.user.model.User;
import fr.openwide.core.basicapp.web.application.common.typedescriptor.user.UserTypeDescriptor;
import fr.openwide.core.commons.util.functional.SerializableFunction;
<BUG>import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.factory.LinkGeneratorFactory;</BUG>
import fr.openwide.core.wicket.more.link.descriptor.generator.ILinkGenerator;
import fr.openwide.core.wicket.more.link.descriptor.generator.IPageLinkGenerator;
import fr.openwide.core.wicket.more.link.descriptor.parameter.CommonParameters;
| import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.link.descriptor.factory.LinkGeneratorFactory;
|
7,604 | import fr.openwide.core.wicket.more.markup.html.form.LabelPlaceholderBehavior;
public class ConsoleSignInPage extends CoreWebPage {
private static final long serialVersionUID = 3401416708867386953L;
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleSignInPage.class);
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(ConsoleSignInPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(ConsoleSignInPage.class);
|
7,605 | import fr.openwide.core.wicket.more.util.model.SequenceProviders;
public class ConsoleNotificationDemoIndexPage extends ConsoleNotificationDemoTemplate {
private static final long serialVersionUID = -6767518941118385548L;
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleNotificationDemoIndexPage.class);
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder().page(ConsoleNotificationDemoIndexPage.class).build();
</BUG>
}
public static final String DEFAULT_USERNAME = "admin";
private static final Range<Long> DEFAULT_ID_RANGE = Range.closed(1L, 100L);
| return LinkDescriptorBuilder.start().page(ConsoleNotificationDemoIndexPage.class);
|
7,606 | import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
public class SignInPage extends ApplicationAccessTemplate {
private static final long serialVersionUID = 7361718534092594202L;
public static ILinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder().page(SignInPage.class).build();
</BUG>
}
public SignInPage(PageParameters parameters) {
super(parameters);
| return LinkDescriptorBuilder.start().page(SignInPage.class);
|
7,607 | import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
import fr.openwide.core.wicket.more.model.BindingModel;
public class ProfilePage extends ProfileTemplate {
private static final long serialVersionUID = -8757939680257114559L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(ProfilePage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(ProfilePage.class);
|
7,608 | import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
public class SecurityPasswordExpirationPage extends SecurityPasswordTemplate {
private static final long serialVersionUID = 547223775134254240L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(SecurityPasswordExpirationPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(SecurityPasswordExpirationPage.class);
|
7,609 | import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
public class LinksPage2 extends LinksTemplate {
private static final long serialVersionUID = 2581363150311136728L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(LinksPage2.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(LinksPage2.class);
|
7,610 | public class ConsoleMaintenanceAuthenticationPage<U extends GenericUser<U, ?>> extends ConsoleMaintenanceTemplate {
private static final long serialVersionUID = 3401416708867386953L;
@SpringBean
private IGenericUserService<U> genericUserService;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(ConsoleMaintenanceAuthenticationPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(ConsoleMaintenanceAuthenticationPage.class);
|
7,611 | import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
public class LinksPage3 extends LinksTemplate {
private static final long serialVersionUID = 789639308894032436L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(LinksPage3.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(LinksPage3.class);
|
7,612 | import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
public class SecurityPasswordRecoveryPage extends SecurityPasswordTemplate {
private static final long serialVersionUID = 547223775134254240L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(SecurityPasswordRecoveryPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(SecurityPasswordRecoveryPage.class);
|
7,613 | package fr.openwide.core.showcase.web.application.navigation.link;
import org.apache.wicket.model.IModel;
import fr.openwide.core.showcase.core.business.user.model.User;
import fr.openwide.core.showcase.web.application.navigation.model.TestIconResourceReferenceModel;
<BUG>import fr.openwide.core.wicket.more.link.descriptor.IImageResourceLinkDescriptor;
import fr.openwide.core.wicket.more.link.factory.AbstractLinkFactory;</BUG>
public final class LinkFactory extends AbstractLinkFactory {
private static final LinkFactory INSTANCE = new LinkFactory();
private LinkFactory() { }
| import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.link.factory.AbstractLinkFactory;
|
7,614 | return new StandardUnauthorizedComponentInstantiationListener();
}
protected abstract Class<? extends AuthenticatedWebSession> getWebSessionClass();
public abstract Class<? extends WebPage> getSignInPageClass();
public final IPageLinkDescriptor getSignInPageLinkDescriptor() {
<BUG>return new LinkDescriptorBuilder().page(getSignInPageClass()).build();
</BUG>
}
@Override
public IProvider<IExceptionMapper> getExceptionMapperProvider() {
| return LinkDescriptorBuilder.start().page(getSignInPageClass());
|
7,615 | import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
public class LinksPage1 extends LinksTemplate {
private static final long serialVersionUID = -1538563562722555674L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(LinksPage1.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(LinksPage1.class);
|
7,616 | public static final ITwoParameterLinkDescriptorMapper<IPageLinkDescriptor, UserGroup, Page> MAPPER_SOURCE =
new LinkDescriptorBuilder().page(AdministrationUserGroupDescriptionPage.class)
.model(UserGroup.class).map(CommonParameters.ID).mandatory()</BUG>
.model(Page.class).pickSecond().map(CommonParameters.SOURCE_PAGE_ID).optional()
<BUG>.build();
public static final IPageLinkDescriptor linkDescriptor(IModel<UserGroup> userGroupModel, IModel<Page> sourcePageModel) {</BUG>
return MAPPER_SOURCE.map(userGroupModel, sourcePageModel);
}
public AdministrationUserGroupDescriptionPage(PageParameters parameters) {
super(parameters);
| LinkDescriptorBuilder.start()
.model(UserGroup.class).map(CommonParameters.ID).mandatory()
.page(AdministrationUserGroupDescriptionPage.class);
public static final IPageLinkDescriptor linkDescriptor(IModel<UserGroup> userGroupModel, IModel<Page> sourcePageModel) {
|
7,617 | import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
public class ReferenceDataPage extends ReferenceDataTemplate {
private static final long serialVersionUID = -4381694964311714573L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder().page(ReferenceDataPage.class)
.build();
}</BUG>
public ReferenceDataPage(PageParameters parameters) {
super(parameters);
| return LinkDescriptorBuilder.start()
.page(ReferenceDataPage.class);
}
|
7,618 | public IPageLinkGenerator linkGenerator(Page pageInstance, Collection<? extends Class<? extends Page>> expectedClasses) {
return linkGenerator(PageModel.of(pageInstance), expectedClasses);
}
public IPageLinkGenerator linkGenerator(IModel<? extends Page> pageInstanceModel,
Collection<? extends Class<? extends Page>> expectedClasses) {
<BUG>IPageInstanceState<?> builder = builder().pageInstance(pageInstanceModel);
</BUG>
for (Class<? extends Page> expectedClass : expectedClasses) {
builder.validate(expectedClass);
}
| IPageInstanceState<?> builder = LinkDescriptorBuilder.start(pageInstanceModel);
|
7,619 | import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
import fr.openwide.core.wicket.more.model.GenericEntityModel;
public class SecurityPasswordCreationPage extends SecurityPasswordTemplate {
private static final long serialVersionUID = 1L;
public static final ITwoParameterLinkDescriptorMapper<IPageLinkDescriptor, User, String> MAPPER =
<BUG>new LinkDescriptorBuilder()
.page(SecurityPasswordCreationPage.class)</BUG>
.model(User.class)
.model(String.class)
| LinkDescriptorBuilder.start()
|
7,620 | public class HideableComponentsPage extends MainTemplate {
private static final long serialVersionUID = -1538563562722555674L;
@SpringBean
private IUserService userService;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(HideableComponentsPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(HideableComponentsPage.class);
|
7,621 | import fr.openwide.core.wicket.more.markup.html.template.js.jquery.plugins.bootstrap.modal.behavior.AjaxModalOpenBehavior;
import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
public class AdministrationUserGroupPortfolioPage extends AdministrationTemplate {
private static final long serialVersionUID = 2733071974944289365L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(AdministrationUserGroupPortfolioPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(AdministrationUserGroupPortfolioPage.class);
|
7,622 | import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
import fr.openwide.core.wicket.more.model.ApplicationPropertyModel;
public class PortfolioMainPage extends MainTemplate {
private static final long serialVersionUID = 6572019030268485555L;
public static final IPageLinkDescriptor linkDescriptor() {
<BUG>return new LinkDescriptorBuilder()
.page(PortfolioMainPage.class)
.build();</BUG>
}
| return LinkDescriptorBuilder.start()
.page(PortfolioMainPage.class);
|
7,623 | package com.taobao.luaview.fun.mapper.ui;
import com.taobao.luaview.fun.base.BaseMethodMapper;
import com.taobao.luaview.fun.mapper.LuaViewLib;
import com.taobao.luaview.userdata.ui.UDLoadingDialog;
<BUG>import com.taobao.luaview.util.ColorUtil;
import org.luaj.vm2.LuaValue;</BUG>
import org.luaj.vm2.Varargs;
import java.util.List;
@LuaViewLib
| import com.taobao.luaview.util.LuaUtil;
import org.luaj.vm2.LuaValue;
|
7,624 | import com.taobao.luaview.fun.mapper.LuaViewLib;
import com.taobao.luaview.fun.mapper.ui.UIViewMethodMapper;
import com.taobao.luaview.global.VmVersion;
import com.taobao.luaview.userdata.indicator.UDCircleViewPagerIndicator;
import com.taobao.luaview.util.ColorUtil;
<BUG>import com.taobao.luaview.util.DimenUtil;
import org.luaj.vm2.LuaValue;</BUG>
import org.luaj.vm2.Varargs;
import java.util.List;
@LuaViewLib
| import com.taobao.luaview.util.LuaUtil;
import org.luaj.vm2.LuaValue;
|
7,625 | return this;
}
public boolean isAnimating() {
return LVLoadingDialog.isAnimating();
}
<BUG>public UDLoadingDialog setColorAndAlpha(int color, int alpha) {
</BUG>
return this;
}
public int getColor() {
| public UDLoadingDialog stopAnimating() {
LVLoadingDialog.stopAnimating();
public UDLoadingDialog setColorAndAlpha(Integer color, Double alpha) {
|
7,626 | package com.taobao.luaview.fun.mapper.ui;
import com.taobao.luaview.fun.mapper.LuaViewLib;
import com.taobao.luaview.userdata.ui.UDLoadingView;
<BUG>import com.taobao.luaview.util.ColorUtil;
import org.luaj.vm2.LuaValue;</BUG>
import org.luaj.vm2.Varargs;
import java.util.List;
@LuaViewLib
| import com.taobao.luaview.util.LuaUtil;
import org.luaj.vm2.LuaValue;
|
7,627 | import org.luaj.vm2.LuaValue;
public class UDCircleViewPagerIndicator<U extends LVCircleViewPagerIndicator> extends UDView<U> {
public UDCircleViewPagerIndicator(U view, Globals globals, LuaValue metaTable, LuaValue initParams) {
super(view, globals, metaTable, initParams);
}
<BUG>public UDCircleViewPagerIndicator setFillColor(int color) {
if (getView() != null) {
getView().setFillColor(color);</BUG>
}
| public UDCircleViewPagerIndicator setFillColor(Integer color) {
if (color != null && getView() != null) {
getView().setFillColor(color);
|
7,628 | animators[i - 2] = varargs.arg(i);
}
}
return view.startAnimation(animators);
}
<BUG>@LuaViewApi(revisions = {VmVersion.V_500, "修改了底层的停止API" })
public LuaValue stopAnimation(U view, Varargs varargs) {</BUG>
view.cancelAnimation();
return view;
}
| @LuaViewApi(revisions = {VmVersion.V_500, "修改了底层的停止API"})
public LuaValue stopAnimation(U view, Varargs varargs) {
|
7,629 | @LuaViewApi(since = VmVersion.V_500)
public LuaValue flxLayout(U view, Varargs varargs) {
return view;
}
@LuaViewApi(since = VmVersion.V_511)
<BUG>public LuaValue effects(U view, Varargs varargs){
if(varargs.narg() > 1){
</BUG>
return setEffects(view, varargs);
| public LuaValue flexCss(U view, Varargs varargs) {
if (varargs.narg() > 1) {
return setFlexCss(view, varargs);
|
7,630 | package com.taobao.luaview.fun.mapper.ui;
import android.text.TextUtils;
import com.taobao.luaview.fun.mapper.LuaViewLib;
import com.taobao.luaview.userdata.constants.UDEllipsize;
import com.taobao.luaview.userdata.ui.UDTextView;
<BUG>import com.taobao.luaview.util.ColorUtil;
import com.taobao.luaview.util.LuaViewUtil;</BUG>
import org.luaj.vm2.LuaValue;
import org.luaj.vm2.Varargs;
import java.util.List;
| import com.taobao.luaview.util.LuaUtil;
import com.taobao.luaview.util.LuaViewUtil;
|
7,631 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
7,632 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
7,633 | VEVENT ("VEVENT",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED,
PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START,
PropertyType.DESCRIPTION, PropertyType.DURATION, PropertyType.EXCEPTION_DATE_TIMES,
<BUG>PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,</BUG>
PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO,
PropertyType.RECURRENCE_RULE, PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE,
PropertyType.STATUS, PropertyType.SUMMARY, PropertyType.TIME_TRANSPARENCY, PropertyType.UNIQUE_IDENTIFIER,
| PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
|
7,634 | VTODO ("VTODO",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED,
PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP,
PropertyType.DATE_TIME_START, PropertyType.DESCRIPTION, PropertyType.DURATION,
<BUG>PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,</BUG>
PropertyType.PERCENT_COMPLETE, PropertyType.PRIORITY, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO, PropertyType.RECURRENCE_RULE,
PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE, PropertyType.STATUS,
| PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
|
7,635 | throw new RuntimeException("not implemented");
}
},
DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
<BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,</BUG>
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
{
| PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
|
7,636 | throw new RuntimeException("not implemented");
}
},
VALARM ("VALARM",
Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION,
<BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT,
PropertyType.SUMMARY, PropertyType.TRIGGER),</BUG>
VAlarm.class)
{
@Override
| DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
|
7,637 | private ContentLineStrategy contentLineGenerator;
protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator)
{
this.contentLineGenerator = contentLineGenerator;
}
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
throw new RuntimeException("Can't copy children. copyChildCallback isn't overridden in subclass." + this.getClass());
};
| protected Callback<VChild, Void> copyIntoCallback()
|
7,638 | import jfxtras.labs.icalendarfx.properties.calendar.Version;
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
public enum CalendarProperty
{
CALENDAR_SCALE ("CALSCALE",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
CalendarScale.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
CalendarScale.class)
|
7,639 | CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
}
},
METHOD ("METHOD",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Method.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
7,640 | }
list.add(new NonStandardProperty((NonStandardProperty) child));
}
},
PRODUCT_IDENTIFIER ("PRODID",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
ProductIdentifier.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| public void copyChild(VChild child, VCalendar destination)
CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
METHOD ("METHOD",
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
7,641 | ProductIdentifier productIdentifier = (ProductIdentifier) child;
destination.setProductIdentifier(productIdentifier);
}
},
VERSION ("VERSION",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Version.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Version.class)
|
7,642 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
7,643 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,644 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,645 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
7,646 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,647 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,648 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,649 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,650 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,651 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,652 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,653 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,654 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,655 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,656 | package com.example.mapdemo;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
<BUG>import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Polygon;</BUG>
import com.google.android.gms.maps.model.PolygonOptions;
import android.graphics.Color;
| import com.google.android.gms.maps.model.Dash;
import com.google.android.gms.maps.model.Dot;
import com.google.android.gms.maps.model.Gap;
import com.google.android.gms.maps.model.JointType;
import com.google.android.gms.maps.model.PatternItem;
import com.google.android.gms.maps.model.Polygon;
|
7,657 | public static final String DELETE_ACTION_HISTORY_RESULT;
public static final String DELETE_ACTION_PLUGIN;
public static final String DELETE_ALERT;
public static final String DELETE_ALERT_CTIME;
public static final String DELETE_ALERT_LIFECYCLE;
<BUG>public static final String DELETE_ALERT_SEVERITY;
public static final String DELETE_ALERT_STATUS;</BUG>
public static final String DELETE_ALERT_TRIGGER;
public static final String DELETE_CONDITIONS;
public static final String DELETE_CONDITIONS_MODE;
| [DELETED] |
7,658 | public static final String INSERT_ACTION_PLUGIN;
public static final String INSERT_ACTION_PLUGIN_DEFAULT_PROPERTIES;
public static final String INSERT_ALERT;
public static final String INSERT_ALERT_CTIME;
public static final String INSERT_ALERT_LIFECYCLE;
<BUG>public static final String INSERT_ALERT_SEVERITY;
public static final String INSERT_ALERT_STATUS;</BUG>
public static final String INSERT_ALERT_TRIGGER;
public static final String INSERT_CONDITION_AVAILABILITY;
public static final String INSERT_CONDITION_COMPARE;
| [DELETED] |
7,659 | public static final String SELECT_ALERT_CTIME_START;
public static final String SELECT_ALERT_CTIME_START_END;
public static final String SELECT_ALERT_LIFECYCLE_END;
public static final String SELECT_ALERT_LIFECYCLE_START;
public static final String SELECT_ALERT_LIFECYCLE_START_END;
<BUG>public static final String SELECT_ALERT_STATUS;
public static final String SELECT_ALERT_SEVERITY;</BUG>
public static final String SELECT_ALERT_TRIGGER;
public static final String SELECT_ALERTS_BY_TENANT;
public static final String SELECT_CONDITION_ID;
| [DELETED] |
7,660 | DELETE_ALERT = "DELETE FROM " + keyspace + ".alerts " + "WHERE tenantId = ? AND alertId = ? ";
DELETE_ALERT_CTIME = "DELETE FROM " + keyspace + ".alerts_ctimes "
+ "WHERE tenantId = ? AND ctime = ? AND alertId = ? ";
DELETE_ALERT_LIFECYCLE = "DELETE FROM " + keyspace + ".alerts_lifecycle "
+ "WHERE tenantId = ? AND status = ? AND stime = ? AND alertId = ? ";
<BUG>DELETE_ALERT_SEVERITY = "DELETE FROM " + keyspace + ".alerts_severities "
+ "WHERE tenantId = ? AND severity = ? AND alertId = ? ";
DELETE_ALERT_STATUS = "DELETE FROM " + keyspace + ".alerts_statuses "
+ "WHERE tenantId = ? AND status = ? AND alertId = ? ";</BUG>
DELETE_ALERT_TRIGGER = "DELETE FROM " + keyspace + ".alerts_triggers "
| [DELETED] |
7,661 | INSERT_ALERT = "INSERT INTO " + keyspace + ".alerts " + "(tenantId, alertId, payload) VALUES (?, ?, ?) ";
INSERT_ALERT_CTIME = "INSERT INTO " + keyspace + ".alerts_ctimes "
+ "(tenantId, alertId, ctime) VALUES (?, ?, ?) ";
INSERT_ALERT_LIFECYCLE = "INSERT INTO " + keyspace + ".alerts_lifecycle "
+ "(tenantId, alertId, status, stime) VALUES (?, ?, ?, ?) ";
<BUG>INSERT_ALERT_SEVERITY = "INSERT INTO " + keyspace + ".alerts_severities "
+ "(tenantId, alertId, severity) VALUES (?, ?, ?) ";
INSERT_ALERT_STATUS = "INSERT INTO " + keyspace + ".alerts_statuses "
+ "(tenantId, alertId, status) VALUES (?, ?, ?) ";</BUG>
INSERT_ALERT_TRIGGER = "INSERT INTO " + keyspace + ".alerts_triggers "
| [DELETED] |
7,662 | + "WHERE tenantId = ? AND status = ? AND stime <= ? ";
SELECT_ALERT_LIFECYCLE_START = "SELECT alertId FROM " + keyspace + ".alerts_lifecycle "
+ "WHERE tenantId = ? AND status = ? AND stime >= ? ";
SELECT_ALERT_LIFECYCLE_START_END = "SELECT alertId FROM " + keyspace + ".alerts_lifecycle "
+ "WHERE tenantId = ? AND status = ? AND stime >= ? AND stime <= ? ";
<BUG>SELECT_ALERT_SEVERITY = "SELECT alertId FROM " + keyspace + ".alerts_severities "
+ "WHERE tenantId = ? AND severity = ? ";
SELECT_ALERT_STATUS = "SELECT alertId FROM " + keyspace + ".alerts_statuses "
+ "WHERE tenantId = ? AND status = ? ";</BUG>
SELECT_ALERTS_BY_TENANT = "SELECT payload FROM " + keyspace + ".alerts " + "WHERE tenantId = ? ";
| [DELETED] |
7,663 | import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
<BUG>import java.util.stream.Collectors;
import javax.ejb.EJB;</BUG>
import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
| import javax.annotation.PostConstruct;
import javax.ejb.EJB;
|
7,664 | import org.hawkular.alerts.api.model.trigger.Trigger;
import org.hawkular.alerts.api.services.ActionsService;
import org.hawkular.alerts.api.services.AlertsCriteria;
import org.hawkular.alerts.api.services.AlertsService;
import org.hawkular.alerts.api.services.DefinitionsService;
<BUG>import org.hawkular.alerts.api.services.EventsCriteria;
import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingData;</BUG>
import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingEvents;
import org.hawkular.alerts.engine.log.MsgLogger;
import org.hawkular.alerts.engine.service.AlertsEngine;
| import org.hawkular.alerts.api.services.PropertiesService;
import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingData;
|
7,665 | import com.datastax.driver.core.Session;
import com.google.common.util.concurrent.Futures;
@Local(AlertsService.class)
@Stateless
@TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED)
<BUG>public class CassAlertsServiceImpl implements AlertsService {
private final MsgLogger msgLog = MsgLogger.LOGGER;
private final Logger log = Logger.getLogger(CassAlertsServiceImpl.class);
@EJB</BUG>
AlertsEngine alertsEngine;
| private static final String CRITERIA_NO_QUERY_SIZE = "hawkular-alerts.criteria-no-query-size";
private static final String CRITERIA_NO_QUERY_SIZE_ENV = "CRITERIA_NO_QUERY_SIZE";
private static final String CRITERIA_NO_QUERY_SIZE_DEFAULT = "200";
private int criteriaNoQuerySize;
|
7,666 | log.debug("Adding " + alerts.size() + " alerts");
}
PreparedStatement insertAlert = CassStatement.get(session, CassStatement.INSERT_ALERT);
PreparedStatement insertAlertTrigger = CassStatement.get(session, CassStatement.INSERT_ALERT_TRIGGER);
PreparedStatement insertAlertCtime = CassStatement.get(session, CassStatement.INSERT_ALERT_CTIME);
<BUG>PreparedStatement insertAlertStatus = CassStatement.get(session, CassStatement.INSERT_ALERT_STATUS);
PreparedStatement insertAlertSeverity = CassStatement.get(session, CassStatement.INSERT_ALERT_SEVERITY);</BUG>
PreparedStatement insertTag = CassStatement.get(session, CassStatement.INSERT_TAG);
try {
List<ResultSetFuture> futures = new ArrayList<>();
| [DELETED] |
7,667 | futures.add(session.executeAsync(insertAlertTrigger.bind(a.getTenantId(),
a.getAlertId(),
a.getTriggerId())));
futures.add(session.executeAsync(insertAlertCtime.bind(a.getTenantId(),
a.getAlertId(), a.getCtime())));
<BUG>futures.add(session.executeAsync(insertAlertStatus.bind(a.getTenantId(),
a.getAlertId(),
a.getStatus().name())));
futures.add(session.executeAsync(insertAlertSeverity.bind(a.getTenantId(),
a.getAlertId(),
a.getSeverity().name())));</BUG>
a.getTags().entrySet().stream().forEach(tag -> {
| [DELETED] |
7,668 | for (Row row : rsAlerts) {
String payload = row.getString("payload");
Alert alert = JsonUtil.fromJson(payload, Alert.class, thin);
alerts.add(alert);
}
<BUG>}
} catch (Exception e) {
msgLog.errorDatabaseException(e.getMessage());
throw e;
}
return preparePage(alerts, pager);</BUG>
}
| [DELETED] |
7,669 | for (Alert a : alertsToDelete) {
String id = a.getAlertId();
List<ResultSetFuture> futures = new ArrayList<>();
futures.add(session.executeAsync(deleteAlert.bind(tenantId, id)));
futures.add(session.executeAsync(deleteAlertCtime.bind(tenantId, a.getCtime(), id)));
<BUG>futures.add(session.executeAsync(deleteAlertSeverity.bind(tenantId, a.getSeverity().name(), id)));
futures.add(session.executeAsync(deleteAlertStatus.bind(tenantId, a.getStatus().name(), id)));</BUG>
futures.add(session.executeAsync(deleteAlertTrigger.bind(tenantId, a.getTriggerId(), id)));
a.getLifecycle().stream().forEach(l -> {
futures.add(
| [DELETED] |
7,670 | private Alert updateAlertStatus(Alert alert) throws Exception {
if (alert == null || alert.getAlertId() == null || alert.getAlertId().isEmpty()) {
throw new IllegalArgumentException("AlertId must be not null");
}
try {
<BUG>PreparedStatement deleteAlertStatus = CassStatement.get(session,
CassStatement.DELETE_ALERT_STATUS);
PreparedStatement insertAlertStatus = CassStatement.get(session,
CassStatement.INSERT_ALERT_STATUS);</BUG>
PreparedStatement insertAlertLifecycle = CassStatement.get(session,
| [DELETED] |
7,671 | PreparedStatement insertAlertLifecycle = CassStatement.get(session,
CassStatement.INSERT_ALERT_LIFECYCLE);
PreparedStatement updateAlert = CassStatement.get(session,
CassStatement.UPDATE_ALERT);
List<ResultSetFuture> futures = new ArrayList<>();
<BUG>for (Status statusToDelete : EnumSet.complementOf(EnumSet.of(alert.getStatus()))) {
futures.add(session.executeAsync(deleteAlertStatus.bind(alert.getTenantId(), statusToDelete.name(),
alert.getAlertId())));
}
futures.add(session.executeAsync(insertAlertStatus.bind(alert.getTenantId(), alert.getAlertId(), alert
.getStatus().name())));</BUG>
Alert.LifeCycle lifecycle = alert.getCurrentLifecycle();
| [DELETED] |
7,672 | String category = null;
Collection<String> categories = null;
String triggerId = null;
Collection<String> triggerIds = null;
Map<String, String> tags = null;
<BUG>boolean thin = false;
public EventsCriteria() {</BUG>
super();
}
public Long getStartTime() {
| Integer criteriaNoQuerySize = null;
public EventsCriteria() {
|
7,673 | }
@Override
public String toString() {
return "EventsCriteria [startTime=" + startTime + ", endTime=" + endTime + ", eventId=" + eventId
+ ", eventIds=" + eventIds + ", category=" + category + ", categories=" + categories + ", triggerId="
<BUG>+ triggerId + ", triggerIds=" + triggerIds + ", tags=" + tags + ", thin=" + thin + "]";
}</BUG>
}
| public void addTag(String name, String value) {
if (null == tags) {
tags = new HashMap<>();
|
7,674 | import com.eventsourcing.Journal;
import com.eventsourcing.Repository;
import com.eventsourcing.index.Attribute;
import com.eventsourcing.index.CQIndexEngine;
import com.eventsourcing.index.IndexEngine;
<BUG>import com.eventsourcing.postgresql.index.EqualityIndex;
import org.osgi.service.component.annotations.Activate;</BUG>
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import javax.sql.DataSource;
| import com.eventsourcing.postgresql.index.NavigableIndex;
import org.osgi.service.component.annotations.Activate;
|
7,675 | new IndexCapabilities<Attribute>("Hash",
new IndexFeature[]{EQ, IN, QZ},
attribute -> EqualityIndex.onAttribute(dataSource, attribute, false)),
new IndexCapabilities<Attribute>("Unique",
new IndexFeature[]{EQ, IN, QZ, UNIQUE},
<BUG>attribute -> EqualityIndex.onAttribute(dataSource, attribute, true))
);</BUG>
}
@Override
| attribute -> EqualityIndex.onAttribute(dataSource, attribute, true)),
new IndexCapabilities<Attribute>("Navigable",
new IndexFeature[]{IndexFeature.EQ, IndexFeature.IN, IndexFeature.QZ, IndexFeature.LT, IndexFeature.GT, IndexFeature.BT},
attr -> NavigableIndex.onAttribute(dataSource, attr))
);
|
7,676 | return result;
}
@Test
public void getDistinctKeysAndCounts() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>SortedKeyStatisticsIndex<String, EntityHandle<Car>> MODEL_INDEX = onAttribute(Car.MODEL);
collection.addIndex(MODEL_INDEX);</BUG>
collection.addAll(CarFactory.createCollectionOfCars(20));
Set<String> distinctModels = setOf(MODEL_INDEX.getDistinctKeys(noQueryOptions()));
assertEquals(new ArrayList<>(distinctModels),
| MODEL_INDEX.clear(noQueryOptions());
collection.addIndex(MODEL_INDEX);
|
7,677 | "Accord"));
}
@Test
public void getCountOfDistinctKeys() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>KeyStatisticsIndex<String, EntityHandle<Car>> MANUFACTURER_INDEX = onAttribute(Car.MANUFACTURER);
collection.addIndex(MANUFACTURER_INDEX);</BUG>
collection.addAll(CarFactory.createCollectionOfCars(20));
assertEquals(MANUFACTURER_INDEX.getCountOfDistinctKeys(noQueryOptions()), Integer.valueOf(4));
}
| MANUFACTURER_INDEX.clear(noQueryOptions());
collection.addIndex(MANUFACTURER_INDEX);
|
7,678 | assertEquals(MANUFACTURER_INDEX.getCountOfDistinctKeys(noQueryOptions()), Integer.valueOf(4));
}
@Test
public void getStatisticsForDistinctKeys() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>KeyStatisticsIndex<String, EntityHandle<Car>> MANUFACTURER_INDEX = onAttribute(Car.MANUFACTURER);
collection.addIndex(MANUFACTURER_INDEX);</BUG>
collection.addAll(CarFactory.createCollectionOfCars(20));
Set<KeyStatistics<String>> keyStatistics = setOf(
MANUFACTURER_INDEX.getStatisticsForDistinctKeys(noQueryOptions()));
| MANUFACTURER_INDEX.clear(noQueryOptions());
collection.addIndex(MANUFACTURER_INDEX);
|
7,679 | ));
}
@Test
public void getStatisticsForDistinctKeysDescending() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>SortedKeyStatisticsIndex<String, EntityHandle<Car>> MANUFACTURER_INDEX = onAttribute(Car.MANUFACTURER);
collection.addIndex(MANUFACTURER_INDEX);</BUG>
collection.addAll(CarFactory.createCollectionOfCars(20));
Set<KeyStatistics<String>> keyStatistics = setOf(
MANUFACTURER_INDEX.getStatisticsForDistinctKeysDescending(noQueryOptions()));
| MANUFACTURER_INDEX.clear(noQueryOptions());
collection.addIndex(MANUFACTURER_INDEX);
|
7,680 | assertEquals(carIdsFound, asList(47, 48, 49, 50, 51, 52, 53));
}
@Test
public void indexQuantization_FirstBucket() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
collection.addAll(CarFactory.createCollectionOfCars(100));</BUG>
assertEquals(collection.retrieve(between(Car.CAR_ID, 2, 4)).getMergeCost(), 10);
assertEquals(collection.retrieve(between(Car.CAR_ID, 2, 4)).size(), 3);
List<Integer> carIdsFound = retrieveCarIds(collection, between(Car.CAR_ID, 2, 4));
| Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
Car.CAR_ID);
index.clear(noQueryOptions());
collection.addIndex(index);
collection.addAll(CarFactory.createCollectionOfCars(100));
|
7,681 | assertEquals(carIdsFound, asList(2, 3, 4));
}
@Test
public void indexQuantization_LastBucket() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
collection.addAll(CarFactory.createCollectionOfCars(100));</BUG>
assertEquals(collection.retrieve(between(Car.CAR_ID, 96, 98)).getMergeCost(), 10);
assertEquals(collection.retrieve(between(Car.CAR_ID, 96, 98)).size(), 3);
List<Integer> carIdsFound = retrieveCarIds(collection, between(Car.CAR_ID, 96, 98));
| Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
Car.CAR_ID);
index.clear(noQueryOptions());
collection.addIndex(index);
collection.addAll(CarFactory.createCollectionOfCars(100));
|
7,682 | assertEquals(carIdsFound, asList(96, 97, 98));
}
@Test
public void indexQuantization_LessThan() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
collection.addAll(CarFactory.createCollectionOfCars(100));</BUG>
assertEquals(collection.retrieve(lessThan(Car.CAR_ID, 5)).size(), 5);
assertEquals(collection.retrieve(lessThan(Car.CAR_ID, 15)).size(), 15);
assertEquals(collection.retrieve(lessThanOrEqualTo(Car.CAR_ID, 5)).size(), 6);
| Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
Car.CAR_ID);
index.clear(noQueryOptions());
collection.addIndex(index);
collection.addAll(CarFactory.createCollectionOfCars(100));
|
7,683 | assertEquals(collection.retrieve(lessThanOrEqualTo(Car.CAR_ID, 15)).size(), 16);
}
@Test
public void indexQuantization_GreaterThan() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
collection.addAll(CarFactory.createCollectionOfCars(100));</BUG>
assertEquals(collection.retrieve(greaterThan(Car.CAR_ID, 95)).size(), 4);
assertEquals(collection.retrieve(greaterThan(Car.CAR_ID, 85)).size(), 14);
assertEquals(collection.retrieve(greaterThanOrEqualTo(Car.CAR_ID, 95)).size(), 5);
| Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
Car.CAR_ID);
index.clear(noQueryOptions());
collection.addIndex(index);
collection.addAll(CarFactory.createCollectionOfCars(100));
|
7,684 | assertEquals(collection.retrieve(greaterThanOrEqualTo(Car.CAR_ID, 85)).size(), 15);
}
@Test
public void indexQuantization_Between() {
IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
collection.addAll(CarFactory.createCollectionOfCars(100));</BUG>
Query<EntityHandle<Car>> query = between(Car.CAR_ID, 88, 92);
assertEquals(collection.retrieve(query).size(), 5);
assertEquals(retrieveCarIds(collection, query), asList(88, 89, 90, 91, 92));
| Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
Car.CAR_ID);
index.clear(noQueryOptions());
collection.addIndex(index);
collection.addAll(CarFactory.createCollectionOfCars(100));
|
7,685 | import com.eventsourcing.*;
import com.eventsourcing.layout.Layout;
import com.eventsourcing.layout.Property;
import com.eventsourcing.layout.TypeHandler;
import com.eventsourcing.layout.binary.BinarySerialization;
<BUG>import com.eventsourcing.layout.types.*;
import com.eventsourcing.repository.AbstractJournal;
import com.eventsourcing.JournalEntityHandle;</BUG>
import com.google.common.base.Joiner;
| import com.eventsourcing.layout.types.ListTypeHandler;
import com.eventsourcing.layout.types.ObjectTypeHandler;
import com.eventsourcing.layout.types.OptionalTypeHandler;
|
7,686 | import org.flywaydb.core.Flyway;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import javax.sql.DataSource;
<BUG>import java.nio.ByteBuffer;
import java.sql.*;
import java.util.*;</BUG>
import java.util.concurrent.ConcurrentHashMap;
| import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Savepoint;
import java.util.*;
|
7,687 | import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
<BUG>import static com.eventsourcing.postgresql.PostgreSQLSerialization.getParameter;
import static com.eventsourcing.postgresql.PostgreSQLSerialization.getValue;
import static com.eventsourcing.postgresql.PostgreSQLSerialization.setValue;</BUG>
@Component(property = "type=PostgreSQLJournal", service = Journal.class)
| import static com.eventsourcing.postgresql.PostgreSQLSerialization.*;
|
7,688 | metadata.setSimpleRedirect();
final SingleFileFetcher f = new SingleFileFetcher(this, metadata, new MultiLevelMetadataCallback(), ctx, container, context);
this.metadata = null;
if(persistent) container.set(this);
if(persistent) container.set(f);
<BUG>f.wrapHandleMetadata(true, container, context);
return;</BUG>
} else if(metadata.isSingleFileRedirect()) {
if(logMINOR) Logger.minor(this, "Is single-file redirect");
clientMetadata.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types!
| if(persistent) container.deactivate(f, 1);
return;
|
7,689 | private void fetchArchive(boolean forData, Metadata meta, String element, ArchiveExtractCallback callback, final ObjectContainer container, ClientContext context) throws FetchException, MetadataParseException, ArchiveFailureException, ArchiveRestartException {
if(logMINOR) Logger.minor(this, "fetchArchive()");
Metadata newMeta = (Metadata) meta.clone();
newMeta.setSimpleRedirect();
final SingleFileFetcher f;
<BUG>f = new SingleFileFetcher(this, newMeta, new ArchiveFetcherCallback(forData, element, callback), new FetchContext(ctx, FetchContext.SET_RETURN_ARCHIVES, true), container, context);
if(logMINOR) Logger.minor(this, "fetchArchive(): "+f);
f.wrapHandleMetadata(true, container, context);
}</BUG>
private void wrapHandleMetadata(final boolean notFinalizedSize, ObjectContainer container, final ClientContext context) {
| if(persistent) container.set(f);
if(persistent) container.deactivate(f, 1);
}
|
7,690 | class MultiLevelMetadataCallback implements GetCompletionCallback {
private final boolean persistent;
MultiLevelMetadataCallback() {
this.persistent = SingleFileFetcher.this.persistent;
}
<BUG>public void onSuccess(FetchResult result, ClientGetState state, ObjectContainer container, ClientContext context) {
if(persistent)
container.activate(SingleFileFetcher.this, 1);
try {</BUG>
Metadata meta = Metadata.construct(result.asBucket());
| boolean wasActive = true;
if(persistent) {
wasActive = container.ext().isActive(SingleFileFetcher.this);
try {
|
7,691 | import org.apache.commons.io.FileUtils;
public class BetterFpsHelper {
public static final String MC_VERSION = "1.9";
public static final String VERSION = "1.2.1";
public static final String URL = "http://guichaguri.github.io/BetterFps/";
<BUG>public static final String UPDATE_URL = "https://raw.githubusercontent.com/Guichaguri/BetterFps/1.8/lastest-version.properties";
public static final LinkedHashMap<String, String> helpers = new LinkedHashMap<String, String>();</BUG>
public static final LinkedHashMap<String, String> displayHelpers = new LinkedHashMap<String, String>();
static {
helpers.put("vanilla", "VanillaMath");
| public static final String UPDATE_URL = "http://widget.mcf.li/mc-mods/minecraft/229876-betterfps.json";
public static final LinkedHashMap<String, String> helpers = new LinkedHashMap<String, String>();
|
7,692 | <BUG>package guichaguri.betterfps;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;</BUG>
import net.minecraft.client.Minecraft;
| import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.InputStreamReader;
|
7,693 | import net.minecraft.util.text.event.ClickEvent;
import net.minecraft.util.text.event.HoverEvent;
public class UpdateChecker implements Runnable {
private static boolean updateCheck = false;
private static boolean done = false;
<BUG>private static Properties prop = null;
public static void check() {</BUG>
if(!BetterFpsConfig.getConfig().updateChecker) {
done = true;
return;
| private static String updateVersion = null;
private static String updateDownload = null;
public static void check() {
|
7,694 | thread.setDaemon(true);
thread.start();
}
}
public static void showChat() {
<BUG>if(!done) return;
if(prop == null) return;
if(BetterFpsHelper.VERSION.equals(prop.getProperty("version"))) {
prop = null;
return;
}</BUG>
if(!BetterFps.isClient) return;
| if(updateVersion == null && updateDownload == null) return;
|
7,695 | @CopyMode(Mode.IGNORE) // Ignore the constructor to prevent an infinite loop
public HopperBlock() {
}
@Override
@CopyMode(Mode.APPEND)
<BUG>public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
</BUG>
TileEntity te = worldIn.getTileEntity(pos);
if(te != null) {
TileEntityHopper hopper = (TileEntityHopper)te;
| public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block neighborBlock) {
|
7,696 | if (!isSimpleFieldComparison(condition)) {
return;
}
registerStatementError(statement);
}
<BUG>private static boolean isSimpleFieldComparison(PsiExpression condition) {
if (condition == null) {</BUG>
return false;
}
if (isSimpleFieldAccess(condition)) {
| private boolean isSimpleFieldComparison(PsiExpression condition) {
condition = PsiUtil.deparenthesizeExpression(condition);
if (condition == null) {
|
7,697 | final PsiExpression operand =
((PsiPrefixExpression)condition).getOperand();
</BUG>
return isSimpleFieldComparison(operand);
}
<BUG>if (condition instanceof PsiPostfixExpression) {
final PsiExpression operand =
((PsiPostfixExpression)condition).getOperand();
return isSimpleFieldComparison(operand);
}
if (condition instanceof PsiParenthesizedExpression) {
final PsiExpression operand =
((PsiParenthesizedExpression)condition).getExpression();</BUG>
return isSimpleFieldComparison(operand);
| prefixExpression.getOperand();
|
7,698 | }
if (condition instanceof PsiBinaryExpression) {
final PsiBinaryExpression binaryExpression =
(PsiBinaryExpression)condition;
final PsiExpression lOperand = binaryExpression.getLOperand();
<BUG>final PsiExpression rOperand = binaryExpression.getROperand();
return isSimpleFieldComparison(lOperand) &&
isLiteral(rOperand) ||
(isSimpleFieldComparison(rOperand) && isLiteral(lOperand));
}</BUG>
return false;
| if (isSimpleFieldAccess(condition)) {
return true;
|
7,699 | }
if (statement instanceof PsiEmptyStatement) {
return true;
}
if (statement instanceof PsiBlockStatement) {
<BUG>final PsiCodeBlock codeBlock =
((PsiBlockStatement)statement).getCodeBlock();
final PsiStatement[] statements = codeBlock.getStatements();
for (PsiStatement statement1 : statements) {
if (!statementIsEmpty(statement1)) {
</BUG>
return false;
| registerStatementError(statement);
|
7,700 | if (sourceProperty != null) {
String sourcePath = sourceProperty.getValue(STRING);
handler.nodeMoved(sourcePath, name, after);
}
handler.nodeAdded(name, after);
<BUG>return addChildDiff(name, MISSING_NODE, after);
} else {</BUG>
return true;
}
}
| return afterEvent();
} else {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.