id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
41,001 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
41,002 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
41,003 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
41,004 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
41,005 | lastThread = Thread.currentThread();
if (fakeProgressTimer == null) {
internalIncrProgress(amount);
}
}
<BUG>private synchronized void internalIncrProgress(double amount) {
</BUG>
current += amount;
if (current >= total) {
internalSetFinished();
| protected synchronized void internalIncrProgress(double amount) {
|
41,006 | fakeProgressTimer.stop();
}
}
@Override
public void setFakeProgress(boolean v) {
<BUG>if (v) {
fakeProgressTimer = new Timeline(new KeyFrame(Duration.seconds(0.1), new EventHandler<ActionEvent>() {
</BUG>
double x = 0;
@Override
| setTotal(1);
fakeProgressTimer = new Timeline(new KeyFrame(Duration.seconds(0.2), new EventHandler<ActionEvent>() {
|
41,007 | import java.util.Properties;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;
<BUG>import com.wilutions.com.BackgTask;
import com.wilutions.itol.db.Config;</BUG>
import com.wilutions.itol.db.IssueService;
import com.wilutions.itol.db.IssueServiceFactory;
import com.wilutions.itol.db.PasswordEncryption;
| import com.wilutions.com.DDAddinDll;
import com.wilutions.itol.db.Config;
|
41,008 | Logger log = Logger.getLogger(Globals.class.getName());
log.info("Logger initialized");
}
else {
Logger.getLogger("").setLevel(Level.SEVERE);
<BUG>}
}</BUG>
catch (Throwable e) {
System.out.println("Logger configuration not found or inaccessible. " + e);
}
| File ddaddinLogFile = new File(new File(logFile).getParent(), "itol-ddaddin.log");
DDAddinDll.openLogFile(ddaddinLogFile.getAbsolutePath(), logLevel, true);
|
41,009 | for (ASTNode child = getFirstChildNode(); child != null; child = child.getTreeNext()) {
if (child.textContains(c)) return true;
}
return false;
}
<BUG>protected int textMatches(CharSequence buffer, int start) {
</BUG>
int curOffset = start;
for (TreeElement child = getFirstChildNode(); child != null; child = child.getTreeNext()) {
curOffset = child.textMatches(buffer, curOffset);
| protected int textMatches(@NotNull CharSequence buffer, int start) {
|
41,010 | @Override
@Nullable
public <T extends PsiElement> T getPsi(Class<T> clazz) {
return LeafElement.getPsi(clazz, getPsi(), LOG);
}
<BUG>final PsiElement createAndStorePsi() {
</BUG>
PsiElement psi = createPsiNoLock();
myWrapper = psi;
return psi;
| private PsiElement createAndStorePsi() {
|
41,011 | public String toString() {
return "chameleon parsing lock";
}
}
<BUG>private final Object lock = new ChameleonLock();
</BUG>
private CharSequence myText;
public LazyParseableElement(@NotNull IElementType type, CharSequence text) {
super(type);
synchronized (lock) {
| private final ChameleonLock lock = new ChameleonLock();
|
41,012 | package mondrian.olap.fun;
import mondrian.calc.*;
import mondrian.calc.impl.*;
import mondrian.mdx.ResolvedFunCall;
<BUG>import mondrian.olap.*;
import mondrian.server.Locus;
import java.util.List;</BUG>
class FilterFunDef extends FunDefBase {
private static final String TIMING_NAME =
| import mondrian.server.Execution;
import mondrian.util.CancellationChecker;
import java.util.List;
|
41,013 | final BooleanCalc bcalc = (BooleanCalc) calcs[1];
final TupleIterable iterable =
icalc.evaluateIterable(evaluator);
final Evaluator evaluator2 = evaluator.push();
evaluator2.setNonEmpty(false);
<BUG>final int checkCancelPeriod =
MondrianProperties.instance().CancelPhaseInterval.get();</BUG>
return new AbstractTupleIterable(iterable.getArity()) {
public TupleCursor tupleCursor() {
return new AbstractTupleCursor(iterable.getArity()) {
| [DELETED] |
41,014 | import mondrian.calc.impl.*;
import mondrian.mdx.*;
import mondrian.olap.*;
import mondrian.olap.type.*;
import mondrian.resource.MondrianResource;
<BUG>import mondrian.rolap.*;
import mondrian.util.*;</BUG>
import org.apache.commons.collections.ComparatorUtils;
import org.apache.commons.collections.comparators.ComparatorChain;
import org.apache.log4j.Logger;
| import mondrian.server.Execution;
import mondrian.util.*;
|
41,015 | import mondrian.calc.impl.*;
import mondrian.mdx.*;
import mondrian.olap.*;
import mondrian.olap.type.*;
import mondrian.resource.MondrianResource;
<BUG>import mondrian.rolap.RolapEvaluator;
import mondrian.util.CartesianProductList;</BUG>
import org.apache.log4j.Logger;
import java.util.*;
public class CrossJoinFunDef extends FunDefBase {
| import mondrian.server.Execution;
import mondrian.server.Locus;
import mondrian.util.CancellationChecker;
import mondrian.util.CartesianProductList;
|
41,016 | List<Member> result)
{
final TupleList tupleList = lists.get(i);
final int partialSizeNext = partialSize + tupleList.getArity();
final int iNext = i + 1;
<BUG>final TupleCursor cursor = tupleList.tupleCursor();
while (cursor.forward()) {
cursor.currentToArray(partialArray, partialSize);</BUG>
if (i == lists.size() - 1) {
result.addAll(partial);
| int currentIteration = 0;
Execution execution = Locus.peek().execution;
CancellationChecker.checkCancelOrTimeout(
currentIteration++, execution);
cursor.currentToArray(partialArray, partialSize);
|
41,017 | int currentIteration = 0;
while (cursor.forward()) {</BUG>
cursor.setContext(evaluator);
for (Member member : memberSet) {
evaluator.setContext(member.getHierarchy().getAllMember());
<BUG>}
if (checkCancelPeriod > 0
&& currentIteration % checkCancelPeriod == 0)
{
query.getStatement().getCurrentExecution()
.checkCancelOrTimeout();
}</BUG>
if (checkData(
| Execution execution = query.getStatement().getCurrentExecution();
while (cursor.forward()) {
CancellationChecker.checkCancelOrTimeout(
currentIteration++, execution);
|
41,018 | package mondrian.olap.fun;
import mondrian.calc.*;
import mondrian.calc.impl.*;
import mondrian.mdx.ResolvedFunCall;
import mondrian.olap.*;
<BUG>import mondrian.olap.type.*;
import mondrian.server.Locus;
import java.util.*;</BUG>
class GenerateFunDef extends FunDefBase {
static final ReflectiveMultiResolver ListResolver =
| import mondrian.server.Execution;
import mondrian.util.CancellationChecker;
import java.util.*;
|
41,019 | this.arityOut = arityOut;
this.all = all;
}
public TupleList evaluateList(Evaluator evaluator) {
final int savepoint = evaluator.savepoint();
<BUG>final int checkCancelPeriod =
MondrianProperties.instance().CancelPhaseInterval.get();</BUG>
try {
evaluator.setNonEmpty(false);
final TupleIterable iterable1 =
| [DELETED] |
41,020 | if(worldIn.getTileEntity(pos) != null){
TileEntity te = worldIn.getTileEntity(pos);
if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null) && te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).getTemp() >= -273D + mult){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(-mult);
}
<BUG>for(EnumFacing dir : EnumFacing.values()){
if(te.hasCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir)){
te.getCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir).addEnergy(-mult, false, false);
break;</BUG>
}
| if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null)){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(mult);
|
41,021 | public static double betterRound(double numIn, int decPlac){
double opOn = Math.round(numIn * Math.pow(10, decPlac)) / Math.pow(10D, decPlac);
return opOn;
}
public static double centerCeil(double numIn, int tiers){
<BUG>return ((numIn > 0) ? Math.ceil(numIn * tiers) : Math.floor(numIn * tiers)) / tiers;
</BUG>
}
public static double findEfficiency(double speedIn, double lowerLimit, double upperLimit){
speedIn = Math.abs(speedIn);
| return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
|
41,022 | package com.Da_Technomancer.crossroads.API;
import com.Da_Technomancer.crossroads.API.DefaultStorageHelper.DefaultStorage;
import com.Da_Technomancer.crossroads.API.heat.DefaultHeatHandler;
import com.Da_Technomancer.crossroads.API.heat.IHeatHandler;
import com.Da_Technomancer.crossroads.API.magic.DefaultMagicHandler;
<BUG>import com.Da_Technomancer.crossroads.API.magic.IMagicHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultRotaryHandler;
import com.Da_Technomancer.crossroads.API.rotary.IRotaryHandler;
</BUG>
import net.minecraftforge.common.capabilities.Capability;
| import com.Da_Technomancer.crossroads.API.rotary.DefaultAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultCogHandler;
import com.Da_Technomancer.crossroads.API.rotary.IAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.ICogHandler;
|
41,023 | import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
public class Capabilities{
@CapabilityInject(IHeatHandler.class)
<BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY = null;
@CapabilityInject(IRotaryHandler.class)
public static Capability<IRotaryHandler> ROTARY_HANDLER_CAPABILITY = null;
</BUG>
@CapabilityInject(IMagicHandler.class)
| @CapabilityInject(IAxleHandler.class)
public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null;
@CapabilityInject(ICogHandler.class)
public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
|
41,024 | public IEffect getMixEffect(Color col){
if(col == null){
return effect;
}
int top = Math.max(col.getBlue(), Math.max(col.getRed(), col.getGreen()));
<BUG>if(top < rand.nextInt(128) + 128){
return voidEffect;</BUG>
}
return effect;
}
| if(top != 255){
return voidEffect;
|
41,025 | MyParentViewHolder vh =
(MyParentViewHolder) mRecyclerView.findViewHolderForAdapterPosition(
pvh.getAdapterPosition());
if (vh == null) return;
final ImageView arrow = vh.getView(R.id.arrow);
<BUG>if (vh.isExpandable() && arrow.getVisibility() != View.VISIBLE) {
arrow.setVisibility(View.VISIBLE);
}
final float currRotate=arrow.getRotation();
</BUG>
Logger.e(TAG, "currRotate=" + currRotate);
| if (arrow.getVisibility() != View.VISIBLE) return;
final float currRotate = arrow.getRotation();
|
41,026 | Logger.e(TAG,"onParentCollapsed="+parentPosition);
MyParentViewHolder vh =
(MyParentViewHolder) mRecyclerView.findViewHolderForAdapterPosition(
pvh.getAdapterPosition());
if (vh == null) return;
<BUG>final ImageView arrow = vh.getView(R.id.arrow);
if (!vh.isExpandable() && arrow.getVisibility() == View.VISIBLE) {
arrow.setVisibility(View.GONE);
}
final float currRotate=arrow.getRotation();
</BUG>
Logger.e(TAG,"currRotate="+currRotate);
| if (arrow.getVisibility() != View.VISIBLE) return;
final float currRotate = arrow.getRotation();
|
41,027 | dialog.show(getChildFragmentManager(), "dialog");
break;
case R.id.action_refresh:
adapter.notifyAllChanged();
break;
<BUG>case R.id.action_toggle_expandable_1:
MyParent parent = adapter.getData().get(1);
parent.setExpandable(!parent.isExpandable());
adapter.notifyParentItemChanged(1);</BUG>
break;
| adapter.toggleExpandable(1);
|
41,028 | package com.github.huajianjiang.expandablerecyclerview.widget;
import java.util.List;
<BUG>class ParentWrapper {
private static final String TAG = "ParentWrapper";
private Parent mParent;
private boolean mExpanded = false;
ParentWrapper(Parent parent) {
mParent = parent;
}
public Parent getParent() {
return mParent;</BUG>
}
| class ParentWrapper<P extends Parent, C> {
private P mParent;
private C mChild;
private boolean mExpandable = false;
ParentWrapper(P parent) {
|
41,029 | import android.view.ViewGroup;
import com.github.huajianjiang.expandablerecyclerview.widget.ExpandableAdapter;
public class Packager {
private static final String TAG = "Packager";
private static final int TYPE_SHIFT = 30;
<BUG>private static final int TYPE_MASK = 0x3 << TYPE_SHIFT;
public static final int ITEM_VIEW_TYPE_DEFAULT = 0 << TYPE_SHIFT;</BUG>
public static final int ITEM_VIEW_TYPE_PARENT = 1 << TYPE_SHIFT;
public static final int ITEM_VIEW_TYPE_CHILD = 2 << TYPE_SHIFT;
public static int makeItemViewTypeSpec(int clientViewType, int localViewType) {
| public static final int ITEM_VIEW_TYPE_ILLEGAL = -1;
public static final int ITEM_VIEW_TYPE_DEFAULT = 0 << TYPE_SHIFT;
|
41,030 | package com.github.huajianjiang.expandablerecyclerview.widget;
import android.os.Parcel;
import android.os.Parcelable;
import com.github.huajianjiang.expandablerecyclerview.util.Logger;
public class SavedState implements Parcelable {
<BUG>private static final String TAG = "SavedState";
private boolean[] mExpansionState;
public SavedState(boolean[] expansionState) {
mExpansionState = expansionState;</BUG>
}
| private boolean[] mExpandableState;
public SavedState(boolean[] expandableState, boolean[] expansionState) {
mExpandableState = expandableState;
mExpansionState = expansionState;
|
41,031 | import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class PresenterImpl implements IPresenter {
private static final String TAG = "PresenterImpl";
<BUG>private Random mRandom=new Random();
</BUG>
private ExpandableAdapter mAdapter;
private List<MyParent> mData;
public PresenterImpl(ExpandableAdapter adapter,List<MyParent> data) {
| private Random mRandom = new Random();
|
41,032 | Logger.e(TAG,"notifyParentItemInserted");
}
@Override
public void notifyParentItemRangeInserted(int parentPositionStart, int parentItemCount) {
for (int i = parentPositionStart; i < parentPositionStart + parentItemCount; i++) {
<BUG>MyParent myParent =getParentItem();
</BUG>
mData.add(i, myParent);
}
mAdapter.notifyParentItemRangeInserted(parentPositionStart,parentItemCount);
| MyParent myParent = getParentItem();
|
41,033 | MyChild myChild =new MyChild();
myChild.setType(mRandom.nextInt(2));
myChildren.add(i, myChild);
}
Logger.e(TAG,"myChildren="+ myChildren.size());
<BUG>mAdapter.notifyChildItemRangeInserted(parentPosition,childPositionStart,childItemCount);
</BUG>
autoNotifyAllChanged();
}
@Override
| mAdapter.notifyChildItemRangeInserted(parentPosition,childPositionStart,childItemCount,true);
|
41,034 | public int getItemCount() {
return mItems.size();
}
public abstract PVH onCreateParentViewHolder(ViewGroup parent, int parentType);
public abstract CVH onCreateChildViewHolder(ViewGroup child, int childType);
<BUG>public abstract void onBindParentViewHolder(PVH parentViewHolder, int parentPosition, Parent parent);
public abstract void onBindChildViewHolder(CVH childViewHolder, int parentPosition,
int childPosition, Object childListItem);
</BUG>
@Override
| public abstract void onBindParentViewHolder(PVH parentViewHolder, int parentPosition, P parent);
int childPosition, C child);
|
41,035 | return null;
}
private int getParentAdapterPosition(int parentPosition) {
if (parentPosition < 0) return RecyclerView.NO_POSITION;
int parentIndex = -1;
<BUG>int listItemCount = mItems.size();
for (int i = 0; i < listItemCount; i++) {
Object listItem = mItems.get(i);
if (listItem instanceof ParentWrapper) {</BUG>
parentIndex++;
| int itemCount = mItems.size();
for (int i = 0; i < itemCount; i++) {
if (mItems.get(i).isParent()) {
|
41,036 | } else if (pvh == null && expanded) {
Logger.e(TAG, "expandViews pvh is null---->parentPos=" + parentPosition +
",parentAdapterPos=" +
parentAdapterPos);
if (mPendingCollapsePositions.contains(parentPosition)) {
mPendingCollapsePositions.remove((Integer) parentPosition);
}
mPendingExpandPositions.add(parentPosition);
}
}
}
@SuppressWarnings("unchecked")
<BUG>private void syncViewCollapseState(int parentPosition,boolean force)
{</BUG>
Logger.e(TAG, "syncViewCollapseState=>" + parentPosition);
| pvh.setExpandable(parentWrapper.isExpandable());
notifyParentExpandableStateChanged(pvh, parentWrapper.isExpandable());
} else if (pvh == null) {
mPendingExpandablePositions.add(parentPosition);
|
41,037 | int parentPosition = mParents.indexOf(parent);
return collapseParent(parentPosition);
}
public void collapseAllParents() {
for (int i = 0; i < mParents.size(); i++) {
<BUG>collapseParent(i);
}</BUG>
}
public final void notifyParentItemInserted(int parentPosition) {
notifyParentItemRangeInserted(parentPosition, 1);
| private void notifyParentExpandableStateChanged(ParentViewHolder pvh, boolean expandable) {
int parentAdapterPos = pvh.getAdapterPosition();
for (OnParentExpandableStateChangeListener listener : mExpandableStateChangeListeners) {
int parentPos = parentAdapterPos - getBeforeExpandedChildCount(parentAdapterPos);
listener.onParentExpandableStateChanged(pvh, parentPos, expandable);
|
41,038 | int parentAdapterPos = getParentAdapterPosition(i);
if (parentAdapterPos == RecyclerView.NO_POSITION) {
allCollapsed = false;
break;
}
<BUG>ParentWrapper parentWrapper = (ParentWrapper) getItem(parentAdapterPos);
</BUG>
if (parentWrapper.isExpanded()) {
allCollapsed = false;
break;
| [DELETED] |
41,039 | if (fromParentPosition == toParentPosition) return;
int fromParentAdapterPos = getParentAdapterPosition(fromParentPosition);
int toParentAdapterPos = getParentAdapterPosition(toParentPosition);
if (fromParentAdapterPos == RecyclerView.NO_POSITION ||
toParentAdapterPos == RecyclerView.NO_POSITION) return;
<BUG>ParentWrapper fromParentWrapper = (ParentWrapper) getItem(fromParentAdapterPos);
ParentWrapper toParentWrapper = (ParentWrapper) getItem(toParentAdapterPos);
</BUG>
final boolean isFromExpanded = fromParentWrapper.isExpanded();
| ParentWrapper<P, C> fromParentWrapper = getItem(fromParentAdapterPos);
ParentWrapper<P, C> toParentWrapper = getItem(toParentAdapterPos);
|
41,040 | </BUG>
if (!fromParentWrapper.hasChildren(children)) return;
final int childCount = children.size();
for (int i = 0; i < childCount; i++) {
<BUG>Object fromChildItem = children.get(i);
if (fromChildItem == null) continue;
int fromChildAdapterPos =</BUG>
moveToBottom ? fromParentAdapterPos : fromParentAdapterPos + i + 1;
int toChildAdapterPos = moveToBottom ? moveToParentAdapterPos
| moveToParentAdapterPos = toParentAdapterPos;
}
mItems.add(moveToParentAdapterPos, fromParentWrapper);
notifyItemMoved(fromParentAdapterPos,moveToParentAdapterPos);
if (isFromExpanded) {
List<C> children = fromParentWrapper.getChildren();
C fromChild = children.get(i);
if (fromChild == null) continue;
int fromChildAdapterPos =
|
41,041 | @Test
public void testStarShapedIntersects() {
utils.filter(geoShape("location",
"POLYGON((-3.798180 40.444563,-3.789082 40.442473,-3.796077 40.437835, " +
"-3.793201 40.441427,-3.798180 40.444563))").operation("intersects"))
<BUG>.checkUnorderedStringColumns("place", "POINT_7", "POINT_8", "POINT_9");
}</BUG>
@Test
public void testStarShapedIntersects2() {
utils.filter(geoShape("location",
| .checkUnorderedColumns("place", "POINT_7", "POINT_8", "POINT_9");
}
|
41,042 | public void testStarShapedIntersects2() {
utils.filter(geoShape("location",
"POLYGON((-3.8012266 40.4384634, -3.7821293000000002 40.44178680000001, " +
"-3.7937164 40.4453468, -3.7937164 40.453054, -3.8012266 40.4384634))")
.operation("intersects"))
<BUG>.checkUnorderedStringColumns("place",
"POINT_7",</BUG>
"POINT_8",
"POINT_9",
"POINT_10",
| .checkUnorderedColumns("place",
"POINT_7",
|
41,043 | public void testStarShapedIsWithin2() {
utils.filter(geoShape("location",
"POLYGON((-3.8012266 40.4384634, -3.7821293000000002 40.44178680000001, " +
"-3.7937164 40.4453468, -3.7937164 40.453054, -3.8012266 40.4384634))")
.operation("is_within"))
<BUG>.checkUnorderedStringColumns("place",
"POINT_7",</BUG>
"POINT_8",
"POINT_9",
"POINT_10",
| .checkUnorderedColumns("place",
"POINT_7",
|
41,044 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
41,045 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
41,046 | 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"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
41,047 | 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_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
41,048 | 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, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
41,049 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
41,050 | for (int i=0 ; i<mProjectCount ; i++) {
String projectName = mCP.mProjectName + Integer.toString((i+1)); // TEST_PROJECT_X
IProject project = mProjectMapper.getProjectByID(projectName);
for (int j=0 ; j<mReleaseCount ; j++) {
String releaseID = Integer.toString(j+1);
<BUG>createSprint(project, j, mCR.getReleases().get(i).getStartDate());
</BUG>
for (int k=0 ; k<mEachCount ; k++) {
System.out.println("專案 " + projectName + ", 第 " + releaseID + " 個 release 加入 sprint-" + ( (j*mEachCount)+(k+1) ) + " 成功");
}
| createSprint(project, j, mCR.getReleases().get(i).getStartDateString());
|
41,051 | actionPerform(); // 執行 action
verifyForwardPath(null);
verifyForward(null);
verifyNoActionErrors();
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper((ProjectObject) request.getSession().getAttribute("Project"));
<BUG>ReleaseObject relasePlan = releasePlanHelper.getReleasePlan(Integer.toString(mCR.getReleaseCount()));
assertNull(relasePlan);</BUG>
project = null;
releasePlanHelper = null;
relasePlan = null;
| ReleaseObject relasePlan = releasePlanHelper.getReleasePlan(mCR.getReleaseCount());
assertNull(relasePlan);
|
41,052 | actionPerform(); // 執行 action
verifyForwardPath(null);
verifyForward(null);
verifyNoActionErrors();
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper((ProjectObject) request.getSession().getAttribute("Project"));
<BUG>ReleaseObject relasePlan = releasePlanHelper.getReleasePlan(Integer.toString(mCR.getReleaseCount()));
assertNotNull(relasePlan); // 沒有刪除掉第一筆 Release Plan</BUG>
project = null;
releasePlanHelper = null;
relasePlan = null;
| ReleaseObject relasePlan = releasePlanHelper.getReleasePlan(mCR.getReleaseCount());
assertNull(relasePlan);
|
41,053 | verifyForwardPath(null);
verifyForward(null);
verifyNoActionErrors();
assertEquals("true", response.getWriterBuffer().toString());
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper((ProjectObject) request.getSession().getAttribute("Project"));
<BUG>ReleaseObject releasePlan = releasePlanHelper.getReleasePlan(Integer.toString(mCR.getReleaseCount() + 1));
assertEquals(Integer.toString(mCR.getReleaseCount() + 1), releasePlan.getId());
assertEquals(releaseName, releasePlan.getName());
assertEquals(format.format(StartDate), releasePlan.getStartDate());
assertEquals(format.format(EndDate), releasePlan.getDueDate());
</BUG>
assertEquals(releaseDesc, releasePlan.getDescription());
| ReleaseObject releasePlan = releasePlanHelper.getReleasePlan(mCR.getReleaseCount() + 1);
assertEquals(mCR.getReleaseCount() + 1, releasePlan.getId());
assertEquals(format.format(StartDate), releasePlan.getStartDateString());
assertEquals(format.format(EndDate), releasePlan.getDueDateString());
|
41,054 | actionPerform(); // 執行 action
verifyForwardPath(null);
verifyForward(null);
verifyNoActionErrors();
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper((ProjectObject) request.getSession().getAttribute("Project"));
<BUG>ReleaseObject releasePlan = releasePlanHelper.getReleasePlan(Integer.toString(mCR.getReleaseCount()));
assertEquals(Integer.toString(mCR.getReleaseCount()), releasePlan.getId());
assertEquals(releaseName, releasePlan.getName());
assertEquals(format.format(StartDate), releasePlan.getStartDate());
assertEquals(format.format(EndDate), releasePlan.getDueDate());
</BUG>
assertEquals(releaseDesc, releasePlan.getDescription());
| assertEquals("true", response.getWriterBuffer().toString());
ReleaseObject releasePlan = releasePlanHelper.getReleasePlan(mCR.getReleaseCount() + 1);
assertEquals(mCR.getReleaseCount() + 1, releasePlan.getId());
assertEquals(format.format(StartDate), releasePlan.getStartDateString());
assertEquals(format.format(EndDate), releasePlan.getDueDateString());
|
41,055 | </BUG>
if (mSprintBacklogMapper.getSprintEndDate().getTime() > (new Date()).getTime()) {
isCurrentSprint = true;
}
<BUG>sprintInfoUI = new SprintInfoUI(currentSprintID, mSprintBacklogMapper.getSprintGoal(), currentPoint, currentHours, releaseID, isCurrentSprint);
</BUG>
} else {
sprintInfoUI = new SprintInfoUI();
}
Gson gson = new Gson();
| long currentSprintID = mSprintBacklogMapper.getSprintId();
double currentPoint = mSprintBacklogLogic.getStoryUnclosedPoints();
double currentHours = mSprintBacklogLogic.getTaskRemainsPoints();
boolean isCurrentSprint = false;
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper(mProject);
long releaseId = releasePlanHelper.getReleaseIdBySprintId(currentSprintID);
sprintInfoUI = new SprintInfoUI(currentSprintID, mSprintBacklogMapper.getSprintGoal(), currentPoint, currentHours, releaseId, isCurrentSprint);
|
41,056 | private double CurrentStoryPoint = 0d;
private double CurrentTaskPoint = 0d;
private String ReleaseID = "Release None";
private boolean isCurrentSprint = false;
public SprintInfoUI() {}
<BUG>public SprintInfoUI(long id, String goal, double sp, double tp, String rid, boolean current) {
</BUG>
ID = id;
SprintGoal = goal;
CurrentStoryPoint = sp;
| public SprintInfoUI(long id, String goal, double sp, double tp, long releaseId, boolean current) {
|
41,057 | </BUG>
ID = id;
SprintGoal = goal;
CurrentStoryPoint = sp;
CurrentTaskPoint = tp;
<BUG>ReleaseID = "Release #" + rid;
</BUG>
isCurrentSprint = current;
}
}
| private double CurrentStoryPoint = 0d;
private double CurrentTaskPoint = 0d;
private String ReleaseID = "Release None";
private boolean isCurrentSprint = false;
public SprintInfoUI() {}
public SprintInfoUI(long id, String goal, double sp, double tp, long releaseId, boolean current) {
ReleaseID = "Release #" + releaseId;
|
41,058 | package ntut.csie.ezScrum.test.CreateData;
import ntut.csie.ezScrum.issue.sql.service.core.Configuration;
import ntut.csie.ezScrum.iteration.core.ScrumEnum;
<BUG>import ntut.csie.ezScrum.web.dataInfo.AccountInfo;
import ntut.csie.ezScrum.web.dataObject.ProjectObject;
import ntut.csie.ezScrum.web.dataObject.AccountObject;</BUG>
import ntut.csie.ezScrum.web.helper.AccountHelper;
import ntut.csie.ezScrum.web.mapper.AccountMapper;
| import ntut.csie.ezScrum.web.dataObject.AccountObject;
|
41,059 | public void setNowAccountIsSystem() {
mAccount = new AccountMapper().getAccount("admin");;
}
public void setEnable(CreateAccount CA, int index, Boolean isEnable) {
AccountObject account = CA.getAccountList().get(index);
<BUG>AccountHelper helper = new AccountHelper(mConfig.getUserSession());
AccountInfo user = new AccountInfo();</BUG>
user.id = account.getId();
user.username = account.getUsername();
user.nickName = account.getNickName();
| AccountHelper helper = new AccountHelper();
AccountInfo user = new AccountInfo();
|
41,060 | user.email = account.getEmail();
user.enable = isEnable;
helper.updateAccount(user);
}
private void updateAccount(long projectId, String role) {
<BUG>AccountHelper helper = new AccountHelper(mConfig.getUserSession());
try {</BUG>
helper.addAssignedRole(mAccount.getId(), projectId, role);
} catch (Exception e) {
e.printStackTrace();
| AccountHelper helper = new AccountHelper();
try {
|
41,061 | public void testGetProjcetMembers3() throws Exception {
CreateAccount CA = new CreateAccount(1);
CA.exe();
AddUserToRole AUTR = new AddUserToRole(mCP, CA);
AUTR.exe_PO();
<BUG>AccountHelper accountHelper = new AccountHelper(mConfig.getUserSession());
accountHelper.removeAssignRole(CA.getAccountList().get(0).getId(), mCP.getAllProjects().get(0).getId(), ScrumEnum.SCRUMROLE_PRODUCTOWNER);</BUG>
AUTR.exe_SM();
String projectName = this.mIProject.getName();
request.setHeader("Referer", "?PID=" + projectName);
| AccountHelper accountHelper = new AccountHelper();
accountHelper.removeAssignRole(CA.getAccountList().get(0).getId(), mCP.getAllProjects().get(0).getId(), ScrumEnum.SCRUMROLE_PRODUCTOWNER);
|
41,062 | currentSprintId = mSprintBacklogMapper.getSprintId();
totalStoryPoints = mSprintBacklogLogic.getTotalStoryPoints();
limitedPoint = mSprintBacklogMapper.getLimitedPoint();
totalTaskPoints = mSprintBacklogLogic.getTotalTaskPoints();
ReleasePlanHelper releasePlanHelper = new ReleasePlanHelper(
<BUG>mProject);
releaseId = Integer.parseInt(releasePlanHelper
.getReleaseIdBySprintId(currentSprintId));</BUG>
sprintGoal = mSprintBacklogMapper.getSprintGoal();
result = Translation.translateSprintBacklogToJson(stories,
| releaseId = releasePlanHelper.getReleaseIdBySprintId(currentSprintId);
|
41,063 | Double taskPoint = sprintInfo.CurrentTaskPoint;
assertEquals(String.valueOf(mCS.getSprintsId().get(0)), String.valueOf(sprintInfo.ID));
assertEquals(mCS.TEST_SPRINT_GOAL + mCS.getSprintsId().get(0), sprintInfo.SprintGoal);
assertEquals(STORY_COUNT * STORY_EST, storyPoint.intValue());
assertEquals(STORY_COUNT * TASK_COUNT * TASK_EST, taskPoint.intValue());
<BUG>assertEquals("Release #0", sprintInfo.ReleaseID);
</BUG>
assertEquals(true, sprintInfo.isCurrentSprint);
}
public void testGetSprintInfoForTaskBoard_2() throws Exception {
| assertEquals("Release #-1", sprintInfo.ReleaseID);
|
41,064 | return responseText.toString();
}
public static String translateSprintBacklogToJson(
ArrayList<StoryObject> stories, long currentSprintId,
double currentPoint, double limitedPoint, double taskPoint,
<BUG>int releaseId, String sprintGoal) {
</BUG>
TranslateSpecialChar translateChar = new TranslateSpecialChar();
JSONObject responseText = new JSONObject();
try {
| public static String translateStoryToJson(StoryObject story) {
ArrayList<StoryObject> storie = new ArrayList<StoryObject>();
storie.add(story);
return translateStoriesToJson(storie);
public static String translateStoriesToJson(ArrayList<StoryObject> stories) {
|
41,065 | sprint.put("LimitedPoint", limitedPoint);
sprint.put("TaskPoint", taskPoint);
sprint.put(
"ReleaseID",
"Release #"
<BUG>+ translateChar.HandleNullString(Integer
</BUG>
.toString(releaseId)));
sprint.put("SprintGoal", sprintGoal);
responseText.put("Sprint", sprint);
| + translateChar.HandleNullString(Long
|
41,066 | ini.exe();
mCP = new CreateProject(mProjectCount);
mCP.exeCreate();
mCA = new CreateAccount(3);
mCA.exe();
<BUG>mAccountHelper = new AccountHelper(mConfig.getUserSession());
ini = null;</BUG>
}
@After
public void tearDown() throws IOException, Exception {
| mAccountHelper = new AccountHelper();
ini = null;
|
41,067 | package rocks.paperwork.android.data;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
<BUG>import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;</BUG>
import android.support.annotation.NonNull;
public class NoteContentProvider extends ContentProvider
{
| import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
|
41,068 | null,
sortOrder
);
break;
}
<BUG>case NOTES_FROM_NOTEBOOK:
{
cursor = mOpenHelper.getReadableDatabase().query(
DatabaseContract.NoteEntry.TABLE_NAME,</BUG>
projection,
| case NOTE_TAGS:
cursor = sNotesByTagQueryBuilder.query(
mOpenHelper.getReadableDatabase(),
|
41,069 | NoteEntry.COLUMN_TITLE + " TEXT NOT NULL, " +
NoteEntry.COLUMN_CONTENT + " TEXT NOT NULL, " +
NoteEntry.COLUMN_UPDATED_AT + " DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, " +
NoteEntry.COLUMN_SYNC_STATUS + " INTEGER NOT NULL DEFAULT 0, " +
NoteEntry.COLUMN_NOTEBOOK_KEY + " INTEGER NOT NULL, " +
<BUG>" FOREIGN KEY (" + NoteEntry.COLUMN_NOTEBOOK_KEY + ") REFERENCES " +
NoteEntry.TABLE_NAME +
" (" + NoteEntry._ID + ") " +</BUG>
" );";
final String SQL_CREATE_TAG_TABLE = "CREATE TABLE " + TagEntry.TABLE_NAME +
| NotebookEntry.TABLE_NAME + " (" + NotebookEntry._ID + ") " +
|
41,070 | private String mTitle;
private String mContent;
private String mNotebookId;
private String mOldNotebookId;
private Date mUpdatedAt;
<BUG>private DatabaseContract.NoteEntry.NOTE_STATUS mSyncStatus;
public Note(String uuid)</BUG>
{
mId = uuid;
}
| private List<Tag> mTags = new ArrayList<>();
public Note(String uuid)
|
41,071 | {
public static final String CONTENT_AUTHORITY = "rocks.paperwork.app";
private static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
public static final String PATH_NOTES = "notes";
public static final String PATH_NOTEBOOKS = "notebooks";
<BUG>public static final String PATH_TAGS = "tags";
public static class NoteEntry implements BaseColumns</BUG>
{
public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon().appendPath(PATH_NOTES).build();
public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + CONTENT_AUTHORITY + "/" + PATH_NOTES;
| public static final String PATH_NOTE_TAGS = "tagged_notes";
public static class NoteEntry implements BaseColumns
|
41,072 | package rocks.paperwork.android.adapters;
<BUG>public class Tag
{</BUG>
private final String mId;
private String mTitle;
public Tag(String id)
| import java.io.Serializable;
public class Tag implements Serializable
{
|
41,073 | public void onChange(boolean selfChange)
{
updateView();
}
});
<BUG>SyncAdapter.syncImmediately(this);
}</BUG>
private void setUpToolbar()
{
mToolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
| [DELETED] |
41,074 | metaCollection.setWriteConcern(WriteConcern.SAFE);
}
public Kryo getKryo(){
if(tlkryo.get() == null){
Kryo kryo = new Kryo();
<BUG>kryo.setInstantiatorStrategy(new SerializingInstantiatorStrategy());
kryo.setDefaultSerializer(CompatibleFieldSerializer.class);</BUG>
kryo.register(DateTime.class, new JodaDateTimeSerializer());
registration.registerClasses(kryo);
tlkryo.set(kryo);
| ((Kryo.DefaultInstantiatorStrategy) kryo.getInstantiatorStrategy()).setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
kryo.setDefaultSerializer(CompatibleFieldSerializer.class);
|
41,075 | } else if (rank < 10) {
label = "Scary";
} else if (rank < 15) {
label = "Troubling";
} else {
<BUG>label = "Possible";
}</BUG>
rankValueLabel.setText(rank + " (" + label + ")");
}
protected String getMessage(String key) {
| label = "Of Concern";
|
41,076 | protected UserPreferences getCurrentProps() {
return propertyPage.getCurrentUserPreferences();
}
@Override
public void setEnabled(boolean enabled) {
<BUG>minPriorityCombo.setEnabled(enabled);
lowPrioCombo.setEnabled(enabled);
normalPrioCombo.setEnabled(enabled);
highPrioCombo.setEnabled(enabled);</BUG>
minRankSlider.setEnabled(enabled);
| ofConcernRankCombo.setEnabled(enabled);
troublingRankCombo.setEnabled(enabled);
scaryRankCombo.setEnabled(enabled);
scariestRankCombo.setEnabled(enabled);
|
41,077 | import static de.tobject.findbugs.preferences.FindBugsConstants.DISABLED_CATEGORIES;
import static de.tobject.findbugs.preferences.FindBugsConstants.DONT_REMIND_ABOUT_FULL_BUILD;
import static de.tobject.findbugs.preferences.FindBugsConstants.EXPORT_SORT_ORDER;
import static de.tobject.findbugs.preferences.FindBugsConstants.KEY_CACHE_CLASS_DATA;
import static de.tobject.findbugs.preferences.FindBugsConstants.KEY_RUN_ANALYSIS_AS_EXTRA_JOB;
<BUG>import static de.tobject.findbugs.preferences.FindBugsConstants.ORDER_BY_NAME;
import static de.tobject.findbugs.preferences.FindBugsConstants.PRIO_HIGH_MARKER_SEVERITY;
import static de.tobject.findbugs.preferences.FindBugsConstants.PRIO_LOW_MARKER_SEVERITY;
import static de.tobject.findbugs.preferences.FindBugsConstants.PRIO_NORMAL_MARKER_SEVERITY;
</BUG>
import static de.tobject.findbugs.preferences.FindBugsConstants.RUN_ANALYSIS_AUTOMATICALLY;
| import static de.tobject.findbugs.preferences.FindBugsConstants.RANK_OFCONCERN_MARKER_SEVERITY;
import static de.tobject.findbugs.preferences.FindBugsConstants.RANK_SCARIEST_MARKER_SEVERITY;
import static de.tobject.findbugs.preferences.FindBugsConstants.RANK_SCARY_MARKER_SEVERITY;
import static de.tobject.findbugs.preferences.FindBugsConstants.RANK_TROUBLING_MARKER_SEVERITY;
|
41,078 | store.setDefault(KEY_RUN_ANALYSIS_AS_EXTRA_JOB, false);
store.setDefault(DISABLED_CATEGORIES, "EXPERIMENTAL,I18N,MALICIOUS_CODE,SECURITY");
store.setDefault(RUN_ANALYSIS_AUTOMATICALLY, false);
store.setDefault(RUN_ANALYSIS_ON_FULL_BUILD, false);
store.setDefault(ASK_ABOUT_PERSPECTIVE_SWITCH, true);
<BUG>store.setDefault(SWITCH_PERSPECTIVE_AFTER_ANALYSIS, false);
store.setDefault(PRIO_LOW_MARKER_SEVERITY, MarkerSeverity.Warning.name());
store.setDefault(PRIO_NORMAL_MARKER_SEVERITY, MarkerSeverity.Warning.name());
store.setDefault(PRIO_HIGH_MARKER_SEVERITY, MarkerSeverity.Warning.name());
</BUG>
}
| store.setDefault(RANK_OFCONCERN_MARKER_SEVERITY, MarkerSeverity.Warning.name());
store.setDefault(RANK_TROUBLING_MARKER_SEVERITY, MarkerSeverity.Warning.name());
store.setDefault(RANK_SCARY_MARKER_SEVERITY, MarkerSeverity.Warning.name());
store.setDefault(RANK_SCARIEST_MARKER_SEVERITY, MarkerSeverity.Warning.name());
|
41,079 | store.setToDefault(DONT_REMIND_ABOUT_FULL_BUILD);
store.setToDefault(DISABLED_CATEGORIES);
store.setToDefault(RUN_ANALYSIS_AUTOMATICALLY);
store.setToDefault(RUN_ANALYSIS_ON_FULL_BUILD);
store.setToDefault(ASK_ABOUT_PERSPECTIVE_SWITCH);
<BUG>store.setToDefault(SWITCH_PERSPECTIVE_AFTER_ANALYSIS);
store.setToDefault(PRIO_LOW_MARKER_SEVERITY);
store.setToDefault(PRIO_NORMAL_MARKER_SEVERITY);
store.setToDefault(PRIO_HIGH_MARKER_SEVERITY);
</BUG>
store.setToDefault(KEY_CACHE_CLASS_DATA);
| store.setToDefault(RANK_OFCONCERN_MARKER_SEVERITY);
store.setToDefault(RANK_TROUBLING_MARKER_SEVERITY);
store.setToDefault(RANK_SCARY_MARKER_SEVERITY);
store.setToDefault(RANK_SCARIEST_MARKER_SEVERITY);
|
41,080 | import mondrian.mdx.MdxVisitorImpl;
import mondrian.mdx.MemberExpr;
import mondrian.olap.*;
import mondrian.rolap.aggmatcher.AggStar;
import mondrian.rolap.sql.*;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
import java.util.concurrent.atomic.AtomicBoolean;
import javax.sql.DataSource;
public class RolapNativeFilter extends RolapNativeSet {
| import java.util.Arrays;
import java.util.List;
|
41,081 | String filterExprStr = sql.generateFilterCondition(filterExpr);
if (filterExprStr == null) {
return null;
}
if (SqlConstraintUtils.containsCalculatedMember(
<BUG>evaluator.getNonAllMembers(), true))
</BUG>
{
return null;
}
| Arrays.asList(evaluator.getNonAllMembers()), true))
|
41,082 | return Message.class.isAssignableFrom(paramType);
}
@Override
public void handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)
throws Exception {
<BUG>Assert.notNull(this.clientChannel, "No clientChannel to send messages to");
if (message == null) {</BUG>
return;
}
PubSubHeaderAccesssor headers = PubSubHeaderAccesssor.wrap(message);
| Message<?> returnMessage = (Message<?>) returnValue;
if (message == null) {
|
41,083 | returnHeaders.setSessionId(headers.getSessionId());
returnHeaders.setSubscriptionId(headers.getSubscriptionId());
if (returnHeaders.getDestination() == null) {
returnHeaders.setDestination(headers.getDestination());
}
<BUG>Message<?> returnMessage = MessageBuilder.withPayload(
message.getPayload()).copyHeaders(headers.toHeaders()).build();
</BUG>
this.clientChannel.send(returnMessage);
}
| [DELETED] |
41,084 | }
@Test
public void connectWithEscapes() throws Exception {
String accept = "accept-version:1.1\n";
String host = "ho\\c\\ns\\rt:st\\nomp.gi\\cthu\\b.org\n";
<BUG>String frame = "CONNECT\n" + accept + host + "\n";
Message<byte[]> message = this.converter.toMessage(frame.getBytes("UTF-8"), "session-123");
</BUG>
assertEquals(0, message.getPayload().length);
StompHeaderAccessor stompHeaders = StompHeaderAccessor.wrap(message);
| @SuppressWarnings("unchecked")
public void connectFrame() throws Exception {
String host = "host:github.org\n";
String frame = "\n\n\nCONNECT\n" + accept + host + "\n";
Message<byte[]> message = (Message<byte[]>) this.converter.toMessage(frame.getBytes("UTF-8"), "session-123");
MessageHeaders headers = message.getHeaders();
assertEquals(7, stompHeaders.toHeaders().size());
|
41,085 | }
@Test
public void connectWithEscapesAndCR12() throws Exception {
String accept = "accept-version:1.1\n";
String host = "ho\\c\\ns\\rt:st\\nomp.gi\\cthu\\b.org\n";
<BUG>String test = "\n\n\nCONNECT\r\n" + accept.replaceAll("\n", "\r\n") + host.replaceAll("\n", "\r\n") + "\r\n";
Message<byte[]> message = this.converter.toMessage(test.getBytes("UTF-8"), "session-123");
</BUG>
assertEquals(0, message.getPayload().length);
StompHeaderAccessor stompHeaders = StompHeaderAccessor.wrap(message);
| @SuppressWarnings("unchecked")
public void connectFrame() throws Exception {
String host = "host:github.org\n";
String frame = "\n\n\nCONNECT\n" + accept + host + "\n";
Message<byte[]> message = (Message<byte[]>) this.converter.toMessage(frame.getBytes("UTF-8"), "session-123");
MessageHeaders headers = message.getHeaders();
assertEquals(7, stompHeaders.toHeaders().size());
|
41,086 | import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;
<BUG>import android.support.v7.app.AppCompatActivity;
import android.view.View;</BUG>
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
| import android.util.Log;
import android.view.View;
|
41,087 | import com.dm.material.dashboard.candybar.R;
import com.dm.material.dashboard.candybar.fragments.dialog.IntentChooserFragment;
import com.dm.material.dashboard.candybar.helpers.DrawableHelper;
import com.dm.material.dashboard.candybar.helpers.FileHelper;
import com.dm.material.dashboard.candybar.items.Request;
<BUG>import com.dm.material.dashboard.candybar.preferences.Preferences;
import java.io.File;</BUG>
import java.util.List;
public class IntentAdapter extends BaseAdapter {
private final Context mContext;
| import com.dm.material.dashboard.candybar.utils.Tag;
import java.io.File;
|
41,088 | package com.dm.material.dashboard.candybar.adapters;
import android.content.Context;
<BUG>import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;</BUG>
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v4.util.SparseArrayCompat;
| [DELETED] |
41,089 | } else if (viewType == TYPE_CONTENT) {
view = LayoutInflater.from(mContext).inflate(
R.layout.fragment_home_feature_item_list, parent, false);
}
return new ViewHolder(view, viewType);
<BUG>}
@Override
public void onViewRecycled(ViewHolder holder) {
super.onViewRecycled(holder);
if (holder.holderId == TYPE_CONTENT) {
Bitmap bitmap = ((BitmapDrawable) holder.icon.getDrawable()).getBitmap();
if (bitmap != null) bitmap.recycle();
holder.icon.setImageDrawable(null);
}</BUG>
}
| [DELETED] |
41,090 | import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.dm.material.dashboard.candybar.R;
<BUG>import com.dm.material.dashboard.candybar.adapters.IconsSearchAdapter;
import com.dm.material.dashboard.candybar.helpers.ColorHelper;</BUG>
import com.dm.material.dashboard.candybar.helpers.DrawableHelper;
import com.dm.material.dashboard.candybar.helpers.IconsHelper;
import com.dm.material.dashboard.candybar.helpers.SoftKeyboardHelper;
| import com.dm.material.dashboard.candybar.adapters.IconsAdapter;
import com.dm.material.dashboard.candybar.helpers.ColorHelper;
|
41,091 | private AutoFitRecyclerView mIconsGrid;
private RecyclerFastScroller mFastScroll;
private TextView mSearchResult;
private SearchView mSearchView;
private ProgressBar mProgress;
<BUG>private IconsSearchAdapter mAdapter;
private AsyncTask<Void, Void, Boolean> mGetIcons;</BUG>
public static final String TAG = "icons_search";
@Nullable
@Override
| private IconsAdapter mAdapter;
private AsyncTask<Void, Void, Boolean> mGetIcons;
|
41,092 | if (cursor.moveToFirst()) {
do {
tables.append(tables.size(), cursor.getString(0));
} while (cursor.moveToNext());
}
<BUG>cursor.close();
for (int i = 0; i < tables.size(); i++) {</BUG>
try {
String dropQuery = "DROP TABLE IF EXISTS " + tables.get(i);
if (!tables.get(i).equalsIgnoreCase("SQLITE_SEQUENCE"))
| SparseArrayCompat<Request> requests = getRequestedApps(db);
for (int i = 0; i < tables.size(); i++) {
|
41,093 | <BUG>package com.dm.material.dashboard.candybar.fragments;
import android.content.pm.PackageInfo;</BUG>
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.TypedArray;
| import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.pm.PackageInfo;
|
41,094 | import android.support.v7.widget.DefaultItemAnimator;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
<BUG>import android.view.animation.Animation;
import android.view.animation.AnimationUtils;</BUG>
import android.widget.TextView;
import com.dm.material.dashboard.candybar.R;
import com.dm.material.dashboard.candybar.adapters.LauncherAdapter;
| [DELETED] |
41,095 | public ParallelPingResponseCallback(int count) {
m_latch = new CountDownLatch(count);
m_responseTimes = new Number[count];
}
public void handleError(InetAddress address, EchoPacket request, Throwable t) {
<BUG>try {
m_responseTimes[request.getSequenceNumber()] = null;
m_error = t;</BUG>
} finally {
m_latch.countDown();
| if (request != null) {
m_error = t;
|
41,096 | Integer datasetId;
String datasetUrn;
String capacityName;
String capacityType;
String capacityUnit;
<BUG>String capacityLow;
String capacityHigh;
</BUG>
Long modifiedTime;
| Long capacityLow;
Long capacityHigh;
|
41,097 | 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] |
41,098 | 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_TABLE + " WHERE dataset_urn = :dataset_urn";
<BUG>public static final String DELETE_DATASET_DEPLOYMENT_BY_URN =
"DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn=?";
</BUG>
public static final String GET_DATASET_CAPACITY_BY_DATASET_ID =
| public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID =
"DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
|
41,099 | </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 DELETE_DATASET_CAPACITY_BY_URN =
"DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn=?";
</BUG>
public static final String GET_DATASET_TAG_BY_DATASET_ID =
| 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_TABLE + " WHERE dataset_urn = :dataset_urn";
public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID =
"DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
public static final String DELETE_DATASET_CAPACITY_BY_DATASET_ID =
"DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id=?";
|
41,100 | "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_REFERENCE_TABLE + " WHERE dataset_urn = :dataset_urn";
<BUG>public static final String DELETE_DATASET_REFERENCE_BY_URN =
"DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_urn=?";
</BUG>
public static final String GET_DATASET_PARTITION_BY_DATASET_ID =
| public static final String DELETE_DATASET_REFERENCE_BY_DATASET_ID =
"DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id=?";
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.