id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
27,901
if(eventId == null){ //empty return null; }else{ lastEventId = eventId; Set<String> eventRecords = eventIdToEventRecords.remove(eventId); <BUG>currentRecordCount -= eventRecords.size(); </BUG> Map<String, String> eventData = new HashMap<String, String>(); if(eventRecords != null){ for(String eventRecord : eventRecords)...
currentlyBufferedRecords -= eventRecords.size();
27,902
@SideOnly(Side.CLIENT) public class GuiSeedAnalyzer extends GuiContainer { public static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/gui/GuiSeedAnalyzer.png"); public TileEntitySeedAnalyzer seedAnalyzer; private boolean journalOpen; <BUG>private GuiJournal guiJournal; </BUG> public...
private AgriGuiWrapper guiJournal;
27,903
return; } ItemStack journal = seedAnalyzer.getStackInSlot(ContainerSeedAnalyzer.journalSlotId); if(journal != null) { journalOpen = true; <BUG>guiJournal = new GuiJournal(journal); </BUG> guiJournal.setWorldAndResolution(this.mc, this.width, this.height); } }
guiJournal = new AgriGuiWrapper(new GuiJournal(journal));
27,904
import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; <BUG>import static net.ttddyy.dsproxy.proxy.ParameterKeyUtils.toIndexMap; import static net.ttddyy.dsproxy.proxy.ParameterKeyUtils.toNameMap;</BUG> import static net.ttddyy.dsproxy.test.Paramet...
[DELETED]
27,905
boolean isOutParamHolder = parameterHolder instanceof OutParameterHolder; SortedSet<ParameterKey> actualParamKeys = toParamKeys(parameterHolder.getSetParams()); SortedSet<ParameterKey> actualSetNullParamKeys = toParamKeys(parameterHolder.getSetNullParams()); SortedSet<ParameterKey> actualOutParamKeys = new TreeSet<Para...
actualOutParamKeys.addAll(toParamKeys(((OutParameterHolder) parameterHolder).getOutParams()));
27,906
String expectedEntry = String.format("%s=%s", parameterKey.getKeyAsString(), displayValue); failWithMessage("%nExpecting: parameters %n<%s>%nto contain:%n<[%s]>%nbut could not find:%n<[%s]>", sortedParams, expectedEntry, expectedEntry); } } private void validateOutParamParameterWithInt(ParameterKey parameterKey, int sq...
Object actualValue = toKeyValueMap(executionEntry.getOutParams()).get(parameterKey);
27,907
String expectedEntry = String.format("%s=%s", parameterKey.getKeyAsString(), displayValue); failWithMessage("%nExpecting: parameters %n<%s>%nto contain:%n<[%s]>%nbut could not find:%n<[%s]>", sortedParams, expectedEntry, expectedEntry); } } private void validateOutParamParameterWithSQLType(ParameterKey parameterKey, SQ...
private void validateOutParamParameterWithInt(ParameterKey parameterKey, int sqlType, OutParameterHolder executionEntry) { Object actualValue = toKeyValueMap(executionEntry.getOutParams()).get(parameterKey); if (!new Integer(sqlType).equals(actualValue)) {
27,908
import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; <BUG>import static net.ttddyy.dsproxy.proxy.ParameterKeyUtils.toIndexMap; import static net.ttddyy.dsproxy.proxy.ParameterKeyUtils.toNameMap;</BUG> import static net.ttddyy.dsproxy.test.Paramet...
[DELETED]
27,909
public F onAbortAsync(CheckedBiConsumer<? extends R, ? extends Throwable> listener, ExecutorService executor) { registry().abort().add(Listeners.of(Listeners.of(listener), Assert.notNull(executor, "executor"), null)); return (F) this; } public F onAbortAsync(CheckedConsumer<? extends Throwable> listener, ExecutorServic...
registry().abort().add(Listeners.of(Listeners.<R>of(listener), Assert.notNull(executor, "executor"), null));
27,910
System.out.println(change); } } }; @Override <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { return (child) -> {
protected Callback<VChild, Void> copyIntoCallback()
27,911
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...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
27,912
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.DESCRIPTI...
PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
27,913
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_TI...
PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
27,914
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....
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
27,915
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, PropertyT...
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)
27,916
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 ...
protected Callback<VChild, Void> copyIntoCallback()
27,917
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), CalendarSca...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), CalendarScale.class)
27,918
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 contentLi...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
27,919
} 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)
27,920
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 vCal...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Version.class)
27,921
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...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
27,922
package jetbrains.mps.project.structure.project.testconfigurations; import com.intellij.openapi.project.Project; import jetbrains.mps.generator.GenParameters; <BUG>import jetbrains.mps.generator.ModelGenerationStatusManager; </BUG> import jetbrains.mps.project.IModule; import jetbrains.mps.project.ProjectOperationConte...
import jetbrains.mps.generator.GenerationFacade;
27,923
public void addCompilationListener(CompilationListener l) { } @Deprecated public void removeCompilationListener(CompilationListener l) { } <BUG>public static boolean isDoNotGenerate(SModelDescriptor sm) { if (!(sm instanceof EditableSModelDescriptor)) return false; return ((EditableSModelDescriptor) sm).isDoNotGenerate...
return sm instanceof EditableSModelDescriptor && ((EditableSModelDescriptor) sm).isDoNotGenerate();
27,924
package jetbrains.mps.project.structure.project.testconfigurations; import com.intellij.openapi.project.Project; import jetbrains.mps.generator.GenParameters; <BUG>import jetbrains.mps.generator.GeneratorManager; import jetbrains.mps.generator.ModelGenerationStatusManager;</BUG> import jetbrains.mps.project.IModule; i...
import jetbrains.mps.generator.GenerationFacade;
27,925
import jetbrains.mps.generator.impl.plan.GenerationPartitioningUtil; import jetbrains.mps.generator.runtime.TemplateMappingConfiguration; import jetbrains.mps.generator.runtime.TemplateModule; import jetbrains.mps.messages.IMessageHandler; import jetbrains.mps.smodel.*; <BUG>import java.util.ArrayList; import java.util...
import java.util.*;
27,926
package org.camunda.bpm.extension.example.reactor; <BUG>import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener;</BUG> import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.test.Deployment;
[DELETED]
27,927
import org.camunda.bpm.extension.reactor.bus.CamundaSelector; import org.camunda.bpm.extension.reactor.listener.SubscriberTaskListener;</BUG> import reactor.bus.EventBus; @CamundaSelector(type = "userTask", event = TaskListener.EVENTNAME_CREATE) <BUG>public class TaskCreateListener extends SubscriberTaskListener { pub...
public class TaskCreateListener implements TaskListener { public TaskCreateListener(CamundaEventBus eventBus) { eventBus.register(this); }
27,928
package org.camunda.bpm.extension.example.reactor; import org.camunda.bpm.engine.ProcessEngineConfiguration; import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration; <BUG>import org.camunda.bpm.extension.reactor.CamundaReactor; import org.camunda.bpm.extension.reactor.plugin.ReactorProcessEngin...
import org.camunda.bpm.extension.reactor.bus.CamundaEventBus; import org.camunda.bpm.extension.reactor.plugin.ReactorProcessEnginePlugin;
27,929
</BUG> this.jobExecutorActivate = false; } }; <BUG>private final EventBus eventBus = CamundaReactor.eventBus(); </BUG> public void init() { new TaskCreateListener(eventBus); new TaskAssignListener(); }
public static final String GROUP_2 = "group2"; public static final String GROUP_3 = "group3"; public static ProcessEngineConfiguration CONFIGURATION = new StandaloneInMemProcessEngineConfiguration() { this.databaseSchemaUpdate = DB_SCHEMA_UPDATE_TRUE; this.getProcessEnginePlugins().add(CamundaReactor.plugin()); private...
27,930
@StepContextParameter private transient FilePath cwd; private BodyExecution body; @Override public boolean start() throws Exception { FilePath dir = cwd.child(step.getPath()); listener.getLogger().println("Running in " + dir); <BUG>body = getContext().invokeBodyLater(dir); body.addCallback(getContext());</BUG> return f...
body = getContext().newBodyInvoker().withContext(dir).start(); body.addCallback(getContext());
27,931
private BodyExecution body; private transient ScheduledFuture<?> killer; @Override public boolean start() throws Exception { StepContext context = getContext(); <BUG>body = context.invokeBodyLater(); setupTimer();</BUG> body.addCallback(new Callback()); return false; // execution is asynchronous }
body = context.newBodyInvoker().start(); setupTimer();
27,932
public static final class Execution extends AbstractStepExecutionImpl { @StepContextParameter private transient Run<?,?> run; @StepContextParameter private transient TaskListener listener; @Override public boolean start() throws Exception { StepContext context = getContext(); <BUG>context.invokeBodyLater().addCallback(...
context.newBodyInvoker().withCallback(new Callback(context)).start();
27,933
import java.net.URI; import java.util.Calendar; import java.util.Date; import java.util.Formatter; import java.util.List; <BUG>import javax.ws.rs.core.UriBuilder; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.util.URIUtil;</BUG> import org.suigeneris.jrcs.rcs.Version; import or...
[DELETED]
27,934
if (home != null) { space.setHome(home.getPrefixedFullName()); space.setXwikiRelativeUrl(home.getURL("view")); space.setXwikiAbsoluteUrl(home.getExternalURL("view")); } <BUG>String pagesUri = UriBuilder.fromUri(baseUri).path(PagesResource.class).build(wikiName, spaceName).toString(); </BUG> Link pagesLink = objectFacto...
String pagesUri = uri(baseUri, PagesResource.class, wikiName, spaceName);
27,935
Link pagesLink = objectFactory.createLink(); pagesLink.setHref(pagesUri); pagesLink.setRel(Relations.PAGES); space.getLinks().add(pagesLink); if (home != null) { <BUG>String homeUri = UriBuilder.fromUri(baseUri).path(PageResource.class).build(wikiName, spaceName, home.getName()) .toString();</BUG> Link homeLink = obje...
String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName());
27,936
.toString();</BUG> Link homeLink = objectFactory.createLink(); homeLink.setHref(homeUri); homeLink.setRel(Relations.HOME); space.getLinks().add(homeLink); <BUG>} String searchUri = UriBuilder.fromUri(baseUri).path(SpaceSearchResource.class).build(wikiName, spaceName).toString();</BUG> Link searchLink = objectFactory.cr...
Link pagesLink = objectFactory.createLink(); pagesLink.setHref(pagesUri); pagesLink.setRel(Relations.PAGES); space.getLinks().add(pagesLink); if (home != null) { String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName()); String searchUri = uri(baseUri, SpaceSearchResource.class, wikiName, s...
27,937
if (!languages.isEmpty()) { if (!doc.getDefaultLanguage().equals("")) { translations.setDefault(doc.getDefaultLanguage()); Translation translation = objectFactory.createTranslation(); translation.setLanguage(doc.getDefaultLanguage()); <BUG>String pageTranslationUri = UriBuilder.fromUri(baseUri).path(PageResource.class)...
uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
27,938
} } for (String language : languages) { Translation translation = objectFactory.createTranslation(); translation.setLanguage(language); <BUG>String pageTranslationUri = UriBuilder.fromUri(baseUri).path(PageTranslationResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), language).toString();</BUG> Link p...
uri(baseUri, PageTranslationResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), language);
27,939
Link pageTranslationLink = objectFactory.createLink(); pageTranslationLink.setHref(pageTranslationUri); pageTranslationLink.setRel(Relations.PAGE); translation.getLinks().add(pageTranslationLink); String historyUri = <BUG>UriBuilder.fromUri(baseUri).path(PageTranslationHistoryResource.class) .build(doc.getWiki(), doc.g...
uri(baseUri, PageTranslationHistoryResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), language); Link historyLink = objectFactory.createLink();
27,940
pageSummary.setParent(doc.getParent()); if (parent != null && !parent.isNew()) { pageSummary.setParentId(parent.getPrefixedFullName()); } else { pageSummary.setParentId(""); <BUG>} String spaceUri = UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG> Link spaceLi...
String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());
27,941
UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG> Link spaceLink = objectFactory.createLink(); spaceLink.setHref(spaceUri); spaceLink.setRel(Relations.SPACE); pageSummary.getLinks().add(spaceLink); <BUG>if (parent != null) { String parentUri = UriBuilder.fromUr...
pageSummary.setParent(doc.getParent()); if (parent != null && !parent.isNew()) { pageSummary.setParentId(parent.getPrefixedFullName()); } else { pageSummary.setParentId(""); } String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace()); String parentUri = uri(baseUri, PageResource.class, parent.g...
27,942
Link historyLink = objectFactory.createLink(); historyLink.setHref(historyUri); historyLink.setRel(Relations.HISTORY); pageSummary.getLinks().add(historyLink); if (!doc.getChildren().isEmpty()) { <BUG>String pageChildrenUri = UriBuilder.fromUri(baseUri).path(PageChildrenResource.class) .build(doc.getWiki(), doc.getSpac...
uri(baseUri, PageChildrenResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
27,943
objectsLink.setRel(Relations.OBJECTS); pageSummary.getLinks().add(objectsLink); } com.xpn.xwiki.api.Object tagsObject = doc.getObject("XWiki.TagClass", 0); if (tagsObject != null) { <BUG>if (tagsObject.getProperty("tags") != null) { String tagsUri = UriBuilder.fromUri(baseUri).path(PageTagsResource.class) .build(doc.ge...
String tagsUri = uri(baseUri, PageTagsResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
27,944
tagsLink.setHref(tagsUri); tagsLink.setRel(Relations.TAGS); pageSummary.getLinks().add(tagsLink); } } <BUG>String syntaxesUri = UriBuilder.fromUri(baseUri).path(SyntaxesResource.class).build().toString(); Link syntaxesLink = objectFactory.createLink();</BUG> syntaxesLink.setHref(syntaxesUri); syntaxesLink.setRel(Relati...
String syntaxesUri = uri(baseUri, SyntaxesResource.class); Link syntaxesLink = objectFactory.createLink();
27,945
} return historySummary; } private static void fillAttachment(Attachment attachment, ObjectFactory objectFactory, URI baseUri, <BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi, Boolean withPrettyNames) {</BUG> Document doc = xwikiAttachment.getDocument...
com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi, {
27,946
Calendar calendar = Calendar.getInstance(); calendar.setTime(xwikiAttachment.getDate()); attachment.setDate(calendar); attachment.setXwikiRelativeUrl(xwikiRelativeUrl); attachment.setXwikiAbsoluteUrl(xwikiAbsoluteUrl); <BUG>String pageUri = UriBuilder.fromUri(baseUri).path(PageResource.class).build(doc.getWiki(), doc.g...
String pageUri = uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
27,947
} return attachmentUri; }</BUG> public static Attachment createAttachment(ObjectFactory objectFactory, URI baseUri, <BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi, Boolean withPrettyNames) {</BUG> Attachment attachment = objectFactory.createAttachmen...
com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi, {
27,948
attachmentLink.setRel(Relations.ATTACHMENT_DATA); attachment.getLinks().add(attachmentLink); return attachment; } public static Attachment createAttachmentAtVersion(ObjectFactory objectFactory, URI baseUri, <BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwiki...
com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi, {
27,949
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString();</BUG> } else { <BUG>propertiesUri = UriBuilder .fromUri(baseUri) .path(ObjectPropertiesResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), ...
fillObjectSummary(objectSummary, objectFactory, baseUri, doc, xwikiObject, xwikiApi, withPrettyNames); Link objectLink = getObjectLink(objectFactory, baseUri, doc, xwikiObject, useVersion, Relations.OBJECT); objectSummary.getLinks().add(objectLink); String propertiesUri; if (useVersion) { uri(baseUri, ObjectPropertiesA...
27,950
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber(), propertyClass.getName()) .toString();</BUG> } else { <BUG>propertyUri = UriBuilder .fromUri(baseUri) .path(ObjectPropertyResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiO...
propertiesUri = uri(baseUri, ObjectPropertiesResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), xwikiObject.getNumber());
27,951
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString();</BUG> } else { <BUG>objectUri = UriBuilder .fromUri(baseUri) .path(ObjectResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), xwikiObject.ge...
private static Link getObjectLink(ObjectFactory objectFactory, URI baseUri, Document doc, BaseObject xwikiObject, boolean useVersion, String relation) String objectUri; if (useVersion) { uri(baseUri, ObjectAtPageVersionResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassN...
27,952
Link propertyLink = objectFactory.createLink(); propertyLink.setHref(propertyUri); propertyLink.setRel(Relations.SELF); property.getLinks().add(propertyLink); clazz.getProperties().add(property); <BUG>} String classUri = UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toStrin...
String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName());
27,953
String classUri = UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG> Link classLink = objectFactory.createLink(); classLink.setHref(classUri); classLink.setRel(Relations.SELF); <BUG>clazz.getLinks().add(classLink); String propertiesUri = UriBuilder.fromUri(base...
propertyLink.setHref(propertyUri); propertyLink.setRel(Relations.SELF); property.getLinks().add(propertyLink); clazz.getProperties().add(property); } String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName()); String propertiesUri = uri(baseUri, ClassPropertiesResource.class, wikiName, xwikiCla...
27,954
<BUG>package org.xwiki.rest.internal; import org.apache.commons.lang3.StringUtils;</BUG> import org.xwiki.component.manager.ComponentManager; import org.xwiki.context.Execution; import org.xwiki.model.reference.EntityReferenceSerializer;
import java.net.URI; import javax.ws.rs.core.UriBuilder; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.util.URIUtil; import org.apache.commons.lang3.StringUtils;
27,955
Repository repository = null; try { if (!Const.isEmpty(optionRepname) || !Const.isEmpty(optionFilename)) { <BUG>log.logDebug(STRING_KITCHEN, "Parsing command line options."); if (!Const.isEmpty(optionRepname) && !"Y".equalsIgnoreCase(optionNorep.toString()))</BUG> { if(log.isDebug()) log.logDebug(STRING_KITCHEN, Messag...
if(log.isDebug()) log.logDebug(STRING_KITCHEN, Messages.getString("Kitchen.Log.ParsingCommandLine")); if (!Const.isEmpty(optionRepname) && !"Y".equalsIgnoreCase(optionNorep.toString()))
27,956
job = new Job(log, stepLoader, repository, jobMeta); } else if ("Y".equalsIgnoreCase(optionListjobs.toString())) { <BUG>if(log.isDebug())log.logDebug(STRING_KITCHEN, "Getting list of jobs in directory: "+directory); </BUG> String jobnames[] = repository.getJobNames(directory.getID()); for (int i=0;i<jobnames.length;i++...
if(log.isDebug())log.logDebug(STRING_KITCHEN, Messages.getString("Kitchen.Log.GettingLostJobsInDirectory",""+directory));
27,957
repinfo=null; } } else { <BUG>System.out.println("ERROR: Can't find the supplied directory ["+optionDirname+"]"); userinfo=null;</BUG> repinfo=null; } }
[DELETED]
27,958
if ("Y".equalsIgnoreCase(optionListrep.toString())) { RepositoriesMeta ri = new RepositoriesMeta(log); if (ri.readData()) { <BUG>System.out.println("List of repositories:"); for (int i=0;i<ri.nrRepositories();i++)</BUG> { RepositoryMeta rinfo = ri.getRepository(i); System.out.println("#"+(i+1)+" : "+rinfo.getName()+" [...
System.out.println(Messages.getString("Kitchen.Log.ListRep")); for (int i=0;i<ri.nrRepositories();i++)
27,959
System.out.println("#"+(i+1)+" : "+rinfo.getName()+" ["+rinfo.getDescription()+"] "); } } else { <BUG>System.out.println("ERROR: Unable to read/parse the repositories XML file."); }</BUG> } } catch(KettleException e)
System.out.println(Messages.getString("Kitchen.Error.UnableToReadXMLFile"));
27,960
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode...
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsR...
27,961
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode...
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsR...
27,962
menu.setEnabled(false); menubar.add(menu); menu = new Menu("Sketch"); menu.add(new MenuItem("Play")); menu.add(new MenuItem("Present")); <BUG>menu.add(new MenuItem("Stop")); menu.addActionListener(this);</BUG> menubar.add(menu); frame.setMenuBar(menubar); Insets insets = frame.getInsets();
menu.addSeparator(); menu.add(new MenuItem("Beautify")); menu.addActionListener(this);
27,963
import java.net.*; import java.util.*; import java.util.zip.*; public class PdeEditor extends Panel { static final String DEFAULT_PROGRAM = "// type program here\n"; <BUG>static final String NEW_SKETCH_ITEM = "( new sketch )"; static final String SKETCH_PREFIX_NAME = "sketch-"; static final String CODE_FILENAME = "sket...
[DELETED]
27,964
userName = user; skOpen(path, name); } else { skNew(); } <BUG>} catch (Exception e) { skNew();</BUG> } } public void doPlay() {
userName = "default";
27,965
sketchDir.mkdirs(); new File(sketchDir, "data").mkdirs(); new File(sketchDir, "build").mkdirs(); File sketchFile = new File(sketchDir, sketchName + ".pde"); new FileOutputStream(sketchFile); <BUG>handleOpen(sketchFile, sketchDir); </BUG> } catch (IOException e) { e.printStackTrace(); }
handleOpen(sketchName, sketchFile, sketchDir);
27,966
byte data[] = new byte[length]; int count = 0; while (count != length) { data[count++] = (byte) input.read(); } <BUG>textarea.setText(new String(data)); header.reset();</BUG> } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (IOException e2) {
sketchName = isketchName; sketchFile = isketchFile; sketchDir = isketchDir; header.reset();
27,967
e2.printStackTrace(); } buttons.clear(); } public void doSave() { <BUG>handleSave(lastFile == null); </BUG> } public void doSaveAs() { handleSave(true);
handleSave(sketchName == null);
27,968
public void doSaveAs() { handleSave(true); } protected void handleSave(boolean promptUser) { message("Saving file..."); <BUG>String s = textarea.getText(); String directory = lastDirectory; String filename = lastFile; System.out.println("1");</BUG> if (promptUser) {
String directory = sketchFile.getPath(); //lastDirectory; String filename = sketchFile.getName(); //lastFile;
27,969
buttons.clear(); return; } <BUG>handleExport(new File(directory), projectName, null); } protected void handleExport(File appletDir, String projectName, </BUG> File dataDir) { try { String program = textarea.getText();
} else if (project.indexOf(' ') != -1) { // space in filename message("Project name cannot have spaces."); handleExport(new File(directory), project, null); protected void handleExport(File appletDir, String exportSketchName,
27,970
</BUG> if (!engine.compileJava()) { return; } <BUG>String javaName = projectName + ".java"; </BUG> copyFile(new File(javaName), new File(appletDir, javaName)); int wide = BApplet.DEFAULT_WIDTH; int high = BApplet.DEFAULT_HEIGHT; int index = program.indexOf("size(");
File dataDir) { try { String program = textarea.getText(); KjcEngine engine = new KjcEngine(program, this); appletDir.mkdirs(); exportSketchName = engine.writeJava(exportSketchName, false); String javaName = exportSketchName + ".java";
27,971
PrintStream ps = new PrintStream(fos); ps.println("<HTML> <BODY BGCOLOR=\"white\">"); ps.println(); ps.println("<BR> <BR> <BR> <CENTER>"); ps.println(); <BUG>ps.print("<APPLET CODE=\"" + projectName + "\" ARCHIVE=\""); ps.print(projectName + ".jar"); </BUG> ps.println("\" WIDTH=" + wide + " HEIGHT=" + high + ">");
ps.print("<APPLET CODE=\"" + exportSketchName + "\" ARCHIVE=\""); ps.print(exportSketchName + ".jar");
27,972
ps.print(projectName + ".jar"); </BUG> ps.println("\" WIDTH=" + wide + " HEIGHT=" + high + ">"); ps.println("</APPLET>"); ps.println(); <BUG>ps.println("<A HREF=\"" + projectName + ".java\">source code</A>"); </BUG> ps.println(); ps.println("</CENTER>"); ps.println("</BODY> </HTML>");
PrintStream ps = new PrintStream(fos); ps.println("<HTML> <BODY BGCOLOR=\"white\">"); ps.println("<BR> <BR> <BR> <CENTER>"); ps.print("<APPLET CODE=\"" + exportSketchName + "\" ARCHIVE=\""); ps.print(exportSketchName + ".jar"); ps.println("<A HREF=\"" + exportSketchName + ".java\">source code</A>");
27,973
ps.close(); String exportDir = ("lib" + File.separator + "export" + File.separator); String bagelClasses[] = new File(exportDir).list(); FileOutputStream zipOutputFile = <BUG>new FileOutputStream(new File(appletDir, projectName + ".jar")); </BUG> ZipOutputStream zos = new ZipOutputStream(zipOutputFile); ZipEntry entry;...
new FileOutputStream(new File(appletDir, exportSketchName + ".jar"));
27,974
userTitleLeft = userLeft - PdeEditor.INSET_SIZE - metrics.stringWidth(USER_TITLER); int baseline = (sizeH + fontAscent) / 2; g.setColor(backgroundColor); g.fillRect(0, 0, imageW, imageH); <BUG>boolean boringUser = user.equals("default"); </BUG> g.setColor(secondaryColor); g.drawString(SKETCH_TITLER, sketchTitleLeft, ba...
boolean boringUser = editor.userName.equals("default");
27,975
package com.liferay.portal.deploy.hot; <BUG>import com.liferay.portal.dao.orm.hibernate.region.LiferayEhcacheRegionFactory; import com.liferay.portal.dao.orm.hibernate.region.SingletonLiferayEhcacheRegionFactory; import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; import com.liferay.portal.kernel.cache.PortalC...
import com.liferay.portal.cache.configurator.util.PortalCacheConfiguratorUtil;
27,976
package com.liferay.portal.servlet.jsp.compiler.internal; <BUG>import com.liferay.osgi.util.ServiceTrackerFactory; import com.liferay.portal.kernel.util.StringPool;</BUG> import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.URLCodec; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.util.CharPool; import com.liferay.portal.kernel.util.StringPool;
27,977
import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.List; import java.util.Map; <BUG>import java.util.concurrent.ConcurrentHashMap; import org.apache.felix.utils.log.Logger;</BUG> import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org....
import javax.tools.JavaFileObject; import org.apache.felix.utils.log.Logger;
27,978
Path fileNamePath = entryPath.getFileName(); String fileName = fileNamePath.toString(); return fileName.endsWith(".class"); } })) { <BUG>for (Path filePath : directoryStream) { String filePathString = filePath.toString(); if (resources == null) { resources = new ArrayList<>(); } resources.add(filePathString.substring(1...
[DELETED]
27,979
bottomPanel.add(new JSeparator(SwingConstants.HORIZONTAL), BorderLayout.NORTH); bottomPanel.add(buttonsPanel, BorderLayout.CENTER); setLayout(new BorderLayout()); add(topPanel, BorderLayout.NORTH); add(centerPanel, BorderLayout.CENTER); <BUG>add(bottomPanel, BorderLayout.SOUTH); addToDesktopPane();</BUG> setLocation(10...
updateGui(); addToDesktopPane();
27,980
} }); } }); } <BUG>else updateGui();</BUG> } void updateGui() {
[DELETED]
27,981
addItem(PluginLoader.getPlugin(className)); } void addItem(PluginDescriptor plugin) { if ((plugin != null) && plugin.isActionable()) <BUG>{ final IcyCommandButton pluginButton = PluginCommandButton.createButton(plugin);</BUG> newPluginsBandDef.addItem(plugin.getClassName(), RibbonElementPriority.TOP); systemWorkspace.s...
plugin.loadIcon(); final IcyCommandButton pluginButton = PluginCommandButton.createButton(plugin);
27,982
if (item != null) { final AbstractCommandButton button = RibbonUtil.findButton( RibbonUtil.getBand(RibbonUtil.getTask(ribbon, item.getTaskName()), item.getBandName()), item.getClassName()); <BUG>if (button != null) PluginCommandButton.setButton(button, plugin); }</BUG> else {
plugin.loadIcon(); } }
27,983
final List<PluginDescriptor> sequenceImporterPlugins = PluginLoader.getPlugins(SequenceImporter.class); if (!sequenceImporterPlugins.isEmpty()) { importPanel.addButtonGroup("Sequence importer"); for (PluginDescriptor plugin : sequenceImporterPlugins) <BUG>{ final AbstractCommandButton button = PluginCommandButton.creat...
plugin.loadIcon(); final AbstractCommandButton button = PluginCommandButton.createButton(plugin, false, false);
27,984
{ super(); final String name = plugin.getName(); final String description = plugin.getDescription(); final String website = plugin.getWeb(); <BUG>final String author = plugin.getAuthor(); final ImageIcon plugIcon = plugin.getIcon();</BUG> final Image plugImg = plugin.getImage(); setTitle(name); if (plugIcon != PluginDe...
public PluginRichToolTip(PluginDescriptor plugin) plugin.loadImages(); final ImageIcon plugIcon = plugin.getIcon();
27,985
private final BufferedImage icyLogo; private final int bgImgWidth; private final int bgImgHeight; private final Color textColor; private final Color bgTextColor; <BUG>private BufferedImage cachedImage; private int cachedImgWidth; private int cachedImgHeight; private Color lastBGColor;</BUG> public BackgroundDesktopOver...
[DELETED]
27,986
private int cachedImgHeight; private Color lastBGColor;</BUG> public BackgroundDesktopOverlay() { super(); <BUG>backGround = ResourceUtil.getImage(BACKGROUND_PATH + Integer.toString(Random.nextInt(1)) + ".jpg"); </BUG> icyLogo = ResourceUtil.getImage("logoICY.png"); textColor = new Color(0, 0, 0, 0.5f); bgTextColor = n...
private final BufferedImage icyLogo; private final int bgImgWidth; private final int bgImgHeight; private final Color textColor; private final Color bgTextColor; backGround = ImageUtil.toGray(ResourceUtil.getImage(BACKGROUND_PATH + Integer.toString(Random.nextInt(1)) + ".jpg"));
27,987
icyLogo = ResourceUtil.getImage("logoICY.png"); textColor = new Color(0, 0, 0, 0.5f); bgTextColor = new Color(1, 1, 1, 0.5f); bgImgWidth = backGround.getWidth(); bgImgHeight = backGround.getHeight(); <BUG>cachedImgWidth = bgImgWidth * 2; cachedImgHeight = bgImgHeight * 2; lastBGColor = Color.gray; run();</BUG> }
[DELETED]
27,988
rect.y = limit; return true; } return false; } <BUG>public Viewer[] getInternalViewers(boolean wantNotVisible, boolean wantIconized) </BUG> { final List<Viewer> result = new ArrayList<Viewer>(); for (Viewer viewer : Icy.getMainInterface().getViewers())
public static Viewer[] getInternalViewers(boolean wantNotVisible, boolean wantIconized)
27,989
final boolean canSetBounds = (roi != null) ? roi.canSetBounds() : false; final boolean canSetPosition = (roi != null) ? roi.canSetPosition() : false; final boolean hasROIinClipboard = Clipboard.isType(Clipboard.TYPE_ROILIST); final boolean hasROILinkinClipboard = Clipboard.isType(Clipboard.TYPE_ROILINKLIST); final bool...
if (!hasSequence) modifiedRois = null; ThreadUtil.sleep(1);
27,990
startupScripts.add(parseScript(subElement)); } else if ("shutdown-cql".equals(name)) { shutdownScripts.add(parseScript(subElement)); } } <BUG>if (poolingOptionsBuilder != null) { builder.addPropertyValue("poolingOptions", getSourceBeanDefinition(poolingOptionsBuilder, context, element)); } builder.addPropertyValue("key...
builder.addPropertyValue("keyspaceSpecifications", newKeyspaceSetFlattenerBeanDefinition( element, parserContext, keyspaceActionSpecificationBeanDefinitions)); builder.addPropertyValue("poolingOptions", getSourceBeanDefinition( poolingOptionsBuilder, parserContext, element));
27,991
ManagedList<String> networkTopologyReplicationFactors = new ManagedList<String>(); if (element != null) { addOptionalPropertyValue(builder, "replicationStrategy", element, "class", KeyspaceAttributes.DEFAULT_REPLICATION_STRATEGY.name()); <BUG>addOptionalPropertyValue(builder, "replicationFactor", element, "replication-...
addOptionalPropertyValue(builder, "replicationFactor", element, "replication-factor", String.valueOf(KeyspaceAttributes.DEFAULT_REPLICATION_FACTOR)); for (Element dataCenter : DomUtils.getChildElementsByTagName(element, "data-center")) {
27,992
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.w3c.dom.Attr; import org.w3c.dom.Element; <BUG>public class ParsingUtils { public static void addOptionalPropertyValue(BeanDefinitionBuilder builder, String proper...
public abstract class ParsingUtils { public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String propertyName, Attr attribute) { addProperty(builder, propertyName, attribute.getValue(), null, false, true); public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String pr...
27,993
String attrName, String defaultValue, boolean required) { addProperty(builder, propertyName, element.getAttribute(attrName), defaultValue, required, true);</BUG> } <BUG>public static void addProperty(BeanDefinitionBuilder builder, String propertyName, Element element, String attrName, String defaultValue, boolean req...
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.w3c.dom.Attr; import org.w3c.dom.Element; public abstract class ParsingUtils { public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String...
27,994
builder.addPropertyReference(propertyName, value); } else { builder.addPropertyValue(propertyName, value); } <BUG>} public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext context, Element element) { Assert.notNull(element, "Element must not be null!"); Assert.notNull(c...
return builder; public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext parserContext, Element element) { Assert.notNull(parserContext, "ParserContext must not be null"); return getSourceBeanDefinition(builder, parserContext.extractSource(element));
27,995
if (cursor.getCount() > 0) { context.startService(new Intent(context, BleService.class)); } cursor.close(); } <BUG>} public static void shutdown() {</BUG> Context context = getContext(); if (null != context) { context.stopService(new Intent(context, BleService.class));
public static boolean isInitialized() { return _instance.mInitialized; public static void shutdown() {
27,996
package com.uriio.beacons; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; <BUG>import android.database.sqlite.SQLiteStatement; import android.util.Base64;</BUG> import com.uriio.beacons.model.Beacon; import ...
import android.support.annotation.NonNull; import android.util.Base64;
27,997
SQLiteDatabase db = getWritableDatabase(); if (null == mInsertUriioItemStmt) { mInsertUriioItemStmt = db.compileStatement("INSERT INTO " + URIIO_TABLE + " (rowid, key, longUrl, urlId, ttl, privateKey) VALUES (?, ?, ?, ?, ?, ?)"); } <BUG>mInsertUriioItemStmt.bindString(2, item.getUrlToken()); String longUrl = item.getLo...
bindStringOrNull(mInsertUriioItemStmt, 3, item.getLongUrl());
27,998
public void updateUriioItem(EphemeralURL item) { long id = item.getSavedId(); SQLiteDatabase db = getWritableDatabase(); updateItem(db, item); SQLiteStatement stmt = db.compileStatement("UPDATE " + URIIO_TABLE + " SET ttl=?, longUrl=? WHERE rowid=?"); <BUG>stmt.bindLong(1, item.getTimeToLive()); String longUrl = item.g...
bindStringOrNull(stmt, 2, item.getLongUrl());
27,999
} private void updateItem(SQLiteDatabase db, Beacon item) { SQLiteStatement stmt = db.compileStatement("UPDATE " + ITEMS_TABLE + " SET advMode=?, txLevel=?, flags=?, name=? WHERE rowid=?"); stmt.bindLong(1, item.getAdvertiseMode()); stmt.bindLong(2, item.getTxPowerLevel()); <BUG>stmt.bindLong(3, item.getFlags()); Strin...
public void updateUriioItem(EphemeralURL item) { long id = item.getSavedId(); SQLiteDatabase db = getWritableDatabase(); updateItem(db, item); SQLiteStatement stmt = db.compileStatement("UPDATE " + URIIO_TABLE + " SET ttl=?, longUrl=? WHERE rowid=?"); stmt.bindLong(1, item.getTimeToLive()); bindStringOrNull(stmt, 2, it...
28,000
public int getType() { return EDDYSTONE_URL; } @Override public Advertiser createAdvertiser(AdvertisersManager advertisersManager) { <BUG>byte[] data = UriBeacon.encodeUri(mURL); if (null == data) return null; int len = data.length; return setAdvertiser(new EddystoneAdvertiser(data, 0, len, advertisersManager, getAdver...
[DELETED]