id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
14,101 | package org.eclipse.xtext.testcollector.popup.actions;
<BUG>import java.io.ByteArrayInputStream;
import org.eclipse.core.resources.IFile;</BUG>
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
| import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.core.resources.IFile;
|
14,102 | ICompilationUnit[] compilationUnits = packageFragment.getCompilationUnits();
for (ICompilationUnit compilationUnit : compilationUnits) {
for (IType type : compilationUnit.getAllTypes()) {
if (!Flags.isAbstract(type.getFlags())) {
if (type.getElementName().endsWith("Test") || type.getSuperclassName() != null
<BUG>&& type.getSuperclassName().contains("TestCase")) {
buffer.append("\t\tsuite.addTestSuite(" + type.getFullyQualifiedName()
+ ".class);\n");</BUG>
System.out.println(packageFragment.getElementName() + "." + type.getElementName());
break;
| testClassNames.add(type.getFullyQualifiedName());
|
14,103 | }
}
}
}
}
<BUG>}
buffer.append("\t\treturn suite;\n");
buffer.append("\t}\n");
buffer.append("}\n");
final String classBody = buffer.toString();</BUG>
JavaCore.run(new IWorkspaceRunnable() {
| Collections.sort(testClassNames);
final IPackageFragment suitePackage = getSuitePackageFragment();
final String classBody = getTestSuiteCode(testClassNames, suitePackage);
|
14,104 | private LocalBroadcastManager mLocalBroadcastManager;
private String mActiveDownloadUrlString;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>setContentView(R.layout.activity_app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);</BUG>
toolbar.setTitle(""); // Nice and clean toolbar
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
| setContentView(R.layout.app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
14,105 | .inflate(R.layout.app_details2_screenshots, parent, false);
return new ScreenShotsViewHolder(view);
} else if (viewType == VIEWTYPE_WHATS_NEW) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_details2_whatsnew, parent, false);
<BUG>return new WhatsNewViewHolder(view);
} else if (viewType == VIEWTYPE_LINKS) {</BUG>
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_details2_links, parent, false);
return new ExpandableLinearLayoutViewHolder(view);
| } else if (viewType == VIEWTYPE_DONATE) {
.inflate(R.layout.app_details2_donate, parent, false);
return new DonateViewHolder(view);
} else if (viewType == VIEWTYPE_LINKS) {
|
14,106 | {
}
interface Styles extends CssResource
{
String messageRow();
<BUG>String image();
}</BUG>
@UiField
VerticalPanel messagePanel;
@UiField
| private static NotificationPanelUiBinder uiBinder = GWT.create(NotificationPanelUiBinder.class);
interface NotificationPanelUiBinder extends UiBinder<Widget, NotificationView>
String timeLabel();
|
14,107 | package org.zanata.webtrans.client.view;
<BUG>import org.zanata.common.TranslationStats;
import org.zanata.webtrans.client.presenter.AppPresenter;</BUG>
import org.zanata.webtrans.client.presenter.DocumentListPresenter;
import org.zanata.webtrans.client.presenter.MainView;
import org.zanata.webtrans.client.presenter.SearchResultsPresenter;
| import org.zanata.webtrans.client.events.NotificationEvent.Severity;
import org.zanata.webtrans.client.presenter.AppPresenter;
|
14,108 | {
}
interface Styles extends CssResource
{
String userName();
<BUG>String hasError();
String image();</BUG>
}
private static AppViewUiBinder uiBinder = GWT.create(AppViewUiBinder.class);
@UiField(provided = true)
| interface AppViewUiBinder extends UiBinder<LayoutPanel, AppView>
String hasWarning();
String image();
|
14,109 | this.container.add(this.documentListView);
this.translationView = translationView.asWidget();
this.container.add(this.translationView);
this.searchResultsView = searchResultsView.asWidget();
this.container.add(this.searchResultsView);
<BUG>errorNotificationBtn.setTitle(messages.errorNotification());
</BUG>
Window.enableScrolling(false);
}
@Override
| notificationBtn.setTitle(messages.errorNotification());
|
14,110 | public HasClickHandlers getSearchAndReplaceLink()
{
return searchAndReplace;
}
@Override
<BUG>public HasClickHandlers getErrorNotificationBtn()
{
return errorNotificationBtn;
</BUG>
}
| [DELETED] |
14,111 | import org.zanata.common.TransUnitWords;
import org.zanata.common.TranslationStats;
import org.zanata.webtrans.client.events.DocumentSelectionEvent;
import org.zanata.webtrans.client.events.DocumentStatsUpdatedEvent;
import org.zanata.webtrans.client.events.DocumentStatsUpdatedEventHandler;
<BUG>import org.zanata.webtrans.client.events.NotificationEvent;
import org.zanata.webtrans.client.events.NotificationEvent.Severity;
import org.zanata.webtrans.client.events.NotificationEventHandler;</BUG>
import org.zanata.webtrans.client.events.ProjectStatsUpdatedEvent;
import org.zanata.webtrans.client.events.ProjectStatsUpdatedEventHandler;
| [DELETED] |
14,112 | appPresenter = new AppPresenter(mockDisplay, mockEventBus,
mockKeyShortcutPresenter, mockTranslationPresenter,
mockDocumentListPresenter, mockSearchResultsPresenter,
mockNotificationPresenter, mockIdentity, mockWorkspaceContext,
mockMessages, mockHistory, mockWindow, mockWindowLocation);
<BUG>mockNotificationPresenter.setErrorLabelListener(appPresenter);
</BUG>
expectLastCall().once();
}
public void testPerformsRequiredActionsOnBind()
| mockNotificationPresenter.setNotificationListener(appPresenter);
|
14,113 | import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.Command;
import com.google.inject.Inject;
<BUG>public class AppPresenter extends WidgetPresenter<AppPresenter.Display> implements HasErrorNotificationLabel
{</BUG>
public interface Display extends net.customware.gwt.presenter.client.widget.WidgetDisplay
{
void showInMainView(MainView editor);
| public class AppPresenter extends WidgetPresenter<AppPresenter.Display> implements HasNotificationLabel
|
14,114 | void setReadOnlyVisible(boolean visible);
HasCommand getLeaveWorkspaceMenuItem();
HasCommand getHelpMenuItem();
HasCommand getSignOutMenuItem();
HasClickHandlers getSearchAndReplaceLink();
<BUG>HasClickHandlers getErrorNotificationBtn();
void setErrorNotificationText(int count);
</BUG>
}
private final KeyShortcutPresenter keyShortcutPresenter;
| HasClickHandlers getNotificationBtn();
void setNotificationText(int count, Severity severity);
|
14,115 | keyShortcutPresenter.bind();
documentListPresenter.bind();
translationPresenter.bind();
searchResultsPresenter.bind();
notificationPresenter.bind();
<BUG>notificationPresenter.setErrorLabelListener(this);
</BUG>
registerHandler(eventBus.addHandler(WorkspaceContextUpdateEvent.getType(), new WorkspaceContextUpdateEventHandler()
{
@Override
| notificationPresenter.setNotificationListener(this);
|
14,116 | public void onValueChange(ValueChangeEvent<String> event)
{
processHistoryEvent(event);
}
}));
<BUG>registerHandler(display.getErrorNotificationBtn().addClickHandler(new ClickHandler()
{</BUG>
@Override
public void onClick(ClickEvent event)
{
| registerHandler(display.getNotificationBtn().addClickHandler(new ClickHandler()
|
14,117 | Display mockDisplay;
EventBus mockEventBus;
private Capture<ClickHandler> capturedDismissClickHandler;
private Capture<ClickHandler> capturedClearClickHandler;
private Capture<NotificationEventHandler> capturedNotificationEventHandler;
<BUG>private final static int MSG_TO_KEEP = 5;
</BUG>
@BeforeClass
public void createMocks()
{
| private final static int MSG_TO_KEEP = 6;
|
14,118 | void appendMessage(String message);
void show();
int getMessageCount();
void setPopupTopRightCorner();
}
<BUG>private HasErrorNotificationLabel listener;
private static final int MESSAGE_TO_KEEP = 6;</BUG>
private final Timer hidePopupTimer = new Timer()
{
@Override
| private HasNotificationLabel listener;
private static final int MESSAGE_TO_KEEP = 6;
|
14,119 | String help();
@DefaultMessage("Leave Workspace")
String leaveWorkspace();
@DefaultMessage("Sign Out")
String signOut();
<BUG>@DefaultMessage("Search and replace")
</BUG>
String searchAndReplace();
@DefaultMessage("▼")
String downArrow();
| @DefaultMessage("Search & replace")
|
14,120 | package org.pentaho.platform.plugin.services.importer;
<BUG>import org.pentaho.platform.api.repository2.unified.IPlatformImportBundle;
import org.pentaho.platform.plugin.services.importexport.ImportSession;
import org.pentaho.platform.util.logging.Logger;</BUG>
import java.io.File;
import java.io.FileInputStream;
| [DELETED] |
14,121 | import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilenameFilter;
import java.text.SimpleDateFormat;
<BUG>import java.util.Date;
public class ArchiveLoader {</BUG>
public static final FilenameFilter ZIPS_FILTER = new FilenameFilter() {
@Override
public boolean accept( File dir, String name ) {
| import org.pentaho.platform.api.repository2.unified.IPlatformImportBundle;
import org.pentaho.platform.api.repository2.unified.RepositoryFile;
import org.pentaho.platform.plugin.services.importexport.ImportSession;
import org.pentaho.platform.util.logging.Logger;
public class ArchiveLoader {
|
14,122 | assertFalse( fileTree.equals( null ) );
assertFalse( fileTree.equals( new String() ) );
}
@Test
public void testBuilder() {
<BUG>RepositoryFile nullFile = new RepositoryFile( null, null, false, false,
false, null, null, null, null, false, null, null, null, null, null, null, null, null, new Long( 1 ), null, null );</BUG>
RepositoryFileTree.Builder nullBuilder = new RepositoryFileTree.Builder( nullFile );
RepositoryFileTree anotherFileTree = nullBuilder.build();
assertFalse( anotherFileTree.equals( fileTree ) );
| RepositoryFile nullFile =
new RepositoryFile( null, null, false, false, true,
false, null, null, null, null, false, null, null, null, null, null, null, null, null, new Long( 1 ), null, null );
|
14,123 | public static final String DEFAULT_LOCALE = "default"; //$NON-NLS-1$
public static final String ROOT_LOCALE = DEFAULT_LOCALE; //$NON-NLS-1$
public static final String TITLE = "title"; //$NON-NLS-1$
public static final String FILE_TITLE = "file.title"; //$NON-NLS-1$
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
<BUG>public static final String FILE_DESCRIPTION = "file.description"; //$NON-NLS-1$
private final String name;</BUG>
private final Serializable id;
private final Date createdDate;
private final String creatorId;
| public static final boolean HIDDEN_BY_DEFAULT = false;
public static final boolean SCHEDULABLE_BY_DEFAULT = true;
public static final String HIDDEN_KEY = "_PERM_HIDDEN";
public static final String SCHEDULABLE_KEY = "_PERM_SCHEDULABLE";
private final String name;
|
14,124 | private final Date createdDate;
private final String creatorId;
private final Date lastModifiedDate;
private final boolean folder;
private final String path;
<BUG>private final boolean hidden;
private final boolean versioned;</BUG>
private final long fileSize;
private final Serializable versionId;
private final boolean locked;
| private final boolean schedulable;
private final boolean versioned;
|
14,125 | private final String locale;
private final String originalParentFolderPath;
private final Date deletedDate;
private final Map<String, Properties> localePropertiesMap;
private final boolean aclNode;
<BUG>public RepositoryFile( Serializable id, String name, boolean folder, boolean hidden, boolean versioned,
Serializable versionId, String path, Date createdDate, Date lastModifiedDate, boolean locked, String lockOwner,</BUG>
String lockMessage, Date lockDate, String locale, String title, String description,
String originalParentFolderPath, Date deletedDate, long fileSize, String creatorId,
| public RepositoryFile( Serializable id, String name, boolean folder, boolean hidden, boolean schedulable,
Serializable versionId, String path, Date createdDate, Date lastModifiedDate, boolean locked, String lockOwner,
|
14,126 | Map<String, Properties> localePropertiesMap, boolean aclNode ) {
super();
this.id = id;
this.name = name;
this.folder = folder;
<BUG>this.hidden = hidden;
this.versioned = versioned;</BUG>
this.versionId = versionId;
this.path = path;
this.createdDate = createdDate != null ? new Date( createdDate.getTime() ) : null;
| this.schedulable = schedulable;
this.versioned = versioned;
|
14,127 | this.fileSize = fileSize;
this.creatorId = creatorId;
this.localePropertiesMap =
localePropertiesMap != null ? new HashMap<String, Properties>( localePropertiesMap ) : null;
this.aclNode = aclNode;
<BUG>}
public RepositoryFile( Serializable id, String name, boolean folder, boolean hidden, boolean versioned,</BUG>
Serializable versionId, String path, Date createdDate, Date lastModifiedDate, boolean locked, String lockOwner,
String lockMessage, Date lockDate, String locale, String title, String description,
String originalParentFolderPath, Date deletedDate, long fileSize, String creatorId,
| public RepositoryFile( Serializable id, String name, boolean folder, boolean hidden, boolean schedulable,
boolean versioned,
|
14,128 | private String creatorId;
private Date lastModifiedDate;
private long fileSize;
private boolean folder;
private String path;
<BUG>private boolean hidden;
private boolean versioned;</BUG>
private Serializable versionId;
private boolean locked;
private String lockOwner;
| private boolean schedulable;
private boolean versioned;
|
14,129 | other.getDescription() ).locale( other.getLocale() ).originalParentFolderPath(
other.getOriginalParentFolderPath() ).deletedDate( other.getDeletedDate() ).localePropertiesMap(
other.getLocalePropertiesMap() ).aclNode( other.isAclNode() );
}
public RepositoryFile build() {
<BUG>return new RepositoryFile( id, name, this.folder, this.hidden, this.versioned, this.versionId, this.path,
this.createdDate, this.lastModifiedDate, this.locked, this.lockOwner, this.lockMessage, this.lockDate,</BUG>
this.locale, this.title, this.description, this.originalParentFolderPath, this.deletedDate, this.fileSize,
this.creatorId, this.localePropertiesMap, this.aclNode );
| return new RepositoryFile( id, name, this.folder, this.hidden, this.schedulable, this.versioned, this.versionId,
this.createdDate, this.lastModifiedDate, this.locked, this.lockOwner, this.lockMessage, this.lockDate,
|
14,130 | public Builder path( final String path1 ) {
this.path = path1;
return this;
}
public Builder hidden( final boolean hidden1 ) {
<BUG>this.hidden = hidden1;
return this;</BUG>
}
public Builder versioned( final boolean versioned1 ) {
this.versioned = versioned1;
| public Builder schedulable( final boolean schedulable1 ) {
this.schedulable = schedulable1;
|
14,131 | private void notNull( final Object in ) {
if ( in == null ) {
throw new IllegalArgumentException();
}
}
<BUG>}
public int compareTo( final RepositoryFile other ) {</BUG>
if ( other == null ) {
throw new NullPointerException(); // per Comparable contract
}
| @Override
public int compareTo( final RepositoryFile other ) {
|
14,132 | private static final Date CREATED_DATE = new Date();
private static final Date LAST_MODIFIED_DATE = new Date();
private static final Long FILE_SIZE = 1000L;
private static final Boolean FOLDER = true;
private static final String PATH = "path";
<BUG>private static final Boolean HIDDEN = false;
private static final Boolean VERSIONED = true;</BUG>
private static final String VERSION_ID = "versionId";
private static final Boolean LOCKED = false;
private static final String LOCK_OWNER = "theOwner";
| private static final Boolean SCHEDULABLE = true;
private static final Boolean VERSIONED = true;
|
14,133 | private RepositoryFile file;
@Before
public void setUp() {
if ( !LOCALE_PROP.containsKey( RepositoryFile.DEFAULT_LOCALE ) ) {
LOCALE_PROP.put( RepositoryFile.DEFAULT_LOCALE, null );
<BUG>}
file = new RepositoryFile( ID, NAME, FOLDER, HIDDEN, VERSIONED, VERSION_ID, PATH, CREATED_DATE, LAST_MODIFIED_DATE,
LOCKED, LOCK_OWNER, LOCK_MESSAGE, LOCK_DATE, LOCALE, TITLE, DESCRIPTION, PARENT_FOLDER, DELETED_DATE, FILE_SIZE,</BUG>
CREATOR_ID, LOCALE_PROP );
| [DELETED] |
14,134 | builder.id( null );
assertNotEquals( 0, file.compareTo( builder.build() ) );
assertNotEquals( 29791, dupFile.hashCode() );
}
@Test
<BUG>public void testBuilderNulls() {
RepositoryFile nullFile = new RepositoryFile( ID, NAME, FOLDER, HIDDEN, VERSIONED, VERSION_ID, PATH, null, null,
</BUG>
LOCKED, LOCK_OWNER, LOCK_MESSAGE, null, LOCALE, null, DESCRIPTION, PARENT_FOLDER, null, FILE_SIZE,
CREATOR_ID, null );
| RepositoryFile nullFile =
new RepositoryFile( ID, NAME, FOLDER, HIDDEN, SCHEDULABLE, VERSIONED, VERSION_ID, PATH, null, null,
|
14,135 | return componentName;
}
public String getRoleName() {
return roleName;
}
<BUG>public ServerStatus getServerStatus() {
</BUG>
return serverStatus;
}
public void setClusterId(String clusterId) {
| public State getServerStatus() {
|
14,136 | import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
<BUG>@XmlType(name = "", propOrder = {"responseId","timestamp", "clusterId",
"hostname", "bluePrintName", "bluePrintRevision", "hardwareProfile",
"actionResults", "serversStatus", "idle"})
public class HeartBeat {</BUG>
@XmlElement
| @XmlType(name = "", propOrder = {"responseId","timestamp",
"hostname", "hardwareProfile", "installedRoleStates",
"actionResults", "idle"})
public class HeartBeat {
|
14,137 | add("cleanUpCommandResults");
add("actionResults");
add("serversStatus");
add("cmd");
add("commands");
<BUG>add("cleanUpCommands");
}</BUG>
};
public AgentJAXBContextResolver() throws Exception {
Map<String, Object> props = new HashMap<String, Object>();
| add("installedRoleStates");
}
|
14,138 | import javax.ws.rs.core.Response;
import org.apache.ambari.common.rest.entities.ClusterDefinition;
import org.apache.ambari.common.rest.entities.ClusterState;
import org.apache.ambari.common.rest.entities.Node;
import org.apache.ambari.common.rest.entities.RoleToNodes;
<BUG>import org.apache.ambari.common.util.ExceptionUtil;
import org.apache.ambari.resource.statemachine.StateMachineInvoker;</BUG>
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class Clusters {
| import org.apache.ambari.resource.statemachine.ClusterFSM;
import org.apache.ambari.resource.statemachine.StateMachineInvoker;
|
14,139 | import org.graylog2.plugin.inputs.MessageInput;
import org.graylog2.rest.models.dashboards.requests.WidgetPositionsRequest;
import org.graylog2.shared.inputs.InputLauncher;
import org.graylog2.shared.inputs.InputRegistry;
import org.graylog2.shared.inputs.MessageInputFactory;
<BUG>import org.graylog2.shared.inputs.NoSuchInputTypeException;
import org.graylog2.streams.OutputImpl;</BUG>
import org.graylog2.streams.OutputService;
import org.graylog2.streams.StreamImpl;
import org.graylog2.streams.StreamRuleImpl;
| import org.graylog2.streams.OutputAVImpl;
import org.graylog2.streams.OutputImpl;
|
14,140 | 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] |
14,141 | 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] |
14,142 | 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] |
14,143 | 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] |
14,144 | 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] |
14,145 | + "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] |
14,146 | 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;
|
14,147 | 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;
|
14,148 | 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;
|
14,149 | 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] |
14,150 | 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] |
14,151 | 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] |
14,152 | 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] |
14,153 | 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] |
14,154 | 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] |
14,155 | 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() {
|
14,156 | }
@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<>();
|
14,157 | import org.codehaus.groovy.control.CompilationUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class GroovyTreeParser implements TreeParser {
private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class);
<BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groovy.lang.GroovyObject";
private static final String JAVA_DEFAULT_OBJECT = "java.lang.Object";
private Map<URI, Set<SymbolInformation>> fileSymbols = Maps.newHashMap();
private Map<String, Set<SymbolInformation>> typeReferences = Maps.newHashMap();</BUG>
private final Supplier<CompilationUnit> unitSupplier;
| private Indexer indexer = new Indexer();
|
14,158 | if (scriptClass != null) {
sourceUnit.getAST().getStatementBlock().getVariableScope().getDeclaredVariables().values().forEach(
variable -> {
SymbolInformation symbol =
getVariableSymbolInformation(scriptClass.getName(), sourceUri, variable);
<BUG>addToValueSet(newTypeReferences, variable.getType().getName(), symbol);
symbols.add(symbol);
});
}
newFileSymbols.put(workspaceUriSupplier.get(sourceUri), symbols);</BUG>
});
| newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol);
if (classes.containsKey(variable.getType().getName())) {
newIndexer.addReference(classes.get(variable.getType().getName()),
GroovyLocations.createLocation(sourceUri, variable.getType()));
|
14,159 | }
if (typeReferences.containsKey(foundSymbol.getName())) {
foundReferences.addAll(typeReferences.get(foundSymbol.getName()));</BUG>
}
<BUG>return foundReferences;
}</BUG>
@Override
public Set<SymbolInformation> getFilteredSymbols(String query) {
checkNotNull(query, "query must not be null");
Pattern pattern = getQueryPattern(query);
| });
sourceUnit.getAST().getStatementBlock()
.visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(),
classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
|
14,160 | <BUG>package com.palantir.ls.server.api;
import io.typefox.lsapi.ReferenceParams;</BUG>
import io.typefox.lsapi.SymbolInformation;
import java.net.URI;
import java.util.Map;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.ReferenceParams;
|
14,161 | import java.util.Map;
import java.util.Set;
public interface TreeParser {
void parseAllSymbols();
Map<URI, Set<SymbolInformation>> getFileSymbols();
<BUG>Map<String, Set<SymbolInformation>> getTypeReferences();
Set<SymbolInformation> findReferences(ReferenceParams params);
Set<SymbolInformation> getFilteredSymbols(String query);</BUG>
}
| Map<Location, Set<Location>> getReferences();
Set<Location> findReferences(ReferenceParams params);
Optional<Location> gotoDefinition(URI uri, Position position);
Set<SymbolInformation> getFilteredSymbols(String query);
|
14,162 | .workspaceSymbolProvider(true)
.referencesProvider(true)
.completionProvider(new CompletionOptionsBuilder()
.resolveProvider(false)
.triggerCharacter(".")
<BUG>.build())
.build();</BUG>
InitializeResult result = new InitializeResultBuilder()
.capabilities(capabilities)
.build();
| .definitionProvider(true)
|
14,163 | package com.palantir.ls.server;
import com.palantir.ls.server.api.CompilerWrapper;
import com.palantir.ls.server.api.TreeParser;
import com.palantir.ls.server.api.WorkspaceCompiler;
<BUG>import io.typefox.lsapi.FileEvent;
import io.typefox.lsapi.PublishDiagnosticsParams;</BUG>
import io.typefox.lsapi.ReferenceParams;
import io.typefox.lsapi.SymbolInformation;
import io.typefox.lsapi.TextDocumentContentChangeEvent;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.PublishDiagnosticsParams;
|
14,164 | 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.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
14,165 | 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();
|
14,166 | 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: " +
|
14,167 | 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.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
14,168 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| 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());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
14,169 | 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.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
14,170 | import org.apache.camel.impl.DefaultCamelContext;
final class CdiCamelContextBean implements Bean<DefaultCamelContext>, PassivationCapable {
private final Set<Annotation> qualifiers;
private final Set<Type> types;
private final InjectionTarget<DefaultCamelContext> target;
<BUG>CdiCamelContextBean(BeanManager manager, InjectionTarget<DefaultCamelContext> target) {
this.qualifiers = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(AnyLiteral.INSTANCE, DefaultLiteral.INSTANCE)));
this.types = Collections.unmodifiableSet(manager.createAnnotatedType(DefaultCamelContext.class).getTypeClosure());
this.target = target;</BUG>
}
| CdiCamelContextBean(CdiCamelContextAnnotated annotated, InjectionTarget<DefaultCamelContext> target) {
this.qualifiers = annotated.getAnnotations();
this.types = annotated.getTypeClosure();
this.target = target;
|
14,171 | package org.apache.camel.cdi;
import java.beans.Introspector;
import java.lang.annotation.Annotation;
<BUG>import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;</BUG>
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
| [DELETED] |
14,172 | this.extension = extension;
}
@Override
public T produce(CreationalContext<T> ctx) {
T context = super.produce(ctx);
<BUG>if (annotated != null && context.getNameStrategy() instanceof DefaultCamelContextNameStrategy) {
context.setNameStrategy(nameStrategy(annotated));</BUG>
}
if (context instanceof DefaultCamelContext) {
DefaultCamelContext adapted = context.adapt(DefaultCamelContext.class);
| if (context.getNameStrategy() instanceof DefaultCamelContextNameStrategy) {
context.setNameStrategy(nameStrategy(annotated));
|
14,173 | adapted.setRegistry(new CdiCamelRegistry(manager));
adapted.setInjector(new CdiCamelInjector(context.getInjector(), manager));
} else {
throw new InjectionException("Camel CDI requires Camel context [" + context.getName() + "] to be a subtype of DefaultCamelContext");
}
<BUG>Set<Annotation> events = new HashSet<>(extension.getObserverEvents());
Collection<Annotation> qualifiers = annotated != null ? extension.getContextBean(new AnnotatedWrapper(annotated)).getQualifiers() : Arrays.asList(AnyLiteral.INSTANCE, DefaultLiteral.INSTANCE);
events.retainAll(qualifiers);
if (!events.isEmpty()) {
</BUG>
context.getManagementStrategy().addEventNotifier(new CdiEventNotifier(manager, qualifiers));
| Set<Annotation> qualifiers = CdiSpiHelper.excludeElementOfTypes(CdiSpiHelper.getQualifiers(annotated, manager), Named.class);
qualifiers.add(AnyLiteral.INSTANCE);
if (qualifiers.size() == 1) {
qualifiers.add(DefaultLiteral.INSTANCE);
qualifiers.retainAll(extension.getObserverEvents());
if (!qualifiers.isEmpty()) {
|
14,174 | ForwardingObserverMethod<?> getObserverMethod(InjectionPoint ip) {
return cdiEventEndpoints.get(ip);
}
Set<Annotation> getObserverEvents() {
return eventQualifiers;
<BUG>}
Bean<?> getContextBean(Annotated annotated) {
return contextBeans.get(annotated);</BUG>
}
Set<Annotation> getContextQualifiers() {
| [DELETED] |
14,175 | private CdiSpiHelper() {
}
static <T extends Annotation> T getQualifierByType(InjectionPoint ip, Class<T> type) {
return getFirstElementOfType(ip.getQualifiers(), type);
}
<BUG>private static <E, T extends E> T getFirstElementOfType(Collection<E> collection, Class<T> type) {
for (E item : collection) {</BUG>
if ((item != null) && type.isAssignableFrom(item.getClass())) {
return ObjectHelper.cast(type, item);
}
| for (E item : collection) {
|
14,176 | import javax.enterprise.inject.spi.InjectionTarget;
import org.apache.camel.impl.DefaultCamelContext;
@Vetoed
final class CamelContextDefaultProducer implements InjectionTarget<DefaultCamelContext> {
@Override
<BUG>public DefaultCamelContext produce(CreationalContext<DefaultCamelContext> ctx) {
DefaultCamelContext context = new DefaultCamelContext();
context.setNameStrategy(new CdiCamelContextNameStrategy());
return context;</BUG>
}
| [DELETED] |
14,177 | 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() );
|
14,178 | 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_();
|
14,179 | 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 );
|
14,180 | 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 );
|
14,181 | 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() ) );
sink.tableCell_();
| sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
14,182 | 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_();
|
14,183 | 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_();
|
14,184 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
14,185 | package org.apache.qpid.jms.provider;
import java.io.IOException;
<BUG>import java.net.URI;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;</BUG>
import org.apache.qpid.jms.message.JmsOutboundMessageDispatch;
import org.apache.qpid.jms.meta.JmsResource;
public interface ProviderListener {
| import java.util.List;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
|
14,186 | package org.apache.qpid.jms.provider;
import java.io.IOException;
<BUG>import java.net.URI;
import javax.jms.JMSException;</BUG>
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
import org.apache.qpid.jms.message.JmsMessageFactory;
import org.apache.qpid.jms.message.JmsOutboundMessageDispatch;
| import java.util.List;
import javax.jms.JMSException;
|
14,187 | LOG.trace("Outcome of delivery was rejected: {}", delivery);
ErrorCondition remoteError = ((Rejected) outcome).getError();
if (remoteError == null) {
remoteError = getEndpoint().getRemoteCondition();
}
<BUG>deliveryError = AmqpSupport.convertToException(getEndpoint(), remoteError);
</BUG>
} else if (outcome instanceof Released) {
LOG.trace("Outcome of delivery was released: {}", delivery);
deliveryError = new JMSException("Delivery failed: released by receiver");
| deliveryError = AmqpSupport.convertToException(getParent().getProvider(), getEndpoint(), remoteError);
|
14,188 | package org.apache.qpid.jms;
import java.io.IOException;
<BUG>import java.net.URI;
import java.util.Map;</BUG>
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
| import java.util.List;
import java.util.Map;
|
14,189 | package org.apache.qpid.jms;
<BUG>import java.net.URI;
import javax.jms.MessageConsumer;</BUG>
import javax.jms.MessageProducer;
import javax.jms.Session;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
| import java.util.List;
import javax.jms.MessageConsumer;
|
14,190 | package org.apache.qpid.jms.provider;
import java.io.IOException;
<BUG>import java.net.URI;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;</BUG>
import org.apache.qpid.jms.message.JmsOutboundMessageDispatch;
import org.apache.qpid.jms.meta.JmsResource;
public class DefaultProviderListener implements ProviderListener {
| import java.util.List;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
|
14,191 | delayedDeliverySupported = true;
}
if (list.contains(SHARED_SUBS)) {
sharedSubsSupported = true;
}
<BUG>}
protected void processProperties(Map<Symbol, Object> properties) {</BUG>
if (properties.containsKey(QUEUE_PREFIX)) {
Object o = properties.get(QUEUE_PREFIX);
if (o instanceof String) {
| @SuppressWarnings("unchecked")
protected void processProperties(Map<Symbol, Object> properties) {
|
14,192 | public AmqpConnection(AmqpProvider provider, JmsConnectionInfo info, Connection protonConnection) {
super(info, protonConnection, provider);
this.provider = provider;
this.remoteURI = provider.getRemoteURI();
this.amqpMessageFactory = new AmqpJmsMessageFactory(this);
<BUG>this.properties = new AmqpConnectionProperties(info);
</BUG>
}
public void createSession(JmsSessionInfo sessionInfo, AsyncResult request) {
AmqpSessionBuilder builder = new AmqpSessionBuilder(this, sessionInfo);
| this.properties = new AmqpConnectionProperties(info, provider);
|
14,193 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
14,194 | import org.jboss.arquillian.core.api.Instance;</BUG>
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider;
import java.lang.annotation.Annotation;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
public class ServiceListResourceProvider implements ResourceProvider {
@Inject
private Instance<KubernetesClient> clientInstance;
| package io.fabric8.arquillian.kubernetes.enricher;
import io.fabric8.arquillian.kubernetes.Session;
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.client.KubernetesClient;
import org.jboss.arquillian.core.api.Instance;
|
14,195 | package io.fabric8.arquillian.kubernetes.enricher;
import io.fabric8.annotations.ServiceName;
import io.fabric8.arquillian.kubernetes.Session;
<BUG>import io.fabric8.kubernetes.api.KubernetesClient;
import io.fabric8.kubernetes.api.model.Service;
import org.jboss.arquillian.core.api.Instance;</BUG>
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.api.ArquillianResource;
| import io.fabric8.kubernetes.client.KubernetesClient;
import org.jboss.arquillian.core.api.Instance;
|
14,196 | }
@Override
public Object lookup(ArquillianResource resource, Annotation... qualifiers) {
KubernetesClient client = this.clientInstance.get();
Session session = sessionInstance.get();
<BUG>for (Service service : client.getServices(session.getNamespace()).getItems()) {
</BUG>
if ( qualifies(service, qualifiers) ) {
return service;
}
| for (Service service : client.services().inNamespace(session.getNamespace()).list().getItems()) {
|
14,197 | package io.fabric8.arquillian.kubernetes.enricher;
<BUG>import io.fabric8.kubernetes.api.KubernetesClient;
</BUG>
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.api.ArquillianResource;
| import io.fabric8.kubernetes.client.KubernetesClient;
|
14,198 | import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
<BUG>import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;</BUG>
public class Session {
private final String id;
| [DELETED] |
14,199 | package io.fabric8.arquillian.kubernetes.enricher;
import io.fabric8.annotations.ReplicationControllerName;
import io.fabric8.arquillian.kubernetes.Session;
<BUG>import io.fabric8.kubernetes.api.KubernetesClient;
import io.fabric8.kubernetes.api.model.ReplicationController;
import org.jboss.arquillian.core.api.Instance;</BUG>
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.api.ArquillianResource;
| import io.fabric8.kubernetes.client.KubernetesClient;
import org.jboss.arquillian.core.api.Instance;
|
14,200 | }
@Override
public Object lookup(ArquillianResource resource, Annotation... qualifiers) {
KubernetesClient client = this.clientInstance.get();
Session session = sessionInstance.get();
<BUG>for (ReplicationController replicationController : client.getReplicationControllers(session.getNamespace()).getItems()) {
</BUG>
if (qualifies(replicationController, qualifiers)) {
return replicationController;
}
| for (ReplicationController replicationController : client.replicationControllers().inNamespace(session.getNamespace()).list().getItems()) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.