id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
2,201
import org.mule.umo.UMOException; import org.mule.umo.endpoint.UMOEndpoint; import org.mule.umo.lifecycle.InitialisationException; import org.mule.umo.lifecycle.LifecycleException; import org.mule.umo.provider.UMOConnector; <BUG>import org.mule.umo.provider.UMOMessageAdapter; import javax.jms.Destination;</BUG> import ...
import org.mule.util.PropertiesHelper; import javax.jms.Destination;
2,202
JmsSupport jmsSupport = this.connector.getJmsSupport(); if (session == null) { session = this.connector.getSession(endpoint); } String resourceInfo = endpoint.getEndpointURI().getResourceInfo(); <BUG>boolean topic = (resourceInfo != null && "topic".equalsIgnoreCase(resourceInfo)); Destination dest = jmsSupport.createDe...
if(!topic) topic = PropertiesHelper.getBooleanProperty(endpoint.getProperties(), "topic", false); Destination dest = jmsSupport.createDestination(session, endpoint.getEndpointURI().getAddress(), topic);
2,203
import ml.puredark.hviewer.ui.activities.BaseActivity; import ml.puredark.hviewer.ui.dataproviders.ListDataProvider; import ml.puredark.hviewer.ui.fragments.SettingFragment; import ml.puredark.hviewer.ui.listeners.OnItemLongClickListener; import ml.puredark.hviewer.utils.SharedPreferencesUtil; <BUG>import static androi...
import static ml.puredark.hviewer.R.id.container; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {
2,204
final PictureViewHolder viewHolder = new PictureViewHolder(view); if (pictures != null && position < pictures.size()) { final Picture picture = pictures.get(getPicturePostion(position)); if (picture.pic != null) { loadImage(container.getContext(), picture, viewHolder); <BUG>} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE...
} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null) { if(site.extraRule.pictureRule != null && site.extraRule.pictureRule.url != null) getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureRule.url, site.extraRule.pictureRule.highRes); else if(site.extr...
2,205
import java.util.regex.Pattern; import butterknife.BindView; import butterknife.ButterKnife; import ml.puredark.hviewer.R; import ml.puredark.hviewer.beans.Category; <BUG>import ml.puredark.hviewer.beans.CommentRule; import ml.puredark.hviewer.beans.Rule;</BUG> import ml.puredark.hviewer.beans.Selector; import ml.pured...
import ml.puredark.hviewer.beans.PictureRule; import ml.puredark.hviewer.beans.Rule;
2,206
inputGalleryRulePictureUrlReplacement.setText(site.galleryRule.pictureUrl.replacement); } if (site.galleryRule.pictureHighRes != null) { inputGalleryRulePictureHighResSelector.setText(joinSelector(site.galleryRule.pictureHighRes)); inputGalleryRulePictureHighResRegex.setText(site.galleryRule.pictureHighRes.regex); <BUG...
[DELETED]
2,207
inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement); } if (site.extraRule.commentContent != null) { inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent)); inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex); <BUG>inp...
[DELETED]
2,208
lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement); lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement); lastSite.galleryRule.datetime = load...
lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule; lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); l...
2,209
lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement); lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement); lastSite.extraRule.datetime = loadSelector(inputExtr...
lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule; lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraR...
2,210
notifyItemChanged(position); if (mItemClickListener != null) mItemClickListener.onItemClick(v, position); } }); <BUG>if (tag.selected) label.getChildAt(0).setBackgroundResource(R.color.colorPrimary); else label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG> }
[DELETED]
2,211
loadPicture(picture, task, null, true); } else if (!TextUtils.isEmpty(picture.pic) && !highRes) { picture.retries = 0; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) <BUG>&& task.collection.site.extraRule != null && task.collection.site.extraRule.pic...
&& task.collection.site.extraRule != null) { if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null) getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes); else if(task.collection.site.ext...
2,212
if (Picture.hasPicPosfix(picture.url)) { picture.pic = picture.url; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) { <BUG>new Handler(Looper.getMainLooper()).post(()->{ </BUG> WebView webView = new WebView(HViewerApplication.mContext); WebSettings mWebSettings...
new Handler(Looper.getMainLooper()).post(() -> {
2,213
package de.akquinet.engineering.vaadinator.mojo; <BUG>import java.io.File; import java.util.List;</BUG> import java.util.Map; import java.util.Set; import org.apache.maven.plugin.logging.Log;
import java.util.HashMap; import java.util.List;
2,214
this.commonMap = commonMap; this.displayProfileNames = displayProfileNames; this.genServletBase = genServletBase; this.hasDisplayBeans = hasDisplayBeans; this.hasServiceBeans = hasServiceBeans; <BUG>this.log = log; }</BUG> public String getProjectName() { return projectName; }
this.generatorOptions = generatorOptions;
2,215
private MavenProject project; private String[] includes = null; private String[] excludes = null; private String genType = VaadinatorConfig.GenType.ALL.toString(); private String artifactType = VaadinatorConfig.ArtifactType.PLAIN.toString(); <BUG>private boolean generateServlet = true; public void execute() throws Mojo...
private Map<String, String> generatorOptions = new HashMap<>(); public void execute() throws MojoExecutionException {
2,216
commonMap.put("beans", beanDescriptions); List<CodeGenerator> codeGenerators = initGenerators(); for (CodeGenerator codeGenerator : codeGenerators) { codeGenerator.generateCode(new VaadinatorConfig(projectName, basePckg, beanDescriptions, artifactTypeEn, genTypeEn, targetFolderBaseStart, targetFolderSrcStart, targetFol...
targetFolderTestResStart, commonMap, displayProfileNames, genServletBase, hasDisplayBeans, hasServiceBeans, getLog(), generatorOptions));
2,217
import de.akquinet.engineering.vaadinator.mojo.VaadinatorConfig; public class WebDriverCodeGenerator implements CodeGenerator { private static final String TEMPLATE_PACKAGE = "/org/vergien/vaadinator/templates/webdriver/"; @Override public void generateCode(VaadinatorConfig vaadinatorConfig) throws Exception { <BUG>vaa...
boolean generatePages = true; if ("false".equalsIgnoreCase(vaadinatorConfig.getGeneratorOptions().get("webDriverPages"))) { generatePages = false; } if (vaadinatorConfig.getGenTypeEn() == VaadinatorConfig.GenType.SOURCES
2,218
import jetbrains.mps.lang.editor.menus.transformation.MenuLocations; import jetbrains.mps.lang.editor.menus.SingleItemMenuPart; import org.jetbrains.annotations.Nullable; import jetbrains.mps.openapi.editor.menus.transformation.ActionItemBase; import org.jetbrains.annotations.NotNull; <BUG>import jetbrains.mps.smodel.a...
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import org.jetbrains.mps.openapi.model.SNode; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new;
2,219
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;</BUG> import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import org.jetbrains.mps.openapi.language.SAbstractConcept; import jetbrains.mps.internal.collection...
[DELETED]
2,220
public String getLabelText(String pattern) { return "Cell Collection"; } @Override public void execute(@NotNull String pattern) { <BUG>SNodeFactoryOperations.replaceWithNewChild(_context.getNode(), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eaff2...
SNodeOperations.replaceWithAnother(_context.getNode(), _quotation_createNode_puymhi_a0a0a0a0());
2,221
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
2,222
} @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);
2,223
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 != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
2,224
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(
2,225
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.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
2,226
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, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
2,227
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) {
2,228
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;
2,229
context.setAuthCache(authCache); ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpclient, context); ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build(); client.register(JacksonJaxbJsonProvider.class); client.register(JacksonObjectMapperProvider.class); <BUG>client.register(Req...
client.register(RestRequestFilter.class); client.register(RestResponseFilter.class);
2,230
import org.hawkular.alerts.api.model.condition.Condition; import org.hawkular.inventory.api.model.CanonicalPath; import org.hawkular.inventory.api.model.Tenant; import org.hawkular.inventory.json.DetypedPathDeserializer; import org.hawkular.inventory.json.InventoryJacksonConfig; <BUG>import org.hawkular.inventory.json....
import org.hawkular.inventory.json.mixins.model.CanonicalPathMixin;
2,231
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
2,232
super.onResume(); if (!mIsConnected) { mTango = new Tango(AugmentedRealityActivity.this, new Runnable() { @Override public void run() { <BUG>try { connectTango();</BUG> setupRenderer(); mIsConnected = true; } catch (TangoOutOfDateException e) {
TangoSupport.initialize(); connectTango();
2,233
if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) { mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics); mCameraPoseTimestamp = lastFramePose.timestamp;</BUG> } else { <BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread); }</BUG> } } } @Override
mRenderer.updateRenderCameraPose(lastFramePose); mCameraPoseTimestamp = lastFramePose.timestamp; Log.w(TAG, "Can't get device pose at time: " +
2,234
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
2,235
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
2,236
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
2,237
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; <BUG>import static org.mockito.Mockito.verify; import java.util.Dictionary;</BUG> import java.util.Hashtable; i...
import java.util.Collection; import java.util.Dictionary;
2,238
ServiceReference<?> refInteger = bundleContext.getServiceReference(Integer.class.getName()); assertSame(reg3.getReference(), refInteger); ServiceReference<?>[] refsString = bundleContext.getServiceReferences(String.class.getName(), null); assertEquals(2, refsString.length); assertSame(reg1.getReference(), refsString[0]...
Collection<ServiceReference<String>> refColString = bundleContext.getServiceReferences(String.class, null); assertEquals(2, refColString.size()); assertSame(reg1.getReference(), refColString.iterator().next()); ServiceReference<?>[] refsInteger = bundleContext.getServiceReferences(Integer.class.getName(), null);
2,239
recovery.recover(clogs); return recovery.blockForWrites(); <BUG>} catch (IOException e) { if (e instanceof UnknownColumnFamilyException) logger.error("Commit log replay failed due to replaying a mutation for a missing table. This error can be ignored by providing -Dcassandra.commitlog.stop_on_missing_tables=false on th...
[DELETED]
2,240
} public CommitLogDescriptor(long id) { this(current_version, id); } <BUG>@VisibleForTesting public static void writeHeader(ByteBuffer out, CommitLogDescriptor descriptor) {</BUG> out.putInt(0, descriptor.version); out.putLong(4, descriptor.id);
[DELETED]
2,241
private int readSyncMarker(CommitLogDescriptor descriptor, int offset, RandomAccessReader reader) throws IOException { if (offset > reader.length() - CommitLogSegment.SYNC_MARKER_SIZE) { if (offset != reader.length() && offset != Integer.MAX_VALUE) <BUG>{ String message = String.format("Encountered bad header at positi...
logger.warn("Encountered bad header at position {} of Commit log {}; not enough room for a header", offset, reader.getPath());
2,242
filecrc = reader.readInt() & 0xffffffffL; if (crc.getValue() != filecrc) { if (end != 0 || filecrc != 0) { <BUG>String message = String.format("Encountered bad header at position %d of Commit log %s, with invalid CRC. The end of segment marker should be zero.", offset, reader.getPath()); if (!IGNORE_ERRORS) throw new ...
logger.warn("Encountered bad header at position {} of commit log {}, with invalid CRC. The end of segment marker should be zero.", offset, reader.getPath());
2,243
break main; // last CL entry didn't get completely written. that's ok. } checksum.update(buffer, 0, serializedSize); if (claimedCRC32 != checksum.getValue()) { <BUG>if (!IGNORE_ERRORS) throw new IOException("Invalid checksum for mutation at position " + mutationStart + " of " + file);</BUG> continue; } FastByteArrayInp...
[DELETED]
2,244
for (Cell cell : cf) cf.getComparator().validate(cell.name()); } catch (UnknownColumnFamilyException ex) { <BUG>if (!IGNORE_MISSING_TABLES) throw ex;</BUG> if (ex.cfId == null) continue; AtomicInteger i = invalidMutations.get(ex.cfId);
[DELETED]
2,245
import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Directories; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.db.SystemKeyspace; <BUG>import org.apache.cassandra.db.UnknownColumnFamilyException; import org.apache.cassandra.d...
[DELETED]
2,246
<BUG>package org.apache.jackrabbit.oak.plugins.nodetype; import java.util.ArrayList; import java.util.List; import javax.jcr.RepositoryException;</BUG> import javax.jcr.nodetype.NodeDefinition;
import static com.google.common.base.Preconditions.checkState; import javax.jcr.ValueFactory;
2,247
return OnParentVersionAction.COPY; } } @Override public boolean isProtected() { <BUG>return node.getBoolean(JcrConstants.JCR_PROTECTED); }</BUG> @Override public String toString() { return getName();
return getBoolean(JcrConstants.JCR_PROTECTED);
2,248
Integer datasetId; String datasetUrn; String capacityName; String capacityType; String capacityUnit; <BUG>String capacityLow; String capacityHigh; </BUG> Long modifiedTime;
Long capacityLow; Long capacityHigh;
2,249
import com.fasterxml.jackson.databind.ObjectMapper; public class DatasetFieldPathRecord { String fieldPath; String role; public DatasetFieldPathRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
2,250
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT...
public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
2,251
</BUG> public static final String GET_DATASET_CAPACITY_BY_DATASET_ID = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CAPACITY_BY_URN = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String ...
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT...
2,252
"SELECT * FROM " + DATASET_CASE_SENSITIVE_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_REFERENCE_BY_DATASET_ID = "SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_REFERENCE_BY_URN = "SELECT * FROM " + DATASET_REF...
public static final String DELETE_DATASET_REFERENCE_BY_DATASET_ID = "DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id=?";
2,253
"SELECT * FROM " + DATASET_SECURITY_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_OWNER_BY_DATASET_ID = "SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id = :dataset_id ORDER BY sort_id"; public static final String GET_DATASET_OWNER_BY_URN = "SELECT * FROM " + DATASET_OWNE...
public static final String DELETE_DATASET_OWNER_BY_DATASET_ID = "DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id=?";
2,254
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " +...
public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?";
2,255
</BUG> public static final String GET_DATASET_INDEX_BY_DATASET_ID = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_INDEX_BY_URN = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATAS...
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " +...
2,256
DatasetSecurityRecord record = om.convertValue(security, DatasetSecurityRecord.class); record.setDatasetId(datasetId); record.setDatasetUrn(urn); record.setModifiedTime(System.currentTimeMillis() / 1000); try { <BUG>Map<String, Object> result = getDatasetSecurityByDatasetId(datasetId); </BUG> String[] columns = record....
DatasetSecurityRecord result = getDatasetSecurityByDatasetId(datasetId);
2,257
"confidential_flags", "is_recursive", "partitioned", "indexed", "namespace", "default_comment_id", "comment_ids"}; } @Override public List<Object> fillAllFields() { return null; <BUG>} public String[] getFieldDetailColumns() {</BUG> return new String[]{"dataset_id", "sort_id", "parent_sort_id", "parent_path", "field_na...
@JsonIgnore public String[] getFieldDetailColumns() {
2,258
partitioned != null && partitioned ? "Y" : "N", isRecursive != null && isRecursive ? "Y" : "N", confidentialFlags, defaultValue, namespace, defaultCommentId, commentIds}; } public DatasetFieldSchemaRecord() { } <BUG>@Override public String toString() { try { return new ObjectMapper().writeValueAsString(this.getFieldVal...
[DELETED]
2,259
String fieldPath; String descend; Integer prefixLength; String filter; public DatasetFieldIndexRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
2,260
String actorUrn; String type; Long time; String note; public DatasetChangeAuditStamp() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
2,261
package wherehows.common.schemas; <BUG>import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.reflect.Field; import java.util.HashMap;</BUG> import java.util.List; import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Date; import java.util.Collection; import java.util.HashMap;
2,262
package kieker.monitoring.writernew; import java.lang.Thread.State; import java.util.concurrent.BlockingQueue; <BUG>import java.util.concurrent.LinkedBlockingQueue; import org.junit.Test;</BUG> import kieker.Await; import kieker.common.configuration.Configuration; import kieker.common.record.IMonitoringRecord;
import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test;
2,263
System.setProperty("java.util.logging.config.file", rootExecutionDir + "logging.properties"); } public MonitoringWriterThreadTest() { super(); } <BUG>@Test(timeout = 10000) public void testTermination() throws Exception {</BUG> final Configuration configuration = new Configuration(); final AbstractMonitoringWriter writ...
@Test public void testTermination() throws Exception {
2,264
thread.start(); while (!writerQueue.isEmpty()) { Thread.yield(); } thread.terminate(); <BUG>thread.join(); }</BUG> @Test public void testBlocking() throws Exception { final Configuration configuration = new Configuration();
thread.join(THREAD_STATE_CHANGE_TIMEOUT_IN_MS); Assert.assertThat(thread.getState(), CoreMatchers.is(State.TERMINATED));
2,265
package kieker.monitoring.core.controller; <BUG>import java.lang.Thread.State; import org.jctools.queues.MpscArrayQueue; import org.junit.Test;</BUG> import kieker.Await; import kieker.common.configuration.Configuration;
import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test;
2,266
import kieker.common.configuration.Configuration; import kieker.common.record.misc.EmptyRecord; import kieker.monitoring.core.configuration.ConfigurationFactory; import kieker.monitoring.writernew.dump.DumpWriter; public class WriterControllerTest { <BUG>private static final int THREAD_STATE_CHANGE_TIMEOUT_IN_MS = 1000...
private static final long CONTROLLER_TIMEOUT_IN_MS = 1000; public WriterControllerTest() {
2,267
import java.util.LinkedList; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; public abstract class NodeCopyPrimitive extends UpdatePrimitive { LinkedList<Iter> c; <BUG>final boolean a; protected NodeCopyPrimitive(final Nod n, final Iter copy, final boolean attr) {</BUG> super(n);
protected NodeCopyPrimitive(final Nod n, final Iter copy) {
2,268
import static org.basex.query.QueryText.*; import org.basex.query.QueryException; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; import org.basex.query.util.Err; <BUG>public class InsertAfterPrimitive extends NodeCopyPrimitive { public InsertAfterPrimitive(final Nod n, final Iter copy, final boole...
public class InsertAfterPrimitive extends InsertPrimitive { public InsertAfterPrimitive(final Nod n, final Iter copy, final int l) { super(n, copy, l);
2,269
package org.basex.query.up.primitives; <BUG>import org.basex.query.QueryException; import org.basex.query.item.Nod;</BUG> public abstract class UpdatePrimitive { public final Nod node; boolean mult;
import org.basex.query.item.DBNode; import org.basex.query.item.Nod;
2,270
import static org.basex.query.QueryText.*; import org.basex.query.QueryException; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; import org.basex.query.util.Err; <BUG>public class InsertIntoFirstPrimitive extends NodeCopyPrimitive { public InsertIntoFirstPrimitive(final Nod n, final Iter copy, fin...
public class InsertIntoFirstPrimitive extends InsertPrimitive { public InsertIntoFirstPrimitive(final Nod n, final Iter copy, final int l) { super(n, copy, l);
2,271
import static org.basex.query.QueryText.*; import org.basex.query.QueryException; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; import org.basex.query.util.Err; <BUG>public class InsertIntoLastPrimitive extends NodeCopyPrimitive { public InsertIntoLastPrimitive(final Nod n, final Iter copy, final...
public class InsertIntoLastPrimitive extends InsertPrimitive { public InsertIntoLastPrimitive(final Nod n, final Iter copy, final int l) { super(n, copy, l);
2,272
import static org.basex.query.QueryText.*; import org.basex.query.QueryException; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; import org.basex.query.util.Err; <BUG>public class InsertBeforePrimitive extends NodeCopyPrimitive { public InsertBeforePrimitive(final Nod n, final Iter copy, final boo...
public class InsertBeforePrimitive extends InsertPrimitive { public InsertBeforePrimitive(final Nod n, final Iter copy, final int l) { super(n, copy, l);
2,273
import org.basex.query.item.Item; import org.basex.query.item.Nod; import org.basex.query.iter.Iter; import org.basex.query.iter.SeqIter; import org.basex.query.up.UpdateFunctions; <BUG>public class InsertIntoPrimitive extends NodeCopyPrimitive { public InsertIntoPrimitive(final Nod n, final Iter copy, final boolean ...
public class InsertIntoPrimitive extends InsertPrimitive { public InsertIntoPrimitive(final Nod n, final Iter copy, final int l) { super(n, copy, l);
2,274
final Data d = n.data; MemData m = null; if(seq.size() == 0 && aSeq.size() == 0) return; if(seq.size() > 0) { m = buildDB(seq, ((DBNode) node).data); <BUG>d.insertSeq(n.pre + d.attSize(n.pre, Nod.kind(n.type)), n.pre, m); }</BUG> if(aSeq.size() > 0) { m = buildDB(aSeq, ((DBNode) node).data); UpdateFunctions.insertAttri...
d.insertSeq(loc, n.pre, m); }
2,275
package org.basex.query.expr; import static org.basex.query.QueryText.*; import org.basex.data.Data; import org.basex.query.QueryContext; <BUG>import org.basex.query.QueryException; import org.basex.query.item.FTxt;</BUG> import org.basex.query.item.Item; import org.basex.query.item.Nod; import org.basex.query.iter.Ite...
import org.basex.query.item.DBNode; import org.basex.query.item.FTxt;
2,276
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
2,277
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(...
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
2,278
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
2,279
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THR...
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.g...
2,280
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_...
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART...
2,281
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
2,282
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
2,283
import org.wso2.carbon.kernel.config.model.DeploymentModeEnum; import org.wso2.carbon.kernel.utils.CarbonServerInfo; import javax.inject.Inject; import java.nio.file.Path; import java.nio.file.Paths; <BUG>import java.util.ArrayList; import java.util.List;</BUG> import static org.wso2.carbon.container.options.CarbonDist...
[DELETED]
2,284
@Inject private CarbonRuntime carbonRuntime; @Inject private CarbonServerInfo carbonServerInfo; @Configuration <BUG>public Option[] createConfiguration() { List<Option> optionList = new ArrayList<>(); optionList.add(copyCarbonYAMLOption()); return optionList.toArray(new Option[optionList.size()]);</BUG> }
private BundleContext bundleContext; return new Option[] { copyCarbonYAMLOption() };
2,285
import org.wso2.carbon.kernel.utils.CarbonServerInfo; import org.wso2.carbon.kernel.utils.Utils; import javax.inject.Inject; import java.nio.file.Path; import java.nio.file.Paths; <BUG>import java.util.ArrayList; import java.util.List;</BUG> import static org.wso2.carbon.container.options.CarbonDistributionOption.copyF...
[DELETED]
2,286
@Inject private BundleContext bundleContext; @Inject private CarbonServerInfo carbonServerInfo; @Configuration <BUG>public Option[] createConfiguration() { List<Option> optionList = new ArrayList<>(); optionList.add(copyCarbonYAMLOption()); return optionList.toArray(new Option[optionList.size()]);</BUG> }
return new Option[] { copyCarbonYAMLOption() };
2,287
import javax.management.MBeanServer; import javax.management.ObjectName; import java.lang.management.ManagementFactory; import java.nio.file.Path; import java.nio.file.Paths; <BUG>import java.util.ArrayList; import java.util.List;</BUG> import static org.wso2.carbon.container.options.CarbonDistributionOption.copyFile; ...
[DELETED]
2,288
} carbonYmlFilePath = Paths.get(basedir, "src", "test", "resources", "jmx", "carbon.yml"); return copyFile(carbonYmlFilePath, Paths.get("conf", "carbon.yml")); } @Configuration <BUG>public Option[] createConfiguration() { List<Option> optionList = new ArrayList<>(); optionList.add(copyCarbonYAMLOption()); return option...
return new Option[] { copyCarbonYAMLOption() };
2,289
Debug.checkNull("mysql_connection", this.mysql_connection); return this.mysql_connection; } @Override public String toString () { <BUG>return "MySQLConnection[" + this.dataSource.getUrl() + " : " + this.dataSource.getURL() + "]"; }</BUG> @Override protected void finalize () throws Throwable { super.finalize();
return "MySQLConnection[" + this.mySQL.getUrl() + "]";
2,290
package com.jfixby.cmns.adopted.gdx.log; import com.badlogic.gdx.Application; import com.badlogic.gdx.Gdx; import com.jfixby.cmns.api.collections.EditableCollection; <BUG>import com.jfixby.cmns.api.collections.Map; import com.jfixby.cmns.api.log.LoggerComponent;</BUG> import com.jfixby.cmns.api.util.JUtils; public clas...
import com.jfixby.cmns.api.err.Err; import com.jfixby.cmns.api.log.LoggerComponent;
2,291
package com.jfixby.red.collections; <BUG>import com.jfixby.cmns.api.java.IntValue; import com.jfixby.cmns.api.math.FloatMath;</BUG> public class RedHistogrammValue { private RedHistogramm master; public RedHistogrammValue (RedHistogramm redHistogramm) {
import com.jfixby.cmns.api.java.Int; import com.jfixby.cmns.api.math.FloatMath;
2,292
public static final String PackageName = "app.version.package_name"; } public static final String VERSION_FILE_NAME = "version.json"; private static final long serialVersionUID = 6662721574596241247L; public String packageName; <BUG>public int major = -1; public int minor = -1; public VERSION_STAGE stage = null; publ...
public String major = ""; public String minor = ""; public String build = "";
2,293
<BUG>package com.jfixby.cmns.db.mysql; import com.jfixby.cmns.api.debug.Debug;</BUG> import com.jfixby.cmns.api.log.L; import com.jfixby.cmns.db.api.DBComponent; import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.sql.Connection; import java.sql.SQLException; import com.jfixby.cmns.api.debug.Debug;
2,294
} public MySQLTable getTable (final String name) { return new MySQLTable(this, name); } public MySQLConnection obtainConnection () { <BUG>final MySQLConnection connection = new MySQLConnection(this.dataSource); connection.open();</BUG> return connection; } public void releaseConnection (final MySQLConnection connection...
public String getDBName () { return this.dbName; final MySQLConnection connection = new MySQLConnection(this); connection.open();
2,295
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
2,296
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
2,297
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
2,298
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
2,299
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.xbib.elasticsearch.common.langdetect.Language; import org.xbib.elasticsearch.common.langdetect.LanguageDetectionException; <BUG>import org.xbib.elasticsearch.commo...
import java.util.HashMap; import java.util.Map; private final static Map<String,LangdetectService> services = new HashMap<>();
2,300
private void addBuffer() { try { if (!isClosed && bufferQueue.size() <= BUFFER_QUEUE_SIZE) bufferQueue.put(new byte[size]); } catch (InterruptedException e) { <BUG>LOGGER.log(LogLevel.INFO, "Unable to add buffer to buffer queue", e); }</BUG> } } public AsyncBufferWriter(OutputStream outputStream, int size, ThreadFactor...
LOGGER.log(LogLevel.INFO, Messages.getString("HDFS_ASYNC_UNABLE_ADD_TO_QUEUE"), e);