id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
28,501
package retrofit2.helpers; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import retrofit2.CallAdapter; import retrofit2.Retrofit; <BUG>public final class NonMatchingCallAdapterFactory implements CallAdapter.Factory { </BUG> public boolean called; @Override public CallAdapter<?> get(Type returnT...
public final class NonMatchingCallAdapterFactory extends CallAdapter.Factory {
28,502
package retrofit2.helpers; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import retrofit2.CallAdapter; import retrofit2.Retrofit; <BUG>public final class DelegatingCallAdapterFactory implements CallAdapter.Factory { </BUG> public boolean called; @Override public CallAdapter<?> get(Type returnTy...
public final class DelegatingCallAdapterFactory extends CallAdapter.Factory {
28,503
import retrofit2.Call; import retrofit2.CallAdapter; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; <BUG>public final class GuavaCallAdapterFactory implements CallAdapter.Factory { </BUG> public static GuavaCallAdapterFactory create() { return new GuavaCallAdapterFactory(); }
public final class GuavaCallAdapterFactory extends CallAdapter.Factory {
28,504
} private GuavaCallAdapterFactory() { } @Override public CallAdapter<?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) { <BUG>if (TypeToken.of(returnType).getRawType() != ListenableFuture.class) { </BUG> return null; } if (!(returnType instanceof ParameterizedType)) {
if (getRawType(returnType) != ListenableFuture.class) {
28,505
return new BodyCallAdapter(innerType); } if (!(innerType instanceof ParameterizedType)) { throw new IllegalStateException("Response must be parameterized" + " as Response<Foo> or Response<? extends Foo>"); <BUG>} Type responseType = ((ParameterizedType) innerType).getActualTypeArguments()[0]; if (responseType instanceo...
Type responseType = getParameterUpperBound(0, (ParameterizedType) innerType);
28,506
String key; if (t.startsWith("safe")) { key = sel + "keep.safeprivateelements"; } else { <BUG>String group = "group" + t.substring(2,4); key = sel + "keep." + group;</BUG> } props.setProperty(key, ""); }
String group = "group" + t; key = sel + "keep." + group;
28,507
String ip = ""; int port = 104; int calledAETTag = 0; int callingAETTag = 0; int connectionIPTag = 0; <BUG>int timeTag = 0; boolean suppressDuplicates = false;</BUG> boolean logAllConnections = false; boolean logRejectedConnections = false; WhiteList ipWhiteList = null;
long throttle = 0L; boolean suppressDuplicates = false;
28,508
ip = element.getAttribute("ip").trim(); port = StringUtil.getInt(element.getAttribute("port").trim(), port); calledAETTag = StringUtil.getHexInt(element.getAttribute("calledAETTag").trim(), calledAETTag); callingAETTag = StringUtil.getHexInt(element.getAttribute("callingAETTag").trim(), callingAETTag); connectionIPTag ...
throttle = StringUtil.getLong(element.getAttribute("throttle").trim(), throttle); suppressDuplicates = element.getAttribute("suppressDuplicates").trim().equals("yes");
28,509
public boolean getLogAllConnections() { return logAllConnections; } public boolean getLogRejectedConnections() { return logRejectedConnections; <BUG>} public WhiteList getIPWhiteList() {</BUG> return ipWhiteList; } public BlackList getIPBlackList() {
public long getThrottle() { return throttle; public WhiteList getIPWhiteList() {
28,510
res.setContentType("html"); String ra = req.getRemoteAddress(); User user = req.getUser(); String serviceCommand = req.getHeader("servicemanager"); boolean serviceManager = (serviceCommand != null); <BUG>boolean localHost = req.isFromLocalHost(); </BUG> if ((serviceManager && localHost) || ((user != null) && (req.userH...
boolean localHost = req.isFromLocalHost() || ra.equals("127.0.0.1");
28,511
int blk = (tag & 0xffff0000) | ((tag & 0x0000ff00) >> 8); try { ctp = dataset.getString(blk).equals("CTP"); } catch (Exception notCTP) { ctp = false; } } String value = null; <BUG>try { if (ctp) { value = new String(dataset.getByteBuffer(tag).array()); </BUG> }
SpecificCharacterSet cs = dataset.getSpecificCharacterSet(); value = cs.decode(dataset.getByteBuffer(tag).array());
28,512
if (de == null) return defaultString; if (!VRs.toString(de.vr()).equals("SQ")) return defaultString; ds = de.getItem(0); if (ds == null) return defaultString; } <BUG>return getElementValue(ds, tags[tags.length -1], defaultString); </BUG> } catch (Exception e) { return defaultString; } }
return getElementValue(fileMetaInfo, ds, tags[tags.length -1], defaultString);
28,513
boolean decipher = false; boolean ctp = false; if (((tag & 0x10000) != 0) && ((tag & 0x0000ff00) != 0)) { int blk = (tag & 0xffff0000) | ((tag & 0x0000ff00) >> 8); if (ctp = getElementValue(blk).equals("CTP")) { <BUG>String v = new String(dataset.getByteBuffer(tag).array()); </BUG> if ((v.length() % 4) == 0) decipher =...
String v = cs.decode(dataset.getByteBuffer(tag).array());
28,514
private String perfMonFile = "/var/log/sdfs/perf.json"; private boolean clusterRackAware = false; private boolean ext = true; private boolean awsAim = false; private boolean genericS3 = false; <BUG>private boolean accessEnabled = false; private String accessPath = null;</BUG> private String cloudUrl; private boolean re...
private boolean atmosEnabled = false; private boolean backblazeEnabled = false; private String accessPath = null;
28,515
this.dirPermissions = cmd.getOptionValue("permissions-folder"); } if (cmd.hasOption("permissions-owner")) { this.owner = cmd.getOptionValue("permissions-owner"); } <BUG>if(cmd.hasOption("compress-metadata")) { </BUG> this.mdCompresstion = true; } if (cmd.hasOption("chunk-store-data-location")) {
if (cmd.hasOption("compress-metadata")) {
28,516
System.out.println(cmd.getOptionValue("cloud-access-key")); System.out.println(cmd.getOptionValue("cloud-secret-key")); System.out.println(cmd.getOptionValue("cloud-bucket-name")); System.exit(-1); } <BUG>} else if (this.gsEnabled) { if (cmd.hasOption("cloud-secret-key") && cmd.hasOption("cloud-access-key")</BUG> && cm...
} else if (this.gsEnabled || this.atmosEnabled || this.backblazeEnabled) { if (cmd.hasOption("cloud-secret-key") && cmd.hasOption("cloud-access-key")
28,517
Element aws = (Element) doc.getElementsByTagName("file-store").item(0); if (aws.hasAttribute("chunkstore-class")) Main.chunkStoreClass = aws.getAttribute("chunkstore-class"); Main.cloudChunkStore = Boolean.parseBoolean(aws .getAttribute("enabled")); <BUG>Main.cloudBucket = aws.getAttribute("bucket-name"); }</BUG> if (g...
}
28,518
if (HashBlobArchive.REMOVE_FROM_CACHE) lf.delete(); SDFSLogger.getLog().error("unable to read " + lf.getPath(), e); } if (m == null && HashBlobArchive.REMOVE_FROM_CACHE) { <BUG>Map<String, Long> _m = store.getHashMap(hashid); Set<String> keys = _m.keySet(); m = new SimpleByteArrayLongMap(lf.getPath(), MAX_HM_SZ, VERSIO...
double z = _m.size() * 1.25; int sz = new Long(Math.round(z)).intValue(); m = new SimpleByteArrayLongMap(lf.getPath(), sz, VERSION);
28,519
buf.putInt(hash.length); buf.put(hash); buf.putInt(chunk.length); buf.put(chunk); this.uncompressedLength.addAndGet(al); <BUG>HashBlobArchive.currentLength.addAndGet(al); HashBlobArchive.compressedLength.addAndGet(chunk.length);</BUG> buf.position(0); ch.write(buf, cp); } finally {
[DELETED]
28,520
public abstract void close(); public abstract void init(Element config) throws IOException; public abstract String getName(); public abstract void setName(String name); public abstract long size(); <BUG>public abstract long compressedSize(); public abstract long maxSize();</BUG> public abstract void sync() throws IOExc...
public abstract void clearCounters(); public abstract long maxSize();
28,521
e.printStackTrace(); } filePlayback=null; } @Override <BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); } void initFiles() throws FileNotFoundException {</BUG> if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed String samples_str = dataDir ...
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; } void initFiles() throws FileNotFoundException {
28,522
public class BufferMonitor extends Thread implements FieldtripBufferMonitor { public static final String TAG = BufferMonitor.class.toString(); private final Context context; private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>(); private final BufferInfo info; <BUG>private fin...
[DELETED]
28,523
public static final String CLIENT_INFO_TIME = "c_time"; public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout"; public static final String CLIENT_INFO_CONNECTED = "c_connected"; public static final String CLIENT_INFO_CHANGED = "c_changed"; public static final String CLIENT_INFO_DIFF = "c_diff"; <BUG>publi...
public static final int THREAD_INFO_TYPE = 0;
28,524
package nl.dcc.buffer_bci.bufferclientsservice; import android.os.Parcel; import android.os.Parcelable; <BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C; public class ThreadInfo implements Parcelable {</BUG> public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() { @Override public ThreadInfo...
import nl.dcc.buffer_bci.C; public class ThreadInfo implements Parcelable {
28,525
package org.apache.felix.gogo.launcher; import org.apache.felix.gogo.runtime.osgi.OSGiShell; import org.apache.felix.gogo.runtime.threadio.ThreadIOImpl; import org.apache.felix.gogo.console.stdio.Console; import org.osgi.framework.Bundle; <BUG>import org.osgi.service.command.CommandProcessor; import org.osgi.service.co...
import org.osgi.framework.launch.FrameworkFactory; import org.osgi.framework.launch.Framework; import org.osgi.service.command.CommandSession;
28,526
static List<URL> classpath = new ArrayList<URL>(); static File cwd = new File("").getAbsoluteFile(); public static void main(String args[]) throws Exception { StringBuffer sb = new StringBuffer(); <BUG>String framework = null; </BUG> PrintStream out = System.out; InputStream in = System.in; boolean console = false;
String fwkClassName = null;
28,527
for (int i = 0; i < args.length; i++) { String arg = args[i]; if (arg.equals("-f")) { <BUG>framework = args[++i]; }</BUG> else { if (arg.equals("-cp") || arg.equals("-classpath"))
fwkClassName = args[++i]; }
28,528
Constructor<?> c = fw.getConstructor(Map.class, List.class); Properties p = new Properties(System.getProperties()); Bundle bundle = (Bundle) c.newInstance(p, null);</BUG> OSGiShell shell = new OSGiShell(); shell.setThreadio(threadio); <BUG>shell.setBundle(bundle); </BUG> shell.start(); CommandSession session = shell.cr...
framework = (Framework) c.newInstance(p); } ThreadIOImpl threadio = new ThreadIOImpl(); threadio.start(); shell.setBundle(framework);
28,529
CommandSession session = shell.createSession(in, out, System.err); session.put("shell", shell); session.put("threadio", threadio); session.execute(sb); out.flush(); <BUG>if (bundle.getState() == Bundle.ACTIVE) </BUG> { } if (console)
if (framework.getState() == Bundle.ACTIVE)
28,530
jodd.lagarto.dom.Document doc = domBuilder.parse(inputString); nodeSelector = new NodeSelector(doc); } List<Node> elements = nodeSelector.select(expression); int size = elements.size(); <BUG>for (int i = 0; i < size; i++) { Node element = elements.get(i); if (matchNumber <=0 || found != matchNumber) { </BUG> result.ad...
JMeterContextService.getContext().getSamplerContext().put(CACHE_KEY_PREFIX+cacheKey, nodeSelector); } else { LagartoDOMBuilder domBuilder = new LagartoDOMBuilder(); for (Node element : elements) { if (matchNumber <= 0 || found != matchNumber) {
28,531
String percentilesAsString = context.getParameter("percentiles", DEFAULT_METRICS_PREFIX); String[] percentilesStringArray = percentilesAsString.split(SEPARATOR); okPercentiles = new HashMap<>(percentilesStringArray.length); koPercentiles = new HashMap<>(percentilesStringArray.length); allPercentiles = new HashMap<>(pe...
DecimalFormat decimalFormat = new DecimalFormat("0.##"); for (String percentilesString : percentilesStringArray) { if (!StringUtils.isEmpty(percentilesString.trim())) {
28,532
} Class<?> clazz = Class.forName(graphiteMetricsSenderClass); this.graphiteMetricsManager = (GraphiteMetricsSender) clazz.newInstance(); graphiteMetricsManager.setup(graphiteHost, graphitePort, rootMetricsPrefix); String[] samplers = samplersList.split(SEPARATOR); <BUG>samplersToFilter = new HashSet<>(); for (String sa...
Collections.addAll(samplersToFilter, samplers);
28,533
private synchronized void updateGui(SampleResult res) { DefaultMutableTreeNode currNode = new DefaultMutableTreeNode(res); treeModel.insertNodeInto(currNode, root, root.getChildCount()); addSubResults(currNode, res); AssertionResult[] assertionResults = res.getAssertionResults(); <BUG>int assertionIndex = currNode.getC...
for (AssertionResult assertionResult : assertionResults) { if (assertionResult.isFailure() || assertionResult.isError()) { DefaultMutableTreeNode assertionNode = new DefaultMutableTreeNode(assertionResult);
28,534
DefaultMutableTreeNode leafNode = new DefaultMutableTreeNode(child); treeModel.insertNodeInto(leafNode, currNode, leafIndex++); addSubResults(leafNode, child); AssertionResult[] assertionResults = child.getAssertionResults(); int assertionIndex = leafNode.getChildCount(); <BUG>for (int j = 0; j < assertionResults.lengt...
for (AssertionResult item : assertionResults) {
28,535
this.data, this.width, this.height, this.incrYAxisScale, this.color, this.legendFont, graphics); } } private double findMax(double[][] datas) { <BUG>double max = 0; for (int i = 0; i < datas.length; i++) { for (int j = 0; j < datas[i].length; j++) { final double value = datas[i][j];</BUG> if ((!Double.isNaN(value)) && ...
for (double[] data : datas) { for (final double value : data) {
28,536
} else { document = Jsoup.parse(inputString); } Elements elements = document.select(expression); int size = elements.size(); <BUG>for (int i = 0; i < size; i++) { Element element = elements.get(i); if (matchNumber <=0 || found != matchNumber) { </BUG> result.add(extractValue(attribute, element));
for (Element element : elements) { if (matchNumber <= 0 || found != matchNumber) {
28,537
private void addHits(SampleResult res) { SampleResult[] subResults = res.getSubResults(); if (!TransactionController.isFromTransactionController(res)) { hits += 1; } <BUG>for (int i = 0; i < subResults.length; i++) { addHits(subResults[i]); }</BUG> } public synchronized void resetForTimeInterval() {
for (SampleResult subResult : subResults) { addHits(subResult);
28,538
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
28,539
} @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);
28,540
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);
28,541
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(
28,542
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 {
28,543
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;
28,544
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) {
28,545
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;
28,546
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;
28,547
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;
28,548
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"),
28,549
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]
28,550
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) {
28,551
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;
28,552
public boolean isAcceptable(Object element, PsiElement context) { return element instanceof XmlElement && getDomFileDescription((XmlElement)element) == myDescription; </BUG> } public boolean isClassAcceptable(Class hintClass) { <BUG>return true; }</BUG> } private class MyCachedValueProvider implements CachedValueProvid...
return !isInitialized() && element instanceof XmlElement && getDomFileDescription((XmlElement)element) == myDescription; return !isInitialized();
28,553
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
28,554
} @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);
28,555
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);
28,556
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(
28,557
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 {
28,558
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;
28,559
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) {
28,560
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;
28,561
return intern(new StringIdItem(new CstString(string))); } public StringIdItem intern(CstString string) { return intern(new StringIdItem(string)); } <BUG>public StringIdItem intern(StringIdItem string) { </BUG> if (string == null) { throw new NullPointerException("string == null"); }
public synchronized StringIdItem intern(StringIdItem string) {
28,562
return already; } strings.put(value, string); return string; } <BUG>public void intern(CstNat nat) { </BUG> intern(nat.getName()); intern(nat.getDescriptor()); }
public synchronized void intern(CstNat nat) {
28,563
out.annotate(4, "proto_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); } <BUG>public ProtoIdItem intern(Prototype prototype) { </BUG> if (prototype == null) { throw new NullPointerException("prototype == null"); }
public synchronized ProtoIdItem intern(Prototype prototype) {
28,564
} catch (NullPointerException ex) { throw new NullPointerException("item == null"); } items.add(item); } <BUG>public <T extends OffsettedItem> T intern(T item) { </BUG> throwIfPrepared(); OffsettedItem result = interns.get(item); if (result != null) {
public synchronized <T extends OffsettedItem> T intern(T item) {
28,565
out.annotate(4, "type_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); } <BUG>public TypeIdItem intern(Type type) { </BUG> if (type == null) { throw new NullPointerException("type == null"); }
public synchronized TypeIdItem intern(Type type) {
28,566
import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; <BUG>import java.util.TreeMap; import java.util.concurrent.Callable;</BUG> import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Execu...
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.Callable;
28,567
if (args.incremental && !anyFilesProcessed) { return 0; // this was a no-op incremental build } byte[] outArray = null; if (!outputDex.isEmpty() || (args.humanOutName != null)) { <BUG>outArray = writeDex(); </BUG> if (outArray == null) { return 2; }
outArray = writeDex(outputDex);
28,568
DxConsole.err.println("\ntrouble processing \"" + name + "\":\n\n" + IN_RE_CORE_CLASSES); errors.incrementAndGet(); throw new StopProcessing(); } <BUG>private static byte[] writeDex() { </BUG> byte[] outArray = null; try { try {
private static byte[] writeDex(DexFile outputDex) {
28,569
if (minimalMainDex && (mainDexListFile == null || !multiDex)) { System.err.println(MINIMAL_MAIN_DEX_OPTION + " is only supported in combination with " + MULTI_DEX_OPTION + " and " + MAIN_DEX_LIST_OPTION); throw new UsageException(); } <BUG>if (multiDex && numThreads != 1) { System.out.println(NUM_THREADS_OPTION + " is ...
[DELETED]
28,570
@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;
28,571
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 ...
boolean coerce = GeoDistanceSortBuilder.DEFAULT_COERCE; boolean ignoreMalformed = GeoDistanceSortBuilder.DEFAULT_IGNORE_MALFORMED; XContentParser.Token token;
28,572
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 = curr...
GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
28,573
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 {
28,574
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.si...
if (coerce == false) { } } public boolean ignoreMalformed() { return this.ignoreMalformed; } builder.startObject(NAME);
28,575
package com.easytoolsoft.easyreport.web.controller.common; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping(value = "/error") <BUG>public class ErrorController extends AbstractController { @RequestMapping(value = {"/404"})</BUG>...
public class ErrorController { @RequestMapping(value = {"/404"})
28,576
import java.util.List; class MultiFilePainter extends BasePainter { private final List<Pair<PsiFile, Editor>> myFilesList; private int myFileIndex = 0; private int myStartPageIndex = 0; <BUG>private Printable myTextPainter = null; </BUG> public MultiFilePainter(List<Pair<PsiFile, Editor>> filesList) { myFilesList = fil...
private TextPainter myTextPainter = null;
28,577
if (myTextPainter == null) { Pair<PsiFile, Editor> pair = myFilesList.get(myFileIndex); myTextPainter = PrintManager.initTextPainter(pair.first, pair.second); } if (myTextPainter != null) { <BUG>((TextPainter)myTextPainter).setProgress(myProgress); int ret = 0;</BUG> try { ret = myTextPainter.print(g, pageFormat, pageI...
myTextPainter.setProgress(myProgress); int ret = 0;
28,578
package com.intellij.codeEditor.printing; import com.intellij.codeInsight.daemon.LineMarkerInfo; import com.intellij.openapi.application.ApplicationManager; <BUG>import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.ex.DocumentEx;</BUG> import com.intellij.openapi.editor.ex.LineIterator; import ...
import com.intellij.openapi.editor.RangeMarker; import com.intellij.openapi.editor.ex.DocumentEx;
28,579
import com.intellij.openapi.editor.highlighter.EditorHighlighter; import com.intellij.openapi.editor.highlighter.HighlighterIterator; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.progress.ProgressManager; <BUG>import com.intellij.o...
import com.intellij.openapi.util.Computable; import com.intellij.psi.PsiFile;
28,580
private static final LineWrapper ourLineWrapper = new LineWrapper(); @NonNls private static final String DEFAULT_MEASURE_HEIGHT_TEXT = "A"; @NonNls private static final String DEFAULT_MEASURE_WIDTH_TEXT = "w"; @NonNls private static final String HEADER_TOKEN_PAGE = "PAGE"; @NonNls private static final String HEADER_TOK...
public TextPainter(@NotNull DocumentEx editorDocument,
28,581
FileType fileType, Editor editor) { this(editorDocument, highlighter, fileName, psiFile.getProject(), fileType, FileSeparatorProvider.getInstance().getFileSeparators(psiFile, editorDocument, editor)); } <BUG>public TextPainter(DocumentEx editorDocument, </BUG> EditorHighlighter highlighter, String fileName, Project pro...
public TextPainter(@NotNull DocumentEx editorDocument,
28,582
import com.intellij.notification.Notification; import com.intellij.notification.NotificationType; import com.intellij.notification.Notifications; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; <BUG>import com.intellij.openapi.actionSystem.LangDataKeys; imp...
[DELETED]
28,583
TextPainter textPainter = psiFile != null ? initTextPainter(psiFile, editor) : initTextPainter((DocumentEx)editor.getDocument(), project); if (textPainter == null) return; if (printSettings.getPrintScope() == PrintSettings.PRINT_SELECTED_TEXT && editor != null && editor.getSelectionModel().hasSelection()) { <BUG>int fi...
textPainter.setSegment(editor.getSelectionModel().getSelectionStart(), editor.getSelectionModel().getSelectionEnd());
28,584
catch (PrinterException e) { Notifications.Bus.notify(new Notification("Print", CommonBundle.getErrorTitle(), e.getMessage(), NotificationType.ERROR)); LOG.warn(e); } catch (Exception e) { <BUG>LOG.error(e); }</BUG> } }); }
finally { painter.dispose();
28,585
private Button wAddFileToResult; private FormData fdlAddFileToResult, fdAddFileToResult; private Button wbTargetDirectory; private FormData fdbTargetDirectory; private Button wbMovetoDirectory; <BUG>private FormData fdbMovetoDirectory; private Label wlWildcardSource;</BUG> private TextVar wWildcardSource; pri...
private Label wlSetModificationDateToOriginal; private Button wSetModificationDateToOriginal; private FormData fdlSetModificationDateToOriginal, fdSetModificationDateToOriginal; private Label wlWildcardSource;
28,586
private Label wlNrErrorsLessThan; private TextVar wNrErrorsLessThan; private FormData fdlNrErrorsLessThan, fdNrErrorsLessThan; private Label wlAddDate; private Button wAddDate; <BUG>private FormData fdlAddDate, fdAddDate; private Label wlAddTime;</BUG> private Button wAddTime; private Form...
private Label wlAddOriginalTimestamp; private Button wAddOriginalTimestamp; private FormData fdlAddOriginalTimestamp, fdAddOriginalTimestamp; private Label wlAddTime;
28,587
wAddDate.setLayoutData(fdAddDate); wAddDate.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { <BUG>jobEntry.setChanged(); }</BUG> } ); wlAddTime=new Label(wUnzippedFiles, SWT.RIGHT);
setDateTime();
28,588
wAddTime.setLayoutData(fdAddTime); wAddTime.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { <BUG>jobEntry.setChanged(); }</BUG> } ); wlSpecifyFormat=new Label(wUnzippedFiles, SWT.RIGHT);
setDateTime();
28,589
wlIfFileExists.setText(BaseMessages.getString(PKG, "JobUnZip.IfFileExists.Label")); props.setLook(wlIfFileExists); fdlIfFileExists = new FormData(); fdlIfFileExists.left = new FormAttachment(0, 0); fdlIfFileExists.right = new FormAttachment(middle, -margin); <BUG>fdlIfFileExists.top = new FormAttachment(wDateTimeFormat...
fdlIfFileExists.top = new FormAttachment(wSetModificationDateToOriginal, margin);
28,590
wIfFileExists.setItems(JobEntryUnZip.typeIfFileExistsDesc); wIfFileExists.select(0); // +1: starts at -1 props.setLook(wIfFileExists); fdIfFileExists = new FormData(); fdIfFileExists.left = new FormAttachment(middle, 0); <BUG>fdIfFileExists.top = new FormAttachment(wDateTimeFormat, margin); </BUG> fdIfFileExists.right ...
fdIfFileExists.top = new FormAttachment(wSetModificationDateToOriginal, margin);
28,591
wSuccessCondition.select(1); else if(jobEntry.getSuccessCondition().equals(jobEntry.SUCCESS_IF_ERRORS_LESS)) wSuccessCondition.select(2); else wSuccessCondition.select(0); <BUG>}else wSuccessCondition.select(0); wIfFileExists.select(jobEntry.getIfFileExist());</BUG> wcreateMoveToDirectory.setSelection(jobEntry.isCreate...
wAddOriginalTimestamp.setSelection(jobEntry.isOriginalTimestamp()); wSetModificationDateToOriginal.setSelection(jobEntry.isOriginalModificationDate()); wIfFileExists.select(jobEntry.getIfFileExist());
28,592
else if(wSuccessCondition.getSelectionIndex()==2) jobEntry.setSuccessCondition(jobEntry.SUCCESS_IF_ERRORS_LESS); else jobEntry.setSuccessCondition(jobEntry.SUCCESS_IF_NO_ERRORS); jobEntry.setIfFileExists(wIfFileExists.getSelectionIndex()); <BUG>jobEntry.setCreateMoveToDirectory(wcreateMoveToDirectory.getSelection()); d...
jobEntry.setAddOriginalTimestamp(wAddOriginalTimestamp.getSelection()); jobEntry.setOriginalModificationDate(wSetModificationDateToOriginal.getSelection()); dispose();
28,593
private boolean rootzip; private boolean createfolder; private String nr_limit; private String wildcardSource; private int iffileexist; <BUG>private boolean createMoveToDirectory; public String SUCCESS_IF_AT_LEAST_X_FILES_UN_ZIPPED="success_when_at_least";</BUG> public String SUCCESS_IF_ERRORS_LESS="success_if_erro...
private boolean addOriginalTimestamp; private boolean setOriginalModificationDate; public String SUCCESS_IF_AT_LEAST_X_FILES_UN_ZIPPED="success_when_at_least";
28,594
createfolder=false; nr_limit="10"; wildcardSource=null; iffileexist=IF_FILE_EXISTS_SKIP; success_condition=SUCCESS_IF_NO_ERRORS; <BUG>createMoveToDirectory=false; setID(-1L);</BUG> } public JobEntryUnZip() {
addOriginalTimestamp=false; setOriginalModificationDate=false; setID(-1L);
28,595
retval.append(" ").append(XMLHandler.addTagValue("movetodirectory", movetodirectory)); retval.append(" ").append(XMLHandler.addTagValue("afterunzip", afterunzip)); retval.append(" ").append(XMLHandler.addTagValue("addfiletoresult", addfiletoresult)); retval.append(" ").append(XMLHandler.addTagValue("isfromprevious",...
retval.append(" ").append(XMLHandler.addTagValue("addOriginalTimestamp", addOriginalTimestamp)); retval.append(" ").append(XMLHandler.addTagValue("SpecifyFormat", SpecifyFormat));
28,596
retval.append(" ").append(XMLHandler.addTagValue("createfolder", createfolder)); retval.append(" ").append(XMLHandler.addTagValue("nr_limit", nr_limit)); retval.append(" ").append(XMLHandler.addTagValue("wildcardSource", wildcardSource)); retval.append(" ").append(XMLHandler.addTagValue("success_condition", success_...
retval.append(" ").append(XMLHandler.addTagValue("setOriginalModificationDate", setOriginalModificationDate)); return retval.toString();
28,597
targetdirectory = XMLHandler.getTagValue(entrynode, "targetdirectory"); movetodirectory = XMLHandler.getTagValue(entrynode, "movetodirectory"); addfiletoresult = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "addfiletoresult")); isfromprevious = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "isfrompre...
addOriginalTimestamp = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "addOriginalTimestamp")); SpecifyFormat = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "SpecifyFormat"));
28,598
nr_limit = XMLHandler.getTagValue(entrynode, "nr_limit"); wildcardSource = XMLHandler.getTagValue(entrynode, "wildcardSource"); success_condition = XMLHandler.getTagValue(entrynode, "success_condition"); if(Const.isEmpty(success_condition)) success_condition=SUCCESS_IF_NO_ERRORS; iffileexist = getIfFileExist...
setOriginalModificationDate = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "setOriginalModificationDate")); }
28,599
targetdirectory = rep.getJobEntryAttributeString(id_jobentry, "targetdirectory"); movetodirectory = rep.getJobEntryAttributeString(id_jobentry, "movetodirectory"); addfiletoresult=rep.getJobEntryAttributeBoolean(id_jobentry, "addfiletoresult"); isfromprevious=rep.getJobEntryAttributeBoolean(id_jobentry, "isfromprevious...
addtime=rep.getJobEntryAttributeBoolean(id_jobentry, "addtime"); addOriginalTimestamp=rep.getJobEntryAttributeBoolean(id_jobentry, "addOriginalTimestamp"); SpecifyFormat=rep.getJobEntryAttributeBoolean(id_jobentry, "SpecifyFormat");
28,600
nr_limit=rep.getJobEntryAttributeString(id_jobentry, "nr_limit"); wildcardSource=rep.getJobEntryAttributeString(id_jobentry, "wildcardSource"); success_condition = rep.getJobEntryAttributeString(id_jobentry, "success_condition"); if(Const.isEmpty(success_condition)) success_condition=SUCCESS_IF_NO_ERRORS; iffileexist ...
setOriginalModificationDate=rep.getJobEntryAttributeBoolean(id_jobentry, "setOriginalModificationDate"); }