id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
1,601 | sb.append(parsed.get(element));
}
sb.append("}]");
return sb.toString();
}
<BUG>private static void checkElement(
</BUG>
Chronology<?> chronology,
Chronology<?> override,
ChronoElement<?> element
| private static Chronology<?> checkElement(
|
1,602 | private LinkedList<AttributeSet> stack;
private int sectionID;
private int reservedIndex;
private int leftPadWidth;
private DayPeriod dayPeriod;
<BUG>private Map<ChronoElement<?>, Object> defaultMap;
private Builder(</BUG>
Chronology<T> chronology,
Locale locale
) {
| private Chronology<?> deepestParser;
private int depthOfParser;
private Builder(
|
1,603 | this.stack = new LinkedList<AttributeSet>();
this.sectionID = 0;
this.reservedIndex = -1;
this.leftPadWidth = 0;
this.dayPeriod = null;
<BUG>this.defaultMap = new HashMap<ChronoElement<?>, Object>();
}</BUG>
public Chronology<?> getChronology() {
return ((this.override == null) ? this.chronology : this.override);
}
| this.deepestParser = chronology;
this.depthOfParser = 0;
|
1,604 | int start = i++;
while ((i < n) && formatPattern.charAt(i) == c) {
i++;
}
Map<ChronoElement<?>, ChronoElement<?>> map =
<BUG>patternType.registerSymbol(this, loc, c, i - start);
if (replacement.isEmpty()) {</BUG>
replacement = map;
} else {
Map<ChronoElement<?>, ChronoElement<?>> tmp =
| if (!map.isEmpty()) {
if (replacement.isEmpty()) {
|
1,605 | replacement = map;
} else {
Map<ChronoElement<?>, ChronoElement<?>> tmp =
new HashMap<ChronoElement<?>, ChronoElement<?>>(replacement);
tmp.putAll(map);
<BUG>replacement = tmp;
}</BUG>
i--; // Schleifenzähler nicht doppelt inkrementieren
} else if (c == '\'') {
this.addLiteralChars(literal);
| }
}
|
1,606 | this.steps.set(ri, numStep.reserve(2));
}
}
return this;
}
<BUG>public Builder<T> addTimezoneID() {
Class<?> chronoType = this.chronology.getChronoType();
if (UnixTime.class.isAssignableFrom(chronoType)) {</BUG>
this.addProcessor(TimezoneIDProcessor.INSTANCE);
return this;
| if (hasUnixChronology(this.chronology)) {
|
1,607 | this.chronology,
this.override,
this.locale,
this.steps,
this.defaultMap,
<BUG>attributes
);</BUG>
if (this.dayPeriod != null) {
AttributeSet as = formatter.globalAttributes;
| attributes,
this.deepestParser
);
|
1,608 | }
private boolean isDayPeriodSupported(ChronoElement<?> element) {
if (!element.name().endsWith("_DAY_PERIOD")) {
return false;
}
<BUG>if ((this.override == null) && (!this.chronology.isSupported(element))) {
Chronology<?> child = this.chronology.preparser();
return ((child != null) && child.isSupported(element));
}</B... | if (m != null) {
for (Integer key : m.keySet()) {
this.steps.set(key.intValue(), m.get(key));
|
1,609 | ((c >= 'A') && (c <= 'Z'))
|| ((c >= 'a') && (c <= 'z'))
);
}
private void checkElement(ChronoElement<?> element) {
<BUG>ChronoFormatter.checkElement(this.chronology, this.override, element);
}</BUG>
private void ensureDecimalDigitsOnlyOnce() {
for (FormatStep step : this.steps) {
| Chronology<?> test = ChronoFormatter.checkElement(this.chronology, this.override, element);
int depth = ChronoFormatter.getDepth(test, this.chronology, this.override);
if (depth >= this.depthOfParser) {
this.deepestParser = test;
this.depthOfParser = depth;
|
1,610 | ) throws IOException;
void parse(
CharSequence text,
ParseLog status,
AttributeQuery attributes,
<BUG>ParsedValues parsedResult,
boolean quickPath</BUG>
);
ChronoElement<V> getElement();
FormatProcessor<V> withElement(ChronoElement<V> element);
| ParsedEntity<?> parsedResult,
boolean quickPath
|
1,611 | import javax.xml.bind.DatatypeConverter;
import org.apache.johnzon.mapper.internal.AdapterKey;
public class MappingGeneratorImpl implements MappingGenerator {
private final MapperConfig config;
private final JsonGenerator generator;
<BUG>protected final Mappings mappings;
</BUG>
MappingGeneratorImpl(MapperConfig config... | private final Mappings mappings;
|
1,612 | 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
|
1,613 | 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++) {
|
1,614 | 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++) {
|
1,615 | 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
|
1,616 | 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++) {
|
1,617 | 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
|
1,618 | 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++) {
|
1,619 | 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
|
1,620 | 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++) {
|
1,621 | 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
|
1,622 | 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++) {
|
1,623 | 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
|
1,624 | 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++) {
|
1,625 | 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);
}
|
1,626 | private static final String ADAPTER_NAME="RancidProvisioningAdapter";
private static final String RANCID_COMMENT="node provisioned by opennms";
public static final String NAME = "RancidProvisioningAdapter";
private volatile static ConcurrentMap<Integer, RancidNode> m_onmsNodeRancidNodeMap;
@Override
<BUG>AdapterOperati... | log().debug("Scheduling: " + type + " for nodeid: " + nodeId);
if (type.equals(AdapterOperationType.CONFIG_CHANGE)) {
|
1,627 | (String)m_template.execute(new TransactionCallback() {
public Object doInTransaction(TransactionStatus arg0) {
return getSuitableIpForRancid(nodeId);
}
});
<BUG>return new AdapterOperationSchedule(m_rancidAdapterConfig.getDelay(ipaddress),60000, m_rancidAdapterConfig.getRetries(ipaddress), TimeUnit.MILLISECONDS);
}</BU... | long initialDelay = m_rancidAdapterConfig.getDelay(ipaddress);
int retries = m_rancidAdapterConfig.getRetries(ipaddress);
log().debug("Setting initialDelay: " + initialDelay);
log().debug("Setting retries: " + retries);
return new AdapterOperationSchedule(initialDelay,60, retries, TimeUnit.SECONDS);
|
1,628 | public void handleRancidDownLoadFailure(Event e) {
log().debug("get Event uei/id: " + e.getUei() + "/" + e.getDbid());
if (e.hasNodeid()) {
int nodeId = Long.valueOf(e.getNodeid()).intValue();
if (m_onmsNodeRancidNodeMap.containsKey(Integer.valueOf(nodeId))) {
<BUG>updateRancidNodeState(nodeId, true);
</BUG>
doNodeConf... | updateRancidNodeState(nodeId, false);
|
1,629 | import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
<BUG>import android.graphics.drawable.GradientDrawable;
import android.os.Handler;</BUG>
import android.os.Message;
import android.support.v4.con... | import android.os.Bundle;
import android.os.Handler;
|
1,630 | import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import com.xbeats.swipebacksample.common.CustomApplication;
<BUG>public class BaseActivity extends AppCompatActivity {
private static f... | private static final String CURRENT_POINT_X = "currentPointX"; //点击事件
private static final int MSG_ACTION_DOWN = 1; //点击事件
|
1,631 | super.handleMessage(msg);
final int width = getResources().getDisplayMetrics().widthPixels;
final FrameLayout contentView = getContentView();
switch (msg.what) {
case MSG_ACTION_DOWN:
<BUG>CustomApplication application = (CustomApplication) getApplication();
Activity previousActivity = application.getActivityLifecycleH... | [DELETED] |
1,632 | startSlideAnim(true);
break;
case MSG_SLIDE_CANCELED:
mDistanceX = 0;
mIsSliding = false;
<BUG>contentView.removeViewAt(1);
resetPreviewView(0);
break;</BUG>
case MSG_SLIDE_PROCEED:
startSlideAnim(false);
| resetShadowView();
resetPreviewView();
|
1,633 | AnimatorSet animatorSet = new AnimatorSet();
animatorSet.setDuration(slideCanceled ? 150 : 300);
animatorSet.playTogether(previewViewAnim, shadowViewAnim, currentViewAnim);
animatorSet.addListener(new AnimatorListenerAdapter() {
@Override
<BUG>public void onAnimationEnd(Animator animation) {
mIsSlideAnimPlaying = false... | if (slideCanceled) {
|
1,634 | import org.apache.catalina.core.StandardContext;
import org.apache.tomcat.JarScanType;
import org.apache.tomcat.JarScanner;
import org.apache.tomcat.JarScannerCallback;
import org.apache.tomcat.util.ExceptionUtils;
<BUG>import org.apache.tomcat.util.descriptor.DigesterFactory;
import org.apache.tomcat.util.descriptor.w... | import org.apache.tomcat.util.descriptor.XmlErrorHandler;
import org.apache.tomcat.util.descriptor.web.ApplicationListener;
|
1,635 | import org.apache.tomcat.util.bcel.classfile.ClassFormatException;
import org.apache.tomcat.util.bcel.classfile.ClassParser;
import org.apache.tomcat.util.bcel.classfile.ElementValue;
import org.apache.tomcat.util.bcel.classfile.ElementValuePair;
import org.apache.tomcat.util.bcel.classfile.JavaClass;
<BUG>import org.a... | import org.apache.tomcat.util.descriptor.XmlErrorHandler;
|
1,636 | import org.apache.tomcat.util.descriptor.web.MultipartDef;
import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
import org.apache.tomcat.util.descriptor.web.SecurityRoleRef;
import org.apache.tomcat.util.descriptor.web.ServletDef;
import org.apache.tomcat.util.descriptor.web.SessionConfig;
<BUG>import org.a... | import org.apache.tomcat.util.descriptor.web.WebXmlParser;
import org.apache.tomcat.util.digester.Digester;
|
1,637 | protected final Map<Class<?>, Set<ServletContainerInitializer>> typeInitializerMap =
new HashMap<>();
protected final Map<String,JavaClassCacheEntry> javaClassCache =
new HashMap<>();
protected boolean handlesTypesAnnotations = false;
<BUG>protected boolean handlesTypesNonAnnotations = false;
protected Digester webDige... | private WebXmlParser webXmlParser;
|
1,638 | log.debug(sm.getString("contextConfig.init"));
}
context.setConfigured(false);
ok = true;
contextConfig(contextDigester);
<BUG>createWebXmlDigester(context.getXmlNamespaceAware(),
</BUG>
context.getXmlValidation());
}
protected synchronized void beforeStart() {
| webXmlParser = new WebXmlParser(context.getXmlNamespaceAware(),
|
1,639 | protected void webConfig() {
Set<WebXml> defaults = new HashSet<>();
defaults.add(getDefaultWebXmlFragment());
WebXml webXml = createWebXml();
InputSource contextWebXml = getContextWebXmlSource();
<BUG>parseWebXml(contextWebXml, webXml, false);
ServletContext sContext = context.getServletContext();</BUG>
Map<String,We... | if (!webXmlParser.parseWebXml(contextWebXml, webXml, false)) {
ok = false;
}
ServletContext sContext = context.getServletContext();
|
1,640 | fragment.setDistributable(true);
} else {
InputSource source = new InputSource(
resourceURL.toString() + "!/" + FRAGMENT_LOCATION);
source.setByteStream(is);
<BUG>parseWebXml(source, fragment, true);
}</BUG>
} finally {
if (jar != null) {
| if (!webXmlParser.parseWebXml(source, fragment, true)) {
ok = false;
}
}
|
1,641 | if (fragmentFile.isFile()) {
stream = new FileInputStream(fragmentFile);
InputSource source =
new InputSource(fragmentFile.toURI().toURL().toString());
source.setByteStream(stream);
<BUG>parseWebXml(source, fragment, true);
} else {</BUG>
fragment.setDistributable(true);
}
| if (!webXmlParser.parseWebXml(source, fragment, true)) {
ok = false;
} else {
|
1,642 | private static final String DATASET_CAPACITY_TABLE = "dataset_capacity";
private static final String DATASET_TAG_TABLE = "dataset_tag";
private static final String DATASET_CASE_SENSITIVE_TABLE = "dataset_case_sensitivity";
private static final String DATASET_REFERENCE_TABLE = "dataset_reference";
private static final S... | private static final String DATASET_SECURITY_TABLE = "dataset_security_info";
|
1,643 | throw new IllegalArgumentException(
"Dataset deployment info update fail, " + "Json missing necessary fields: " + root.toString());
</BUG>
}
<BUG>final Object[] idUrn = findIdAndUrn(idNode, urnNode);
final Integer datasetId = (Integer) idUrn[0];</BUG>
final String urn = (String) idUrn[1];
ObjectMapper om = new ObjectMa... | "Dataset deployment info update error, missing necessary fields: " + root.toString());
final Object[] idUrn = findDataset(root);
if (idUrn[0] == null || idUrn[1] == null) {
throw new IllegalArgumentException("Cannot identify dataset from id/uri/urn: " + root.toString());
final Integer datasetId = (Integer) idUrn[0];
|
1,644 | rec.setModifiedTime(System.currentTimeMillis() / 1000);
if (datasetId == 0) {
DatasetRecord record = new DatasetRecord();
record.setUrn(urn);
record.setSourceCreatedTime("" + rec.getCreateTime() / 1000);
<BUG>record.setSchema(rec.getOriginalSchema());
record.setSchemaType(rec.getFormat());
</BUG>
record.setFields((Str... | record.setSchema(rec.getOriginalSchema().getText());
record.setSchemaType(rec.getOriginalSchema().getFormat());
|
1,645 | datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
rec.setDatasetId(datasetId);
}
else {
DICT_DATASET_WRITER.execute(UPDATE_DICT_DATASET_WITH_SCHEMA_CHANGE,
<BUG>new Object[]{rec.getOriginalSchema(), rec.getFormat(), StringUtil.objectToJsonString(rec.getFieldSchema()),
"API", System.curr... | new Object[]{rec.getOriginalSchema().getText(), rec.getOriginalSchema().getFormat(),
StringUtil.objectToJsonString(rec.getFieldSchema()), "API", System.currentTimeMillis() / 1000, datasetId});
|
1,646 | case "deploymentInfo":
try {
DatasetInfoDao.updateDatasetDeployment(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change exception: deployment ", ex);
<BUG>}
break;
case "caseSensitivity":
try {
DatasetInfoDao.updateDatasetCaseSensitivity(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change ex... | [DELETED] |
1,647 | private static final Icon ICON = null;
private static Logger LOG = Logger.getLogger(MakeFieldStatic_Action.class);
public MakeFieldStatic_Action() {
super("Make Field Static", "", ICON);
this.setIsAlwaysVisible(false);
<BUG>this.setExecuteOutsideCommand(false);
</BUG>
}
public boolean isApplicable(AnActionEvent event, ... | this.setExecuteOutsideCommand(true);
|
1,648 | private static final Icon ICON = null;
private static Logger LOG = Logger.getLogger(MoveStaticField_Action.class);
public MoveStaticField_Action() {
super("Move Static Field", "", ICON);
this.setIsAlwaysVisible(false);
<BUG>this.setExecuteOutsideCommand(false);
</BUG>
}
public boolean isApplicable(AnActionEvent event, ... | this.setExecuteOutsideCommand(true);
|
1,649 | private static final Icon ICON = null;
private static Logger LOG = Logger.getLogger(MoveStaticMethod_Action.class);
public MoveStaticMethod_Action() {
super("Move Static Method", "", ICON);
this.setIsAlwaysVisible(false);
<BUG>this.setExecuteOutsideCommand(false);
</BUG>
}
public boolean isApplicable(AnActionEvent even... | this.setExecuteOutsideCommand(true);
|
1,650 | private static final Icon ICON = null;
private static Logger LOG = Logger.getLogger(ConvertAnonymousClass_Action.class);
public ConvertAnonymousClass_Action() {
super("Convert Anonymous Class", "", ICON);
this.setIsAlwaysVisible(false);
<BUG>this.setExecuteOutsideCommand(false);
</BUG>
}
public boolean isApplicable(AnA... | this.setExecuteOutsideCommand(true);
|
1,651 | private static final Icon ICON = null;
private static Logger LOG = Logger.getLogger(MakeFieldFinal_Action.class);
public MakeFieldFinal_Action() {
super("Make Field Final", "", ICON);
this.setIsAlwaysVisible(false);
<BUG>this.setExecuteOutsideCommand(false);
</BUG>
}
public boolean isApplicable(AnActionEvent event, fin... | this.setExecuteOutsideCommand(true);
|
1,652 | package alien4cloud.rest.orchestrator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
<BUG>import java.util.stream.Collectors;
import javax.annotation.Resource;</BUG>
import org.apache.commons.collections4.MapUtils;
import org.elasticsearch.common.collect.Lists;
import org.e... | import java.util.stream.IntStream;
import javax.annotation.Resource;
|
1,653 | }
List<ApplicationEnvironmentAuthorizationDTO> result = Lists.newArrayList(aeaDTOsMap.values());</BUG>
return RestResponseBuilder.<List<ApplicationEnvironmentAuthorizationDTO>> builder().data(result).build();
<BUG>}
}
</BUG>
| if (request.getEnvironmentsToAdd() != null && request.getEnvironmentsToAdd().length > 0) {
List<String> envToAddSet = Arrays.stream(request.getEnvironmentsToAdd()).filter(env -> !envIds.contains(env)).collect(Collectors.toList());
resourcePermissionService.grantPermission(location, Subject.ENVIRONMENT, envToAddSet.toAr... |
1,654 | package alien4cloud.rest.orchestrator.model;
import alien4cloud.model.application.Application;
<BUG>import alien4cloud.model.application.ApplicationEnvironment;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApplicationEnvironmentAuthorizationDTO {</BUG>
private Applicat... | import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import org.elasticsearch.common.collect.Lists;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
|
1,655 | if (transMeta.getMaxDateConnection()!=null &&
transMeta.getMaxDateTable()!=null && transMeta.getMaxDateTable().length()>0 &&
transMeta.getMaxDateField()!=null && transMeta.getMaxDateField().length()>0
)
{
<BUG>log.logDetailed(toString(), Messages.getString("Trans.Log.LookingForMaxdateConnection")+transMeta.getMaxDateCo... | log.logDetailed(toString(), Messages.getString("Trans.Log.LookingForMaxdateConnection",""+transMeta.getMaxDateConnection())); //$NON-NLS-1$ //$NON-NLS-2$
|
1,656 | log.logDetailed(toString(), Messages.getString("Trans.Log.NoLastDateFoundOnTheMaxdateConnection")); //$NON-NLS-1$
}
}
catch(KettleException e)
{
<BUG>throw new KettleTransException(Messages.getString("Trans.Log.ErrorConnectingToDatabase")+transMeta.getMaxDateConnection()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$
</BUG>
}
fi... | throw new KettleTransException(Messages.getString("Trans.Exception.ErrorConnectingToDatabase",""+transMeta.getMaxDateConnection()), e); //$NON-NLS-1$ //$NON-NLS-2$
|
1,657 | maxdb.disconnect();
}
}
else
{
<BUG>throw new KettleTransException(Messages.getString("Trans.Exception.MaximumDateConnectionCouldNotBeFound")+transMeta.getMaxDateConnection()+"] couldn't be found!"); //$NON-NLS-1$ //$NON-NLS-2$
</BUG>
}
}
if (transMeta.nrDependencies()>0)
| throw new KettleTransException(Messages.getString("Trans.Exception.MaximumDateConnectionCouldNotBeFound",""+transMeta.getMaxDateConnection())); //$NON-NLS-1$ //$NON-NLS-2$
|
1,658 | maxdepdate=maxvalue.getDate();
}
}
else
{
<BUG>throw new KettleTransException(Messages.getString("Trans.Exception.UnableToGetDependencyInfoFromDB")+td.getDatabase().getName()+"."+td.getTablename()+"."+td.getFieldname()+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
</BUG>
}
}
else
| [DELETED] |
1,659 | depdb.disconnect();
}
}
else
{
<BUG>throw new KettleTransException(Messages.getString("Trans.Exception.ConnectionCouldNotBeFound")+td.getDatabase()+"] couldn't be found!"); //$NON-NLS-1$ //$NON-NLS-2$
</BUG>
}
log.logDetailed(toString(), Messages.getString("Trans.Log.Maxdepdate")+(new Value("maxdepdate", maxdepdate)).t... | throw new KettleTransException(Messages.getString("Trans.Exception.ConnectionCouldNotBeFound",""+td.getDatabase())); //$NON-NLS-1$ //$NON-NLS-2$
|
1,660 | );
}
}
catch(KettleException e)
{
<BUG>throw new KettleTransException(Messages.getString("Trans.Exception.ErrorWritingLogRecordToTable")+transMeta.getLogTable()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$
</BUG>
}
finally
{
| throw new KettleTransException(Messages.getString("Trans.Exception.ErrorWritingLogRecordToTable",transMeta.getLogTable()), e); //$NON-NLS-1$ //$NON-NLS-2$
|
1,661 | log_string
);
}
catch(Exception e)
{
<BUG>throw new KettleException(Messages.getString("Trans.Exception.ErrorWritingLogRecordToTable2")+transMeta.getLogTable()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$
}</BUG>
finally
{
ldb.disconnect();
| throw new KettleException(Messages.getString("Trans.Exception.ErrorWritingLogRecordToTable")+transMeta.getLogTable()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$
|
1,662 | import com.fincatto.nfe310.FabricaDeObjetosFake;
import org.junit.Assert;
import org.junit.Test;
import java.math.BigDecimal;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
import java.util.List;</BUG>
public class NFEnviaEventoCancelamentoTest {
@Test
public void deveObterEventosComoFoiSetado() {
| import java.util.Collections;
import java.util.List;
|
1,663 | import com.fincatto.nfe310.FabricaDeObjetosFake;
import com.fincatto.nfe310.classes.nota.NFNota;
import org.junit.Assert;
import org.junit.Test;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
import java.util.List;</BUG>
public class NFLoteEnvioTest {
@Test
public void devePermitirNotasComTamanho50() {
| import java.util.Collections;
import java.util.List;
|
1,664 | public void deveGerarXMLDeAcordoComOPadraoEstabelecido() {
final NFLoteEnvio loteEnvio = new NFLoteEnvio();
loteEnvio.setIdLote("333972757970401");
loteEnvio.setVersao("3.10");
loteEnvio.setIndicadorProcessamento(NFLoteIndicadorProcessamento.PROCESSAMENTO_ASSINCRONO);
<BUG>loteEnvio.setNotas(Arrays.asList(FabricaDeObje... | loteEnvio.setNotas(Collections.singletonList(FabricaDeObjetosFake.getNFNota()));
|
1,665 | import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
public class FabricaDeObjetosFake {</BUG>
public static NFInformacaoImpostoDevolvido getNFInformacaoImpostoDevolvido() {
final NFInformacaoIm... | import java.util.Collections;
public class FabricaDeObjetosFake {
|
1,666 | info.setEmitente(FabricaDeObjetosFake.getNFNotaInfoEmitente());
info.setEntrega(FabricaDeObjetosFake.getNFNotaInfoLocal());
info.setExportacao(FabricaDeObjetosFake.getNFNotaInfoExportacao());
info.setIdentificador("89172658591754401086218048846976493475937081");
info.setInformacoesAdicionais(FabricaDeObjetosFake.getNFN... | info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
|
1,667 | imposto.setValorTotalTributos(new BigDecimal("999999999999.99"));
item.setImposto(imposto);
item.setNumeroItem(990);
item.setProduto(FabricaDeObjetosFake.getProdutoMedicamento());
item.setImpostoDevolvido(FabricaDeObjetosFake.getNFImpostoDevolvido());
<BUG>info.setItens(Arrays.asList(item));
info.setRetirada(FabricaDeO... | info.setItens(Collections.singletonList(item));
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
|
1,668 | identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO);
identificacao.setModelo(NFModelo.NFE);
identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ");
identificacao.setNumeroNota("999999999");
identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE);
<BUG>ident... | identificacao.setReferenciadas(Collections.singletonList(referenciada));
|
1,669 | produtoMedicamento.setCfop("1302");
produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq");
produtoMedicamento.setCodigoDeBarras("36811963532505");
produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505");
produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);... | produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
|
1,670 | produtoMedicamento.setValorSeguro(new BigDecimal("999999999999.99"));
produtoMedicamento.setValorTotalBruto(new BigDecimal("999999999999.99"));
produtoMedicamento.setValorUnitario(new BigDecimal("9999999999.9999999999"));
produtoMedicamento.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999"));
produtoMed... | produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
|
1,671 | info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal());
info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte());
info.setVersao(new BigDecimal("3.10"));
<BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutori... | info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
|
1,672 | identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO);
identificacao.setModelo(NFModelo.NFE);
identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ");
identificacao.setNumeroNota("999999999");
identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE);
<BUG>ident... | identificacao.setReferenciadas(Collections.singletonList(FabricaDeObjetosFake.getNFInfoReferenciada()));
|
1,673 | return compra;
}
public static NFNotaInfoCobranca getNFNotaInfoCobranca() {
final NFNotaInfoCobranca cobranca = new NFNotaInfoCobranca();
cobranca.setFatura(FabricaDeObjetosFake.getNFNotaInfoFatura());
<BUG>cobranca.setDuplicatas(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
</BUG>
return cobranca;
}
p... | cobranca.setDuplicatas(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
|
1,674 | </BUG>
produto.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP");
produto.setExtipi("999");
produto.setCodigoEspecificadorSituacaoTributaria("9999999");
<BUG>produto.setMedicamentos(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoIte... | produto.setCfop("1302");
produto.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq");
produto.setCodigoDeBarras("36811963532505");
produto.setCodigoDeBarrasTributavel("36811963532505");
produto.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);
produto.setDeclaracoesImportacao(Collections.singleton... |
1,675 | produto.setValorFrete(new BigDecimal("999999999999.99"));
produto.setValorOutrasDespesasAcessorias(new BigDecimal("999999999999.99"));
produto.setValorSeguro(new BigDecimal("999999999999.99"));
produto.setValorTotalBruto(new BigDecimal("999999999999.99"));
produto.setValorUnitario(new BigDecimal("9999999999.9999999999"... | produto.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
|
1,676 | medicamento.setQuantidade(new BigDecimal("9999999.999"));
return medicamento;
}
public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() {
final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao();
<BUG>declaraoImpo... | declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
|
1,677 | public static NFNotaInfoVolume getNFNotaInfoVolume() {
final NFNotaInfoVolume volume = new NFNotaInfoVolume();
volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb");
final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre();
notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLb... | volume.setLacres(Collections.singletonList(notaInfoLacre));
|
1,678 | public void deveGerarXMLDeAcordoComOPadraoEstabelecido() {
final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno();
retorno.setAmbiente(NFAmbiente.HOMOLOGACAO);
retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNz... | retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
|
1,679 | import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
<BUG>import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.GenericServiceException;</BUG>
import org.ofbiz.s... | import org.ofbiz.service.GenericResultWaiter;
import org.ofbiz.service.GenericServiceException;
|
1,680 | public class ServiceEngineTestServices {
public static final String module = ServiceEngineTestServices.class.getName();
public static Map testServiceDeadLockRetry(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
try {
<BUG>dispatcher.runAsync("testServiceDeadLockRetryThreadA", nul... | GenericResultWaiter threadAWaiter = dispatcher.runAsyncWait("testServiceDeadLockRetryThreadA", null, false);
GenericResultWaiter threadBWaiter = dispatcher.runAsyncWait("testServiceDeadLockRetryThreadB", null, false);
threadAWaiter.waitForResult();
threadBWaiter.waitForResult();
} catch (Exception e) {
return ServiceUt... |
1,681 | 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
|
1,682 | 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++) {
|
1,683 | 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++) {
|
1,684 | 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
|
1,685 | 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++) {
|
1,686 | 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
|
1,687 | 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++) {
|
1,688 | 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
|
1,689 | 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++) {
|
1,690 | 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
|
1,691 | 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++) {
|
1,692 | 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
|
1,693 | 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++) {
|
1,694 | }
@RootTask
static Task<Exec.Result> exec(String parameter, int number) {
Task<String> task1 = MyTask.create(parameter);
Task<Integer> task2 = Adder.create(number, number + 2);
<BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh")
.in(() -> task1)</BUG>
.in(() -> task2)
.process(Exec.exec((str, i) -> args... | return Task.named("exec", "/bin/sh").ofType(Exec.Result.class)
.in(() -> task1)
|
1,695 | return args;
}
static class MyTask {
static final int PLUS = 10;
static Task<String> create(String parameter) {
<BUG>return Task.ofType(String.class).named("MyTask", parameter)
.in(() -> Adder.create(parameter.length(), PLUS))</BUG>
.in(() -> Fib.create(parameter.length()))
.process((sum, fib) -> something(parameter, s... | return Task.named("MyTask", parameter).ofType(String.class)
.in(() -> Adder.create(parameter.length(), PLUS))
|
1,696 | final String instanceField = "from instance";
final TaskContext context = TaskContext.inmem();
final AwaitingConsumer<String> val = new AwaitingConsumer<>();
@Test
public void shouldJavaUtilSerialize() throws Exception {
<BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39)
.process(() -> 9999L);
Task... | Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class)
Task<String> task2 = Task.named("Baz", 40).ofType(String.class)
.in(() -> task1)
|
1,697 | assertEquals(des.id().name(), "Baz");
assertEquals(val.awaitAndGet(), "[9999] hello 10004");
}
@Test(expected = NotSerializableException.class)
public void shouldNotSerializeWithInstanceFieldReference() throws Exception {
<BUG>Task<String> task = Task.ofType(String.class).named("WithRef")
.process(() -> instanceField +... | Task<String> task = Task.named("WithRef").ofType(String.class)
.process(() -> instanceField + " causes an outer reference");
|
1,698 | serialize(task);
}
@Test
public void shouldSerializeWithLocalReference() throws Exception {
String local = instanceField;
<BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef")
.process(() -> local + " won't cause an outer reference");</BUG>
serialize(task);
Task<String> des = deserialize();
context.e... | Task<String> task = Task.named("WithLocalRef").ofType(String.class)
.process(() -> local + " won't cause an outer reference");
|
1,699 | }
@RootTask
public static Task<String> standardArgs(int first, String second) {
firstInt = first;
secondString = second;
<BUG>return Task.ofType(String.class).named("StandardArgs", first, second)
.process(() -> second + " " + first * 100);</BUG>
}
@Test
public void shouldParseFlags() throws Exception {
| return Task.named("StandardArgs", first, second).ofType(String.class)
.process(() -> second + " " + first * 100);
|
1,700 | assertThat(parsedEnum, is(CustomEnum.BAR));
}
@RootTask
public static Task<String> enums(CustomEnum enm) {
parsedEnum = enm;
<BUG>return Task.ofType(String.class).named("Enums", enm)
.process(enm::toString);</BUG>
}
@Test
public void shouldParseCustomTypes() throws Exception {
| return Task.named("Enums", enm).ofType(String.class)
.process(enm::toString);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.