id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
34,601
import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment; import com.money.manager.ex.Constants; <BUG>import com.money.manager.ex.core.UIHelper; import com.money.manager.ex.utils.MmxJodaDateTimeUtil...
import com.money.manager.ex.utils.MmxDate; import com.money.manager.ex.utils.MmxDateTimeUtils; import com.money.manager.ex.utils.MmxJodaDateTimeUtils;
34,602
@Override public void onClick(View v) { DateTime dateTime = MmxJodaDateTimeUtils.today(); String calendarValue = mTextView.getText().toString(); if (!TextUtils.isEmpty(calendarValue)) { <BUG>String userDatePattern = new MmxJodaDateTimeUtils(mParent.getApplicationContext()).getUserDatePattern(); </BUG> DateTimeFormatter...
String userDatePattern = new MmxDateTimeUtils().getUserDatePattern(mParent.getApplicationContext());
34,603
Object positionObj = parent.getItemAtPosition(position); Cursor cursor = (Cursor) positionObj; if (cursor == null) return; // i.e. footer row. IncomeVsExpenseReportEntity entity = IncomeVsExpenseReportEntity.from(cursor); SearchParameters params = new SearchParameters(); <BUG>MmxDate calendar = new MmxDate(); calendar...
MmxDate dateTime = new MmxDate(); dateTime.setYear(entity.getYear());
34,604
if (month == IncomeVsExpensesActivity.SUBTOTAL_MONTH) { calendar.setMonth(Calendar.DECEMBER); </BUG> } <BUG>calendar.lastDayOfMonth(); params.dateTo = new DateTime(calendar.getTime()); Intent intent = IntentFactory.getSearchIntent(getActivity(), params);</BUG> startActivity(intent); }
dateTime.setMonth(Calendar.DECEMBER); dateTime.lastDayOfMonth(); params.dateTo = dateTime.toDate(); Intent intent = IntentFactory.getSearchIntent(getActivity(), params);
34,605
public class DeleteProductsActivity extends AppCompatActivity { private ProductService productService; private ShoppingListService shoppingListService; private DeleteProductsCache cache; <BUG>private String listId; @Override</BUG> protected final void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInst...
private ListDto dto; @Override
34,606
return observable; } private Void deleteListsSync() { List<ListDto> shoppingList = cache.getDeleteListsAdapter().getShoppingList(); <BUG>List<String> deletedIds = shoppingListService.deleteSelected(shoppingList); Observable.from(deletedIds) .doOnNext(id -> productService.deleteAllFromList(id).subscribe()) .doOnComplete...
shoppingListService.deleteSelected(shoppingList) .doOnNext(id -> productService.deleteAllFromList(id).subscribe();
34,607
assertEquals(date, newDto.getDeadlineDate()); assertEquals(time, newDto.getDeadlineTime()); assertEquals(notes, newDto.getNotes()); String expectedName = "newName"; newDto.setListName(expectedName); <BUG>shoppingListService.saveOrUpdate(newDto); ListDto updatedDto = shoppingListService.getById(id); </BUG> assertEquals...
shoppingListService.saveOrUpdate(newDto).toBlocking().single(); ListDto updatedDto = shoppingListService.getById(id).toBlocking().single();
34,608
dto.setPriority(priority); dto.setIcon(icon); dto.setDeadlineDate(date); dto.setDeadlineTime(time); dto.setNotes(notes); <BUG>shoppingListService.saveOrUpdate(dto); </BUG> listId = dto.getId(); } @Test
shoppingListService.saveOrUpdate(dto).toBlocking().single();
34,609
dto2.setId(null); productService.saveOrUpdate(dto2, listId).toBlocking().single(); List<ProductDto> products = productService.getAllProducts(listId).toList().toBlocking().single(); assertEquals(2, products.size()); productService.deleteAllFromList(listId).toBlocking().single(); <BUG>shoppingListService.deleteById(listI...
shoppingListService.deleteById(listId).toBlocking().single();
34,610
@Override public Observable<ProductDto> getById(String entityId) { Observable<ProductDto> observable = Observable .fromCallable(() -> getByIdSync(entityId)) <BUG>.observeOn(Schedulers.newThread()) .subscribeOn(AndroidSchedulers.mainThread()); </BUG> return observable;
public void setContext(Context context, DB db) this.context = context; productItemDao.setContext(context, db); shoppingListService.setContext(context, db); converterService.setContext(context, db);
34,611
import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.framework.context.InstanceFactory; import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.framework.utils.MessageUtils; import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.logic.shoppingList.business.Shopp...
import java.util.ArrayList; import java.util.List;
34,612
cache.getDeleteFab().setOnClickListener(new DeleteListsOnClickListener(cache)); overridePendingTransition(0, 0); } public void updateListView() { <BUG>List<ListDto> allListDtos = shoppingListService.getAllListDtos(); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);</BUG> String sortBy...
List<ListDto> allListDtos = new ArrayList<>(); shoppingListService.getAllListDtos() .doOnNext(dto -> allListDtos.add(dto)) .doOnCompleted(() -> SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
34,613
import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.logic.shoppingList.business.domain.ListDto; import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.logic.shoppingList.business.impl.comparators.ListsComparators; import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshop...
import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; import javax.inject.Inject;
34,614
.filter(dto -> dto.isSelected()) .subscribe( dto -> { String id = dto.getId(); <BUG>deleteById(id); </BUG> deletedIds.add(id); } );
deleteByIdSync(id);
34,615
List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < dataSetRowCount; i++) { // iterate all rows from data set DataSetRow row = rows.get(i); nnet.setInput(row.getInput()); // set current row as network input and nnet.calculate(); // calculate network <BUG>Neuron[] neurons = nnet.getLayerAt(attr...
List<Neuron> neurons = nnet.getLayerAt(attribute[0].getIndex()).getNeurons(); // get neurons at specified layer for (int j = 0; j < neurons.size(); j++) { double out = neurons.get(j).getOutput();
34,616
public void actionPerformed(ActionEvent e) { TestTopComponent.getDefault().open(); TestTopComponent.getDefault().requestActive(); TestTopComponent.getDefault().clear(); IOProvider.getDefault().getIO("Neuroph", false).getOut().println("Evaluating classifier neural network "/*+trainingController.getNetwork().getLabel() +...
NeuralNetwork<?> neuralNet = trainingController.getNetwork();
34,617
import org.neuroph.core.data.DataSet; import org.neuroph.core.data.DataSetRow; import org.nugs.graph2d.api.Attribute; public class DatasetErrorDataProvider2D implements DataProvider2D { DataSet dataSet; <BUG>NeuralNetwork nnet; </BUG> Point2D[] error; int attribute; public DatasetErrorDataProvider2D() {
NeuralNetwork<?> nnet;
34,618
List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { DataSetRow row = rows.get(i); nnet.setInput(row.getInput()); nnet.calculate(); <BUG>Neuron outputNeuron = nnet.getOutputNeurons()[0]; </BUG> double err = row.getDesiredOutput()[0] - outputNeuron.getOutput(); double colVal = rows.get(i).g...
Neuron outputNeuron = nnet.getOutputNeurons().get(0);
34,619
import org.neuroph.core.data.DataSet; import org.neuroph.core.data.DataSetRow; import org.nugs.graph2d.api.Attribute; public class ErrorDataProvider2D implements DataProvider2D { DataSet dataSet; <BUG>NeuralNetwork nnet; </BUG> Point2D[] error; public ErrorDataProvider2D() { }
NeuralNetwork<?> neuralNet;
34,620
Point2D[] error; public ErrorDataProvider2D() { } public ErrorDataProvider2D(DataSet dataSet, NeuralNetwork nnet) { this.dataSet = dataSet; <BUG>this.nnet = nnet; </BUG> } @Override public Point2D[] getData() {
this.neuralNet = nnet;
34,621
int numberOfPoints = dataSet.getRows().size(); error = new Point2D.Double[numberOfPoints + 1]; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { DataSetRow row = rows.get(i); <BUG>nnet.setInput(row.getInput()); nnet.calculate(); Neuron outputNeuron = nnet.getOutputNeurons()[0]; </BUG>...
neuralNet.setInput(row.getInput()); neuralNet.calculate(); Neuron outputNeuron = neuralNet.getOutputNeurons().get(0);
34,622
p.setProperty("version", "1.0"); } void readProperties(java.util.Properties p) { String version = p.getProperty("version"); } <BUG>public void orderForm(NeuralNetwork nnet) { </BUG> drawButton.setEnabled(false); openInLauncherButton.setEnabled(false); this.nnet = nnet;
public void orderForm(NeuralNetwork<?> nnet) {
34,623
graphTypeCombo.removeAllItems(); layerCombo.removeAllItems(); datasetTextField.setEditable(false); nnetField.setEditable(false); nnetField.setText(nnet.getLabel()); <BUG>Layer[] layers = nnet.getLayers(); for (int i = layers.length; i > 0; i--) { </BUG> layerCombo.addItem(i); }
for (int i = nnet.getLayers().size(); i > 0; i--) {
34,624
import org.neuroph.bci.mindwave.MindWaveManager; import org.neuroph.bci.mindwave.MindWaveSample; import org.neuroph.core.NeuralNetwork; import org.neuroph.core.Neuron; public class MindWaveController { <BUG>NeuralNetwork neuralNetwork; </BUG> public MindWaveController(NeuralNetwork neuralNetwork) { this.neuralNetwork =...
NeuralNetwork<?> neuralNetwork;
34,625
import org.neuroph.core.data.DataSetRow; import org.nugs.graph2d.api.Attribute; import org.nugs.graph3d.api.Point3D; public class ErrorDataProvider3D implements DataProvider3D<Point3D> { DataSet dataSet; <BUG>NeuralNetwork nnet; </BUG> public ErrorDataProvider3D(DataSet dataSet, NeuralNetwork nnet) { this.dataSet = dat...
NeuralNetwork<?> nnet;
34,626
this.nnet = nnet; } @Override public Point3D[] getData(Attribute...attr) { int dataSetRowCount = dataSet.getRows().size(); <BUG>int neuronsCount = nnet.getOutputNeurons().length; </BUG> Point3D[] errorPoints3D = new Point3D[(dataSetRowCount * neuronsCount) + 1]; int counter = 1; List<DataSetRow> rows = dataSet.getRows(...
int neuronsCount = nnet.getOutputNeurons().size();
34,627
int counter = 1; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { nnet.setInput(rows.get(i).getInput()); nnet.calculate(); <BUG>Neuron[] outputNeurons = nnet.getOutputNeurons(); for (int j = 0; j < outputNeurons.length; j++) { double err = rows.get(i).getDesiredOutput()[j] - outputNe...
List<Neuron>outputNeurons = nnet.getOutputNeurons(); for (int j = 0; j < outputNeurons.size(); j++) { double err = rows.get(i).getDesiredOutput()[j] - outputNeurons.get(j).getOutput();
34,628
import org.neuroph.core.data.DataSet; import org.neuroph.core.data.DataSetRow; import org.nugs.graph2d.api.Attribute; public class OutputDataProvider2D implements DataProvider2D { DataSet dataSet; <BUG>NeuralNetwork nnet; </BUG> Point2D[] output; public OutputDataProvider2D() { }
NeuralNetwork<?> neuralNet;
34,629
Point2D[] output; public OutputDataProvider2D() { } public OutputDataProvider2D(DataSet dataSet, NeuralNetwork nnet) { this.dataSet = dataSet; <BUG>this.nnet = nnet; </BUG> } @Override public Point2D[] getData() {
this.neuralNet = nnet;
34,630
int numberOfPoints = dataSet.getRows().size(); output = new Point2D.Double[numberOfPoints + 1]; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { DataSetRow row = rows.get(i); <BUG>nnet.setInput(row.getInput()); nnet.calculate(); Neuron outputNeuron = nnet.getOutputNeurons()[0]; </BUG...
neuralNet.setInput(row.getInput()); neuralNet.calculate(); Neuron outputNeuron = neuralNet.getOutputNeurons().get(0);
34,631
layersNeuronsCount.add(0, numberOfInputs); layersNeuronsCount.add(numberOfOutputs); NeuralNetwork neuralNetwork = new MultiLayerPerceptron(layersNeuronsCount, transferFunction); neuralNetwork.setLabel(neuralNetworkName); neuralNetwork.setLearningRule(new MomentumBackpropagation()); <BUG>Neuron[] outputNeurons = neuralN...
List<Neuron> outputNeurons = neuralNetwork.getOutputNeurons(); for(int i=0; i<outputNeurons.size(); i++) { outputNeurons.get(i).setLabel(classes[i]);
34,632
this.nnet = nnet; } @Override public Point3D[] getData(Attribute ...attr) { int dataSetRowCount = dataSet.getRows().size(); <BUG>int neuronsCount = nnet.getOutputNeurons().length; </BUG> Point3D[] error = new Point3D[(dataSetRowCount * neuronsCount) + 1]; int counter = 1; List<DataSetRow> rows = dataSet.getRows();
int neuronsCount = nnet.getOutputNeurons().size();
34,633
int counter = 1; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { nnet.setInput(rows.get(i).getInput()); nnet.calculate(); <BUG>Neuron[] outputNeurons = nnet.getOutputNeurons(); for (int j = 0; j < outputNeurons.length; j++) { double err = rows.get(i).getDesiredOutput()[j] - outputNe...
List<Neuron>outputNeurons = nnet.getOutputNeurons(); for (int j = 0; j < outputNeurons.size(); j++) { double err = rows.get(i).getDesiredOutput()[j] - outputNeurons.get(j).getOutput();
34,634
</BUG> Layer l = nnet.getLayerAt(i); int layerConnectionCount = 1; for (Neuron neuron : l.getNeurons()) { <BUG>Connection[] connections = neuron.getInputConnections(); </BUG> for (Connection connection : connections) { weights[totalConnectionCount] = new Point3D.Float(i, layerConnectionCount, (float) connection.getWeig...
if (nnet == null) { throw new RuntimeException("No neural network."); } Point3D.Float[] weights = new Point3D.Float[NeurophChartUtilities.getConnectionCount(nnet) + 1]; int totalConnectionCount = 1; for (int i = 1; i < nnet.getLayers().size(); i++) { List<Connection> connections = neuron.getInputConnections();
34,635
import org.neuroph.core.data.DataSet; import org.neuroph.core.data.DataSetRow; import org.nugs.graph2d.api.Attribute; public class DatasetOutputDataProvider2D implements DataProvider2D { DataSet dataSet; <BUG>NeuralNetwork nnet; </BUG> Point2D[] output; int attribute; public DatasetOutputDataProvider2D() {
NeuralNetwork<?> neuralNet;
34,636
int attribute; public DatasetOutputDataProvider2D() { } public DatasetOutputDataProvider2D(DataSet dataSet, NeuralNetwork nnet) { this.dataSet = dataSet; <BUG>this.nnet = nnet; </BUG> } @Override public Point2D[] getData() {
this.neuralNet = nnet;
34,637
output = new Point2D[numberOfPoints + 1]; int counter = 1; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { DataSetRow row = rows.get(i); <BUG>nnet.setInput(row.getInput()); nnet.calculate(); Neuron outputNeuron = nnet.getOutputNeurons()[0]; </BUG> double err = outputNeuron.getOutput...
neuralNet.setInput(row.getInput()); neuralNet.calculate(); Neuron outputNeuron = neuralNet.getOutputNeurons().get(0);
34,638
int counter = 1; List<DataSetRow> rows = dataSet.getRows(); for (int i = 0; i < rows.size(); i++) { nnet.setInput(rows.get(i).getInput()); nnet.calculate(); <BUG>Neuron[] neurons = nnet.getLayerAt(attr[0].getIndex()).getNeurons(); for (int j = 0; j < neurons.length; j++) { double out = neurons[j].getOutput(); </BUG> ...
List<Neuron> neurons = nnet.getLayerAt(attr[0].getIndex()).getNeurons(); for (int j = 0; j < neurons.size(); j++) { double out = neurons.get(j).getOutput();
34,639
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 ...
[DELETED]
34,640
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 st...
[DELETED]
34,641
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 SELEC...
[DELETED]
34,642
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 sta...
[DELETED]
34,643
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, ...
[DELETED]
34,644
+ "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 stat...
[DELETED]
34,645
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;
34,646
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.ser...
import org.hawkular.alerts.api.services.PropertiesService; import org.hawkular.alerts.engine.impl.IncomingDataManagerImpl.IncomingData;
34,647
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; pr...
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;
34,648
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...
[DELETED]
34,649
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.getStatu...
[DELETED]
34,650
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]
34,651
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(deleteAlertSeveri...
[DELETED]
34,652
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_STAT...
[DELETED]
34,653
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.ge...
[DELETED]
34,654
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() {
34,655
} @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=" + ...
public void addTag(String name, String value) { if (null == tags) { tags = new HashMap<>();
34,656
import de.kuschku.libquassel.objects.serializers.ObjectSerializer; import de.kuschku.libquassel.primitives.types.QVariant; import de.kuschku.libquassel.syncables.serializers.AliasManagerSerializer; import de.kuschku.libquassel.syncables.serializers.BufferSyncerSerializer; import de.kuschku.libquassel.syncables.serializ...
import de.kuschku.libquassel.syncables.serializers.CoreInfoSerializer; import de.kuschku.libquassel.syncables.serializers.IdentitySerializer;
34,657
map.put("Identity", IdentitySerializer.get()); map.put("IrcChannel", IrcChannelSerializer.get()); map.put("IrcUser", IrcUserSerializer.get()); map.put("Network", NetworkSerializer.get()); map.put("NetworkConfig", NetworkConfigSerializer.get()); <BUG>map.put("AliasManager", AliasManagerSerializer.get()); }</BUG> private...
map.put("CoreInfo", CoreInfoSerializer.get());
34,658
import java.nio.ByteBuffer; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.concurrent.ExecutorService; <BUG>import java.util.concurrent.Executors; import de.kuschku.libquassel.client.Client;</BUG> import de.kuschku.libquassel.client.ClientData; import de.kuschku.libq...
import javax.security.cert.X509Certificate; import de.kuschku.libquassel.client.Client;
34,659
channel = WrappedChannel.withCompression(getChannel()); } private void setSSL(boolean supportsSSL) { if (supportsSSL) { try { <BUG>channel = WrappedChannel.withSSL(getChannel(), certificateManager, address); </BUG> } catch (Exception e) { if (e.getCause() instanceof UnknownCertificateException) { busProvider.sendEvent(...
channel = WrappedChannel.withSSL(getChannel(), certificateManager, address, client::setCertificateChain);
34,660
public void addIrcChannel(String channel) { _addIrcChannel(channel); syncVar("addIrcChannel", channel); } @Override <BUG>public void ircUserNickChanged(String oldnick, String newnick) { _ircUserNickChanged(oldnick, newnick); syncVar("ircUserNickChanged", newnick); } @Override</BUG> public void connect() {
[DELETED]
34,661
final Set<Integer> cachedIds = new HashSet<>(); final ObservableSortedList<QBufferViewConfig> list = new ObservableSortedList<>(QBufferViewConfig.class, new ObservableSortedList.ItemComparator<QBufferViewConfig>() { @Override public int compare(QBufferViewConfig o1, QBufferViewConfig o2) { <BUG>return o1.bufferViewName...
return o1.bufferViewName().compareToIgnoreCase(o2.bufferViewName());
34,662
package de.kuschku.libquassel.client; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; <BUG>import android.util.Pair; import java.util.HashMap;</BUG> import java.util.LinkedList; import java.util.List; import java.util.Map;
import java.security.cert.X509Certificate; import java.util.HashMap;
34,663
import de.kuschku.libquassel.syncables.types.interfaces.QBufferSyncer; import de.kuschku.libquassel.syncables.types.interfaces.QBufferViewConfig; import de.kuschku.libquassel.syncables.types.interfaces.QBufferViewManager; import de.kuschku.libquassel.syncables.types.interfaces.QIgnoreListManager; import de.kuschku.libq...
import de.kuschku.libquassel.syncables.types.interfaces.QSyncableObject; import de.kuschku.util.buffermetadata.BufferMetaDataManager;
34,664
private QNetworkConfig globalNetworkConfig; private CoreStatus core; private CoreInfo coreInfo; private long latency; private ConnectionChangeEvent.Status connectionStatus; <BUG>private int r = 1; public Client(@NonNull BusProvider provider, @NonNull BacklogStorage backlogStorage, @NonNull BufferMetaDataManager metaDat...
private X509Certificate[] certificateChain; public Client(@NonNull BusProvider provider, @NonNull BacklogStorage backlogStorage, @NonNull BufferMetaDataManager metaDataManager, String coreId) {
34,665
if (peerPtr != 0x0000000000000000L) provider.sendEvent(new CriticalErrorEvent("Your core has a critical vulnerability. Please update it.")); provider.sendEvent(new PasswordChangeEvent(success)); } @Override <BUG>public void ___objectRenamed__(String type, String oldName, String newName) { }</BUG> public synchronized C...
public void ___objectRenamed__(String type, String newName, String oldName) { ((QSyncableObject) unsafe_getObjectByIdentifier(type, oldName)).setObjectName(newName);
34,666
bufferManager.init(sessionState.BufferInfos); requestInitObject("BufferSyncer", ""); requestInitObject("BufferViewManager", ""); requestInitObject("AliasManager", ""); requestInitObject("NetworkConfig", "GlobalNetworkConfig"); <BUG>requestInitObject("IgnoreListManager", ""); assertNotNull(provider);</BUG> provider.even...
requestInitObject("CoreInfo", ""); assertNotNull(provider);
34,667
import java.security.cert.X509Certificate; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; <BUG>import de.kuschku.util.accounts.ServerAddress; import de.kuschku.util.certificates.CertificateUtils;</BUG> public cl...
import de.kuschku.util.backports.Consumer; import de.kuschku.util.certificates.CertificateUtils;
34,668
chain[0].checkValidity(); if (!CertificateUtils.getHostnames(chain[0]).contains(address.host)) throw new CertificateException("Hostname not in certificate"); } catch (CertificateException e) { certificateManager.checkTrusted(chain[0], address); <BUG>} }</BUG> @Override public X509Certificate[] getAcceptedIssuers() { re...
callback.apply(chain);
34,669
public void init(AuthenticationManagerBuilder auth) throws Exception { boolean secured = null != environment.getProperty("shiny.proxy.ldap.manager-dn"); if (secured) { auth .ldapAuthentication() <BUG>.userDnPatterns("uid={0}") .groupSearchBase(environment.getProperty("shiny.proxy.ldap.group-search-base"))</BUG> .contex...
.userSearchBase(environment.getProperty("shiny.proxy.ldap.user-search-base")) .groupSearchBase(environment.getProperty("shiny.proxy.ldap.group-search-base"))
34,670
package org.elasticsearch.common.http.client; import org.apache.lucene.util.IOUtils; import org.elasticsearch.ElasticsearchTimeoutException; import org.elasticsearch.Version; import org.elasticsearch.common.Nullable; <BUG>import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.unit.TimeValue;...
import org.elasticsearch.common.cli.Terminal; import org.elasticsearch.common.unit.TimeValue;
34,671
package org.elasticsearch.plugins; import com.google.common.base.Strings; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; <BUG>import org.apache.lucene.util.IOUtils; import org.elasticsearch.*; </BUG> import org.elasticsearch.bootstrap.JarHell; import org.elasticsearch.common....
import org.elasticsearch.ElasticsearchTimeoutException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.Version;
34,672
boolean downloaded = false; HttpDownloadHelper.DownloadProgress progress; if (outputMode == OutputMode.SILENT) { progress = new HttpDownloadHelper.NullProgress(); } else { <BUG>progress = new HttpDownloadHelper.VerboseProgress(SysOut.getOut()); </BUG> } if (!Files.isWritable(environment.pluginsFile())) { throw new IOEx...
progress = new HttpDownloadHelper.VerboseProgress(terminal.writer());
34,673
downloadHelper.download(pluginUrl, pluginFile, progress, this.timeout); downloaded = true; } catch (ElasticsearchTimeoutException e) { throw e; } catch (Exception e) { <BUG>log("Failed: " + ExceptionsHelper.detailedMessage(e)); </BUG> } } else { if (PluginHandle.isOfficialPlugin(pluginHandle.repo, pluginHandle.user, pl...
terminal.println("Failed: %s", ExceptionsHelper.detailedMessage(e));
34,674
checkForOfficialPlugins(pluginHandle.name); } } if (!downloaded) { for (URL url : pluginHandle.urls()) { <BUG>log("Trying " + url.toExternalForm() + "..."); try {</BUG> downloadHelper.download(url, pluginFile, progress, this.timeout); downloaded = true; break;
terminal.println("Trying %s ...", url.toExternalForm()); try {
34,675
downloaded = true; break; } catch (ElasticsearchTimeoutException e) { throw e; } catch (Exception e) { <BUG>debug("Failed: " + ExceptionsHelper.detailedMessage(e)); </BUG> } } }
terminal.println(VERBOSE, "Failed: %s", ExceptionsHelper.detailedMessage(e));
34,676
throw new IOException("failed to download out of all possible locations..., use --verbose to get detailed information"); } Path tmp = unzipToTemporary(pluginFile); final List<URL> jars = new ArrayList<>(); ClassLoader loader = PluginManager.class.getClassLoader(); <BUG>if (loader instanceof URLClassLoader) { for (URL u...
Collections.addAll(jars, ((URLClassLoader) loader).getURLs());
34,677
Files.copy(file, target, StandardCopyOption.REPLACE_EXISTING); return FileVisitResult.CONTINUE; } }); } <BUG>log("Installed " + name + " into " + extractLocation.toAbsolutePath()); } catch (Exception e) { log("failed to extract plugin [" + pluginFile + "]: " + ExceptionsHelper.detailedMessage(e)); </BUG> return;
terminal.println("Installed %s into %s", name, extractLocation.toAbsolutePath()); terminal.printError("failed to extract plugin [%s]: %s", pluginFile, ExceptionsHelper.detailedMessage(e));
34,678
Path site = extractLocation.resolve("_site"); Path tmpLocation = environment.pluginsFile().resolve(extractLocation.getFileName() + ".tmp"); Files.move(extractLocation, tmpLocation); Files.createDirectories(extractLocation); Files.move(tmpLocation, site); <BUG>debug("Installed " + name + " into " + site.toAbsolutePath()...
terminal.println(VERBOSE, "Installed " + name + " into " + site.toAbsolutePath());
34,679
PluginHandle pluginHandle = PluginHandle.parse(name); boolean removed = false; checkForForbiddenName(pluginHandle.name); Path pluginToDelete = pluginHandle.extractedDir(environment); if (Files.exists(pluginToDelete)) { <BUG>debug("Removing: " + pluginToDelete); try {</BUG> IOUtils.rm(pluginToDelete); } catch (IOExcepti...
terminal.println(VERBOSE, "Removing: %s", pluginToDelete); try {
34,680
} @After public void clearPathHome() { System.clearProperty("es.default.path.home"); } <BUG>protected static String[] args(String command) { </BUG> if (!Strings.hasLength(command)) { return Strings.EMPTY_ARRAY; }
public static String[] args(String command) {
34,681
import org.apache.commons.io.FileUtils; public class BetterFpsHelper { public static final String MC_VERSION = "1.9"; public static final String VERSION = "1.2.1"; public static final String URL = "http://guichaguri.github.io/BetterFps/"; <BUG>public static final String UPDATE_URL = "https://raw.githubusercontent.com/G...
public static final String UPDATE_URL = "http://widget.mcf.li/mc-mods/minecraft/229876-betterfps.json"; public static final LinkedHashMap<String, String> helpers = new LinkedHashMap<String, String>();
34,682
<BUG>package guichaguri.betterfps; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties;</BUG> import net.minecraft.client.Minecraft;
import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.io.InputStreamReader;
34,683
import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; public class UpdateChecker implements Runnable { private static boolean updateCheck = false; private static boolean done = false; <BUG>private static Properties prop = null; public static void check() {</BUG> if(!BetterFps...
private static String updateVersion = null; private static String updateDownload = null; public static void check() {
34,684
thread.setDaemon(true); thread.start(); } } public static void showChat() { <BUG>if(!done) return; if(prop == null) return; if(BetterFpsHelper.VERSION.equals(prop.getProperty("version"))) { prop = null; return; }</BUG> if(!BetterFps.isClient) return;
if(updateVersion == null && updateDownload == null) return;
34,685
@CopyMode(Mode.IGNORE) // Ignore the constructor to prevent an infinite loop public HopperBlock() { } @Override @CopyMode(Mode.APPEND) <BUG>public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { </BUG> TileEntity te = worldIn.getTileEntity(pos); if(te != null) { TileEnt...
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block neighborBlock) {
34,686
import io.opentracing.tag.Tags; public class Span implements io.opentracing.Span { private final Tracer tracer; private final long start; // time in microseconds private final String operationName; <BUG>private TraceContext context; private Map<String, String> baggage;</BUG> private Endpoint peer; private long duratio...
private SpanContext context;
34,687
package net.spy.memcached.ops; import java.io.IOException; <BUG>public final class OperationException extends IOException { private final OperationErrorType type;</BUG> public OperationException() { super(); type=OperationErrorType.GENERAL;
private static final long serialVersionUID = 2457625388445818437L; private final OperationErrorType type;
34,688
super.setUp(); mc.asyncBopDelete(key, 0, 100, ElementFlagFilter.DO_NOT_FILTER, 0, true); } public void testAfterSuccess() throws Exception { CollectionFuture<Boolean> future; <BUG>OperationStatus status; future = (CollectionFuture<Boolean>) mc.asyncBopInsert(key, 0, null, "hello", new CollectionAttributes());</BUG> Boo...
future = mc.asyncBopInsert(key, 0, null, "hello", new CollectionAttributes());
34,689
assertEquals("CREATED_STORED", status.getMessage()); } public void testAfterFailure() throws Exception { CollectionFuture<Map<Long, Element<Object>>> future; OperationStatus status; <BUG>future = (CollectionFuture<Map<Long, Element<Object>>>) mc.asyncBopGet( key, 0, ElementFlagFilter.DO_NOT_FILTER, false, false); Map<...
future = mc.asyncBopGet(key, 0, ElementFlagFilter.DO_NOT_FILTER, false, false); Map<Long, Element<Object>> result = future.get(1000, TimeUnit.MILLISECONDS);
34,690
assertFalse(status.isSuccess()); assertEquals("NOT_FOUND", status.getMessage()); } public void testTimeout() throws Exception { CollectionFuture<Boolean> future; <BUG>OperationStatus status; future = (CollectionFuture<Boolean>) mc.asyncBopInsert(key, 0, null, "hello", new CollectionAttributes());</BUG> try { future.get...
future = mc.asyncBopInsert(key, 0, null, "hello", new CollectionAttributes());
34,691
import java.util.Collection; import java.util.Collections; import java.util.concurrent.TimeoutException; import net.spy.memcached.MemcachedNode; import net.spy.memcached.ops.Operation; <BUG>public class CheckedOperationTimeoutException extends TimeoutException { private final Collection<Operation> operations;</BUG> pub...
private static final long serialVersionUID = 5187393339735774489L; private final Collection<Operation> operations;
34,692
future.cancel(true); e.printStackTrace(); Assert.fail(e.getMessage()); } } <BUG>public void testInvalidArgumentException() { try {</BUG> CollectionAttributes attr = new CollectionAttributes(); mc.delete(KEY_LIST.get(0)).get(); mc.delete(KEY_LIST.get(1)).get();
ArrayList<String> testKeyList = new ArrayList<String>(); testKeyList.add(KEY_LIST.get(0)); testKeyList.add(KEY_LIST.get(1)); try {
34,693
mc.asyncBopSortMergeGet(new ArrayList<String>(), 10, 0, ElementFlagFilter.DO_NOT_FILTER, -1, 10); fail("This should be an exception"); } catch (Exception e) { assertEquals("Key list is empty.", e.getMessage()); } <BUG>try { mc.asyncBopSortMergeGet(new ArrayList<String>() { { add(KEY_LIST.get(0)); add(KEY_LIST.get(1)); ...
[DELETED]
34,694
}, 10, 0, ElementFlagFilter.DO_NOT_FILTER, -1, 10);</BUG> fail("This should be an exception"); } catch (Exception e) { assertEquals("Offset must be 0 or positive integer.", e.getMessage()); } <BUG>try { mc.asyncBopSortMergeGet(new ArrayList<String>() { { add(KEY_LIST.get(0)); add(KEY_LIST.get(1)); } }, 10, 0, ElementFl...
mc.asyncBopSortMergeGet(new ArrayList<String>(), 10, 0, ElementFlagFilter.DO_NOT_FILTER, -1, 10); assertEquals("Key list is empty.", e.getMessage()); mc.asyncBopSortMergeGet(testKeyList, 10, 0, ElementFlagFilter.DO_NOT_FILTER, -1, 10); mc.asyncBopSortMergeGet(testKeyList, 10, 0, ElementFlagFilter.DO_NOT_FILTER, 0, 0);
34,695
private final String key2 = "ByteArrayBKeySMGetIrregularEflagTest2" + (Math.abs(new Random().nextInt(99)) + 100); private final byte[] eFlag = { 1 }; private final Object value = "valvalvalvalvalvalvalvalvalval"; public void testGetAll_1() { <BUG>SMGetMode smgetMode = SMGetMode.UNIQUE; try {</BUG> mc.delete(key1).get()...
ArrayList<String> testKeyList = new ArrayList<String>(); testKeyList.add(key1); testKeyList.add(key2); try {
34,696
mc.asyncBopInsert(key2, new byte[] { 5 }, null, value + "1", new CollectionAttributes()).get(); mc.asyncBopInsert(key2, new byte[] { 4 }, eFlag, value + "2", new CollectionAttributes()).get(); List<SMGetElement<Object>> list = mc.asyncBopSortMergeGet( <BUG>new ArrayList<String>() { { add(key1); add(key2); } }, new byte...
testKeyList, new byte[] { 0 }, new byte[] { 10 },
34,697
mc.asyncBopInsert(key2, new byte[] { 5 }, null, value + "1", new CollectionAttributes()).get(); mc.asyncBopInsert(key2, new byte[] { 4 }, eFlag, value + "2", new CollectionAttributes()).get(); List<SMGetElement<Object>> list = mc.asyncBopSortMergeGet( <BUG>new ArrayList<String>() { { add(key1); add(key2); } }, new byte...
testKeyList, new byte[] { 0 }, new byte[] { 10 }, ElementFlagFilter.DO_NOT_FILTER, 0, 10).get();
34,698
mc.delete(invalidKey).get(); mc.delete(kvKey).get(); CollectionAttributes attrs = new CollectionAttributes(); attrs.setReadable(false); for (long i = 0; i < 100; i++) { <BUG>mc.asyncBopInsert(key, (long)i, null, "val", attrs).get(); }</BUG> mc.set(kvKey, 0, "value").get(); CollectionFuture<Map<Integer, Element<Object>>...
mc.asyncBopInsert(key, i, null, "val", attrs).get(); }
34,699
"a" }; protected void setUp() { try { super.setUp(); mc.delete(key); <BUG>} catch (Exception e) { </BUG> } } public void testBopIncrDecr_Basic() throws Exception {
} catch (Exception ignored) {
34,700
assertTrue(response2.toString() == "NOT_FOUND_ELEMENT"); } public void testBopIncrDecr_StringError() throws Exception { addToBTree(key, items9); try { <BUG>CollectionFuture<Long> future3 = mc.asyncBopIncr(key, 9L, (int) 2); Long result3 = future3.get(1000, TimeUnit.MILLISECONDS);</BUG> CollectionResponse response3 = fu...
CollectionFuture<Long> future3 = mc.asyncBopIncr(key, 9L, 2); Long result3 = future3.get(1000, TimeUnit.MILLISECONDS);