id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
35,501 | Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.tab_qibla, container, false);
final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass);
qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_... | sOrientationListener = new android.hardware.SensorListener() {
|
35,502 | import java.util.Set;
import java.util.Stack;
import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException;
import org.openstreetmap.josm.data.conflict.Conflict;
import org.openstreetmap.josm.data.conflict.ConflictCollection;
<BUG>import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.... | import org.openstreetmap.josm.data.osm.IPrimitive;
import org.openstreetmap.josm.data.osm.Node;
|
35,503 | return ret;
}
public int getSize() {
return toAdd.size() + toUpdate.size() + toDelete.size();
}
<BUG>public void removeProcessed(Collection<OsmPrimitive> processed) {
</BUG>
if (processed == null) return;
toAdd.removeAll(processed);
toUpdate.removeAll(processed);
| public void removeProcessed(Collection<IPrimitive> processed) {
|
35,504 | import static org.openstreetmap.josm.tools.I18n.tr;
import java.util.Collection;
import java.util.HashSet;
import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException;
import org.openstreetmap.josm.data.APIDataSet;
<BUG>import org.openstreetmap.josm.data.osm.Changeset;
import org.openstreetmap.josm.dat... | import org.openstreetmap.josm.data.osm.IPrimitive;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
35,505 | private OsmServerWriter writer;
private OsmDataLayer layer;
private ProgressMonitor monitor;
private Changeset changeset;
private Collection<OsmPrimitive> toUpload;
<BUG>private HashSet<OsmPrimitive> processedPrimitives;
</BUG>
private UploadStrategySpecification strategy;
public UploadLayerTask(UploadStrategySpecifica... | private HashSet<IPrimitive> processedPrimitives;
|
35,506 | }
this.layer = layer;
this.monitor = monitor;
this.changeset = changeset;
this.strategy = strategy;
<BUG>processedPrimitives = new HashSet<OsmPrimitive>();
</BUG>
}
protected OsmPrimitive getPrimitive(OsmPrimitiveType type, long id) {
for (OsmPrimitive p: toUpload) {
| processedPrimitives = new HashSet<IPrimitive>();
|
35,507 | if (!e.isKnownPrimitive()) throw e;
OsmPrimitive p = getPrimitive(e.getPrimitiveType(), e.getPrimitiveId());
if (p == null) throw e;
if (p.isDeleted()) {
System.out.println(tr("Warning: object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.", p.getDisplayName(DefaultNameFormatter.... | processedPrimitives.addAll(writer.getProcessedPrimitives());
processedPrimitives.add(p);
|
35,508 | while(true) {
try {
ProgressMonitor m = monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false);
if (isCanceled()) return;
writer.uploadOsm(strategy, toUpload, changeset, m);
<BUG>processedPrimitives.addAll((Collection) writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
break;</BUG>
} catch... | processedPrimitives.addAll(writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
break;
|
35,509 | package org.openstreetmap.josm.tools;
import java.util.Hashtable;
public class Diff {
public Diff(Object[] a,Object[] b) {
<BUG>Hashtable h = new Hashtable(a.length + b.length);
filevec[0] = new file_data(a,h);</BUG>
filevec[1] = new file_data(b,h);
}
private int equiv_max = 1;
| Hashtable<Object, Integer> h = new Hashtable<Object, Integer>(a.length + b.length);
filevec[0] = new file_data(a,h);
|
35,510 | import org.openstreetmap.josm.data.gpx.WayPoint;
import org.openstreetmap.josm.data.osm.DataIntegrityProblemException;
import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.DataSetMerger;
import org.openstreetmap.josm.data.osm.DataSource;
<BUG>import org.openstreetmap.josm.data.osm.Data... | import org.openstreetmap.josm.data.osm.IPrimitive;
import org.openstreetmap.josm.data.osm.Node;
|
35,511 | if (n.isUsable()) {
v.visit(n);
}
}
}
<BUG>public void cleanupAfterUpload(final Collection<OsmPrimitive> processed) {
</BUG>
if (processed == null || processed.isEmpty())
return;
Main.main.undoRedo.clean(this);
| public void cleanupAfterUpload(final Collection<IPrimitive> processed) {
|
35,512 | private Exception lastException = null;
private APIDataSet toUpload;
private OsmServerWriter writer;
private OsmDataLayer layer;
private Changeset changeset;
<BUG>private HashSet<OsmPrimitive> processedPrimitives;
</BUG>
private UploadStrategySpecification strategy;
public UploadPrimitivesTask(UploadStrategySpecificati... | private HashSet<IPrimitive> processedPrimitives;
|
35,513 | ensureParameterNotNull(changeset, "changeset");
this.toUpload = toUpload;
this.layer = layer;
this.changeset = changeset;
this.strategy = strategy;
<BUG>this.processedPrimitives = new HashSet<OsmPrimitive>();
</BUG>
}
protected MaxChangesetSizeExceededPolicy askMaxChangesetSizeExceedsPolicy() {
ButtonSpec[] specs = new... | this.processedPrimitives = new HashSet<IPrimitive>();
|
35,514 | OsmPrimitive p = layer.data.getPrimitiveById(e.getPrimitiveId(), e.getPrimitiveType());
if (p == null) throw e;
if (p.isDeleted()) {
System.out.println(tr("Warning: object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.", p.getDisplayName(DefaultNameFormatter.getInstance())));
mon... | processedPrimitives.addAll(writer.getProcessedPrimitives());
processedPrimitives.add(p);
|
35,515 | uploadCanceled = true;
break uploadloop;
} catch(OsmApiPrimitiveGoneException e) {
recoverFromGoneOnServer(e, getProgressMonitor());
} catch(ChangesetClosedException e) {
<BUG>processedPrimitives.addAll((Collection) writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
changeset.setOpen(false);</BUG>... | processedPrimitives.addAll(writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
changeset.setOpen(false);
|
35,516 | lastException = e;
break uploadloop;
}
} finally {
if (writer != null) {
<BUG>processedPrimitives.addAll((Collection) writer.getProcessedPrimitives());
}</BUG>
synchronized(this) {
writer = null;
}
| processedPrimitives.addAll(writer.getProcessedPrimitives());
|
35,517 | package org.apache.sling.ide.eclipse.core.internal;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
<BUG>import java.util.Set;
import org.eclipse.core.resources.IFile;</BUG>
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
i... | import org.apache.sling.ide.eclipse.core.debug.PluginLogger;
import org.eclipse.core.resources.IFile;
|
35,518 | package org.apache.sling.ide.eclipse.core.internal;
<BUG>import org.apache.sling.ide.eclipse.core.ServiceUtil;
import org.apache.sling.ide.filter.FilterLocator;</BUG>
import org.apache.sling.ide.osgi.OsgiClientFactory;
import org.apache.sling.ide.serialization.SerializationManager;
import org.apache.sling.ide.transport... | import org.apache.sling.ide.eclipse.core.debug.PluginLogger;
import org.apache.sling.ide.eclipse.core.debug.PluginLoggerRegistrar;
import org.apache.sling.ide.filter.FilterLocator;
|
35,519 | serializationManager.open();
filterLocator = new ServiceTracker<FilterLocator, FilterLocator>(context, FilterLocator.class, null);
filterLocator.open();
osgiClientFactory = new ServiceTracker<OsgiClientFactory, OsgiClientFactory>(context, OsgiClientFactory.class,
null);
<BUG>osgiClientFactory.open();
}
public void stop... | ServiceReference<Object> reference = (ServiceReference<Object>) tracerRegistration.getReference();
tracer = new ServiceTracker<Object, Object>(context, reference, null);
tracer.open();
tracerRegistration.unregister();
repositoryFactory.close();
|
35,520 | }
public void stop(BundleContext context) throws Exception {
repositoryFactory.close();</BUG>
serializationManager.close();
filterLocator.close();
<BUG>osgiClientFactory.close();
plugin = null;</BUG>
super.stop(context);
}
public static Activator getDefault() {
| tracerRegistration.unregister();
repositoryFactory.close();
tracer.close();
plugin = null;
|
35,521 | public static String getSyncDirectoryValue(IProject project) {
String value = null;
try {
value = project.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, PROPERTY_SYNC_ROOT));
} catch (CoreException e) {
<BUG>Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), ... | Activator.getDefault().getPluginLogger().error(e.getMessage(), e);
}
|
35,522 | return RedProtect.plugin.getConfig().getStringList("allowed-claim-worlds").contains(p.getWorld().getName()) || p.hasPermission("redprotect.bypass.world");
}
public static boolean needClaimToBuild(Player p, Block b) {
boolean bool = RedProtect.plugin.getConfig().getStringList("needed-claim-to-build.worlds").contains(p.g... | if (b != null && getBool("needed-claim-to-build.allow-only-protections-blocks") && (getWorldClaimType(p.getWorld().getName()).equalsIgnoreCase("BLOCK"))){
|
35,523 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.u... | import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
35,524 | 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);
|
35,525 | @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.getExcepti... | public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
35,526 | 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);
|
35,527 | 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.form... | if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,528 | 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, S... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,529 | 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.for... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,530 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker... | import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
35,531 | 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());
|
35,532 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWra... | public class TwidereDns implements Dns, Constants {
|
35,533 | 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);
|
35,534 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
35,535 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
35,536 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
35,537 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VE... | [DELETED] |
35,538 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
35,539 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
35,540 | rest("/cart/").description("Personal Shopping Cart Service")
.produces(MediaType.APPLICATION_JSON_VALUE)
.options("/{cartId}")
.route().id("getCartOptionsRoute").end().endRest()
.options("/checkout/{cartId}")
<BUG>.route().id("checkoutCartOptionsRoute").end().endRest()
.options("/{cartId}/{itemId}/{quantity}")</BUG>
.r... | .options("/{cartId}/{tmpId}")
.route().id("cartSetOptionsRoute").end().endRest()
.options("/{cartId}/{itemId}/{quantity}")
|
35,541 | 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";
|
35,542 | 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];
|
35,543 | 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());
|
35,544 | 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});
|
35,545 | 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] |
35,546 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
35,547 | }
@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);
|
35,548 | 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 != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
35,549 | 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(
|
35,550 | 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.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
35,551 | 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, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
35,552 | 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) {
|
35,553 | 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;
|
35,554 | while (declaringClass != null) {
for (FieldNode field : (Collection<FieldNode>) declaringClass.getFields()) {
if (field.getType() == null) {
continue;
}
<BUG>if (PropertyChangeSupport.class.getName().equals(field.getType().getName())) {
pcsField = field;</BUG>
return false;
}
}
| if (pcsClassNode.equals(field.getType())) {
pcsField = field;
|
35,555 | import java.util.Collection;
public class ASTTransformationCollectorCodeVisitor extends ClassCodeVisitorSupport {
private SourceUnit source;
private CompilationUnit compilationUnit;
private Map<Integer, ASTTransformationCodeVisitor> stageVisitors;
<BUG>public ASTTransformationCollectorCodeVisitor(Map<Integer, ASTTransf... | public ASTTransformationCollectorCodeVisitor(Map<Integer, ASTTransformationCodeVisitor> stageVisitors, CompilationUnit compilationUnit) {
|
35,556 | return source;
}
public void visitAnnotations(AnnotatedNode node) {
super.visitAnnotations(node);
for (AnnotationNode annotation : (Collection<AnnotationNode>) node.getAnnotations()) {
<BUG>ClassNode cn = annotation.getClassNode();
if (!cn.isResolved()) continue;
Class<? extends GroovyASTTransformation> annotationTyp... | ClassNode annotationClassNode = annotation.getClassNode();
if (!annotationClassNode.isResolved()) continue;
Class<? extends GroovyASTTransformation> annotationType = annotationClassNode.getTypeClass();
|
35,557 | node.getColumnNumber()),
source));
} catch (ArrayIndexOutOfBoundsException aiobe) {
source.getErrorCollector().addErrorAndContinue(
new SyntaxErrorMessage(new SyntaxException(
<BUG>"@" + annotationTypeName + " specifies a phase that does not exist: " + transformationAnnotation.phase(),
</BUG>
node.getLineNumber(),
node... | "@" + annotationClassNode.getName() + " specifies a phase that does not exist: " + transformationAnnotation.phase(),
|
35,558 | public void visitClass(ClassNode classNode) {
if (!annotationsMap.isEmpty()) {
targetNodes = new LinkedList<ASTNode[]>();
super.visitClass(classNode);
for (ASTNode[] node : targetNodes) {
<BUG>annotationsMap.get(((AnnotationNode) node[0]).getClassNode().getName())
.visit((AnnotationNode) node[0], (AnnotatedNode) node[1... | annotationsMap.get(((AnnotationNode) node[0]).getClassNode())
.visit(node[0], node[1], source, context);
|
35,559 | public Class[] getPluginDefaultGroovyMethods() {
return PLUGIN_DGM;
}
public void addPhaseOperations(CompilationUnit unit) {
Map<Integer, ASTTransformationCodeVisitor> transformationVisitors = new HashMap<Integer, ASTTransformationCodeVisitor>();
<BUG>ASTTransformationCollectorCodeVisitor annotCollector = new ASTTransf... | ASTTransformationCollectorCodeVisitor annotCollector = new ASTTransformationCollectorCodeVisitor(transformationVisitors, unit);
|
35,560 | while (declaringClass != null) {
for (FieldNode field : (Collection<FieldNode>) declaringClass.getFields()) {
if (field.getType() == null) {
continue;
}
<BUG>if (VetoableChangeSupport.class.getName().equals(field.getType().getName())) {
vcsField = field;</BUG>
return false;
}
}
| if (vcsClassNode.equals(field.getType())) {
vcsField = field;
|
35,561 | import java.util.function.Function;
import java.util.logging.Level;
import javafx.application.Platform;
import javafx.beans.Observable;
import javafx.beans.value.ChangeListener;
<BUG>import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;</BUG>
import javafx.fxml.FXML;
import javafx.scene.control.Bu... | import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
|
35,562 | categoryEventBus.unregister(listener);
}
synchronized public TagName getTagName(Category cat) {
return catTagNameMap.getUnchecked(cat);
}
<BUG>public static Category fromTagName(TagName tagName) {
</BUG>
return Category.fromDisplayName(tagName.getDisplayName());
}
public static boolean isCategoryTagName(TagName tName) ... | public static Category categoryFromTagName(TagName tagName) {
|
35,563 | public ReadOnlyDoubleProperty regroupProgress() {
return regroupProgress.getReadOnlyProperty();
}
@Subscribe
public void handleTagAdded(ContentTagAddedEvent evt) {
<BUG>if (groupBy == DrawableAttribute.TAGS || groupBy == DrawableAttribute.CATEGORY) {
final GroupKey<TagName> groupKey = new GroupKey<>(DrawableAttribute.T... | GroupKey<?> groupKey = null;
if (groupBy == DrawableAttribute.TAGS) {
groupKey = new GroupKey<TagName>(DrawableAttribute.TAGS, evt.getAddedTag().getName());
} else if (groupBy == DrawableAttribute.CATEGORY) {
groupKey = new GroupKey<Category>(DrawableAttribute.CATEGORY, CategoryManager.categoryFromTagName(evt.getAddedT... |
35,564 | if (groupMap.containsKey(groupKey)) {
group = groupMap.get(groupKey);
group.setFiles(ObjectUtils.defaultIfNull(fileIDs, Collections.emptySet()));
} else {
group = new DrawableGroup(groupKey, fileIDs, groupSeen);
<BUG>group.seenProperty().addListener((observable, oldSeen, newSeen) -> {
markGroupSeen(group, newSeen);</BU... | group.seenProperty().addListener((o, oldSeen, newSeen) -> {
markGroupSeen(group, newSeen);
|
35,565 | this.queryLogger = Loggers.getLogger(logger, ".query");
this.fetchLogger = Loggers.getLogger(logger, ".fetch");
queryLogger.setLevel(level);
fetchLogger.setLevel(level);
indexSettingsService.addListener(new ApplySettings());
<BUG>}
private long parseTimeSetting(String name, long defaultNanos) {
try {
return componentSe... | [DELETED] |
35,566 | TaskContext taskContext = TaskContext.inmem();
TaskContext.Value<Long> value = taskContext.evaluate(fib92);
value.consume(f92 -> System.out.println("fib(92) = " + f92));
}
static Task<Long> create(long n) {
<BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n);
</BUG>
if (n < 2) {
return fib
.process(() ... | TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
|
35,567 | final IOException ioe = new IOException();
throw (IOException) ioe.initCause(e);
}
}
public static void storeSampleImage(final File sampleImageFile, final SampleModel defaultSM,
<BUG>final ColorModel defaultCM) throws IOException {
final SampleModel sm = defaultSM.createCompatibleSampleModel(1, 1);
final WritableRaster... | SampleImage sampleImage = new SampleImage(defaultSM, defaultCM);
|
35,568 | if (outStream != null)
outStream.close();
} catch (Throwable e) {
IOUtils.closeQuietly(outStream);
}
<BUG>try {
if (sri != null)
sri.dispose();
} catch (Throwable e) {
}</BUG>
}
| [DELETED] |
35,569 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
35,570 | }
@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);
|
35,571 | 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 != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
35,572 | 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(
|
35,573 | 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.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
35,574 | 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, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
35,575 | 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) {
|
35,576 | 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;
|
35,577 | String defaultPreferences = null;
preferences = portletPreferencesLocalService.getPreferences(
entry.getCompanyId(), ownerId, ownerType, plid, portletId,
defaultPreferences);
}
<BUG>if (serviceContext.isCommandAdd() &&
!BookmarksUtil.getEmailEntryAddedEnabled(preferences) ||
</BUG>
(serviceContext.isCommandUpdate() &&... | if ((serviceContext.isCommandAdd() &&
!BookmarksUtil.getEmailEntryAddedEnabled(preferences)) ||
|
35,578 | catch (Exception e) {
_log.error(e, e);
}
String entryURL =
layoutFullURL + Portal.FRIENDLY_URL_SEPARATOR + "bookmarks" +
<BUG>StringPool.SLASH + entry.getEntryId();
String fromName = BookmarksUtil.getEmailFromName(
preferences, entry.getCompanyId());
String fromAddress = BookmarksUtil.getEmailFromAddress(</BUG>
prefer... | String fromAddress = BookmarksUtil.getEmailFromAddress(
|
35,579 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
35,580 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
35,581 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
35,582 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VE... | [DELETED] |
35,583 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
35,584 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
35,585 | import java.net.URI;
import java.util.Calendar;
import java.util.Date;
import java.util.Formatter;
import java.util.List;
<BUG>import javax.ws.rs.core.UriBuilder;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.util.URIUtil;</BUG>
import org.suigeneris.jrcs.rcs.Version;
import or... | [DELETED] |
35,586 | if (home != null) {
space.setHome(home.getPrefixedFullName());
space.setXwikiRelativeUrl(home.getURL("view"));
space.setXwikiAbsoluteUrl(home.getExternalURL("view"));
}
<BUG>String pagesUri = UriBuilder.fromUri(baseUri).path(PagesResource.class).build(wikiName, spaceName).toString();
</BUG>
Link pagesLink = objectFacto... | String pagesUri = uri(baseUri, PagesResource.class, wikiName, spaceName);
|
35,587 | Link pagesLink = objectFactory.createLink();
pagesLink.setHref(pagesUri);
pagesLink.setRel(Relations.PAGES);
space.getLinks().add(pagesLink);
if (home != null) {
<BUG>String homeUri =
UriBuilder.fromUri(baseUri).path(PageResource.class).build(wikiName, spaceName, home.getName())
.toString();</BUG>
Link homeLink = obje... | String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName());
|
35,588 | .toString();</BUG>
Link homeLink = objectFactory.createLink();
homeLink.setHref(homeUri);
homeLink.setRel(Relations.HOME);
space.getLinks().add(homeLink);
<BUG>}
String searchUri =
UriBuilder.fromUri(baseUri).path(SpaceSearchResource.class).build(wikiName, spaceName).toString();</BUG>
Link searchLink = objectFactory.cr... | Link pagesLink = objectFactory.createLink();
pagesLink.setHref(pagesUri);
pagesLink.setRel(Relations.PAGES);
space.getLinks().add(pagesLink);
if (home != null) {
String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName());
String searchUri = uri(baseUri, SpaceSearchResource.class, wikiName, s... |
35,589 | if (!languages.isEmpty()) {
if (!doc.getDefaultLanguage().equals("")) {
translations.setDefault(doc.getDefaultLanguage());
Translation translation = objectFactory.createTranslation();
translation.setLanguage(doc.getDefaultLanguage());
<BUG>String pageTranslationUri =
UriBuilder.fromUri(baseUri).path(PageResource.class)... | uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
35,590 | }
}
for (String language : languages) {
Translation translation = objectFactory.createTranslation();
translation.setLanguage(language);
<BUG>String pageTranslationUri =
UriBuilder.fromUri(baseUri).path(PageTranslationResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), language).toString();</BUG>
Link p... | uri(baseUri, PageTranslationResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), language);
|
35,591 | Link pageTranslationLink = objectFactory.createLink();
pageTranslationLink.setHref(pageTranslationUri);
pageTranslationLink.setRel(Relations.PAGE);
translation.getLinks().add(pageTranslationLink);
String historyUri =
<BUG>UriBuilder.fromUri(baseUri).path(PageTranslationHistoryResource.class)
.build(doc.getWiki(), doc.g... | uri(baseUri, PageTranslationHistoryResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
language);
Link historyLink = objectFactory.createLink();
|
35,592 | pageSummary.setParent(doc.getParent());
if (parent != null && !parent.isNew()) {
pageSummary.setParentId(parent.getPrefixedFullName());
} else {
pageSummary.setParentId("");
<BUG>}
String spaceUri =
UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG>
Link spaceLi... | String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());
|
35,593 | UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG>
Link spaceLink = objectFactory.createLink();
spaceLink.setHref(spaceUri);
spaceLink.setRel(Relations.SPACE);
pageSummary.getLinks().add(spaceLink);
<BUG>if (parent != null) {
String parentUri =
UriBuilder.fromUr... | pageSummary.setParent(doc.getParent());
if (parent != null && !parent.isNew()) {
pageSummary.setParentId(parent.getPrefixedFullName());
} else {
pageSummary.setParentId("");
}
String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());
String parentUri = uri(baseUri, PageResource.class, parent.g... |
35,594 | Link historyLink = objectFactory.createLink();
historyLink.setHref(historyUri);
historyLink.setRel(Relations.HISTORY);
pageSummary.getLinks().add(historyLink);
if (!doc.getChildren().isEmpty()) {
<BUG>String pageChildrenUri =
UriBuilder.fromUri(baseUri).path(PageChildrenResource.class)
.build(doc.getWiki(), doc.getSpac... | uri(baseUri, PageChildrenResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
35,595 | objectsLink.setRel(Relations.OBJECTS);
pageSummary.getLinks().add(objectsLink);
}
com.xpn.xwiki.api.Object tagsObject = doc.getObject("XWiki.TagClass", 0);
if (tagsObject != null) {
<BUG>if (tagsObject.getProperty("tags") != null) {
String tagsUri =
UriBuilder.fromUri(baseUri).path(PageTagsResource.class)
.build(doc.ge... | String tagsUri = uri(baseUri, PageTagsResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
35,596 | tagsLink.setHref(tagsUri);
tagsLink.setRel(Relations.TAGS);
pageSummary.getLinks().add(tagsLink);
}
}
<BUG>String syntaxesUri = UriBuilder.fromUri(baseUri).path(SyntaxesResource.class).build().toString();
Link syntaxesLink = objectFactory.createLink();</BUG>
syntaxesLink.setHref(syntaxesUri);
syntaxesLink.setRel(Relati... | String syntaxesUri = uri(baseUri, SyntaxesResource.class);
Link syntaxesLink = objectFactory.createLink();
|
35,597 | }
return historySummary;
}
private static void fillAttachment(Attachment attachment, ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwikiApi, Boolean withPrettyNames)
{</BUG>
Document doc = xwikiAttachment.getDocument... | com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
35,598 | Calendar calendar = Calendar.getInstance();
calendar.setTime(xwikiAttachment.getDate());
attachment.setDate(calendar);
attachment.setXwikiRelativeUrl(xwikiRelativeUrl);
attachment.setXwikiAbsoluteUrl(xwikiAbsoluteUrl);
<BUG>String pageUri =
UriBuilder.fromUri(baseUri).path(PageResource.class).build(doc.getWiki(), doc.g... | String pageUri = uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
35,599 | }
return attachmentUri;
}</BUG>
public static Attachment createAttachment(ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwikiApi, Boolean withPrettyNames)
{</BUG>
Attachment attachment = objectFactory.createAttachmen... | com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
35,600 | attachmentLink.setRel(Relations.ATTACHMENT_DATA);
attachment.getLinks().add(attachmentLink);
return attachment;
}
public static Attachment createAttachmentAtVersion(ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwiki... | com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.