id
int64 1
194k
| buggy
stringlengths 23
37.5k
| fixed
stringlengths 6
37.4k
|
---|---|---|
201 | 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]] = destinationNoDataUShort;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
}
}
} else {
|
202 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
203 | 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]] = destinationNoDataUShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
dstPixelOffset += dstPixelStride;
}
}
|
204 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
205 | 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]] = destinationNoDataShort;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
}
}
} else {
|
206 | : 0);
}
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| : 0);
}
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
207 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
}
|
208 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
209 | 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]] = destinationNoDataShort;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
}
}
} else {
|
210 | 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]] = destinationNoDataShort;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
211 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
}
|
212 | weightVert &= (0x0F - (1 << h));
}
sumArray[h] = ((tempSum + round) >> precisionBits);
}
if (weight == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;
</BUG>
} else {
long[] tempData = bicubicInpainting(sumArray, weightVert,
emptyArray);
| weightVert &= (0x0F - (1 << h));
}
sumArray[h] = ((tempSum + round) >> precisionBits);
}
if (weight == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
} else {
long[] tempData = bicubicInpainting(sumArray, weightVert,
emptyArray);
|
213 | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (short) result;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (short) result;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
}
}
if (fracx < fracdx1) {
|
214 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
215 | 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]] = destinationNoDataShort;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
}
}
} else {
|
216 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
217 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
}
|
218 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
219 | 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]] = destinationNoDataShort;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
}
}
} else {
|
220 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
221 | 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]] = destinationNoDataShort;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataShort[k2];
dstPixelOffset += dstPixelStride;
}
}
|
222 | result = (int) ((sum + round) >> precisionBits);
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = result;
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
}
}
if (fracx < fracdx1) {
| result = (int) ((sum + round) >> precisionBits);
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = result;
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
if (fracx < fracdx1) {
|
223 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
224 | 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]] = destinationNoDataInt;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
} else {
|
225 | : 0);
}
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| : 0);
}
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
226 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
}
|
227 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
228 | 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]] = destinationNoDataInt;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
} else {
|
229 | 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]] = destinationNoDataInt;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
230 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
}
|
231 | weightVert &= (0x0F - (1 << h));
}
sumArray[h] = ((tempSum + round) >> precisionBits);
}
if (weight == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
} else {
long[] tempData = bicubicInpainting(sumArray, weightVert,
emptyArray);
| weightVert &= (0x0F - (1 << h));
}
sumArray[h] = ((tempSum + round) >> precisionBits);
}
if (weight == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
} else {
long[] tempData = bicubicInpainting(sumArray, weightVert,
emptyArray);
|
232 | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = result;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = result;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
if (fracx < fracdx1) {
|
233 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
234 | 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]] = destinationNoDataInt;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
} else {
|
235 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
236 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
}
|
237 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
238 | 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]] = destinationNoDataInt;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
}
}
} else {
|
239 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
long tempSum = 0;
|
240 | 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]] = destinationNoDataInt;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataInt[k2];
dstPixelOffset += dstPixelStride;
}
}
|
241 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
242 | 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]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
}
}
} else {
|
243 | : 0);
}
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
float tempSum = 0;
| : 0);
}
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
float tempSum = 0;
|
244 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
}
|
245 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
246 | 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]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
}
}
} else {
|
247 | 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]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
float tempSum = 0;
| pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
float tempSum = 0;
|
248 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
}
|
249 | weightVert &= (0x0F - (1 << h));
}
sumArray[h] = tempSum;
}
if (weight == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
double[] tempData = bicubicInpaintingDouble(sumArray, weightVert,
emptyArray);
| weightVert &= (0x0F - (1 << h));
}
sumArray[h] = tempSum;
}
if (weight == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
} else {
double[] tempData = bicubicInpaintingDouble(sumArray, weightVert,
emptyArray);
|
250 | 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) {
| sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
}
}
if (fracx < fracdx1) {
|
251 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
252 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
}
}
} else {
|
253 | 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;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
254 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
}
|
255 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
256 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
}
}
} else {
|
257 | 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;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
258 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
dstPixelOffset += dstPixelStride;
}
}
|
259 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
260 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
}
}
} else {
|
261 | : 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;
| : 0);
}
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
262 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
}
|
263 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
264 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
}
}
} else {
|
265 | 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;
| pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
266 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
}
|
267 | 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);
| weightVert &= (0x0F - (1 << h));
}
sumArray[h] = tempSum;
}
if (weight == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
} else {
double[] tempData = bicubicInpaintingDouble(sumArray, weightVert,
emptyArray);
|
268 | 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) {
| sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
}
}
if (fracx < fracdx1) {
|
269 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
270 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
}
}
} else {
|
271 | 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;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
272 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
}
|
273 | 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
| 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++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
274 | 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 {
| 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++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
}
}
} else {
|
275 | 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;
| weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
|
276 | 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;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
dstPixelOffset += dstPixelStride;
}
}
|
277 | UserGroupGroupRoleLocalServiceUtil.addUserGroupGroupRoles(
<BUG>userGroup.getGroupId(), group.getGroupId(), roleIds);
</BUG>
UserGroupRoleLocalServiceUtil.addUserGroupRoles(
<BUG>user.getUserId(), group.getGroupId(), roleIds);
</BUG>
Assert.assertEquals(
<BUG>2, RoleLocalServiceUtil.getAssigneesTotal(role.getRoleId()));
</BUG>
}
| UserGroupGroupRoleLocalServiceUtil.addUserGroupGroupRoles(
_userGroup.getGroupId(), _group.getGroupId(), roleIds);
UserGroupRoleLocalServiceUtil.addUserGroupRoles(
_user.getUserId(), _group.getGroupId(), roleIds);
Assert.assertEquals(
2, RoleLocalServiceUtil.getAssigneesTotal(_role.getRoleId()));
}
|
278 | group.getGroupId());
testGetTeamRoleMap(teamRoleMap, team, true);
}
protected Object[] getOrganizationAndTeam() throws Exception {
User user = TestPropsValues.getUser();
<BUG>Organization organization =
OrganizationLocalServiceUtil.addOrganization(
</BUG>
user.getUserId(),
OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID,
| group.getGroupId());
testGetTeamRoleMap(teamRoleMap, team, true);
}
protected Object[] getOrganizationAndTeam() throws Exception {
User user = TestPropsValues.getUser();
_organization = OrganizationLocalServiceUtil.addOrganization(
user.getUserId(),
OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID,
|
279 | Team team = TeamLocalServiceUtil.addTeam(
<BUG>user.getUserId(), organization.getGroupId(),
</BUG>
RandomTestUtil.randomString(), null, new ServiceContext());
<BUG>return new Object[] {organization, team};
</BUG>
}
protected void testGetTeamRoleMap(
Map<Team, Role> teamRoleMap, Team team, boolean hasTeam) {
Assert.assertNotNull(teamRoleMap);
| Team team = TeamLocalServiceUtil.addTeam(
user.getUserId(), _organization.getGroupId(),
RandomTestUtil.randomString(), null, new ServiceContext());
return new Object[] {_organization, team};
}
protected void testGetTeamRoleMap(
Map<Team, Role> teamRoleMap, Team team, boolean hasTeam) {
Assert.assertNotNull(teamRoleMap);
|
280 | else {
Assert.assertFalse(teamRoleMap.containsKey(team));
}
}
@DeleteAfterTestRun
<BUG>private final List<Group> _groups = new ArrayList<>();
@DeleteAfterTestRun
private final List<Organization> _organizations = new ArrayList<>();
@DeleteAfterTestRun
private final List<Role> _roles = new ArrayList<>();
@DeleteAfterTestRun
private final List<UserGroup> _userGroups = new ArrayList<>();
@DeleteAfterTestRun
private final List<User> _users = new ArrayList<>();
}</BUG>
| else {
Assert.assertFalse(teamRoleMap.containsKey(team));
}
}
|
281 | import com.liferay.document.library.web.display.context.logic.FileEntryDisplayContextHelper;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.portlet.configuration.icon.BasePortletConfigurationIcon;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.util.Constants;
<BUG>import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.trash.util.TrashUtil;</BUG>
import javax.portlet.ActionRequest;
import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
| import com.liferay.document.library.web.display.context.logic.FileEntryDisplayContextHelper;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.portlet.configuration.icon.BasePortletConfigurationIcon;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.util.Constants;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
import com.liferay.portlet.trash.util.TrashUtil;
import javax.portlet.ActionRequest;
import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
|
282 | import com.liferay.document.library.web.constants.DLPortletKeys;
import com.liferay.document.library.web.display.context.logic.FileEntryDisplayContextHelper;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.portlet.configuration.icon.BasePortletConfigurationIcon;
import com.liferay.portal.kernel.repository.model.FileEntry;
<BUG>import com.liferay.portal.util.PortalUtil;
import javax.portlet.PortletRequest;</BUG>
import javax.portlet.PortletURL;
public class MoveFileEntryPortletConfigurationIcon
extends BasePortletConfigurationIcon {
| import com.liferay.document.library.web.constants.DLPortletKeys;
import com.liferay.document.library.web.display.context.logic.FileEntryDisplayContextHelper;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.portlet.configuration.icon.BasePortletConfigurationIcon;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
public class MoveFileEntryPortletConfigurationIcon
extends BasePortletConfigurationIcon {
|
283 | mvcRenderCommandName.equals("/document_library/select_folder")) {
_addPortletBreadcrumbEntry(
request, "mvcRenderCommandName", mvcRenderCommandName, groupId,
ignoreRootFolder, portletURL);
}
<BUG>else {
portletURL.setParameter(
"mvcRenderCommandName", "/document_library/view");
}</BUG>
addPortletBreadcrumbEntries(folder, request, portletURL);
| mvcRenderCommandName.equals("/document_library/select_folder")) {
_addPortletBreadcrumbEntry(
request, "mvcRenderCommandName", mvcRenderCommandName, groupId,
ignoreRootFolder, portletURL);
|
284 | import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.util.PropsValues;
import com.liferay.portlet.PortletURLUtil;
import com.liferay.portlet.documentlibrary.display.context.DLUIItemKeys;
<BUG>import com.liferay.portlet.documentlibrary.model.DLFileEntryConstants;
import com.liferay.portlet.documentlibrary.util.DLUtil;</BUG>
import com.liferay.portlet.trash.util.TrashUtil;
import com.liferay.taglib.security.PermissionsURLTag;
import java.util.List;
| import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.util.PropsValues;
import com.liferay.portlet.PortletURLUtil;
import com.liferay.portlet.documentlibrary.display.context.DLUIItemKeys;
import com.liferay.portlet.documentlibrary.model.DLFileEntryConstants;
import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
import com.liferay.portlet.documentlibrary.util.DLUtil;
import com.liferay.portlet.trash.util.TrashUtil;
import com.liferay.taglib.security.PermissionsURLTag;
import java.util.List;
|
285 | LiferayPortletResponse liferayPortletResponse =
_getLiferayPortletResponse();
PortletURL portletURL = liferayPortletResponse.createRenderURL();
portletURL.setParameter(
"mvcRenderCommandName", "/document_library/move_entry");
<BUG>PortletURL redirectURL = liferayPortletResponse.createRenderURL();
redirectURL.setParameter(
"mvcRenderCommandName", "/document_library/view");
redirectURL.setParameter("folderId", String.valueOf(_folderId));
</BUG>
portletURL.setParameter("redirect", redirectURL.toString());
| LiferayPortletResponse liferayPortletResponse =
_getLiferayPortletResponse();
PortletURL portletURL = liferayPortletResponse.createRenderURL();
long folderId = _fileEntry.getFolderId();
if (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
|
286 | "package test " +
"class Foo extends Super {" +
" Number baz" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
<BUG>AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1);
sub.child(0, "baz : Number").numChildren(0);
</BUG>
setShowInherited(true);
| "package test " +
"class Foo extends Super {" +
" Number baz" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1).hasTextRegion(true);
sub.child(0, "baz : Number").numChildren(0).hasTextRegion(true);
setShowInherited(true);
|
287 | "package test " +
"class Foo extends Super {" +
" def Number baz() { null }" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
<BUG>AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1);
sub.child(0, "baz() : Number").numChildren(0);
</BUG>
setShowInherited(true);
| "package test " +
"class Foo extends Super {" +
" Number baz" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1).hasTextRegion(true);
sub.child(0, "baz : Number").numChildren(0).hasTextRegion(true);
setShowInherited(true);
|
288 | "package test " +
"class Foo extends Super {" +
" def dispatch void foo(Number x) { }" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
<BUG>AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1);
sub.child(0, "foo(Serializable) : void").numChildren(1).child(0, "foo(Number) : void").numChildren(0);
</BUG>
setShowInherited(true);
| "package test " +
"class Foo extends Super {" +
" Number baz" +
"}";
AssertBuilder assertBuilder = newAssertBuilder(model).numChildren(2);
AssertBuilder sub = assertBuilder.child(1, "Foo").numChildren(1).hasTextRegion(true);
sub.child(0, "baz : Number").numChildren(0).hasTextRegion(true);
setShowInherited(true);
|
289 | for (JvmConstructor constructor : inferredType.getDeclaredConstructors()) {
if (associations.getXtendConstructor(constructor) == null)
processedFeatures.add(constructor);
}
for (JvmFeature feature : remainingFeatures) {
<BUG>if (!processedFeatures.contains(feature)) {
createNodeForFeature(parentNode, inferredType, feature, feature);
}</BUG>
}
} else {
| for (JvmConstructor constructor : inferredType.getDeclaredConstructors()) {
if (associations.getXtendConstructor(constructor) == null)
processedFeatures.add(constructor);
}
for (JvmFeature feature : remainingFeatures) {
if (!processedFeatures.contains(feature)) {
EObject primarySourceElement = associations.getPrimarySourceElement(feature);
createNodeForFeature(parentNode, inferredType, feature,
primarySourceElement != null ? primarySourceElement : feature);
}
}
} else {
|
290 | return nextMatch;
} catch (NoSuchValueException e) {
throw new IllegalArgumentException(e);
}
}
<BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException {
</BUG>
List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear());
TimeNode days = null;
int lowestMonth = months.getValues().get(0);
| return nextMatch;
} catch (NoSuchValueException e) {
throw new IllegalArgumentException(e);
}
}
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear());
TimeNode days = null;
int lowestMonth = months.getValues().get(0);
|
291 | int lowestMonth = months.getValues().get(0);
int lowestHour = hours.getValues().get(0);
int lowestMinute = minutes.getValues().get(0);
int lowestSecond = seconds.getValues().get(0);
NearestValue nearestValue;
<BUG>DateTime newDate;
</BUG>
if(year.isEmpty()){
int newYear = yearsValueGenerator.generateNextValue(date.getYear());
<BUG>days = generateDays(cronDefinition, new DateTime(newYear, lowestMonth, 1, 0, 0));
</BUG>
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
| int lowestMonth = months.getValues().get(0);
int lowestHour = hours.getValues().get(0);
int lowestMinute = minutes.getValues().get(0);
int lowestSecond = seconds.getValues().get(0);
NearestValue nearestValue;
ZonedDateTime newDate;
if(year.isEmpty()){
int newYear = yearsValueGenerator.generateNextValue(date.getYear());
days = generateDays(cronDefinition, ZonedDateTime.of(LocalDateTime.of(newYear, lowestMonth, 1, 0, 0), date.getZone()));
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
|
292 | int newYear = yearsValueGenerator.generateNextValue(date.getYear());
<BUG>days = generateDays(cronDefinition, new DateTime(newYear, lowestMonth, 1, 0, 0));
</BUG>
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
}
<BUG>if(!months.getValues().contains(date.getMonthOfYear())) {
nearestValue = months.getNextValue(date.getMonthOfYear(), 0);
</BUG>
int nextMonths = nearestValue.getValue();
| int newYear = yearsValueGenerator.generateNextValue(date.getYear());
days = generateDays(cronDefinition, ZonedDateTime.of(LocalDateTime.of(newYear, lowestMonth, 1, 0, 0), date.getZone()));
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
}
if(!months.getValues().contains(date.getMonthValue())) {
nearestValue = months.getNextValue(date.getMonthValue(), 0);
int nextMonths = nearestValue.getValue();
|
293 | nearestValue = months.getNextValue(date.getMonthOfYear(), 0);
</BUG>
int nextMonths = nearestValue.getValue();
if(nearestValue.getShifts()>0){
newDate =
<BUG>new DateTime(date.getYear(), 1, 1, 0, 0, 0, date.getZone()).plusYears(nearestValue.getShifts());
</BUG>
return nextClosestMatch(newDate);
}
<BUG>if (nearestValue.getValue() < date.getMonthOfYear()) {
</BUG>
date = date.plusYears(1);
| int newYear = yearsValueGenerator.generateNextValue(date.getYear());
days = generateDays(cronDefinition, ZonedDateTime.of(LocalDateTime.of(newYear, lowestMonth, 1, 0, 0), date.getZone()));
return initDateTime(yearsValueGenerator.generateNextValue(date.getYear()), lowestMonth, days.getValues().get(0), lowestHour, lowestMinute, lowestSecond, date.getZone());
}
if(!months.getValues().contains(date.getMonthValue())) {
nearestValue = months.getNextValue(date.getMonthValue(), 0);
int nextMonths = nearestValue.getValue();
if(nearestValue.getShifts()>0){
newDate =
ZonedDateTime.of(LocalDateTime.of(date.getYear(), 1, 1, 0, 0, 0), date.getZone()).plusYears(nearestValue.getShifts());
return nextClosestMatch(newDate);
|
294 | boolean questionMarkSupported =
cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK);
if(questionMarkSupported){
return new TimeNode(
generateDayCandidatesQuestionMarkSupported(
<BUG>date.getYear(), date.getMonthOfYear(),
</BUG>
((DayOfWeekFieldDefinition)
cronDefinition.getFieldDefinition(DAY_OF_WEEK)
).getMondayDoWValue()
| boolean questionMarkSupported =
cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK);
if(questionMarkSupported){
return new TimeNode(
generateDayCandidatesQuestionMarkSupported(
date.getYear(), date.getMonthValue(),
((DayOfWeekFieldDefinition)
cronDefinition.getFieldDefinition(DAY_OF_WEEK)
).getMondayDoWValue()
|
295 | )
);
}else{
return new TimeNode(
generateDayCandidatesQuestionMarkNotSupported(
<BUG>date.getYear(), date.getMonthOfYear(),
</BUG>
((DayOfWeekFieldDefinition)
cronDefinition.getFieldDefinition(DAY_OF_WEEK)
).getMondayDoWValue()
| )
);
}else{
return new TimeNode(
generateDayCandidatesQuestionMarkNotSupported(
date.getYear(), date.getMonthValue(),
((DayOfWeekFieldDefinition)
cronDefinition.getFieldDefinition(DAY_OF_WEEK)
).getMondayDoWValue()
|
296 | }
public DateTime lastExecution(DateTime date){
</BUG>
Validate.notNull(date);
try {
<BUG>DateTime previousMatch = previousClosestMatch(date);
</BUG>
if(previousMatch.equals(date)){
previousMatch = previousClosestMatch(date.minusSeconds(1));
}
| }
}
public java.time.Duration timeToNextExecution(ZonedDateTime date){
return java.time.Duration.between(date, nextExecution(date));
}
public ZonedDateTime lastExecution(ZonedDateTime date){
Validate.notNull(date);
try {
ZonedDateTime previousMatch = previousClosestMatch(date);
if(previousMatch.equals(date)){
previousMatch = previousClosestMatch(date.minusSeconds(1));
}
|
297 | return previousMatch;
} catch (NoSuchValueException e) {
throw new IllegalArgumentException(e);
}
}
<BUG>public Duration timeFromLastExecution(DateTime date){
return new Interval(lastExecution(date), date).toDuration();
}
public boolean isMatch(DateTime date){
</BUG>
return nextExecution(lastExecution(date)).equals(date);
| return previousMatch;
} catch (NoSuchValueException e) {
throw new IllegalArgumentException(e);
|
298 | <BUG>package com.cronutils.model.time.generator;
import com.cronutils.model.field.CronField;</BUG>
import com.cronutils.model.field.expression.Every;
import com.cronutils.model.field.expression.FieldExpression;
import com.google.common.annotations.VisibleForTesting;
| package com.cronutils.model.time.generator;
import java.time.ZonedDateTime;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cronutils.model.field.CronField;
import com.cronutils.model.field.expression.Every;
import com.cronutils.model.field.expression.FieldExpression;
import com.google.common.annotations.VisibleForTesting;
|
299 | import com.cronutils.model.field.CronField;</BUG>
import com.cronutils.model.field.expression.Every;
import com.cronutils.model.field.expression.FieldExpression;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
<BUG>import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;</BUG>
class EveryFieldValueGenerator extends FieldValueGenerator {
| package com.cronutils.model.time.generator;
import java.time.ZonedDateTime;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cronutils.model.field.CronField;
import com.cronutils.model.field.expression.Every;
import com.cronutils.model.field.expression.FieldExpression;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
class EveryFieldValueGenerator extends FieldValueGenerator {
|
300 | private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class);
public EveryFieldValueGenerator(CronField cronField) {
super(cronField);
log.trace(String.format(
"processing \"%s\" at %s",
<BUG>cronField.getExpression().asString(), DateTime.now()
</BUG>
));
}
@Override
| private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class);
public EveryFieldValueGenerator(CronField cronField) {
super(cronField);
log.trace(String.format(
"processing \"%s\" at %s",
cronField.getExpression().asString(), ZonedDateTime.now()
));
}
@Override
|
Subsets and Splits