id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
1,201 | sms.setDeliveryCount(9);
sms.setOriginatorSccpAddress("11224455");
sms.setStatusReportRequest(true);
sms.setDeliveryAttempt(321);
sms.setUserData("userdata");
<BUG>sms.setExtraData("extradata_1");
sms.setExtraData_2("extradata_2");</BUG>
sms.setExtraData_3("extradata_3");
sms.setExtraData_4("extradata_4");
return sms;
| sms.setMprocNotes("mproc notes xxx");
sms.setExtraData_2("extradata_2");
|
1,202 | assertEquals(sms.getTlvSet().getOptionalParameter((short) 6).getValue(), new byte[] { (byte) (6 + num), 7, 8 });
assertEquals(sms.getOriginatorSccpAddress(), "11224455");
assertTrue(sms.isStatusReportRequest());
assertEquals(sms.getDeliveryAttempt(), 321);
assertEquals(sms.getUserData(), "userdata");
<BUG>assertEquals(sms.getExtraData(), "extradata_1");
assertEquals(sms.getExtraData_2(), "extradata_2");</BUG>
assertEquals(sms.getExtraData_3(), "extradata_3");
assertEquals(sms.getExtraData_4(), "extradata_4");
}
| assertEquals(sms.getMprocNotes(), "mproc notes xxx");
assertEquals(sms.getExtraData_2(), "extradata_2");
|
1,203 | smscPropertiesManagement.setReviseSecondsOnSmscStart(val);
} else if (parName.equals("processingsmssettimeout")) {
int val = Integer.parseInt(options[3]);
smscPropertiesManagement.setProcessingSmsSetTimeout(val);
} else if (parName.equals("generatereceiptcdr")) {
<BUG>smscPropertiesManagement.setGenerateReceiptCdr(Boolean.parseBoolean(options[3]));
} else if (parName.equals("receiptsdisabling")) {</BUG>
smscPropertiesManagement.setReceiptsDisabling(Boolean.parseBoolean(options[3]));
} else if (parName.equals("enableintermediatereceipts")) {
smscPropertiesManagement.setEnableIntermediateReceipts(Boolean.parseBoolean(options[3]));
| } else if (parName.equals("generatetempfailurecdr")) {
smscPropertiesManagement.setGenerateTempFailureCdr(Boolean.parseBoolean(options[3]));
} else if (parName.equals("calculatemsgpartslencdr")) {
smscPropertiesManagement.setCalculateMsgPartsLenCdr(Boolean.parseBoolean(options[3]));
} else if (parName.equals("receiptsdisabling")) {
|
1,204 | public int getReviseSecondsOnSmscStart();
public void setReviseSecondsOnSmscStart(int reviseSecondsOnSmscStart);
public int getProcessingSmsSetTimeout();
public void setProcessingSmsSetTimeout(int processingSmsSetTimeout);
public boolean getGenerateReceiptCdr();
<BUG>public void setGenerateReceiptCdr(boolean generateReceiptCdr);
public MoChargingType getMoCharging();</BUG>
public void setMoCharging(MoChargingType moCharging);
public MoChargingType getHrCharging();
public void setHrCharging(MoChargingType hrCharging);
| public boolean getGenerateTempFailureCdr();
public void setGenerateTempFailureCdr(boolean generateTempFailureCdr);
public boolean getCalculateMsgPartsLenCdr();
public void setCalculateMsgPartsLenCdr(boolean calculateMsgPartsLenCdr);
public MoChargingType getMoCharging();
|
1,205 | Logger.getLogger("com.enioka").setLevel(Level.toLevel("DEBUG"));
}
@Test
public void testFibo() throws Exception
{
<BUG>JqmSimpleTest.create(em, "pyl.StressFibo").addRuntimeParameter("p1", "1").addRuntimeParameter("p2", "2").expectOk(11).run(this);
}</BUG>
@Test
public void testEnqueueSynchronously() throws Exception
| JqmSimpleTest.create(em, "pyl.StressFibo").addRuntimeParameter("p1", "1").addRuntimeParameter("p2", "2").addWaitMargin(20000)
|
1,206 | Path2D.Double path;
int off = getDecorationOffset();
if (isFocused()) {
if (isSelected() && !isLastElement()) {
path = new Path2D.Double();
<BUG>g.translate(1, 0);
</BUG>
path.moveTo(0, 0);
path.lineTo(off, h / 2); // |\
path.lineTo(0, h); // |/
| g.translate(2, 0);
|
1,207 | </BUG>
path.moveTo(0, 0);
path.lineTo(off, h / 2); // |\
path.lineTo(0, h); // |/
path.lineTo(0, 0);
<BUG>g.setColor(UIUtil.getListSelectionBackground());
g.fill(path);
g.translate(-1, 0);
</BUG>
}
| Path2D.Double path;
int off = getDecorationOffset();
if (isFocused()) {
if (isSelected() && !isLastElement()) {
path = new Path2D.Double();
g.translate(2, 0);
g.setColor(selBg);
g.translate(-2, 0);
|
1,208 | path.lineTo(off, h / 2); // ___
path.lineTo(0, h); // \ |
path.lineTo(off + 2, h); // /_|
path.lineTo(off + 2, 0);
path.lineTo(0, 0);
<BUG>g.setColor(isNextSelected() ? UIUtil.getListSelectionBackground() : UIUtil.getListBackground());
g.fill(path);</BUG>
}
}
}
| g.setColor(isNextSelected() ? selBg : UIUtil.getListBackground());
g.fill(path);
|
1,209 | g.fill(path);</BUG>
}
}
}
if (! isLastElement() && ((!isSelected() && !isNextSelected()) || !myPanel.hasFocus())) {
<BUG>Image img;
if (UIUtil.isUnderAquaLookAndFeel()) {
img = SEPARATOR_PASSIVE;
} else {
img = myPanel.isInFloatingMode() && isFocused() ? SEPARATOR_ACTIVE : SEPARATOR_PASSIVE;</BUG>
}
| path.lineTo(off, h / 2); // ___
path.lineTo(0, h); // \ |
path.lineTo(off + 2, h); // /_|
path.lineTo(off + 2, 0);
path.lineTo(0, 0);
g.setColor(isNextSelected() ? selBg : UIUtil.getListBackground());
g.fill(path);
g.drawImage(SEPARATOR_PASSIVE, null, null);
|
1,210 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
1,211 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
1,212 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
1,213 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
1,214 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
1,215 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
1,216 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
1,217 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
1,218 | PathFinder pathFinder = new PathFinder(modelConfig);
if(StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
String path = scoreMetaColumnNameFile;
File file = new File(scoreMetaColumnNameFile);
path = new Path(pathFinder.getEvalSetPath(this), file.getName()).toString();
<BUG>scoreMetaColumns = CommonUtils.readConfFileIntoList(path, dataSet.getSource(),
dataSet.getHeaderDelimiter());
</BUG>
}
}
| StringUtils.isBlank(dataSet.getHeaderDelimiter()) ? dataSet.getDataDelimiter()
: dataSet.getHeaderDelimiter());
|
1,219 | List<String> scoreMetaColumns = null;
if(StringUtils.isNotBlank(scoreMetaColumnNameFile) && SourceType.HDFS.equals(dataSet.getSource())) {
String path = scoreMetaColumnNameFile;
File file = new File(scoreMetaColumnNameFile);
path = new Path(pathFinder.getEvalSetPath(this), file.getName()).toString();
<BUG>scoreMetaColumns = CommonUtils.readConfFileIntoList(path, dataSet.getSource(),
dataSet.getHeaderDelimiter());
</BUG>
metaColumns = scoreMetaColumns;
}
| StringUtils.isBlank(dataSet.getHeaderDelimiter()) ? dataSet.getDataDelimiter()
: dataSet.getHeaderDelimiter());
|
1,220 | String rawMetaPath = dataSet.getMetaColumnNameFile();
if(StringUtils.isNotBlank(rawMetaPath) && SourceType.HDFS.equals(dataSet.getSource())) {
File file = new File(rawMetaPath);
rawMetaPath = new Path(pathFinder.getEvalSetPath(this), file.getName()).toString();
}
<BUG>List<String> rawMetaColumns = CommonUtils.readConfFileIntoList(rawMetaPath,
dataSet.getSource(), dataSet.getHeaderDelimiter());
</BUG>
if(metaColumns != null) {
for(String column: rawMetaColumns) {
| dataSet.getSource(),
StringUtils.isBlank(dataSet.getHeaderDelimiter()) ? dataSet.getDataDelimiter()
: dataSet.getHeaderDelimiter());
|
1,221 | paramsMap.put("pathEvalScore", pathFinder.getEvalScorePath(evalConfig));
paramsMap.put("pathEvalPerformance", pathFinder.getEvalPerformancePath(evalConfig));
paramsMap.put("eval_set_name", evalConfig.getName());
paramsMap.put("delimiter", evalConfig.getDataSet().getDataDelimiter());
paramsMap.put("columnIndex", evalConfig.getPerformanceScoreSelector().trim());
<BUG>paramsMap.put("scale", Environment.getProperty(Constants.SHIFU_SCORE_SCALE,
Integer.toString(Scorer.DEFAULT_SCORE_SCALE)));
String pigScript = "scripts/Eval.pig";</BUG>
Map<String, String> confMap = new HashMap<String, String>();
String maxMinScoreFolder = ShifuFileUtils
| paramsMap.put("scale",
Environment.getProperty(Constants.SHIFU_SCORE_SCALE, Integer.toString(Scorer.DEFAULT_SCORE_SCALE)));
String pigScript = "scripts/Eval.pig";
|
1,222 | private void validateEvalColumnConfig(EvalConfig evalConfig) throws IOException {
if(this.columnConfigList == null) {
return;
}
String[] evalColumnNames = null;
<BUG>if(StringUtils.isNotBlank(evalConfig.getDataSet().getHeaderPath())) {
evalColumnNames = CommonUtils.getHeaders(evalConfig.getDataSet().getHeaderPath(), evalConfig.getDataSet()
.getHeaderDelimiter(), evalConfig.getDataSet().getSource());
} else {</BUG>
String delimiter = StringUtils.isBlank(evalConfig.getDataSet().getHeaderDelimiter()) ? evalConfig
| [DELETED] |
1,223 | private int weightExceptions;
public EvalScoreUDF(String source, String pathModelConfig, String pathColumnConfig, String evalSetName)
throws IOException {
this(source, pathModelConfig, pathColumnConfig, evalSetName, Integer.toString(Scorer.DEFAULT_SCORE_SCALE));
}
<BUG>public EvalScoreUDF(String source, String pathModelConfig, String pathColumnConfig, String evalSetName,
String scale) throws IOException {
super(source, pathModelConfig, pathColumnConfig);</BUG>
evalConfig = modelConfig.getEvalConfigByName(evalSetName);
| public EvalScoreUDF(String source, String pathModelConfig, String pathColumnConfig, String evalSetName, String scale)
super(source, pathModelConfig, pathColumnConfig);
|
1,224 | super(source, pathModelConfig, pathColumnConfig);</BUG>
evalConfig = modelConfig.getEvalConfigByName(evalSetName);
if(evalConfig.getModelsPath() != null) {
this.columnConfigList = ShifuFileUtils.searchColumnConfig(evalConfig, columnConfigList);
}
<BUG>if(StringUtils.isNotBlank(evalConfig.getDataSet().getHeaderPath())) {
this.headers = CommonUtils.getHeaders(evalConfig.getDataSet().getHeaderPath(), evalConfig.getDataSet()
.getHeaderDelimiter(), evalConfig.getDataSet().getSource());
} else {</BUG>
String delimiter = StringUtils.isBlank(evalConfig.getDataSet().getHeaderDelimiter()) ? evalConfig
| private int weightExceptions;
public EvalScoreUDF(String source, String pathModelConfig, String pathColumnConfig, String evalSetName)
throws IOException {
this(source, pathModelConfig, pathColumnConfig, evalSetName, Integer.toString(Scorer.DEFAULT_SCORE_SCALE));
public EvalScoreUDF(String source, String pathModelConfig, String pathColumnConfig, String evalSetName, String scale)
throws IOException {
super(source, pathModelConfig, pathColumnConfig);
|
1,225 | this.subModelsCnt = CommonUtils.getSubModelsCnt(modelConfig, this.columnConfigList, evalConfig, evalConfig
.getDataSet().getSource());
this.scale = scale;
}
public Tuple exec(Tuple input) throws IOException {
<BUG>if(this. modelRunner == null) {
List<BasicML> models = CommonUtils.loadBasicModels(modelConfig, this.columnConfigList, evalConfig,</BUG>
evalConfig.getDataSet().getSource(), evalConfig.getGbtConvertToProb());
this.modelRunner = new ModelRunner(modelConfig, columnConfigList, this.headers, evalConfig.getDataSet()
.getDataDelimiter(), models);
| if(this.modelRunner == null) {
List<BasicML> models = CommonUtils.loadBasicModels(modelConfig, this.columnConfigList, evalConfig,
|
1,226 | evalConfig.getDataSet().getSource(), evalConfig.getGbtConvertToProb());
this.modelRunner = new ModelRunner(modelConfig, columnConfigList, this.headers, evalConfig.getDataSet()
.getDataDelimiter(), models);
List<ModelSpec> subModels = CommonUtils.loadSubModels(modelConfig, this.columnConfigList, evalConfig,
evalConfig.getDataSet().getSource(), evalConfig.getGbtConvertToProb());
<BUG>if ( CollectionUtils.isNotEmpty(subModels) ) {
for ( ModelSpec modelSpec : subModels ) {
this.modelRunner.addSubModels(modelSpec);</BUG>
this.subModelsCnt.put(modelSpec.getModelName(), modelSpec.getModels().size());
}
| if(CollectionUtils.isNotEmpty(subModels)) {
for(ModelSpec modelSpec: subModels) {
this.modelRunner.addSubModels(modelSpec);
|
1,227 | Iterator<Map.Entry<String, Integer>> iterator = this.subModelsCnt.entrySet().iterator();
while ( iterator.hasNext() ) {
Map.Entry<String, Integer> entry = iterator.next();</BUG>
String modelName = entry.getKey();
Integer smCnt = entry.getValue();
<BUG>if ( smCnt > 0 ) {
addModelSchema(tupleSchema, smCnt, modelName);</BUG>
}
}
}
| while(iterator.hasNext()) {
Map.Entry<String, Integer> entry = iterator.next();
if(smCnt > 0) {
addModelSchema(tupleSchema, smCnt, modelName);
|
1,228 | Iterator<Map.Entry<String, Integer>> iterator = this.subModelsCnt.entrySet().iterator();
while ( iterator.hasNext() ) {
Map.Entry<String, Integer> entry = iterator.next();</BUG>
String modelName = entry.getKey();
Integer smCnt = entry.getValue();
<BUG>if ( smCnt > 0 ) {
addModelTagSchema(tupleSchema, smCnt, modelName);</BUG>
}
}
}
| while(iterator.hasNext()) {
Map.Entry<String, Integer> entry = iterator.next();
if(smCnt > 0) {
addModelSchema(tupleSchema, smCnt, modelName);
|
1,229 | import java.util.List;
import java.util.Map;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.ValidationException;
import org.opennms.core.utils.ConfigFileConstants;
<BUG>import org.opennms.core.xml.CastorUtils;
</BUG>
import org.opennms.netmgt.config.opennmsDataSources.DataSourceConfiguration;
import org.opennms.netmgt.config.opennmsDataSources.JdbcDataSource;
import org.slf4j.Logger;
| import org.opennms.core.xml.JaxbUtils;
|
1,230 | package org.opennms.core.db;
import java.io.File;
<BUG>import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.ValidationException;
import org.opennms.core.xml.CastorUtils;
</BUG>
import org.opennms.netmgt.config.opennmsDataSources.ConnectionPool;
| import java.io.InputStreamReader;
import java.io.Reader;
import org.opennms.core.xml.JaxbUtils;
|
1,231 | package pasta.streamer.activities;
import android.animation.ValueAnimator;
import android.app.ActivityManager;
import android.content.Intent;
<BUG>import android.content.res.ColorStateList;
import android.databinding.DataBindingUtil;</BUG>
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Build;
| [DELETED] |
1,232 | import pasta.streamer.fragments.SettingsFragment;
import pasta.streamer.utils.ImageUtils;
import pasta.streamer.utils.PreferenceUtils;
import pasta.streamer.utils.StaticUtils;
import pasta.streamer.views.Playbar;
<BUG>public class HomeActivity extends AppCompatActivity implements ColorChooserDialog.ColorCallback {
@Bind(R.id.playbar)</BUG>
View playbarView;
@Bind(R.id.toolbar)
Toolbar toolbar;
| public class HomeActivity extends AppCompatActivity {
@Bind(R.id.playbar)
|
1,233 | private boolean preload;
private Pasta pasta;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>if (PreferenceUtils.isDarkTheme(this)) setTheme(R.style.AppTheme_Transparent_Dark);
DataBindingUtil.setContentView(this, R.layout.activity_home);
ButterKnife.bind(this);</BUG>
limitMap = new HashMap<>();
limitMap.put(SpotifyService.LIMIT, (PreferenceUtils.getLimit(this) + 1) * 10);
| setContentView(R.layout.activity_home);
ButterKnife.bind(this);
|
1,234 | import com.liferay.portal.kernel.repository.Repository;
import com.liferay.portal.kernel.repository.RepositoryFactory;
import com.liferay.portal.kernel.repository.capabilities.BulkOperationCapability;
import com.liferay.portal.kernel.repository.capabilities.SyncCapability;
import com.liferay.portal.kernel.repository.capabilities.TrashCapability;
<BUG>import com.liferay.portal.kernel.repository.capabilities.WorkflowCapability;
import com.liferay.portal.kernel.repository.registry.BaseRepositoryDefiner;</BUG>
import com.liferay.portal.kernel.repository.registry.CapabilityRegistry;
import com.liferay.portal.kernel.repository.registry.RepositoryEventRegistry;
import com.liferay.portal.kernel.repository.registry.RepositoryFactoryRegistry;
| import com.liferay.portal.kernel.repository.model.ContentReference;
import com.liferay.portal.kernel.repository.model.ModelValidator;
import com.liferay.portal.kernel.repository.registry.BaseRepositoryDefiner;
|
1,235 | RepositoryFactory repositoryFactory) {
_repositoryFactory = repositoryFactory;
}
@Override
public LocalRepository createLocalRepository(long repositoryId)
<BUG>throws PortalException {
return new LiferayWorkflowLocalRepositoryWrapper(
new ModelValidatorLocalRepositoryWrapper(
_repositoryFactory.createLocalRepository(repositoryId),
ModelValidatorUtil.getDefaultFileSizeModelValidator()),
_liferayWorkflowCapability);</BUG>
}
| [DELETED] |
1,236 | Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.tab_qibla, container, false);
final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass);
qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_north),
((TextView)rootView.findViewById(R.id.bearing_qibla)), getText(R.string.bearing_qibla));
<BUG>sOrientationListener = new SensorListener() {
</BUG>
public void onSensorChanged(int s, float v[]) {
float northDirection = v[SensorManager.DATA_X];
qiblaCompassView.setDirections(northDirection, sQiblaDirection);
| sOrientationListener = new android.hardware.SensorListener() {
|
1,237 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
1,238 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
1,239 | VEVENT ("VEVENT",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED,
PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START,
PropertyType.DESCRIPTION, PropertyType.DURATION, PropertyType.EXCEPTION_DATE_TIMES,
<BUG>PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,</BUG>
PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO,
PropertyType.RECURRENCE_RULE, PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE,
PropertyType.STATUS, PropertyType.SUMMARY, PropertyType.TIME_TRANSPARENCY, PropertyType.UNIQUE_IDENTIFIER,
| PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
|
1,240 | VTODO ("VTODO",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED,
PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP,
PropertyType.DATE_TIME_START, PropertyType.DESCRIPTION, PropertyType.DURATION,
<BUG>PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,</BUG>
PropertyType.PERCENT_COMPLETE, PropertyType.PRIORITY, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO, PropertyType.RECURRENCE_RULE,
PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE, PropertyType.STATUS,
| PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
|
1,241 | throw new RuntimeException("not implemented");
}
},
DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
<BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,</BUG>
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
{
| PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
|
1,242 | throw new RuntimeException("not implemented");
}
},
VALARM ("VALARM",
Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION,
<BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT,
PropertyType.SUMMARY, PropertyType.TRIGGER),</BUG>
VAlarm.class)
{
@Override
| DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
|
1,243 | private ContentLineStrategy contentLineGenerator;
protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator)
{
this.contentLineGenerator = contentLineGenerator;
}
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
throw new RuntimeException("Can't copy children. copyChildCallback isn't overridden in subclass." + this.getClass());
};
| protected Callback<VChild, Void> copyIntoCallback()
|
1,244 | import jfxtras.labs.icalendarfx.properties.calendar.Version;
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
public enum CalendarProperty
{
CALENDAR_SCALE ("CALSCALE",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
CalendarScale.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
CalendarScale.class)
|
1,245 | CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
}
},
METHOD ("METHOD",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Method.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
1,246 | }
list.add(new NonStandardProperty((NonStandardProperty) child));
}
},
PRODUCT_IDENTIFIER ("PRODID",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
ProductIdentifier.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| public void copyChild(VChild child, VCalendar destination)
CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
METHOD ("METHOD",
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
1,247 | ProductIdentifier productIdentifier = (ProductIdentifier) child;
destination.setProductIdentifier(productIdentifier);
}
},
VERSION ("VERSION",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Version.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Version.class)
|
1,248 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
1,249 | if (holder.hasName()) {
pipeline.addLast(holder.getGroupIfConfigured(), holder.getNameIfConfigured(),
holder.getHandlerFactoryIfConfigured().call());
} else {
pipeline.addLast(holder.getGroupIfConfigured(), holder.getHandlerFactoryIfConfigured().call());
<BUG>}
} else if (holder.hasInvoker()) {
if (holder.hasName()) {
pipeline.addLast(holder.getInvokerIfConfigured(), holder.getNameIfConfigured(),
holder.getHandlerFactoryIfConfigured().call());
} else {
pipeline.addLast(holder.getInvokerIfConfigured(), holder.getHandlerFactoryIfConfigured().call());</BUG>
}
| [DELETED] |
1,250 | package io.reactivex.netty.client.pool;
<BUG>import io.netty.channel.EventLoop;
import io.netty.util.concurrent.FastThreadLocal;</BUG>
import io.reactivex.netty.client.ClientConnectionToChannelBridge;
import io.reactivex.netty.threads.PreferCurrentEventLoopGroup;
import org.slf4j.Logger;
| import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.FastThreadLocal;
|
1,251 | </BUG>
public class PreferCurrentEventLoopHolder<W, R> extends IdleConnectionsHolder<W, R> {
private static final Logger logger = LoggerFactory.getLogger(PreferCurrentEventLoopHolder.class);
private final FastThreadLocal<IdleConnectionsHolder<W, R>> perElHolder = new FastThreadLocal<>();
<BUG>private final IdleConnectionsHolder<W, R>[] allElHolders;
</BUG>
private final Observable<PooledConnection<R, W>> pollObservable;
private final Observable<PooledConnection<R, W>> peekObservable;
PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup) {
this(eventLoopGroup, new FIFOIdleConnectionsHolderFactory<W, R>());
| import rx.Observable.OnSubscribe;
import rx.Subscriber;
import rx.functions.Action1;
import rx.functions.Actions;
import rx.functions.Func0;
import java.util.ArrayList;
private final ArrayList<IdleConnectionsHolder<W, R>> allElHolders;
|
1,252 | private final Observable<PooledConnection<R, W>> peekObservable;
PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup) {
this(eventLoopGroup, new FIFOIdleConnectionsHolderFactory<W, R>());
}
PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup,
<BUG>final IdleConnectionsHolderFactory<W, R> holderFactory) {
Set<EventLoop> children = eventLoopGroup.children();
@SuppressWarnings("unchecked")
final
IdleConnectionsHolder<W, R>[] _allElHolders = new IdleConnectionsHolder[children.size()];
allElHolders = _allElHolders;
int count = 0;
for (final EventLoop child : children) {</BUG>
final IdleConnectionsHolder<W, R> newHolder = holderFactory.call();
| final ArrayList<IdleConnectionsHolder<W, R>> _allElHolders = new ArrayList<>();
|
1,253 | allElHolders = _allElHolders;
int count = 0;
for (final EventLoop child : children) {</BUG>
final IdleConnectionsHolder<W, R> newHolder = holderFactory.call();
<BUG>allElHolders[count++] = newHolder;
child.submit(new Runnable() {</BUG>
@Override
public void run() {
perElHolder.set(newHolder);
}
| for (final EventExecutor child : eventLoopGroup) {
allElHolders.add(newHolder);
child.submit(new Runnable() {
|
1,254 | package io.reactivex.netty.channel;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
<BUG>import io.netty.channel.ChannelHandlerInvoker;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.ChannelPromise;</BUG>
import io.netty.util.concurrent.EventExecutorGroup;
| import io.netty.channel.ChannelOutboundInvoker;
import io.netty.channel.ChannelProgressivePromise;
import io.netty.channel.ChannelPromise;
|
1,255 | String name, ChannelHandler handler) {
delegate.addFirst(group, name, handler);
return this;
}
@Override
<BUG>public ChannelPipeline addFirst(ChannelHandlerInvoker invoker,
String name, ChannelHandler handler) {
delegate.addFirst(invoker, name, handler);
return this;
}
@Override</BUG>
public ChannelPipeline addLast(String name, ChannelHandler handler) {
| [DELETED] |
1,256 | }
@Override
public ChannelPipeline addLast(EventExecutorGroup group,
String name, ChannelHandler handler) {
delegate.addLast(group, name, handler);
<BUG>return this;
}
@Override
public ChannelPipeline addLast(ChannelHandlerInvoker invoker,
String name, ChannelHandler handler) {
delegate.addLast(invoker, name, handler);</BUG>
return this;
| public ChannelPipeline addFirst(String name, ChannelHandler handler) {
delegate.addFirst(name, handler);
|
1,257 | ChannelHandler... handlers) {
delegate.addFirst(group, handlers);
return this;
}
@Override
<BUG>public ChannelPipeline addFirst(ChannelHandlerInvoker invoker,
ChannelHandler... handlers) {
delegate.addFirst(invoker, handlers);
return this;
}
@Override</BUG>
public ChannelPipeline addLast(ChannelHandler... handlers) {
| [DELETED] |
1,258 | }
@Override
public ChannelPipeline addLast(EventExecutorGroup group,
ChannelHandler... handlers) {
delegate.addLast(group, handlers);
<BUG>return this;
}
@Override
public ChannelPipeline addLast(ChannelHandlerInvoker invoker,
ChannelHandler... handlers) {
delegate.addLast(invoker, handlers);</BUG>
return this;
| public ChannelPipeline addFirst(ChannelHandler... handlers) {
delegate.addFirst(handlers);
|
1,259 | if (!aggregatesByTypeList.isEmpty()) {
try {
aggregateDao.store(agentId, captureTime, aggregatesByTypeList,
sharedQueryTexts);
} catch (Throwable t) {
<BUG>logger.error("{} - {}", agentId, t.getMessage(), t);
</BUG>
responseObserver.onError(t);
return;
}
| logger.error("{} - {}", getAgentDisplay(agentId), t.getMessage(), t);
|
1,260 | if (t == null) {
log(level, "{} -- {} -- {} -- {}", request.getAgentId(), level,
</BUG>
logEvent.getLoggerName(), logEvent.getMessage());
} else {
<BUG>log(level, "{} -- {} -- {} -- {}\n{}", request.getAgentId(), level,
</BUG>
logEvent.getLoggerName(), logEvent.getMessage(), t);
}
} catch (Throwable t) {
| log(level, "{} -- {} -- {} -- {}", agentDisplay, level,
log(level, "{} -- {} -- {} -- {}\n{}", agentDisplay, level,
|
1,261 | @Override
public void run() {
try {
runInternal();
} catch (Throwable t) {
<BUG>logger.error("{} - {}", agentId, t.getMessage(), t);
</BUG>
}
}
private void runInternal() throws InterruptedException {
| logger.error("{} - {}", getAgentDisplay(agentId), t.getMessage(), t);
|
1,262 | checkTransactionAlert(agentId, agentDisplay, alertConfig, captureTime,
smtpConfig);
} catch (InterruptedException e) {
throw e;
} catch (Exception e) {
<BUG>logger.error("{} - {}", agentId, e.getMessage(), e);
</BUG>
}
}
}
| logger.error("{} - {}", getAgentDisplay(agentId), e.getMessage(), e);
|
1,263 | @Override
public void run() {
try {
runInternal();
} catch (Throwable t) {
<BUG>logger.error("{} - {}", agentId, t.getMessage(), t);
</BUG>
}
}
private void runInternal() throws InterruptedException {
| logger.error("{} - {}", getAgentDisplay(agentId), t.getMessage(), t);
|
1,264 | checkGaugeAlert(agentId, agentDisplay, alertConfig, captureTime,
smtpConfig);
} catch (InterruptedException e) {
throw e;
} catch (Exception e) {
<BUG>logger.error("{} - {}", agentId, e.getMessage(), e);
</BUG>
}
}
}
| logger.error("{} - {}", getAgentDisplay(agentId), e.getMessage(), e);
|
1,265 | @Override
public void run() {
try {
runInternal();
} catch (Throwable t) {
<BUG>logger.error("{} - {}", agentId, t.getMessage(), t);
</BUG>
}
}
private void runInternal() throws InterruptedException {
| logger.error("{} - {}", getAgentDisplay(agentId), t.getMessage(), t);
|
1,266 | traceHeadline = "Check heartbeat alert: {{0}}", timer = "check heartbeat alert")
private void checkHeartbeatAlert(String agentId, String agentDisplay,
AlertConfig alertConfig, SmtpConfig smtpConfig) throws Exception {
alertingService.checkHeartbeatAlert(agentId, agentDisplay, alertConfig, false,
smtpConfig);
<BUG>}
private void log(Level level, String format, Object... arguments) {</BUG>
switch (level) {
case ERROR:
logger.error(format, arguments);
| private String getAgentDisplay(String agentId) {
return agentDao.readAgentRollupDisplay(agentId);
private void log(Level level, String format, Object... arguments) {
|
1,267 | requestObserver.onNext(CentralRequest.newBuilder()
.setHelloAck(HelloAck.getDefaultInstance())
.build());
}
startupLogger.info("downstream connection (re-)established with agent: {}",
<BUG>agentId);
return;</BUG>
}
long requestId = value.getRequestId();
ResponseHolder responseHolder = responseHolders.getIfPresent(requestId);
| getAgentDisplay(agentId));
return;
if (agentId == null) {
logger.error("first message from agent to downstream service must be HELLO");
return;
|
1,268 | final ChiselCraftingRequirements req = getCraftingReqs( inv, true );
if ( req != null )
{
return ChiselsAndBits.getItems().itemPositiveprint.getPatternedItem( req.pattern, true );
}
<BUG>return null;
}</BUG>
@Override
public int getRecipeSize()
{
| return ModUtil.getEmptyStack();
|
1,269 | final int blockStateID )
{
stateID = blockStateID;
}
@Override
<BUG>public ItemStack getItemStack(
</BUG>
final int count )
{
if ( stateID == 0 )
| public @Nullable ItemStack getItemStack(
|
1,270 | public boolean isAir()
{
return stateID == 0;
}
@Override
<BUG>public IBlockState getState()
</BUG>
{
if ( stateID == 0 )
{
| public @Nullable IBlockState getState()
|
1,271 | final NBTBlobConverter tmp = new NBTBlobConverter();
tmp.readChisleData( targetA.getTagCompound() );
final VoxelBlob bestBlob = tmp.getBlob();
bestBlob.binaryReplacement( ModUtil.getStateId( Blocks.STONE.getDefaultState() ), 0 );
tmp.setBlob( bestBlob );
<BUG>final NBTTagCompound comp = targetA.getTagCompound().copy();
</BUG>
tmp.writeChisleData( comp, false );
final ItemStack outputPattern = new ItemStack( targetA.getItem() );
outputPattern.setTagCompound( comp );
| final NBTTagCompound comp = ModUtil.getTagCompound( targetA ).copy();
|
1,272 | package mod.chiselsandbits.api;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
public interface IBitBrush
{
<BUG>boolean isAir();
IBlockState getState();
ItemStack getItemStack(</BUG>
int count );
int getStateID();
| import javax.annotation.Nullable;
@Nullable
@Nullable
ItemStack getItemStack(
|
1,273 | import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
<BUG>import java.util.TreeMap;
import mod.chiselsandbits.core.ChiselsAndBits;</BUG>
import mod.chiselsandbits.helpers.LocalStrings;
import mod.chiselsandbits.helpers.ModUtil;
import mod.chiselsandbits.items.ItemBitBag;
| import javax.annotation.Nonnull;
import mod.chiselsandbits.core.ChiselsAndBits;
|
1,274 | public int getSizeInventory()
{
return stackSlots.length;
}
@Override
<BUG>public ItemStack getStackInSlot(
</BUG>
final int index )
{
final int qty = inv.contents[ItemBitBag.INTS_PER_BIT_TYPE * index + ItemBitBag.OFFSET_QUANTITY];
| public @Nonnull ItemStack getStackInSlot(
|
1,275 | final int index )
{
final int qty = inv.contents[ItemBitBag.INTS_PER_BIT_TYPE * index + ItemBitBag.OFFSET_QUANTITY];
final int id = inv.contents[ItemBitBag.INTS_PER_BIT_TYPE * index + ItemBitBag.OFFSET_STATE_ID];
if ( ModUtil.notEmpty( stackSlots[index] ) )
<BUG>{
ModUtil.setStackSize( stackSlots[index], qty );
return stackSlots[index];
}</BUG>
if ( qty == 0 || id == 0 )
| final ItemStack which = ModUtil.nonNull( stackSlots[index] );
ModUtil.setStackSize( which, qty );
return which;
}
|
1,276 | saveAndUpdate();
}
}
if ( amount < merged )
{
<BUG>final ItemStack out = stack.copy();
</BUG>
ModUtil.setStackSize( out, merged - amount );
return out;
}
| final ItemStack out = ModUtil.copy( stack );
|
1,277 | if ( playerIn.isSneaking() )
{
boolean change = false;
for ( int x = 0; x < playerIn.inventory.getSizeInventory(); x++ )
{
<BUG>final ItemStack stackInSlot = playerIn.inventory.getStackInSlot( x );
</BUG>
if ( ChiselsAndBits.getApi().getItemType( stackInSlot ) == ItemType.CHISLED_BIT )
{
playerIn.inventory.setInventorySlotContents( x, insertItem( 0, stackInSlot, false ) );
| final ItemStack stackInSlot = ModUtil.nonNull( playerIn.inventory.getStackInSlot( x ) );
|
1,278 | public ItemStack insertItem(
final int slot,
final ItemStack stack,
final boolean simulate )
{
<BUG>if ( slot >= 0 && slot < BAG_STORAGE_SLOTS && stack != null )
</BUG>
{
final int indexId = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_STATE_ID;
final int indexQty = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_QUANTITY;
| if ( slot >= 0 && slot < BAG_STORAGE_SLOTS && !ModUtil.isEmpty( stack ) )
|
1,279 | package mod.chiselsandbits.core;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.HashMap;
import java.util.Random;
<BUG>import java.util.concurrent.TimeUnit;
import org.lwjgl.input.Keyboard;</BUG>
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import com.google.common.base.Stopwatch;
| import javax.annotation.Nonnull;
import org.lwjgl.input.Keyboard;
|
1,280 | final BitLocation bl = new BitLocation( mc.objectMouseOver, true, BitOperation.CHISEL );
final IBitAccess access = ChiselsAndBits.getApi().getBitAccess( mc.theWorld, bl.getBlockPos() );
final IBitBrush brush = access.getBitAt( bl.getBitX(), bl.getBitY(), bl.getBitZ() );
if ( brush != null )
{
<BUG>final ItemStack is = brush.getItemStack( 1 );
doPick( is );
}</BUG>
}
catch ( final CannotBeChiseled e )
| if ( is != null )
|
1,281 | final PositionedSoundRecord psr = new PositionedSoundRecord( SoundEvents.UI_BUTTON_CLICK, SoundCategory.MASTER, volume, 1.0f, getPlayer().getPosition() );
Minecraft.getMinecraft().getSoundHandler().playSound( psr );
}
}
private boolean doPick(
<BUG>final ItemStack result )
</BUG>
{
final EntityPlayer player = getPlayer();
for ( int x = 0; x < 9; x++ )
| final @Nonnull ItemStack result )
|
1,282 | if ( isNegative )
{
bestBlob.binaryReplacement( 0, ModUtil.getStateId( Blocks.STONE.getDefaultState() ) );
}
tmp.setBlob( bestBlob );
<BUG>final NBTBase copied = targetA.getTagCompound().copy();
</BUG>
final NBTTagCompound comp = (NBTTagCompound) copied;
tmp.writeChisleData( comp, false );
final ItemStack outputPattern = new ItemStack( targetB.getItem() );
| final NBTBase copied = ModUtil.getTagCompound( targetA ).copy();
|
1,283 | for ( int x = 0; x < inv.getWidth(); ++x )
{
for ( int y = 0; y < inv.getHeight(); ++y )
{
final ItemStack is = inv.getStackInRowAndColumn( x, y );
<BUG>if ( is != null )
{</BUG>
if ( is.getItem() instanceof ItemBitSaw )
{
if ( r.sawPosX != -1 )
| if ( !ModUtil.isEmpty( is ) )
|
1,284 | import org.apache.sling.jcr.resource.JcrResourceConstants;
import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
import org.apache.sling.jcr.resource.internal.helper.MapEntries;
import org.apache.sling.jcr.resource.internal.helper.Mapping;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
<BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG>
import org.junit.runner.RunWith;
| import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
|
1,285 | @PerformanceTestSuite
public ParameterizedTestList testPerformance() throws Exception {
Helper helper = new Helper();
ParameterizedTestList testCenter = new ParameterizedTestList();
testCenter.setTestSuiteTitle("jcr.resource-2.0.10");
<BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
</BUG>
return testCenter;
| testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10));
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50));
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWithManyAliasTest",helper, 1000));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
|
1,286 | package org.apache.sling.performance;
<BUG>import static org.mockito.Mockito.*;
import javax.jcr.NamespaceRegistry;</BUG>
import javax.jcr.Session;
import junitx.util.PrivateAccessor;
| import static org.mockito.Mockito.when;
import static org.mockito.Mockito.mock;
import javax.jcr.NamespaceRegistry;
|
1,287 | import org.apache.sling.jcr.resource.JcrResourceConstants;
import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
import org.apache.sling.jcr.resource.internal.helper.MapEntries;
import org.apache.sling.jcr.resource.internal.helper.Mapping;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
<BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG>
import org.junit.runner.RunWith;
| import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
|
1,288 | import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.resource.JcrResourceConstants;
import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
<BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG>
import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator;
| import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
|
1,289 | @PerformanceTestSuite
public ParameterizedTestList testPerformance() throws Exception {
Helper helper = new Helper();
ParameterizedTestList testCenter = new ParameterizedTestList();
testCenter.setTestSuiteTitle("jcr.resource-2.2.0");
<BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
</BUG>
return testCenter;
| testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10));
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50));
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith1000AliasTest",helper, 1000));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000));
testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
|
1,290 | public static void historyWithLinks(final Project project,
FilePath path,
@Nullable final SymbolicRefsI refs,
@NotNull final AsynchConsumer<GitCommit> gitCommitConsumer,
@Nullable final Getter<Boolean> isCanceled,
<BUG>@Nullable Collection<VirtualFile> paths, final String... parameters) throws VcsException {
path = getLastCommitName(project, path);</BUG>
final VirtualFile root = GitUtil.getGitRoot(path);
final GitLineHandler h = new GitLineHandler(project, root, GitCommand.LOG);
final GitLogParser parser = new GitLogParser(project, GitLogParser.NameStatus.STATUS, SHORT_HASH, HASH, COMMIT_TIME, AUTHOR_NAME, AUTHOR_TIME, AUTHOR_EMAIL,
| @Nullable Collection<VirtualFile> paths,
boolean fullHistory, final String... parameters) throws VcsException {
path = getLastCommitName(project, path);
|
1,291 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
1,292 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
1,293 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
1,294 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
1,295 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
1,296 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
1,297 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
1,298 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
1,299 | import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
<BUG>import java.util.Set;
import com.landawn.abacus.util.Multimap;</BUG>
import com.landawn.abacus.util.Multiset;
import com.landawn.abacus.util.N;
import com.landawn.abacus.util.Optional;
| import com.landawn.abacus.util.Builder;
import com.landawn.abacus.util.Multimap;
|
1,300 | boolean containsColumn(String columnName);
boolean containsColumnAll(Collection<String> columnNames);
void renameColumn(String columnName, String newColumnName);
void renameColumn(Map<String, String> oldNewNames);
void renameColumn(String columnName, Function<String, String> func);
<BUG>void renameColumn(Collection<String> columnNames, Function<String, String> func);
<T> T get(int rowIndex, int columnIndex);</BUG>
<T> T get(Class<T> targetClass, int rowIndex, int columnIndex);
void set(int rowIndex, int columnIndex, Object element);
boolean isNull(int rowIndex, int columnIndex);
| void moveColumn(String columnName, int newPosition);
void moveColumn(Map<String, Integer> columnNameNewPositionMap);
<T> T get(int rowIndex, int columnIndex);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.