id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
2,801
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
2,802
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
2,803
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
2,804
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != null) { c.moveToFirst(); }
MemoEntry.COLUMN_ORDER + " ASC", null);
2,805
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
2,806
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode { </BUG> private List<MemoEntity> memoList;
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
2,807
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) { this.mActivity = activity;</BUG> this.topicId = topicId; this.memoList = memoList;
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
2,808
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
2,809
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
2,810
super(fixes, descriptionTemplate); LOG.assertTrue(startElement.isValid(), "Invalid PsiElement"); LOG.assertTrue(startElement.isPhysical(), "Non-physical PsiElement. Physical element is required to be able to anchor the problem in the source tree"); LOG.assertTrue(endElement.isValid(), "Invalid PsiElement"); LOG.assertTrue(endElement.isPhysical(), "Non-physical PsiElement. Physical element is required to be able to anchor the problem in the source tree"); <BUG>if (startElement.getTextRange().getStartOffset() >= endElement.getTextRange().getEndOffset()) { LOG.error("Empty PSI elements should not be passed to createDescriptor");</BUG> } myHighlightType = highlightType; final Project project = startElement.getProject();
if (startElement.getTextRange().getStartOffset() >= endElement.getTextRange().getEndOffset() && rangeInElement.getStartOffset() >= rangeInElement.getEndOffset()) { LOG.error("Empty PSI elements should not be passed to createDescriptor");
2,811
package com.intellij.psi; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.util.TextRange; import com.intellij.util.IncorrectOperationException; <BUG>import org.jetbrains.annotations.Nullable; public abstract class PsiReferenceBase<T extends PsiElement> implements PsiReference {</BUG> protected final T myElement; private TextRange myRange; protected boolean mySoft;
import org.jetbrains.annotations.NotNull; public abstract class PsiReferenceBase<T extends PsiElement> implements PsiReference {
2,812
public PsiReferenceBase(T element) { myElement = element; } public void setRangeInElement(TextRange range) { myRange = range; <BUG>} public String getValue() {</BUG> String text = myElement.getText(); return getRangeInElement().substring(text); }
@NotNull public String getValue() {
2,813
try { if (vmProxy.canGetOwnedMonitorInfo() && vmProxy.canGetMonitorInfo()) { List<ObjectReference> list = threadReference.ownedMonitors(); for (ObjectReference reference : list) { final List<ThreadReference> waiting = reference.waitingThreads(); <BUG>for (ThreadReference thread : waiting) { buffer.append("\n\t ").append(DebuggerBundle.message("threads.export.attribute.label.blocks.thread", threadName(thread))); }</BUG> }
final String waitingThreadName = threadName(thread); if (waitingThreadName != null) { buffer.append("\n\t ").append(DebuggerBundle.message("threads.export.attribute.label.blocks.thread", waitingThreadName));
2,814
ObjectReference waitedMonitor = vmProxy.canGetCurrentContendedMonitor() ? threadReference.currentContendedMonitor() : null; if (waitedMonitor != null) { if (vmProxy.canGetMonitorInfo()) { ThreadReference waitedThread = waitedMonitor.owningThread(); if (waitedThread != null) { <BUG>buffer.append("\n\t ") .append(DebuggerBundle.message("threads.export.attribute.label.waiting.for.thread", threadName(waitedThread))); }</BUG> }
final String waitedThreadName = threadName(waitedThread); if (waitedThreadName != null) { buffer.append("\n\t ").append(DebuggerBundle.message("threads.export.attribute.label.waiting.for.thread", waitedThreadName));
2,815
@Override public String toString() { return "desc"; } }; <BUG>public static final SortOrder DEFAULT = DESC; private static final SortOrder PROTOTYPE = DEFAULT; </BUG> @Override public SortOrder readFrom(StreamInput in) throws IOException {
return "asc"; }, DESC { private static final SortOrder PROTOTYPE = ASC;
2,816
GeoDistance geoDistance = GeoDistance.DEFAULT; boolean reverse = false; MultiValueMode sortMode = null; NestedInnerQueryParseSupport nestedHelper = null; final boolean indexCreatedBeforeV2_0 = context.indexShard().getIndexSettings().getIndexVersionCreated().before(Version.V_2_0_0); <BUG>boolean coerce = false; boolean ignoreMalformed = false; XContentParser.Token token;</BUG> String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
boolean coerce = GeoDistanceSortBuilder.DEFAULT_COERCE; boolean ignoreMalformed = GeoDistanceSortBuilder.DEFAULT_IGNORE_MALFORMED; XContentParser.Token token;
2,817
String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentName = parser.currentName(); } else if (token == XContentParser.Token.START_ARRAY) { <BUG>parseGeoPoints(parser, geoPoints); </BUG> fieldName = currentName; } else if (token == XContentParser.Token.START_OBJECT) { if ("nested_filter".equals(currentName) || "nestedFilter".equals(currentName)) {
GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
2,818
package org.elasticsearch.search.sort; <BUG>import org.elasticsearch.script.Script; public class SortBuilders {</BUG> public static ScoreSortBuilder scoreSort() { return new ScoreSortBuilder(); }
import org.elasticsearch.common.geo.GeoPoint; import java.util.Arrays; public class SortBuilders {
2,819
public GeoDistanceSortBuilder ignoreMalformed(boolean ignoreMalformed) { this.ignoreMalformed = ignoreMalformed; return this; }</BUG> @Override <BUG>public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject("_geo_distance"); if (geohashes.size() == 0 && points.size() == 0) { throw new ElasticsearchParseException("No points provided for _geo_distance sort."); }</BUG> builder.startArray(fieldName);
if (coerce == false) { } } public boolean ignoreMalformed() { return this.ignoreMalformed; } builder.startObject(NAME);
2,820
SNode method = _context.getOutputNodeByInputNodeAndMappingLabel(SNodeOperations.cast(SNodeOperations.getParent(_context.getNode()), "jetbrains.mps.lang.quotation.structure.Quotation"), "quotationStaticMethod"); SNode varDeclStmt = SNodeOperations.cast(ListSequence.fromList(SLinkOperations.getTargets(SLinkOperations.getTarget(method, "body", true), "statement", true)).first(), "jetbrains.mps.baseLanguage.structure.LocalVariableDeclarationStatement"); return SLinkOperations.getTarget(varDeclStmt, "localVariableDeclaration", true); } public static Object referenceMacro_GetReferent_1196860192984(final IOperationContext operationContext, final ReferenceMacroContext _context) { <BUG>return SNodeOperations.cast(_context.getOutputNodeByInputNodeAndMappingLabel(SNodeOperations.getParent(_context.getNode()), "nodeVariable"), "jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration"); }</BUG> public static Object referenceMacro_GetReferent_1196351887411(final IOperationContext operationContext, final ReferenceMacroContext _context) { SNode quotation = SNodeOperations.getAncestor(_context.getNode(), "jetbrains.mps.lang.quotation.structure.Quotation", false, false); SNode antiquotation = null;
return _context.getOutputNodeByInputNodeAndMappingLabel(SNodeOperations.getParent(_context.getNode()), "nodeVariable");
2,821
if (SNodeOperations.isInstanceOf(child, "jetbrains.mps.lang.quotation.structure.ListAntiquotation")) { return true; } } return false; <BUG>} public static boolean ifMacro_Condition_1025590056396681218(final IOperationContext operationContext, final IfMacroContext _context) { return true; } public static boolean ifMacro_Condition_1025590056396681235(final IOperationContext operationContext, final IfMacroContext _context) { return true;</BUG> }
[DELETED]
2,822
import org.apache.commons.lang3.math.NumberUtils; import org.json.JSONException; import org.mariotaku.microblog.library.MicroBlog; import org.mariotaku.microblog.library.MicroBlogException; import org.mariotaku.microblog.library.twitter.model.RateLimitStatus; <BUG>import org.mariotaku.microblog.library.twitter.model.Status; import org.mariotaku.sqliteqb.library.AllColumns;</BUG> import org.mariotaku.sqliteqb.library.Columns; import org.mariotaku.sqliteqb.library.Columns.Column; import org.mariotaku.sqliteqb.library.Expression;
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
2,823
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
2,824
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.format("Unable to delete %s", file)); }</BUG> }
if (deleteImage) { Utils.deleteMedia(context, imageUri);
2,825
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.format("Unable to delete %s", file)); }</BUG> }
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
2,826
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.format("Unable to delete %s", file)); }</BUG> }
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
2,827
import org.mariotaku.twidere.receiver.NotificationReceiver; import org.mariotaku.twidere.service.LengthyOperationsService; import org.mariotaku.twidere.util.ActivityTracker; import org.mariotaku.twidere.util.AsyncTwitterWrapper; import org.mariotaku.twidere.util.DataStoreFunctionsKt; <BUG>import org.mariotaku.twidere.util.DataStoreUtils; import org.mariotaku.twidere.util.ImagePreloader;</BUG> import org.mariotaku.twidere.util.InternalTwitterContentUtils; import org.mariotaku.twidere.util.JsonSerializer; import org.mariotaku.twidere.util.NotificationManagerWrapper;
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.ImagePreloader;
2,828
final List<InetAddress> addresses = mDns.lookup(host); for (InetAddress address : addresses) { c.addRow(new String[]{host, address.getHostAddress()}); } } catch (final IOException ignore) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, ignore); }</BUG> }
DebugLog.w(LOGTAG, null, ignore);
2,829
for (Location location : twitter.getAvailableTrends()) { map.put(location); } return map.pack(); } catch (final MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
2,830
import android.content.Context; import android.content.SharedPreferences; import android.location.Location; import android.os.AsyncTask; import android.support.annotation.NonNull; <BUG>import android.util.Log; import org.mariotaku.twidere.BuildConfig; import org.mariotaku.twidere.Constants; import org.mariotaku.twidere.util.JsonSerializer;</BUG> import org.mariotaku.twidere.util.Utils;
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.JsonSerializer;
2,831
} public static LatLng getCachedLatLng(@NonNull final Context context) { final Context appContext = context.getApplicationContext(); final SharedPreferences prefs = DependencyHolder.Companion.get(context).getPreferences(); if (!prefs.getBoolean(KEY_USAGE_STATISTICS, false)) return null; <BUG>if (BuildConfig.DEBUG) { Log.d(HotMobiLogger.LOGTAG, "getting cached location"); }</BUG> final Location location = Utils.getCachedLocation(appContext);
DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
2,832
public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) { final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId); return asyncTaskManager.add(task, true); } public int destroyStatusAsync(final UserKey accountKey, final String statusId) { <BUG>final DestroyStatusTask task = new DestroyStatusTask(context,accountKey, statusId); </BUG> return asyncTaskManager.add(task, true); } public int destroyUserListAsync(final UserKey accountKey, final String listId) {
final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
2,833
@Override public void afterExecute(Bus handler, SingleResponse<Relationship> result) { if (result.hasData()) { handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData())); } else if (result.hasException()) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, "Unable to update friendship", result.getException()); }</BUG> }
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
2,834
MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId); if (!Utils.isOfficialCredentials(context, accountId)) continue; try { microBlog.setActivitiesAboutMeUnread(cursor); } catch (MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
2,835
return size()+offset; } public PlaLineInt[] to_array() { return a_list.toArray(new PlaLineInt[size()]); <BUG>} @Override</BUG> public Iterator<PlaLineInt> iterator() { return a_list.iterator();
public ArrayList<PlaLineInt>to_alist() return a_list; @Override
2,836
while (Math.abs(prev_dist) < c_epsilon) { ++corners_skipped_before; int curr_no = p_start_no - corners_skipped_before; if (curr_no < 0) return null; <BUG>prev_corner = p_line_arr[curr_no].intersection_approx(p_line_arr[curr_no + 1]); </BUG> prev_dist = translate_line.distance_signed(prev_corner); } double next_dist = translate_line.distance_signed(next_corner);
prev_corner = p_line_arr.get(curr_no).intersection_approx(p_line_arr.get(curr_no + 1));
2,837
</BUG> { return null; } <BUG>next_corner = p_line_arr[curr_no].intersection_approx(p_line_arr[curr_no + 1]); </BUG> next_dist = translate_line.distance_signed(next_corner); } if (Signum.of(prev_dist) != Signum.of(next_dist)) {
double next_dist = translate_line.distance_signed(next_corner); while (Math.abs(next_dist) < c_epsilon) ++corners_skipped_after; int curr_no = p_start_no + 3 + corners_skipped_after; if (curr_no >= p_line_arr.size() - 2) next_corner = p_line_arr.get(curr_no).intersection_approx(p_line_arr.get(curr_no + 1));
2,838
check_ok = r_board.check_trace(shape_to_check, curr_layer, curr_net_no_arr, curr_cl_type, contact_pins); } delta_dist /= 2; if (check_ok) { <BUG>result = curr_lines[p_start_no + 2]; </BUG> if (translate_dist == max_translate_dist) break; translate_dist += delta_dist; }
result = curr_lines.get(p_start_no + 2);
2,839
translate_dist -= shorten_value; delta_dist -= shorten_value; } } if (result == null) return null; <BUG>PlaPointFloat new_prev_corner = curr_lines[p_start_no].intersection_approx(curr_lines[p_start_no + 1]); PlaPointFloat new_next_corner = curr_lines[p_start_no + 3].intersection_approx(curr_lines[p_start_no + 4]); </BUG> r_board.changed_area.join(new_prev_corner, curr_layer);
PlaPointFloat new_prev_corner = curr_lines.get(p_start_no).intersection_approx(curr_lines.get(p_start_no + 1)); PlaPointFloat new_next_corner = curr_lines.get(p_start_no + 3).intersection_approx(curr_lines.get(p_start_no + 4));
2,840
private static final int DEFAULT_MIN_THREAD_POOL_SIZE = 5; private static final double INITIAL_BACKOFF_MS = 5; private static final double BACKOFF_RANDOMNESS_FACTOR = 0.2; private static final Logger logger = LoggerFactory.getLogger(PublisherImpl.class); private final String topic; <BUG>private final int maxBundleMessages; private final int maxBundleBytes; </BUG> private final Duration maxBundleDuration;
private final long maxBundleMessages; private final long maxBundleBytes;
2,841
private final MessagesWaiter messagesWaiter; private final Duration sendBundleDeadline; private ScheduledFuture<?> currentAlarmFuture; PublisherImpl(Builder builder) throws IOException { topic = builder.topic; <BUG>maxBundleMessages = builder.maxBundleMessages; maxBundleBytes = builder.maxBundleBytes; maxBundleDuration = builder.maxBundleDuration; hasBundlingBytes = maxBundleBytes > 0;</BUG> maxOutstandingMessages = builder.maxOutstandingMessages;
maxBundleMessages = builder.bundlingSettings.getElementCountThreshold(); maxBundleBytes = builder.bundlingSettings.getRequestByteThreshold(); maxBundleDuration = builder.bundlingSettings.getDelayThreshold(); hasBundlingBytes = maxBundleBytes > 0;
2,842
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.atLeast; <BUG>import static org.mockito.Mockito.times; import com.google.cloud.pubsub.Publisher.Builder;</BUG> import com.google.common.base.Optional; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString;
import com.google.api.gax.grpc.BundlingSettings; import com.google.cloud.pubsub.Publisher.Builder;
2,843
public void testPublishFailureRetries_exceededsRetryDuration() throws Exception { Publisher publisher = getTestPublisherBuilder() .setExecutor(Executors.newSingleThreadScheduledExecutor()) .setSendBundleDeadline(Duration.standardSeconds(10)) <BUG>.setMaxBundleDuration(Duration.standardSeconds(5)) .setMaxBundleMessages(1) .build(); // To demonstrate that reaching duration will trigger publish</BUG> ListenableFuture<String> publishFuture1 = sendTestMessage(publisher, "A"); for (int i = 0; i < 11; ++i) {
.setBundlingSettings( Publisher.DEFAULT_BUNDLING_SETTINGS .toBuilder() .setElementCountThreshold(1) .setDelayThreshold(Duration.standardSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish
2,844
public void testPublishFailureRetries_nonRetryableFailsImmediately() throws Exception { Publisher publisher = getTestPublisherBuilder() .setExecutor(Executors.newSingleThreadScheduledExecutor()) .setSendBundleDeadline(Duration.standardSeconds(10)) <BUG>.setMaxBundleDuration(Duration.standardSeconds(5)) .setMaxBundleMessages(1) .build(); // To demonstrate that reaching duration will trigger publish</BUG> ListenableFuture<String> publishFuture1 = sendTestMessage(publisher, "A"); testPublisherServiceImpl.addPublishError(new StatusException(Status.INVALID_ARGUMENT));
.setBundlingSettings( Publisher.DEFAULT_BUNDLING_SETTINGS .toBuilder() .setElementCountThreshold(1) .setDelayThreshold(Duration.standardSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish
2,845
Publisher.Builder builder = Publisher.Builder.newBuilder(TEST_TOPIC); builder.setChannelBuilder(testChannelBuilder); builder.setCredentials(credentials); builder.setExecutor(executor); builder.setFailOnFlowControlLimits(true); <BUG>builder.setMaxBundleBytes(10); builder.setMaxBundleDuration(new Duration(11)); builder.setMaxBundleMessages(12); builder.setMaxOutstandingBytes(13);</BUG> builder.setMaxOutstandingMessages(14);
builder.setBundlingSettings( BundlingSettings.newBuilder() .setRequestByteThreshold(10) .setDelayThreshold(new Duration(11)) .setElementCountThreshold(12) .build()); builder.setMaxOutstandingBytes(13);
2,846
builder.setExecutor(null); fail("Should have thrown an IllegalArgumentException"); } catch (NullPointerException expected) { } try { <BUG>builder.setMaxBundleBytes(0); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { </BUG> }
[DELETED]
2,847
} catch (IllegalArgumentException expected) { </BUG> } try { <BUG>builder.setMaxBundleBytes(-1); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { </BUG> }
builder.setExecutor(null); } catch (NullPointerException expected) { builder.setBundlingSettings( Publisher.DEFAULT_BUNDLING_SETTINGS.toBuilder().setRequestByteThreshold(null).build()); fail("Should have thrown an NullPointerException"); } catch (NullPointerException expected) {
2,848
Optional<Integer> getMaxOutstandingBytes(); boolean failOnFlowControlLimits(); PublisherStats getStats(); void shutdown(); final class Builder { <BUG>String topic; int maxBundleMessages; int maxBundleBytes; Duration maxBundleDuration;</BUG> Optional<Integer> maxOutstandingMessages;
BundlingSettings bundlingSettings;
2,849
} private void setDefaults() { userCredentials = Optional.absent(); channelBuilder = Optional.absent(); maxOutstandingMessages = Optional.absent(); <BUG>maxOutstandingBytes = Optional.absent(); maxBundleMessages = DEFAULT_MAX_BUNDLE_MESSAGES; maxBundleBytes = DEFAULT_MAX_BUNDLE_BYTES; maxBundleDuration = DEFAULT_MAX_BUNDLE_DURATION;</BUG> requestTimeout = DEFAULT_REQUEST_TIMEOUT;
Builder(String topic) { this.topic = Preconditions.checkNotNull(topic); setDefaults(); bundlingSettings = DEFAULT_BUNDLING_SETTINGS;
2,850
import android.view.MenuItem; import android.view.View; import android.widget.Toast; import com.mikepenz.aboutlibraries.util.UIUtils; import com.mikepenz.fastadapter.FastAdapter; <BUG>import com.mikepenz.fastadapter.IAdapter; import com.mikepenz.fastadapter.IItem; import com.mikepenz.fastadapter.adapters.FastItemAdapter; import com.mikepenz.fastadapter.app.items.ExpandableItem; </BUG> import com.mikepenz.fastadapter.app.items.SampleItem;
import com.mikepenz.fastadapter.IExpandable; import com.mikepenz.fastadapter.ISelectionListener; import com.mikepenz.fastadapter.app.items.HeaderSelectionItem;
2,851
.withIdentifier(i + 1) .withDescription("ID: " + (i + 1))</BUG> ; List<IItem> subItems = new LinkedList<>(); for (int ii = 1; ii <= 5; ii++) { <BUG>subItems.add(new SampleItem() .withName("-- Test " + (i + 1) + "." + ii) .withIdentifier((i + 1) * 100 + ii) .withDescription("ID: " + (i + 1) * 100 + ii)); }</BUG> expandableItem.withSubItems(subItems);
final SampleItem sampleItem = new SampleItem(); sampleItem .withDescription("ID: " + (i + 1) * 100 + ii) .withParent(expandableItem) .withIdentifier((i + 1) * 100 + ii); subItems.add(sampleItem); }
2,852
import android.widget.ImageView; import android.widget.TextView; import com.mikepenz.fastadapter.FastAdapter; import com.mikepenz.fastadapter.IAdapter; import com.mikepenz.fastadapter.IExpandable; <BUG>import com.mikepenz.fastadapter.IItem; import com.mikepenz.fastadapter.app.R;</BUG> import com.mikepenz.fastadapter.items.AbstractItem; import com.mikepenz.fastadapter.utils.FastAdapterUIUtils; import com.mikepenz.fastadapter.utils.ViewHolderFactory;
import com.mikepenz.fastadapter.ISubItem; import com.mikepenz.fastadapter.app.R;
2,853
@Override public boolean isExpanded() { return mExpanded; } @Override <BUG>public ExpandableItem withIsExpanded(boolean expanded) { </BUG> mExpanded = expanded; return this; }
public ExpandableItem<T, S> withIsExpanded(boolean expanded) {
2,854
</BUG> mExpanded = expanded; return this; } @Override <BUG>public List<IItem> getSubItems() { </BUG> return mSubItems; } @Override
public boolean isExpanded() { return mExpanded; public ExpandableItem<T, S> withIsExpanded(boolean expanded) { public List<S> getSubItems() {
2,855
int x = 0; List<SampleItem> items = new ArrayList<>(); for (String s : ALPHABET) { int count = new Random().nextInt(20); for (int i = 1; i <= count; i++) { <BUG>items.add(new SampleItem().withName(s + " Test " + x).withIdentifier(100 + x)); x++;</BUG> } } fastItemAdapter.add(items);
SampleItem item = new SampleItem(); item .withName(s + " Test " + x) .withIdentifier(100 + x); items.add(item); x++;
2,856
import com.liferay.portal.service.PortletLocalServiceUtil; import com.liferay.portal.service.PortletPreferencesLocalServiceUtil; import com.liferay.portal.util.PortletKeys; import com.liferay.portal.util.PropsKeys; import com.liferay.portal.util.PropsUtil; <BUG>import com.liferay.portal.util.PropsValues; import com.liferay.util.PwdGenerator;</BUG> import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import com.liferay.util.JS; import com.liferay.util.PwdGenerator;
2,857
long userId, String portletId, String columnId, int columnPos) { return addPortletId(userId, portletId, columnId, columnPos, true); } public String addPortletId( long userId, String portletId, String columnId, int columnPos, <BUG>boolean checkPermission) { Layout layout = getLayout();</BUG> Portlet portlet = null; try { portlet = PortletLocalServiceUtil.getPortletById(
portletId = JS.getSafeName(portletId); Layout layout = getLayout();
2,858
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
2,859
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
2,860
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != null) { c.moveToFirst(); }
MemoEntry.COLUMN_ORDER + " ASC", null);
2,861
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
2,862
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode { </BUG> private List<MemoEntity> memoList;
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
2,863
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) { this.mActivity = activity;</BUG> this.topicId = topicId; this.memoList = memoList;
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
2,864
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
2,865
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
2,866
import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import com.agenthun.eseal.R; import com.agenthun.eseal.bean.base.DetailParcelable; <BUG>import com.agenthun.eseal.connectivity.ble.ACSUtility; import butterknife.Bind;</BUG> import butterknife.ButterKnife; import butterknife.OnClick; public class DeviceOperationActivity extends AppCompatActivity {
import com.agenthun.eseal.model.protocol.ESealOperation; import com.agenthun.eseal.model.utils.Encrypt; import com.agenthun.eseal.model.utils.SocketPackage; import java.nio.ByteBuffer; import butterknife.Bind;
2,867
private ACSUtility utility; private boolean utilEnable = false; private boolean isPortOpen = false; private AppCompatDialog mProgressDialog; @Bind(R.id.card_seting) <BUG>CardView cardSetting; @Override</BUG> protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_device_operation);
private int id = 0x12345678; private int rn = 0xABABABAB; private int key = 0x87654321; @Override
2,868
.setAction("Action", null).show(); } } @Override public void didPackageReceived(ACSUtility.blePort port, byte[] packageToSend) { <BUG>StringBuffer sb = new StringBuffer(); for (byte b : packageToSend) { sb.append("0x"); if ((b & 0xff) <= 0x0f) { sb.append("0"); } sb.append(Integer.toHexString(b & 0xff) + " "); } Log.d(TAG, "didPackageReceived() returned: " + sb.toString());</BUG> }
} else { Snackbar.make(cardSetting, getString(R.string.fail_device_send_data), Snackbar.LENGTH_SHORT)
2,869
mProgressDialog.setCanceledOnTouchOutside(false); mProgressDialog.setContentView(R.layout.dialog_device_connecting); mProgressDialog.setTitle(getString(R.string.device_connecting)); return mProgressDialog; } <BUG>private void sendData() { byte[] data = new byte[128]; for (int i = 0; i < data.length; i++) { data[i] = (byte) i; }</BUG> utility.writePort(data);
[DELETED]
2,870
add(Box.createVerticalStrut(20)); action(null); } public void action(final Object cmp) { String msg = null; <BUG>try { if(cmp == change) {</BUG> for(final Proc p : permps) { if(!sess.execute(p)) { msg = sess.info();
final Object di = databases.getSelectedItem(); final String db = di == null ? null : di.toString(); if(cmp == change) {
2,871
import static org.basex.core.Text.*; import java.util.regex.Pattern; @SuppressWarnings("all") public interface Commands { enum CmdCreate { DATABASE, DB, COLLECTION, COLL, MAB, FS, INDEX, USER } <BUG>enum CmdInfo { NULL, DATABASE, DB, INDEX, TABLE, USERS } enum CmdDrop { DATABASE, DB, INDEX, USER }</BUG> enum CmdShow { DATABASES, SESSIONS, USERS } enum CmdPerm { READ, WRITE, CREATE, ADMIN, ALL } enum CmdSet {
enum CmdInfo { NULL, DATABASE, DB, INDEX, TABLE } enum CmdDrop { DATABASE, DB, INDEX, USER }
2,872
return new Kill(name(cmd)); case SHOW: final CmdShow show = consume(CmdShow.class, cmd); switch(show) { case DATABASES: <BUG>case SESSIONS: case USERS: return new Show(show); </BUG> default:
final String db = key(ON, null) ? name(cmd) : null; return new Show(show, db);
2,873
CmdShow.USERS + "]", lang("ch_show1"), lang("ch_show21") + NL + LI + CmdShow.DATABASES + ": " + lang("ch_show22") + NL + LI + CmdShow.SESSIONS + ": " + lang("ch_show23") + NL + <BUG>LI + CmdShow.USERS + ": " + lang("ch_show24") </BUG> }; String[] HELPGRANT = { "[" + CmdPerm.READ + "|" + CmdPerm.WRITE + "|" + CmdPerm.CREATE + "|" +
LI + CmdShow.USERS + " (" + ON + " [db]): " + lang("ch_show24")
2,874
interpB.setROIdata(roiBounds, roiIter); if (nod == null) { nod = interpB.getNoDataRange(); } if (destNod == null) { <BUG>destNod = interpB.getDestinationNoData(); </BUG> } } if (nod != null) {
destNod = new double[]{interpB.getDestinationNoData()};
2,875
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,876
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,877
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,878
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,879
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,880
for (int k2 = 0; k2 < dst_num_bands; k2++) { int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>int w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; int w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; int w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; int w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
int w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
2,881
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff); } } } else if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } if (fracx < fracdx1) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,882
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,883
int w11 = w11index < roiDataLength ? roiDataArray[w11index] & 0xff : 0; if (baseIndex > roiDataLength || w00 == 0 || (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0)) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,884
final int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; final int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
2,885
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,886
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,887
int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,888
+ bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
2,889
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]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
2,890
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]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,891
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; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,892
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]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,893
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,894
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; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,895
int w01 = noData.contains(s01) ? 0 : 1; int w10 = noData.contains(s10) ? 0 : 1; int w11 = noData.contains(s11) ? 0 : 1; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } else { double result = computeValue(s00, s01, s10, s11, w00, w01, w10,
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,896
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (short) (intResult & 0xffff); } } } else if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } if (fracx < fracdx1) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,897
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]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,898
int w11 = w11index < roiDataLength ? roiDataArray[w11index] & 0xff : 0; if (baseIndex > roiDataLength || w00 == 0 || (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0)) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,899
w01 = noData.contains(s01) ? 0 : 1; w10 = noData.contains(s10) ? 0 : 1; w11 = noData.contains(s11) ? 0 : 1; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } else { double result = computeValue(s00, s01, s10, s11, w00, w01, w10,
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
2,900
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; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];