id
int64 1
49k
| buggy
stringlengths 34
37.5k
| fixed
stringlengths 2
37k
|
---|---|---|
48,901 | sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,902 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,903 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,904 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,905 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,906 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,907 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,908 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,909 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
48,910 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,911 | final int posyROI = (s_iy - srcRectY) * roiScanlineStride;
final int baseIndex = (posx / dst_num_bands) + posyROI;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,912 | : 0);
}
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,913 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,914 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,915 | int x0 = src.getX() + posx / srcPixelStride;
int y0 = src.getY() + posy / srcScanlineStride;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,916 | pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,917 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,918 | weightVert &= (0x0F - (1 << h));
}
sumArray[h] = tempSum;
}
if (weight == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
double[] tempData = bicubicInpaintingDouble(sumArray, weightVert,
emptyArray);
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,919 | sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,920 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,921 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,922 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,923 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,924 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,925 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,926 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,927 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
48,928 | this.pushConstant(locatable, ordinal);
break ENUM;
}</BUG>
ordinal++;
<BUG>}
throw new AssertionError(constantName);</BUG>
}
}
if (optionalEnclosingInstance != null) {
IClass outerIClass = targetClass.getOuterIClass();
| break ENUM_CONSTANT;
|
48,929 | import java.util.List;
import javax.portlet.PortletPreferences;
public class MBPortletDataHandler extends BasePortletDataHandler {
public static final String NAMESPACE = "message_boards";
public MBPortletDataHandler() {
<BUG>setExportControls(
new PortletDataHandlerBoolean(
NAMESPACE, "categories-and-messages", true, true),</BUG>
new PortletDataHandlerBoolean(NAMESPACE, "thread-flags"),
new PortletDataHandlerBoolean(NAMESPACE, "user-bans"));
| new PortletDataHandlerBoolean(NAMESPACE, "messages"),
|
48,930 | 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;
|
48,931 | 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"),
|
48,932 | 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] |
48,933 | 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) {
|
48,934 | 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;
|
48,935 | package org.opennms.netmgt.provision.service.tasks;
import java.util.ArrayList;
<BUG>import java.util.List;
public class ContainerTask extends Task {</BUG>
private final class TaskTrigger extends Task {
public TaskTrigger(DefaultTaskCoordinator coordinator, ContainerTask parent) {
super(coordinator, parent);
| import java.util.concurrent.atomic.AtomicInteger;
public class ContainerTask extends Task {
|
48,936 | getCoordinator().markTaskAsCompleted(TaskTrigger.this);
}
public String toString() { return "Trigger For "+ContainerTask.this; }
}
protected final Task m_triggerTask;
<BUG>protected final List<Task> m_children = new ArrayList<Task>();
</BUG>
public ContainerTask(DefaultTaskCoordinator coordinator, ContainerTask parent) {
super(coordinator, parent);
m_triggerTask = new TaskTrigger(coordinator, this);
| private final List<Task> m_children = Collections.synchronizedList(new ArrayList<Task>());
|
48,937 | 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
|
48,938 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| 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++) {
|
48,939 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<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);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
48,940 | 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
|
48,941 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
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++) {
|
48,942 | 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
|
48,943 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
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++) {
|
48,944 | 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
|
48,945 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
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++) {
|
48,946 | 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
|
48,947 | 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++) {
|
48,948 | 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
|
48,949 | 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++) {
|
48,950 | @EventHandler
public void onAmountCheck(CurrencyAmountEvent event) {
if (!event.getAmount().equals(BigDecimal.ZERO)) {
return;
}
<BUG>double balance = provider.getBalance(NameManager.getLastSeenName(event.getAccount()), event.getWorld().getName());
if (balance > Double.MAX_VALUE) {
balance = Double.MAX_VALUE;
}</BUG>
event.setAmount(balance);
| [DELETED] |
48,951 | @EventHandler
public void onCurrencyCheck(CurrencyCheckEvent event) {
if (event.hasEnough()) {
return;
}
<BUG>World world = event.getWorld();
if (provider.has(NameManager.getLastSeenName(event.getAccount()), world.getName(), event.getDoubleAmount())) {
event.hasEnough(true);
}</BUG>
}
| public void onAmountCheck(CurrencyAmountEvent event) {
if (!event.getAmount().equals(BigDecimal.ZERO)) {
|
48,952 | private static Map<String, String> shortToLongName = new HashMap<String, String>();
public static String getLastSeenName(UUID uuid) {
if (lastSeenName.containsKey(uuid)) {
return lastSeenName.get(uuid);
}
<BUG>if (Bukkit.getOfflinePlayer(uuid).getName() != null) {
String lastSeen = Bukkit.getOfflinePlayer(uuid).getName();
lastSeenName.put(uuid, lastSeen);</BUG>
return lastSeen;
}
| OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
String lastSeen = player.getName();
if (lastSeen != null) {
lastSeenName.put(uuid, lastSeen);
|
48,953 | Iterable<SNode> originalModules = ListSequence.fromList(SLinkOperations.getTargets(thisNode, "modules", true)).translate(new ITranslator2<SNode, SNode>() {
public Iterable<SNode> translate(SNode it) {
return BehaviorReflection.invokeVirtual((Class<Iterable<SNode>>) ((Class) Object.class), it, "virtual_getModules_4560297596904469651", new Object[]{});
}
});
<BUG>Iterable<SNode> modules = Sequence.fromIterable(new MPSModulesClosure(genContext, originalModules).trackDevkits().runtimeClosure().getAllModules()).union(Sequence.fromIterable(originalModules));
</BUG>
for (SNode m : Sequence.fromIterable(modules)) {
SNode artifact;
SNode originalModule = DependenciesHelper.getOriginalNode(m, genContext);
| Iterable<SNode> modules = Sequence.fromIterable(new MPSModulesClosure(genContext, originalModules).trackDevkits().designtimeClosure().getAllModules()).union(Sequence.fromIterable(originalModules));
|
48,954 | queryPhase.execute(context);
}
}
public QuerySearchResultProvider executeQueryPhase(ShardSearchRequest request) throws IOException {
final SearchContext context = createAndPutContext(request);
<BUG>final SearchOperationListener operationListener = context.indexShard().getSearchOperationListener();
try {</BUG>
operationListener.onPreQueryPhase(context);
long time = System.nanoTime();
contextProcessing(context);
| context.incRef();
try {
|
48,955 | cleanContext(context);
}
}
public ScrollQuerySearchResult executeQueryPhase(InternalScrollSearchRequest request) {
final SearchContext context = findContext(request.id());
<BUG>SearchOperationListener operationListener = context.indexShard().getSearchOperationListener();
try {</BUG>
operationListener.onPreQueryPhase(context);
long time = System.nanoTime();
contextProcessing(context);
| context.incRef();
try {
|
48,956 | package org.elasticsearch.search.internal;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.FieldDoc;
<BUG>import org.apache.lucene.search.Query;
import org.apache.lucene.util.Counter;
import org.elasticsearch.action.search.SearchType;</BUG>
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.ParseFieldMatcher;
| import org.apache.lucene.store.AlreadyClosedException;
import org.apache.lucene.util.RefCount;
import org.elasticsearch.action.search.SearchType;
|
48,957 | import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.ParseFieldMatcher;
import org.elasticsearch.common.lease.Releasable;
import org.elasticsearch.common.lease.Releasables;
import org.elasticsearch.common.unit.TimeValue;
<BUG>import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.iterable.Iterables;</BUG>
import org.elasticsearch.index.analysis.AnalysisService;
import org.elasticsearch.index.cache.bitset.BitsetFilterCache;
import org.elasticsearch.index.fielddata.IndexFieldDataService;
| import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
import org.elasticsearch.common.util.concurrent.RefCounted;
import org.elasticsearch.common.util.iterable.Iterables;
|
48,958 | import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicBoolean;
<BUG>public abstract class SearchContext implements Releasable {
</BUG>
private static ThreadLocal<SearchContext> current = new ThreadLocal<>();
public static final int DEFAULT_TERMINATE_AFTER = 0;
public static void setCurrent(SearchContext value) {
| public abstract class SearchContext extends AbstractRefCounted implements Releasable {
|
48,959 | package org.elasticsearch.search;
<BUG>import org.apache.lucene.search.Query;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.io.stream.StreamInput;</BUG>
import org.elasticsearch.common.io.stream.StreamOutput;
| import com.carrotsearch.hppc.IntArrayList;
import org.apache.lucene.store.AlreadyClosedException;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.common.io.stream.StreamInput;
|
48,960 | synchronized (mWaitingList) {
copyWaitingList = (List<BaseDownloadTask.IRunningTask>) mWaitingList.clone();
mWaitingList.clear();
for (BaseDownloadTask.IRunningTask task : copyWaitingList) {
if (queueHandler.contain(task.getAttachKey())) {
<BUG>task.getOrigin().ready();
continue;</BUG>
}
if (!task.getOrigin().isUsing()) {
task.getOrigin().start();
| task.getOrigin().asInQueueTask().enqueue();
continue;
|
48,961 | private boolean mSyncCallback = false;
public final static int DEFAULT_CALLBACK_PROGRESS_MIN_INTERVAL_MILLIS = 10;
private int mCallbackProgressTimes = FileDownloadModel.DEFAULT_CALLBACK_PROGRESS_TIMES;
private int mCallbackProgressMinIntervalMillis = DEFAULT_CALLBACK_PROGRESS_MIN_INTERVAL_MILLIS;
private boolean mIsForceReDownload = false;
<BUG>volatile int mAttachKey = 0;
DownloadTask(final String url) {</BUG>
this.mUrl = url;
final DownloadTaskHunter hunter = new DownloadTaskHunter(this);
mHunter = hunter;
| private boolean mIsInQueueTask = false;
DownloadTask(final String url) {
|
48,962 | if (isRunning()) {
FileDownloadLog.w(this, "This task is running %d, if you want start the same task," +
" please create a new one by FileDownloader.create", getId());
return false;
}
<BUG>this.mAttachKey = 0;
clearMarkAdded2List();</BUG>
mHunter.reset();
return true;
}
| mIsInQueueTask = false;
clearMarkAdded2List();
|
48,963 | throw new IllegalStateException("This task is dirty to restart, If you want to " +
"reuse this task, please invoke #reuse method manually and retry to " +
"restart again.");
}
}
<BUG>if (mAttachKey == 0) {
mAttachKey = mListener.hashCode();
</BUG>
}
mHunter.intoLaunchPool();
| if (!isAttached()) {
setAttachKey(mListener.hashCode());
|
48,964 | }
@Override
public void free() {
mHunter.free();
clearMarkAdded2List();
<BUG>}
void clearMarkAdded2List() {
isMarkedAdded2List = false;
</BUG>
}
| if (!isAttached()) {
setAttachKey(mListener.hashCode());
mHunter.intoLaunchPool();
return getId();
|
48,965 | assembleTasksToStart(attachKey, listener);
if (onAssembledTasksToStart(attachKey, list, listener, false)) {
return false;
}
for (BaseDownloadTask.IRunningTask task : list) {
<BUG>task.getOrigin().start();
}</BUG>
return true;
}
@Override
| task.startTaskByQueue();
|
48,966 | goNext(msg.arg1 + 1);
return true;
}
}
stackTopTask.getOrigin()
<BUG>.addFinishListener(mSerialFinishListener.setNextIndex(mRunningIndex + 1))
.start();
} else if (msg.what == WHAT_FREEZE) {</BUG>
freeze();
| .addFinishListener(mSerialFinishListener.setNextIndex(mRunningIndex + 1));
stackTopTask.startTaskByQueue();
} else if (msg.what == WHAT_FREEZE) {
|
48,967 | BaseDownloadTask setAutoRetryTimes(int autoRetryTimes);
BaseDownloadTask addHeader(final String name, final String value);
BaseDownloadTask addHeader(final String line);
BaseDownloadTask removeAllHeaders(final String name);
BaseDownloadTask setSyncCallback(final boolean syncCallback);
<BUG>int ready();
boolean reuse();</BUG>
boolean isUsing();
boolean isRunning();
boolean isAttached();
| InQueueTask asInQueueTask();
boolean reuse();
|
48,968 | boolean isResuming();
String getEtag();
int getAutoRetryTimes();
int getRetryingTimes();
boolean isSyncCallback();
<BUG>boolean isLargeFile();
@SuppressWarnings("UnusedParameters")</BUG>
interface FinishListener {
void over(final BaseDownloadTask task);
}
| interface InQueueTask {
int enqueue();
@SuppressWarnings("UnusedParameters")
|
48,969 | boolean isOver();
int getAttachKey();
void setAttachKey(int key);
boolean isMarkedAdded2List();
void markAdded2List();
<BUG>void free();
}</BUG>
interface LifeCycleCallback {
void onBegin();
void onIng();
| void startTaskByQueue();
}
|
48,970 | import static org.neo4j.kernel.impl.ha.ClusterManager.clusterOfSize;
@RunWith( Parameterized.class )
public class TestFailover
{
@Rule
<BUG>public LoggerRule logger = new LoggerRule();
public TargetDirectory dir = TargetDirectory.forTest( getClass() );
</BUG>
private int clusterSize;
@Parameters( name = "clusterSize:{0}")
| public TargetDirectory.TestDirectory dir = TargetDirectory.testDirForTest( getClass() );
|
48,971 | import static org.neo4j.kernel.impl.ha.ClusterManager.masterAvailable;
@RunWith( Parameterized.class )
public class TestFailoverWithAdditionalSlaveFailures
{
@Rule
<BUG>public LoggerRule logger = new LoggerRule();
public TargetDirectory dir = TargetDirectory.forTest( getClass() );
</BUG>
private int clusterSize;
private int[] slavesToFail;
| public TargetDirectory.TestDirectory dir = TargetDirectory.testDirForTest( getClass() );
|
48,972 | }
@Override
public void setCredentials(String userName, String password) {
this.userName = userName;
this.password = password;
<BUG>}
@Override
public <TResponse> TResponse send(IReturn<TResponse> request) {
return send(
createSendRequest(request),
request.getResponseType());</BUG>
}
| return true;
|
48,973 | || relativeOrAbsoluteUrl.startsWith("https:")
? relativeOrAbsoluteUrl
: Utils.combinePath(baseUrl, relativeOrAbsoluteUrl);
}
@Override
<BUG>public <TResponse> TResponse get(IReturn<TResponse> request) {
return send(
createRequest(createUrl(request), HttpMethods.Get),
request.getResponseType());</BUG>
}
| [DELETED] |
48,974 | return send(
createRequest(createUrl(request, queryParams), HttpMethods.Get),
request.getResponseType());</BUG>
}
@Override
<BUG>public <TResponse> TResponse get(String path, Class responseType) {
return send(
createRequest(resolveUrl(path), HttpMethods.Get),
responseType);</BUG>
}
| Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Post, request,
request.getResponseType());
|
48,975 | return send(
createRequest(resolveUrl(path), HttpMethods.Get),
responseType);</BUG>
}
@Override
<BUG>public <TResponse> TResponse get(String path, Type responseType) {
return send(
createRequest(resolveUrl(path), HttpMethods.Get),
responseType);</BUG>
}
| Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Post, request,
request.getResponseType());
|
48,976 | IReturnVoid.class);</BUG>
}
@Override
public <TResponse> TResponse post(String path, Object request, Class responseType) {
<BUG>return send(
createRequest(resolveUrl(path), HttpMethods.Post, request),
responseType);</BUG>
}
@Override
| Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Post, request,
request.getResponseType());
public void post(IReturnVoid request) {
send(Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Post, request, IReturnVoid.class);
return send(resolveUrl(path), HttpMethods.Post, request, responseType);
|
48,977 | @Override
public HttpURLConnection put(String path, byte[] requestBody, String contentType) {
return createRequest(resolveUrl(path), HttpMethods.Put, requestBody, contentType);
}
@Override
<BUG>public <TResponse> TResponse delete(IReturn<TResponse> request) {
return send(
createRequest(createUrl(request), HttpMethods.Delete),
request.getResponseType());</BUG>
}
| public <TResponse> TResponse post(String path, byte[] requestBody, String contentType, Type responseType) {
return send(resolveUrl(path), HttpMethods.Post, requestBody, contentType, responseType);
|
48,978 | return send(
createRequest(createUrl(request, queryParams), HttpMethods.Delete),
request.getResponseType());</BUG>
}
@Override
<BUG>public <TResponse> TResponse delete(String path, Class responseType) {
return send(
createRequest(resolveUrl(path), HttpMethods.Delete),
responseType);</BUG>
}
| Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Put, request,
request.getResponseType());
|
48,979 | return send(
createRequest(resolveUrl(path), HttpMethods.Delete),
responseType);</BUG>
}
@Override
<BUG>public <TResponse> TResponse delete(String path, Type responseType) {
return send(
createRequest(resolveUrl(path), HttpMethods.Delete),
responseType);</BUG>
}
| Utils.combinePath(replyUrl, typeName(request)), HttpMethods.Put, request,
request.getResponseType());
|
48,980 | import java.io.InputStream;
import java.net.URL;
import static org.assertj.core.api.Assertions.assertThat;
public class TomcatWebServerTest {
@Test
<BUG>public void shouldBootWebServer() throws Exception {
try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG>
.extensions(new ConfigurationExtension())
.beanClasses(TomcatWebServer.class, DefaultServlet.class, MessageProvider.class,
WebServerConfiguration.class, DefaultConfigPropertyProducer.class)
| SSLBypass.disableSSLChecks();
try(WeldContainer weldContainer = new Weld().disableDiscovery()
|
48,981 | tomcat.start();
try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo(MessageProvider.DATA);
}
<BUG>try(InputStream stream = new URL("http://localhost:8080/rest").openStream()) {
</BUG>
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo("Hello, world!");
}
| try(InputStream stream = new URL("https://localhost:8443/rest").openStream()) {
|
48,982 | import java.io.InputStream;
import java.net.URL;
import static org.assertj.core.api.Assertions.assertThat;
public class JettyBootTest {
@Test
<BUG>public void shouldBootWebServer() throws Exception {
try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG>
.extensions(new ConfigurationExtension())
.beanClasses(JettyWebServer.class, DefaultServlet.class, MessageProvider.class,
WebServerConfiguration.class, DefaultConfigPropertyProducer.class)
| SSLBypass.disableSSLChecks();
try(WeldContainer weldContainer = new Weld().disableDiscovery()
|
48,983 | webServer.start();
try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo(MessageProvider.DATA);
}
<BUG>try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
</BUG>
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo(MessageProvider.DATA);
}
| try(InputStream stream = new URL("https://localhost:8443/").openStream()) {
|
48,984 | }
public String getAddress() {
return address;
}
public boolean isSecuredConfigured(){
<BUG>return securedPort != 0 && keystorePath != null && truststorePassword != null;
}</BUG>
public int getSecuredPort(){
return securedPort;
}
| public int getPort() {
return port;
return securedPort != 0;
|
48,985 | package no.kantega.publishing.jobs.alerts;
<BUG>import com.google.common.base.Function;
import com.google.common.base.Predicate;
import no.kantega.publishing.api.content.ContentIdentifier;
import no.kantega.publishing.common.Aksess;
import no.kantega.publishing.common.ao.AttachmentAO;
import no.kantega.publishing.common.ao.LinkDao;</BUG>
import no.kantega.publishing.common.data.Attachment;
| import no.kantega.publishing.api.attachment.ao.AttachmentAO;
import no.kantega.publishing.api.content.ContentAO;
import no.kantega.publishing.api.link.LinkDao;
|
48,986 | import no.kantega.publishing.common.ao.AttachmentAO;
import no.kantega.publishing.common.ao.LinkDao;</BUG>
import no.kantega.publishing.common.data.Attachment;
import no.kantega.publishing.common.data.Content;
import no.kantega.publishing.common.exception.ContentNotFoundException;
<BUG>import no.kantega.publishing.content.api.ContentAO;
import no.kantega.publishing.modules.linkcheck.check.LinkHandler;</BUG>
import no.kantega.publishing.modules.linkcheck.check.LinkOccurrence;
import no.kantega.publishing.modules.linkcheck.check.LinkQueryGenerator;
import no.kantega.publishing.modules.linkcheck.crawl.LinkEmitter;
| package no.kantega.publishing.jobs.alerts;
import no.kantega.publishing.api.attachment.ao.AttachmentAO;
import no.kantega.publishing.api.content.ContentAO;
import no.kantega.publishing.api.content.ContentIdentifier;
import no.kantega.publishing.api.link.LinkDao;
import no.kantega.publishing.common.Aksess;
|
48,987 | import no.kantega.publishing.modules.linkcheck.crawl.LinkEmitter;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
<BUG>import static com.google.common.collect.Collections2.filter;
import static com.google.common.collect.Collections2.transform;
public class UnusedAttachmentsFinder {
@Autowired</BUG>
private LinkDao linkDao;
| import java.util.stream.Collectors;
import static java.util.Objects.nonNull;
|
48,988 | @Scheduled(cron = "${jobs.attachmentCheckJob.trigger}")
public void executeAttachmentCheckJob() {
log.info("Starting AttachmentCheckJob");
contentAO.forAllContentObjects(content -> {
List<Attachment> attachments = attachmentAO.getAttachmentList(content.getContentIdentifier());
<BUG>if(!attachments.isEmpty()) {
</BUG>
checkAttachments(content, attachments);
}
}, () -> false);
| if (!attachments.isEmpty()) {
|
48,989 | private void checkAttachments(Content content, List<Attachment> attachments) {
log.info("Checking attachments({}) for content {}", attachments.size(), content.getId());
try {
List<Integer> unusedAttachments = unusedAttachmentsFinder.getUnusedAttachmentsForContent(content.getId());
for (Attachment attachment : attachments) {
<BUG>if(unusedAttachments.contains(attachment.getId()) && attachment.isSearchable() && content.isSearchable()) {
</BUG>
log.info("Setting attachment {}({}) not searchable", attachment.getFilename(), attachment.getId());
attachment.setSearchable(false);
attachmentAO.setAttachment(attachment);
| if (unusedAttachments.contains(attachment.getId()) && attachment.isSearchable() && content.isSearchable()) {
|
48,990 | String attributeName = type + name.toLowerCase();
Attribute cached = attributeIndex.get(attributeName);
if(cached != null) {
return cached;
}
<BUG>List<Attribute> list = getAttributeList(name, type);
</BUG>
if (name.contains("[") && name.contains("].")) {
name = name.substring(name.indexOf("].") + 2, name.length());
}
| List<Attribute> list = getAttributeList(name, attributeDataType);
|
48,991 | if (attributeDataType == AttributeDataType.CONTENT_DATA) {
contentAttributes.add(attr);
} else {
metaAttributes.add(attr);
}
<BUG>attributeIndex.put(attributeIndexKey(attr, type), attr);
</BUG>
}
public void removeAttribute(String name, AttributeDataType attributeDataType) {
List<Attribute> list;
| attributeIndex.put(attributeIndexKey(attr, attributeDataType), attr);
|
48,992 | }
for (int i = 0; i < list.size(); i++) {
Attribute attr = list.get(i);
if (attr.getName().equalsIgnoreCase(name)) {
list.remove(attr);
<BUG>attributeIndex.remove(attributeIndexKey(attr, type));
</BUG>
break;
}
}
| public void addAttribute(Attribute attr, AttributeDataType attributeDataType) {
Attribute a = getAttribute(attr.getName(), attributeDataType);
if (a != null) {
throw new IllegalArgumentException("Attribute " + attr.getName() + " already exists for content with id: " + getId());
|
48,993 | public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max) {
return dispatch(commandBuilder.zrangebyscore(channel, key, min, max));
}
@Override
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, String min, String max) {
<BUG>return dispatch(commandBuilder.zrangebyscore(channel, key, min, max));
}</BUG>
@Override
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max, long offset,
long count) {
| public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range) {
return dispatch(commandBuilder.zrangebyscore(channel, key, range, Limit.unlimited()));
|
48,994 | public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min) {
return dispatch(commandBuilder.zrevrangebyscore(channel, key, max, min));
}
@Override
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, String max, String min) {
<BUG>return dispatch(commandBuilder.zrevrangebyscore(channel, key, max, min));
}</BUG>
@Override
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min, long offset,
long count) {
| public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range) {
return dispatch(commandBuilder.zrevrangebyscore(channel, key, range, Limit.unlimited()));
|
48,995 | import org.springframework.web.util.UriComponentsBuilder;
import lombok.RequiredArgsConstructor;
import ru.mystamps.web.Url;
import ru.mystamps.web.controller.converter.annotation.Category;
import ru.mystamps.web.controller.converter.annotation.CurrentUser;
<BUG>import ru.mystamps.web.dao.dto.LinkEntityDto;
import ru.mystamps.web.dao.dto.UrlEntityDto;</BUG>
import ru.mystamps.web.model.AddCategoryForm;
import ru.mystamps.web.service.CategoryService;
import ru.mystamps.web.service.SeriesService;
| import ru.mystamps.web.dao.dto.SeriesInfoDto;
import ru.mystamps.web.dao.dto.UrlEntityDto;
|
48,996 | import java.util.Locale;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.RequiredArgsConstructor;
<BUG>import ru.mystamps.web.Url;
import ru.mystamps.web.service.CategoryService;</BUG>
import ru.mystamps.web.service.CollectionService;
import ru.mystamps.web.service.CountryService;
import ru.mystamps.web.service.SeriesService;
| import ru.mystamps.web.dao.dto.LinkEntityDto;
import ru.mystamps.web.dao.dto.SeriesInfoDto;
import ru.mystamps.web.dao.dto.SuspiciousActivityDto;
import ru.mystamps.web.service.CategoryService;
|
48,997 | }
CollectionInfoDto collection = collectionService.findById(collectionId);
if (collection == null) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return null;
<BUG>}
model.addAttribute("ownerName", collection.getOwnerName());
String lang = LocaleUtils.getLanguageOrNull(userLocale);</BUG>
Iterable<SeriesInfoDto> seriesOfCollection =
seriesService.findByCollectionId(collectionId, lang);
| String owner = collection.getOwnerName();
model.addAttribute("ownerName", owner);
String lang = LocaleUtils.getLanguageOrNull(userLocale);
|
48,998 | import org.springframework.web.util.UriComponentsBuilder;
import lombok.RequiredArgsConstructor;
import ru.mystamps.web.Url;
import ru.mystamps.web.controller.converter.annotation.Country;
import ru.mystamps.web.controller.converter.annotation.CurrentUser;
<BUG>import ru.mystamps.web.dao.dto.LinkEntityDto;
import ru.mystamps.web.dao.dto.UrlEntityDto;</BUG>
import ru.mystamps.web.model.AddCountryForm;
import ru.mystamps.web.service.CountryService;
import ru.mystamps.web.service.SeriesService;
| import ru.mystamps.web.dao.dto.SeriesInfoDto;
import ru.mystamps.web.dao.dto.UrlEntityDto;
|
48,999 | 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;
|
49,000 | 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;
|