id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
36,701 | : 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;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
36,702 | 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];
|
36,703 | 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];
|
36,704 | 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 {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
36,705 | 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;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
36,706 | 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];
|
36,707 | 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);
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
36,708 | 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];
|
36,709 | 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];
|
36,710 | 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>... | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
36,711 | 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];
|
36,712 | 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];
|
36,713 | 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];
|
36,714 | 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];
|
36,715 | 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];
|
36,716 | 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];
|
36,717 | 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];
|
36,718 | 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]] = desti... | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
36,719 | : 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];
|
36,720 | 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];
|
36,721 | 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];
|
36,722 | 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];
|
36,723 | 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];
|
36,724 | 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];
|
36,725 | 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];
|
36,726 | 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];
|
36,727 | 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];
|
36,728 | 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... | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
36,729 | 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];
|
36,730 | 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];
|
36,731 | 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];
|
36,732 | 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];
|
36,733 | 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];
|
36,734 | 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];
|
36,735 | customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString());
customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName);
customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString());
customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName);
customTokens.put("%%mlTraceFo... | customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName);
customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName);
}
|
36,736 | 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 ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
36,737 | 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;
|
36,738 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
36,739 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VE... | [DELETED] |
36,740 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
36,741 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
36,742 | package wew.water.gpf;
<BUG>import org.esa.beam.framework.gpf.OperatorException;
public class ChlorophyllNetworkOperation implements NeuralNetworkOperation {
@Override
public void compute(float[] in, float[] out, int mask, int errMask, float a) {</BUG>
if(in.length != getNumberOfInputNodes()) {
| public class ChlorophyllNetworkOperation {
public static int compute(float[] in, float[] out) {
|
36,743 | if(in.length != getNumberOfInputNodes()) {
throw new IllegalArgumentException("Wrong input array size");
}
if(out.length != getNumberOfOutputNodes()) {
throw new IllegalArgumentException("Wrong output array size");
<BUG>}
NeuralNetworkComputer.compute(in, out, mask, errMask, a,
</BUG>
NeuralNetworkConstants.INPUT_SCALE... | final int[] rangeCheckErrorMasks = {
WaterProcessorOp.RESULT_ERROR_VALUES[1],
WaterProcessorOp.RESULT_ERROR_VALUES[2]
};
return NeuralNetworkComputer.compute(in, out, rangeCheckErrorMasks,
|
36,744 | +4.332827e-01, +4.453712e-01, -2.355489e-01, +4.329192e-02,
-3.259577e-02, +4.245090e-01, -1.132328e-01, +2.511418e-01,
-1.995074e-01, +1.797701e-01, -3.817864e-01, +2.854951e-01,
},
};
<BUG>private final double[][] input_hidden_weights = new double[][]{
</BUG>
{
-5.127986e-01, +5.872741e-01, +4.411426e-01, +1.344507e+... | private static final double[][] input_hidden_weights = new double[][]{
|
36,745 | -1.875955e-01, +7.851294e-01, -1.226189e+00, -1.852845e-01,
+9.392875e-01, +9.886471e-01, +8.400441e-01, -1.657109e+00,
+8.292500e-01, +6.291445e-01, +1.855838e+00, +7.817575e-01,
},
};
<BUG>private final double[][] input_intercept_and_slope = new double[][]{
</BUG>
{+4.165578e-02, +1.161174e-02},
{+3.520901e-02, +1.06... | private static final double[][] input_intercept_and_slope = new double[][]{
|
36,746 | {+2.468300e-01, +8.368545e-01},
{-6.613120e-01, +1.469582e+00},
{-6.613120e-01, +1.469582e+00},
{+7.501110e-01, +2.776545e-01},
};
<BUG>private final double[][] output_weights = new double[][]{
</BUG>
{-6.498447e+00,},
{-1.118659e+01,},
{+7.141798e+00,},
| private static final double[][] output_weights = new double[][]{
|
36,747 | package wew.water.gpf;
public class NeuralNetworkComputer {
<BUG>public static void compute(float[] in, float[] out, int mask, int errMask, float a,
</BUG>
double[][] input_scale_limits,
double[] input_scale_offset_factors,
int[] input_scale_flag,
| public static int compute(float[] in, float[] out, int[] rangeCheckErrorMasks,
|
36,748 | package wew.water.gpf;
<BUG>public class AtmosphericCorrectionNetworkOperation implements NeuralNetworkOperation {
@Override
public void compute(float[] in, float[] out, int mask, int errMask, float a) {
if(in.length != getNumberOfInputNodes()) {
</BUG>
throw new IllegalArgumentException("Wrong input array size");
| import java.util.Arrays;
public class AtmosphericCorrectionNetworkOperation {
public static int compute(float[] in, float[] out) {
if (in.length != getNumberOfInputNodes()) {
|
36,749 | import android.util.Log;
import android.view.SurfaceView;
import android.view.WindowManager;
import android.widget.MediaController;
import android.widget.Toast;
<BUG>import android.widget.VideoView;
import com.felkertech.cumulustv.model.ChannelDatabase;</BUG>
import com.felkertech.cumulustv.model.JsonChannel;
import co... | import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.Target;
import com.felkertech.cumulustv.model.ChannelDatabase;
|
36,750 | import com.felkertech.cumulustv.model.JsonChannel;
import com.felkertech.cumulustv.player.CumulusTvPlayer;
import com.felkertech.cumulustv.player.CumulusWebPlayer;
import com.felkertech.cumulustv.player.MediaSourceFactory;
import com.felkertech.n.cumulustv.R;
<BUG>import com.google.android.exoplayer2.DefaultLoadControl... | import java.util.concurrent.ExecutionException;
public class CumulusVideoPlayback extends AppCompatActivity {
|
36,751 | return;
}
Log.d(TAG, "Adding dynamic shortcut to " + jsonChannel.getName());
String logo = ChannelDatabase.getNonNullChannelLogo(jsonChannel);
try {
<BUG>Bitmap logoBitmap = Picasso.with(getApplicationContext())
.load(logo)
.get();</BUG>
ShortcutManager shortcutManager = getSystemService(ShortcutManager.class);
| Bitmap logoBitmap = Glide.with(getApplicationContext())
.asBitmap()
.into(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.get();
|
36,752 | .setLongLabel(jsonChannel.getNumber() + " - " + jsonChannel.getName())
.setIcon(Icon.createWithBitmap(logoBitmap))
.setIntent(playVideo)
.build();
shortcutManager.setDynamicShortcuts(Arrays.asList(shortcut));
<BUG>} catch (IOException e) {
e.printStackTrace();</BUG>
}
}
}
| } catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
|
36,753 | setContentView(v);
}
@Override
protected void onResume() {
super.onResume();
<BUG>new MaterialDialog.Builder(this)
.title("Choose a file")
.items(getTitles())
.itemsCallback(new MaterialDialog.ListCallback() {
@Override
public void onSelection(MaterialDialog dialog, View itemView, int position,
CharSequence text) {</... | new AlertDialog.Builder(this)
.setTitle("Choose a file")
.setItems(getTitles(), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogInterface, int position) {
|
36,754 | Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("https://raw.githubusercontent.com/Fleker/Cumulus" +
"TV/master/app/src/test/resources/m3u_test1.m3u"));
startActivity(i);
} else if (position == 1) {
<BUG>new MaterialDialog.Builder(FileIoTestActivity.this)
.title("Here's how your Channel Data Looks:")
.... | new AlertDialog.Builder(FileIoTestActivity.this)
.setTitle("Here's how your Channel Data Looks:")
.setMessage(ChannelDatabase.getInstance(FileIoTestActivity.this)
.show();
|
36,755 | LOG.debug("Decompressing {} bytes", input.length);
try
{
while (decompressor.getRemaining() > 0 && !decompressor.finished())
{
<BUG>byte[] output = new byte[Math.min(input.length * 2, 64 * 1024)];
</BUG>
int decompressed = decompressor.inflate(output);
if (decompressed == 0)
{
| byte[] output = new byte[Math.min(input.length * 2, 32 * 1024)];
|
36,756 | 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
max... | 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
|
36,757 | 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 IndexColor... | 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++) {
|
36,758 | 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++) {
|
36,759 | 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
max... | 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
|
36,760 | 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 += l... | 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++) {
|
36,761 | 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
max... | 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
|
36,762 | 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 += l... | 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++) {
|
36,763 | 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
max... | 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
|
36,764 | 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 += lineS... | 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++) {
|
36,765 | 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
max... | 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
|
36,766 | 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 += l... | 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++) {
|
36,767 | 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
max... | 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
|
36,768 | 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 +=... | 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++) {
|
36,769 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
36,770 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
36,771 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
36,772 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
36,773 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
36,774 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
36,775 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
36,776 |
final ImageIcon terminal = ImageUtilities.loadImageIcon("com/sessonad/quickopener/icons/terminal.png",false);
</BUG>
CustomCommandPopupAction cAction=new CustomCommandPopupAction("Launch custom command...",run16);
<BUG>CustomTerminalPopupAction tAction=new CustomTerminalPopupAction("Open shell in...",folder);
CustomF... | }
@Override
public Component getToolbarPresenter() {
final ImageIcon run16 = ImageUtilities.loadImageIcon("com/sessonad/quickopener/icons/run.png", false);
final ImageIcon run32 = ImageUtilities.loadImageIcon("com/sessonad/quickopener/icons/run24.png", false);
final ImageIcon folder = ImageUtilities.loadImageIcon("com/... |
36,777 | public Path(DataObject dataObj) {
this.dataObj = dataObj;
}
@Override
public void actionPerformed(ActionEvent e) {
<BUG>String path=PathFinder.getPathFromDataObject(dataObj);
</BUG>
try {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Clipboard clipboard = toolkit.getSystemClipboard();
| String path=PathFinder.getPathFromDataObject(dataObj,false);
|
36,778 | this.dataObj = dataObj;
}
@Override
public void actionPerformed(ActionEvent e) {
try {
<BUG>String path=PathFinder.getPathFromDataObject(dataObj);
</BUG>
Commands.getPlatform().openInShell(path);
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, ex.getMessage());
| String path=PathFinder.getPathFromDataObject(dataObj,true);
|
36,779 | return FileUtil.toFile(root).getAbsolutePath();
} catch (Exception e) {
return null;
}
}
<BUG>public static String getFileFromSelectedNode(){
</BUG>
TopComponent topActive = TopComponent.getRegistry().getActivated();
Node[]nodes = topActive.getActivatedNodes();
if(nodes.length==1){
| public static String getFileFromSelectedNode(boolean isFolder){
|
36,780 | </BUG>
TopComponent topActive = TopComponent.getRegistry().getActivated();
Node[]nodes = topActive.getActivatedNodes();
if(nodes.length==1){
DataObject dataObj=nodes[0].getLookup().lookup(DataObject.class);
<BUG>return (dataObj!=null)?getPathFromDataObject(dataObj):null;
</BUG>
}else{
return null;
}
| return FileUtil.toFile(root).getAbsolutePath();
} catch (Exception e) {
public static String getFileFromSelectedNode(boolean isFolder){
return (dataObj!=null)?getPathFromDataObject(dataObj,isFolder):null;
|
36,781 | public FileSystem(DataObject dataObj) {
this.dataObj = dataObj;
}
@Override
public void actionPerformed(ActionEvent e) {
<BUG>File toOpen = PathFinder.getFileFromDataObject(dataObj);
</BUG>
try {
Commands.getPlatform().browseInFileSystem(toOpen);
} catch (Exception ex) {
| File toOpen = PathFinder.getFileFromDataObject(dataObj,true);
|
36,782 | package edu.stanford.nlp.dcoref;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
import java.util.List;
import java.util.Map;</BUG>
import java.util.Properties;
import java.util.Set;
| import java.util.Collections;
import java.util.Locale;
import java.util.Map;
|
36,783 | "likely", "necessary", "probable", "possible", "uncertain", "unlikely", "unsure", "likelihood", "probability",
"possibility", "eventual", "hypothetical" , "presumed", "supposed", "reported", "apparent"));
public final Set<String> personPronouns = Generics.newHashSet();
public final Set<String> allPronouns = Generics.ne... | private final Map<String, Set<String>> demonyms = Generics.newHashMap();
|
36,784 | import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
<BUG>import java.util.List;
import java.util.Set;</BUG>
import edu.stanford.nlp.classify.LogisticClassifier;
import edu.stanford.nlp.dcoref.Dictionaries.Animacy;
import ed... | import java.util.Locale;
import java.util.Set;
|
36,785 | if (modelListener != null) {
modelListenersContainer.registerModelListener(
modelName, modelListener);
}
}
<BUG>EventsContainer eventsContainer = _eventsContainerMap.get(
servletContextName);
if (eventsContainer == null) {
eventsContainer = new EventsContainer();
_eventsContainerMap.put(servletContextName, eventsContai... | [DELETED] |
36,786 | }</BUG>
List<Element> eventElements = rootElement.elements("event");
for (Element eventElement : eventElements) {
String eventName = eventElement.elementText("event-type");
String eventClassName = eventElement.elementText("event-class");
<BUG>Object obj = initEvent(
eventName, eventClassName, portletClassLoader);
if (... | if (modelListener != null) {
modelListenersContainer.registerModelListener(
modelName, modelListener);
eventName, eventClassName, portletClassLoader,
serviceRegistrations);
|
36,787 | if (_propsKeysSessionEvents.contains(eventName)) {
Class<?> clazz = portletClassLoader.loadClass(eventClassName);
SessionAction sessionAction = (SessionAction)clazz.newInstance();
sessionAction = new InvokerSessionAction(
sessionAction, portletClassLoader);
<BUG>EventsProcessorUtil.registerEvent(eventName, sessionActio... | Map<String, Object> properties = new HashMap<String, Object>();
properties.put("key", eventName);
ServiceRegistration<LifecycleAction> serviceRegistration =
registry.registerService(
LifecycleAction.class, sessionAction, properties);
serviceRegistrations.put(eventClassName, serviceRegistration);
|
36,788 | private Map<String, DLFileEntryProcessorContainer>
_dlFileEntryProcessorContainerMap =
new HashMap<String, DLFileEntryProcessorContainer>();
private Map<String, DLRepositoryContainer> _dlRepositoryContainerMap =
new HashMap<String, DLRepositoryContainer>();
<BUG>private Map<String, EventsContainer> _eventsContainerMap ... | [DELETED] |
36,789 | public class Relationship {
private static final int ARROWHEAD_LENGTH = 10;</BUG>
private static final int ARROWHEAD_WIDTH = ARROWHEAD_LENGTH / 2;
private Line edge;
private HTML label;
<BUG>private Widget from;
private Widget to;
</BUG>
private Line arrowheadLeft;
| package org.neo4j.server.ext.visualization.gwt.client;
import org.vaadin.gwtgraphics.client.Line;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Position;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.HTML;
private static final int ARROWHEAD_LENGTH = 1... |
36,790 | arrowheadRight = new Line(0, 0, 0, 0);
parent.add(arrowheadRight);
updateArrowhead();
}
private void addEdge(VGraphComponent parent) {
<BUG>edge = new Line((int) Math.round(getCenterX(from)),
(int) Math.round(getCenterY(from)),
(int) Math.round(getCenterX(to)),
(int) Math.round(getCenterY(to)));
</BUG>
parent.add(edge... | [DELETED] |
36,791 | label = new HTML("<div style='text-align:center'>" + type + "</div>");
parent.add(label);
Style style = label.getElement().getStyle();
style.setPosition(Position.ABSOLUTE);
style.setBackgroundColor("white");
<BUG>style.setFontSize(9, Unit.PX);
</BUG>
updateLabel();
}
void update() {
| style.setFontSize(10, Unit.PX);
|
36,792 | void update() {
updateEdge();
updateLabel();
updateArrowhead();
}
<BUG>private void updateArrowhead() {
double originX = getArrowheadOrigin(getCenterX(from), getCenterX(to));
double originY = getArrowheadOrigin(getCenterY(from), getCenterY(to));
double angle = Math.atan2(getCenterY(to) - getCenterY(from),
getCenterX(... | double fromX = from.getCenterX();
double fromY = from.getCenterY();
double toX = to.getCenterX();
double toY = to.getCenterY();
double originX = getArrowheadOrigin(fromX, toX);
double originY = getArrowheadOrigin(fromY, toY);
double angle = Math.atan2(toY - fromY, toX - fromX);
|
36,793 | double rightY = originY
+ rotateY(-ARROWHEAD_LENGTH, ARROWHEAD_WIDTH, angle);
updateLine(arrowheadRight, originX, originY, rightX, rightY);
}
private void updateEdge() {
<BUG>updateLine(edge, getCenterX(from), getCenterY(from), getCenterX(to),
getCenterY(to));
</BUG>
}
| updateLine(edge, from.getCenterX(), from.getCenterY(), to.getCenterX(),
to.getCenterY());
|
36,794 | private int picHeight = 8; // Works better with power of 2
private PVector captureOffset;
private boolean invY;
protected int col;
public ColorDetection(PaperScreen paperScreen) {
<BUG>this.invY = false;
this.paperScreen = paperScreen;</BUG>
setCaptureOffset(new PVector());
}
public void initialize() {
| this.invY = paperScreen.isIsDrawingOnScreen();
this.paperScreen = paperScreen;
|
36,795 | private MarkerBoard board = MarkerBoardInvalid.board;
private PaperScreen paperScreen = null; // todo : invalid one...
private boolean useBoardLocation = false;
private boolean usePaperLocation = false;
private boolean useManualConrers = false;
<BUG>private PVector bottomLeftCorner = new PVector(0, 0), captureSizeMM = ... | private PVector topLeftCorner = new PVector(0, 0);
private boolean isYUp = true;
private Camera camera;
|
36,796 | extractedIplImage = Utils.createImageFrom(extractedImage);
}
}
private void computeCorners() {
PMatrix3D pos = null;
<BUG>if(useManualConrers){
return ;
}</BUG>
if (usePaperLocation) {
| if (useManualConrers) {
return;
|
36,797 | String command = null;
String result = null;
Socket socket;
while (continueListenning() && (socket = getSocket()) != null) {
try {
<BUG>time = System.currentTimeMillis();
try {</BUG>
InputStream inputStream = socket.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "ISO-8859-1")... | InetAddress ipAddress = socket.getInetAddress();
|
36,798 | InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "ISO-8859-1");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
command = bufferedReader.readLine();
if (command == null) {
command = "DISCONNECTED";
<BUG>} else {
result = AdministrationTCP.this.processCommand(command);
</BU... | Client client = Client.get(ipAddress);
User user = client == null ? null : client.getUser();
result = AdministrationTCP.this.processCommand(user, command);
|
36,799 | } catch (SocketException ex) {
Server.logDebug("interrupted " + getName() + " connection.");
result = "INTERRUPTED\n";
} finally {
socket.close();
<BUG>InetAddress address = socket.getInetAddress();
</BUG>
clearSocket();
Server.logAdministration(
time,
| InetAddress address = ipAddress;
|
36,800 | 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 ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.