id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
6,501 | when(document.createParagraphElement()).thenAnswer(invocation -> new StandaloneElement("p"));
when(document.createSelectElement()).thenAnswer(invocation -> new StandaloneInputElement("select"));
when(document.createSpanElement()).thenAnswer(invocation -> new StandaloneElement("span"));
when(document.createTextAreaEleme... | builder = new TestableBuilder(document);
|
6,502 | TodoItemRepository repository = new TodoItemRepository(BEAN_FACTORY);
ApplicationElement application = new ApplicationElement(repository, i18n);
Element body = Browser.getDocument().getBody();
body.appendChild(application.asElement());
body.appendChild(new FooterElement(i18n).asElement());
<BUG>Element e = new MyBuilde... | [DELETED] |
6,503 | @Override
public String toString() {
return (container ? "container" : "simple") + " @ " + level + ": " + element.getTagName();
}
}
<BUG>public static class Builder extends CoreBuilder<Builder>
{
public Builder() {
super(Browser.getDocument());
}
protected Builder(Document document) {
super( document );</BUG>
}
| [DELETED] |
6,504 | return start(document.createElement(tag));
}
public B start(Element element) {
elements.push(new ElementInfo(element, true, level));
level++;
<BUG>return (B) this;
}</BUG>
public B end() {
assertCurrent();
if (level == 0) {
| return that();
|
6,505 | Element closingElement = elements.peek().element;
for (ElementInfo child : children) {
closingElement.appendChild(child.element);
}
level--;
<BUG>return (B) this;
}</BUG>
private String dumpElements() {
return elements.toString();
}
| return that();
|
6,506 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
6,507 | log().debug("get Event uei/id: " + e.getUei() + "/" + e.getDbid());
if (e.getParms() != null ) {
Iterator<Parm> ite = e.getParms().iterateParm();
while (ite.hasNext()) {
Parm parm = ite.next();
<BUG>if (parm.getParmName().equals("rancidGroupName")) {
updateGroupConfiguration(parm.getValue().getContent());</BUG>
break;
... | if (e.hasNodeid()) {
int nodeId = Long.valueOf(e.getNodeid()).intValue();
if (m_onmsNodeRancidNodeMap.containsKey(Integer.valueOf(nodeId))) {
updateRancidNodeState(nodeId, false);
} else {
log().warn("node does not exist with nodeid: " + e.getNodeid());
|
6,508 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoC... | import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
6,509 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
6,510 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
6,511 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.... | import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
6,512 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.t... | public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate()... |
6,513 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangos... | import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
6,514 | 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] |
6,515 | 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);
|
6,516 | 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());
|
6,517 | .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... |
6,518 | 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());
|
6,519 | }
}
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);
|
6,520 | 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();
|
6,521 | 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());
|
6,522 | 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... |
6,523 | 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());
|
6,524 | 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());
|
6,525 | 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();
|
6,526 | }
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,
{
|
6,527 | 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());
|
6,528 | }
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,
{
|
6,529 | 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,
{
|
6,530 | .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... |
6,531 | .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());
|
6,532 | .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... |
6,533 | 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());
|
6,534 | 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... |
6,535 | <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;
|
6,536 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
6,537 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
6,538 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
6,539 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
6,540 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
6,541 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
6,542 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
6,543 | import org.voltcore.messaging.HostMessenger;
import org.voltcore.messaging.LocalObjectMessage;
import org.voltcore.messaging.Mailbox;
import org.voltcore.messaging.VoltMessage;
import org.voltcore.utils.CoreUtils;
<BUG>import org.voltdb.CatalogContext;
import org.voltdb.VoltDB;</BUG>
import org.voltdb.VoltType;
import ... | import org.voltdb.ClientInterface.ExplainMode;
import org.voltdb.VoltDB;
|
6,544 | partitioning = StatementPartitioning.forceMP();
} else {
partitioning = StatementPartitioning.forceSP();
}
try {
<BUG>AdHocPlannedStatement result = ptool.planSql(sqlStatement, partitioning, work.userParamSet);
if (inferSP) {</BUG>
partitionParamIndex = result.getPartitioningParameterIndex();
partitionParamType = resul... | AdHocPlannedStatement result = ptool.planSql(sqlStatement, partitioning,
work.explainMode != ExplainMode.NONE, work.userParamSet);
if (inferSP) {
|
6,545 | if (plan == null) {
throw new RuntimeException("Null plan received in PlannerTool.planSql");
}
CorePlan core = new CorePlan(plan, m_catalogHash);
AdHocPlannedStatement ahps = new AdHocPlannedStatement(plan, core);
<BUG>if (partitioning.isInferred()) {
core.setPartitioningParamIndex(partitioning.getInferredParameterInde... | if (!wrongNumberParameters && partitioning.isInferred()) {
core.setPartitioningParamIndex(partitioning.getInferredParameterIndex());
|
6,546 | private final I18n i18n;
private Filter filter;
ApplicationElement(TodoItemRepository repository, I18n i18n) {
this.repository = repository;
this.i18n = i18n;
<BUG>Elements.Builder builder = new Elements.Builder()
.section().css("todoapp")</BUG>
.header().css("header")
.h(1).innerText(i18n.constants().todos()).end()
.i... | TodoBuilder builder = new TodoBuilder()
.section().css("todoapp")
|
6,547 | import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class ElementsBuilderTest {
<BUG>private Elements.Builder builder;
</BUG>
@Before
public void setUp() {
Document document = mock(Document.cla... | private TestableBuilder builder;
|
6,548 | when(document.createParagraphElement()).thenAnswer(invocation -> new StandaloneElement("p"));
when(document.createSelectElement()).thenAnswer(invocation -> new StandaloneInputElement("select"));
when(document.createSpanElement()).thenAnswer(invocation -> new StandaloneElement("span"));
when(document.createTextAreaEleme... | builder = new TestableBuilder(document);
|
6,549 | TodoItemRepository repository = new TodoItemRepository(BEAN_FACTORY);
ApplicationElement application = new ApplicationElement(repository, i18n);
Element body = Browser.getDocument().getBody();
body.appendChild(application.asElement());
body.appendChild(new FooterElement(i18n).asElement());
<BUG>Element e = new MyBuilde... | [DELETED] |
6,550 | @Override
public String toString() {
return (container ? "container" : "simple") + " @ " + level + ": " + element.getTagName();
}
}
<BUG>public static class Builder extends CoreBuilder<Builder>
{
public Builder() {
super(Browser.getDocument());
}
protected Builder(Document document) {
super( document );</BUG>
}
| [DELETED] |
6,551 | return start(document.createElement(tag));
}
public B start(Element element) {
elements.push(new ElementInfo(element, true, level));
level++;
<BUG>return (B) this;
}</BUG>
public B end() {
assertCurrent();
if (level == 0) {
| return that();
|
6,552 | Element closingElement = elements.peek().element;
for (ElementInfo child : children) {
closingElement.appendChild(child.element);
}
level--;
<BUG>return (B) this;
}</BUG>
private String dumpElements() {
return elements.toString();
}
| return that();
|
6,553 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
6,554 | public Void run(Connection con) throws Exception {
dialect.resumeBrokenBusinessProcesses(con);
return null;
}
});
<BUG>}
public void insert(final Workflow<?> wf, final Acknowledge ack) throws Exception {</BUG>
logger.trace("insert({})", wf);
try {
run(new DatabaseTransaction<Void>() {
| @Override
public void insert(final Workflow<?> wf, final Acknowledge ack) throws Exception {
|
6,555 | ack.onSuccess();
} catch (Exception e) {
ack.onException(e);
throw e;
}
<BUG>}
public void insert(final List<Workflow<?>> wfs, final Acknowledge ack) throws Exception {</BUG>
logger.trace("insert(wfs.size={})", wfs.size());
try {
run(new DatabaseTransaction<Void>() {
| @Override
public void insert(final List<Workflow<?>> wfs, final Acknowledge ack) throws Exception {
|
6,556 | public Integer run(Connection con) throws Exception {
return dialect.deleteStaleResponse(con, MAX_ROWS);
}
});
} while (n == MAX_ROWS);
<BUG>}
public synchronized void shutdown() {</BUG>
if (shutdown)
return;
shutdown = true;
| @Override
public synchronized void shutdown() {
|
6,557 | public void insert(List<Workflow<?>> wfs, Connection con) throws Exception {
if (con == null)
insert(wfs, new Acknowledge.BestEffortAcknowledge());
else
dialect.insert(wfs, con);
<BUG>}
public void restart(final String workflowInstanceId) throws Exception {</BUG>
run(new DatabaseTransaction<Void>() {
@Override
public V... | public void restart(final String workflowInstanceId) throws Exception {
|
6,558 | if (batcher != null) {
batcher.submitBatchCommand(cmd);
} else {
runSingleBatchCommand(cmd);
}
<BUG>}
public void registerCallback(final RegisterCall rc, final Acknowledge callback) throws Exception {</BUG>
if (logger.isTraceEnabled())
logger.trace("registerCallback(" + rc + ")");
if (rc == null)
| @Override
public void registerCallback(final RegisterCall rc, final Acknowledge callback) throws Exception {
|
6,559 | if (logger.isTraceEnabled())
logger.trace("registerCallback(" + rc + ")");
if (rc == null)
throw new NullPointerException();
executeBatchCommand(dialect.createBatchCommand4registerCallback(rc, this, callback));
<BUG>}
public void notify(final Response<?> response, final Acknowledge callback) throws Exception {</BUG>
if... | @Override
public void notify(final Response<?> response, final Acknowledge callback) throws Exception {
|
6,560 | public void onException(Throwable t) {
callback.onException(t);
}
};
executeBatchCommand(dialect.createBatchCommand4Notify(response, notify));
<BUG>}
public void finish(final Workflow<?> w, final Acknowledge callback) {</BUG>
if (logger.isTraceEnabled())
logger.trace("finish(" + w.getId() + ")");
try {
| @Override
public void finish(final Workflow<?> w, final Acknowledge callback) {
|
6,561 | @Override
public Workflow<?> run(Connection con) throws Exception {
return dialect.read(workflowInstanceId, con);
}
});
<BUG>}
}
</BUG>
| public void onSuccess() {
signalQueueState();
callback.onSuccess();
|
6,562 | import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.copperengine.core.Acknowledge;
<BUG>import org.copperengine.core.DuplicateIdException;
import org.copperengine.core.Response;</BUG>
import org.copperengine.core.Workflow;
import org.copperengine.core.batcher.BatchCo... | import org.copperengine.core.ProcessingState;
import org.copperengine.core.Response;
|
6,563 | boolean isTimeout = timeoutTS != null ? timeoutTS.getTime() <= System.currentTimeMillis() : false;
String response = rsResponses.getString(4);
PersistentWorkflow<?> wf = (PersistentWorkflow<?>) map.get(bpId);
Response<?> r = null;
if (response != null) {
<BUG>r = (Response<?>) serializer.deserializeResponse(response);
... | r = serializer.deserializeResponse(response);
wf.addResponseId(r.getResponseId());
|
6,564 | final Timestamp timeoutTS = rsResponses.getTimestamp(3);
boolean isTimeout = timeoutTS != null ? timeoutTS.getTime() <= System.currentTimeMillis() : false;
String response = rsResponses.getString(4);
Response<?> r = null;
if (response != null) {
<BUG>r = (Response<?>) serializer.deserializeResponse(response);
wf.addRes... | r = serializer.deserializeResponse(response);
wf.addResponseId(r.getResponseId());
|
6,565 | import org.copperengine.core.Acknowledge;
import org.copperengine.core.DuplicateIdException;
import org.copperengine.core.Response;
import org.copperengine.core.Workflow;
import org.copperengine.core.batcher.BatchCommand;
<BUG>public class PostgreSQLDialect extends AbstractSqlDialect {
protected PreparedStatement creat... | @Override
protected PreparedStatement createUpdateStateStmt(final Connection c, final int max) throws SQLException {
|
6,566 | import java.util.List;
import java.util.Map;
import org.copperengine.core.Acknowledge;
import org.copperengine.core.CopperRuntimeException;
import org.copperengine.core.DuplicateIdException;
<BUG>import org.copperengine.core.EngineIdProvider;
import org.copperengine.core.Response;</BUG>
import org.copperengine.core.Wor... | import org.copperengine.core.ProcessingState;
import org.copperengine.core.Response;
|
6,567 | private boolean removeWhenFinished = true;
private long defaultStaleResponseRemovalTimeout = 60 * 60 * 1000;
private int dbBatchingLatencyMSec = 0;
public OracleDialect() {
initStmtStats();
<BUG>}
public void startup() {</BUG>
if (engineIdProvider == null || engineIdProvider.getEngineId() == null)
throw new NullPointer... | @Override
public void startup() {
|
6,568 | public void setWfRepository(WorkflowRepository wfRepository) {
this.wfRepository = wfRepository;
}
public RuntimeStatisticsCollector getRuntimeStatisticsCollector() {
return runtimeStatisticsCollector;
<BUG>}
public boolean isRemoveWhenFinished() {</BUG>
return removeWhenFinished;
}
public Serializer getSerializer() {
| @Override
public boolean isRemoveWhenFinished() {
|
6,569 | String response = rsResponses.getString(3);
if (response == null)
response = rsResponses.getString(4);
Response<?> r = null;
if (response != null) {
<BUG>r = (Response<?>) serializer.deserializeResponse(response);
wf.addResponseId(r.getResponseId());</BUG>
} else if (isTimeout) {
r = new Response<Object>(cid);
}
| r = serializer.deserializeResponse(response);
wf.addResponseId(r.getResponseId());
|
6,570 | this.dependencyInjector = dependencyInjector;
}
@Override
public String getDependencyInjectorType() {
return (dependencyInjector != null) ? dependencyInjector.getType() : "UNKNOWN";
<BUG>}
public EngineState getEngineState() {</BUG>
return engineState;
}
public void setEngineIdProvider(EngineIdProvider engineIdProvider... | public EngineState getEngineState() {
|
6,571 | try {
startupBlocker.pass();
} catch (InterruptedException e) {
}
return wfRepository.createWorkflowFactory(classname);
<BUG>}
public synchronized void addShutdownObserver(Runnable observer) {</BUG>
shutdownObserver.add(observer);
}
@Override
| public synchronized void addShutdownObserver(Runnable observer) {
|
6,572 | assert existingWF != null;
if (existingWF != null && existingWF.getProcessingState() == ProcessingState.FINISHED) {
statisticsCollector.submit(getEngineId() + "." + wf.getClass().getSimpleName() + ".ExecutionTime", 1, System.currentTimeMillis() - wf.getCreationTS().getTime(), TimeUnit.MILLISECONDS);
}
getAndRemoveWaitH... | public int getNumberOfWorkflowInstances() {
|
6,573 | isitspastCtx.put("trackingNum", trackingNum);
isitspastCtx.put("inventoryItemId", orderItemShipGrpInvReservation.get("inventoryItemId"));
isitspastCtx.put("shipmentId", shipmentId);
isitspastCtx.put("shipmentPackageSeqId", shipmentPackageSeqId);
isitspastCtx.put("promisedDatetime", orderItemShipGrpInvReservation.get("p... | List invDetailElementList = UtilXml.childElementList(invItemElement, "ns:INVDETAIL"); //n
if(UtilValidate.isNotEmpty(invDetailElementList)) {
Iterator invDetailElementItr = invDetailElementList.iterator();
while(invDetailElementItr.hasNext()) {
Element invDetailElement = (Element) invDetailElementItr.next();
String ser... |
6,574 | Debug.logError(errMsg, module);
}
} catch(GenericServiceException e) {
Debug.logInfo(e, module);
String errMsg = "Error executing issueSerializedInvToShipmentPackageAndSetTracking Service: "+e.toString();
<BUG>errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException"));
}</BUG>
} el... | [DELETED] |
6,575 | public static void injectContextProxiesAndApplication(AbstractResourceInfo cri,
Object instance,
Application app) {
if (!cri.contextsAvailable() || !cri.isSingleton()) {
return;
<BUG>}
for (Map.Entry<Class<?>, Method> entry : cri.getContextMethods().entrySet()) {</BUG>
Method method = entry.getValue();
Object value = m... | synchronized (instance) {
for (Map.Entry<Class<?>, Method> entry : cri.getContextMethods().entrySet()) {
|
6,576 | if (tlp != null) {
tlp.remove();
}
}
}
<BUG>private Map<Class<?>, List<Field>> addContextField(Map<Class<?>, List<Field>> theFields, Field f) {
theFields = theFields == null ? new HashMap<Class<?>, List<Field>>() : theFields;
List<Field> fields = theFields.get(serviceClass);</BUG>
if (fields == null) {
fields = new Arr... | if (theFields == null) {
theFields = new HashMap<Class<?>, List<Field>>();
List<Field> fields = theFields.get(serviceClass);
|
6,577 | if (!fields.contains(f)) {
fields.add(f);
}
return theFields;
}
<BUG>private <T, V> void addToMap(Map<Class<?>, Map<T, V>> theFields,
T f, V proxy) {
Map<T, V> proxies = theFields.get(serviceClass);
</BUG>
if (proxies == null) {
| private <T, V> void addToMap(Map<Class<?>, Map<T, V>> proxyMap,
T f,
Map<T, V> proxies = proxyMap.get(serviceClass);
|
6,578 | timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp");
timeWarp.setName("time warp");
Container wrapWrapper = new Container(timeWarp);
wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR);
wrapWrapper.align(Align.center);
<BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCAL... | VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
|
6,579 | focusListScrollPane.setFadeScrollBars(false);
focusListScrollPane.setScrollingDisabled(true, false);
focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR);
focusListScrollPane.setWidth(160);
}
<BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 *... | VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
|
6,580 | headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
}
<BUG>public void expand() {
</BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
| public void expandPane() {
|
6,581 | </BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
}
<BUG>public void collapse() {
</BUG>
if (expandIcon.isChecked()) {
expandIcon.setChecked(false);
}
| headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
public void expandPane() {
public void collapsePane() {
|
6,582 | });
playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin));
TimeComponent timeComponent = new TimeComponent(skin, ui);
timeComponent.initialize();
CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop);
<BUG>time.align(Align.left);
mainActors.ad... | time.align(Align.left).columnAlign(Align.left);
mainActors.add(time);
|
6,583 | panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects);
ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui);
objectsComponent.setSceneGraph(sg);
objectsComponent.initialize();
CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, fal... | objects.align(Align.left).columnAlign(Align.left);
mainActors.add(objects);
|
6,584 | if (Constants.desktop) {
MusicComponent musicComponent = new MusicComponent(skin, ui);
musicComponent.initialize();
Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null;
CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicCompo... | music.align(Align.left).columnAlign(Align.left);
mainActors.add(music);
|
6,585 | import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
public class DependencyConvergenceReport
extends AbstractProjectInfoReport
<BUG>{
private List reactorProjects;
private static final int PERCENTAGE = 100;</BUG>
public String getOutputName()
{
| private static final int PERCENTAGE = 100;
private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment
.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
|
6,586 | sink.section1();
sink.sectionTitle1();
sink.text( getI18nString( locale, "title" ) );
sink.sectionTitle1_();
Map dependencyMap = getDependencyMap();
<BUG>generateLegend( locale, sink );
generateStats( locale, sink, dependencyMap );
generateConvergence( locale, sink, dependencyMap );
sink.section1_();</BUG>
sink.body_()... | sink.lineBreak();
sink.section1_();
|
6,587 | Iterator it = artifactMap.keySet().iterator();
while ( it.hasNext() )
{
String version = (String) it.next();
sink.tableRow();
<BUG>sink.tableCell();
sink.text( version );</BUG>
sink.tableCell_();
sink.tableCell();
generateVersionDetails( sink, artifactMap, version );
| sink.tableCell( String.valueOf( cellWidth ) + "px" );
sink.text( version );
|
6,588 | sink.tableCell();
sink.text( getI18nString( locale, "legend.shared" ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableCell();
iconError( sink );</BUG>
sink.tableCell_();
sink.tableCell();
sink.text( getI18nString( locale, "legend.different" ) );
| sink.tableCell( "15px" ); // according /images/icon_error_sml.gif
iconError( sink );
|
6,589 | sink.tableCaption();
sink.text( getI18nString( locale, "stats.caption" ) );
sink.tableCaption_();</BUG>
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.subprojects" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
s... | sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
6,590 | sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.dependencies" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( depCount ) );
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.dependencies" ) );
sink.tableHeaderCell_();
|
6,591 | sink.text( String.valueOf( convergence ) + "%" );
sink.bold_();
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.readyrelease" ) );
sink.tableHeaderCell_();
|
6,592 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
6,593 | package org.apache.catalina.filters;
<BUG>import java.io.IOException;
import java.text.DateFormat;</BUG>
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collections;
| import java.net.URI;
import java.net.URISyntaxException;
import java.text.DateFormat;
|
6,594 | request.setAttribute(AccessLog.PROTOCOL_ATTRIBUTE,
xRequest.getProtocol());
request.setAttribute(AccessLog.SERVER_PORT_ATTRIBUTE,
Integer.valueOf(xRequest.getServerPort()));
}
<BUG>chain.doFilter(xRequest, response);
</BUG>
} else {
if (log.isDebugEnabled()) {
log.debug("Skip RemoteIpFilter for request " + request.getR... | chain.doFilter(xRequest, xResponse);
|
6,595 | package heros;
import java.util.Collection;
import java.util.List;
import java.util.Set;
public interface InterproceduralCFG<N,M> {
<BUG>public M getMethodOf(N n);
public List<N> getSuccsOf(N n);</BUG>
public Collection<M> getCalleesOfCallAt(N n);
public Collection<N> getCallersOf(M m);
public Set<N> getCallsFromWithi... | public List<N> getPredsOf(N u);
public List<N> getSuccsOf(N n);
|
6,596 | 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... | 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;
|
6,597 | package com.comcast.cmb.common.controller;
import javax.servlet.AsyncContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.comcast.cmb.common.model.CMBPolicy;
<BUG>import com.comcast.cmb.common.model.User;
import com.comcast.cmb.common.persistence.CassandraPers... | import com.comcast.cmb.common.persistence.AbstractCassandraPersistence;
import com.comcast.cmb.common.persistence.CassandraPersistenceFactory;
|
6,598 | sb.append("\t<Redis>Cache unavailable: "+ex.getMessage()+"</Redis>\n");
healthy = false;
}
}
try {
<BUG>CassandraPersistence cassandra = new CassandraPersistence(CMBProperties.getInstance().getCMBKeyspace());
</BUG>
if (cassandra.isAlive()) {
sb.append("\t<Cassandra>OK</Cassandra>\n");
} else {
| AbstractCassandraPersistence cassandra = CassandraPersistenceFactory.getInstance(CMBProperties.getInstance().getCMBKeyspace());
|
6,599 | final Field field = new Field.Builder()
.name(getAttributeValue(node, "name"))
.description(getAttributeValueOrNull(node, "description"))
.id(Integer.parseInt(getAttributeValue(node, "id")))
.blockLength(Integer.parseInt(getAttributeValue(node, "blockLength", "0")))
<BUG>.sinceVersion(Integer.parseInt(getAttributeValue... | .deprecated(Integer.parseInt(getAttributeValue(node, "deprecated", "0")))
.dimensionType((CompositeType)dimensionType)
|
6,600 | final Token.Builder tokenBuilder = new Token.Builder()
.signal(Signal.ENCODING)
.name(type.name())
.size(type.encodedLength())
.description(type.description())
<BUG>.version(type.sinceVersion())
.offset(offset);</BUG>
if (field != null && !(field.type() instanceof CompositeType))
{
tokenBuilder.version(field.sinceVersi... | .deprecated(type.deprecated())
.offset(offset);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.