id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
43,701
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
43,702
} @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);
43,703
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);
43,704
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(
43,705
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 {
43,706
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;
43,707
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) {
43,708
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;
43,709
package jetbrains.mps.baseLanguage.unitTest.plugin; import jetbrains.mps.ide.ui.MPSTreeNode; import jetbrains.mps.smodel.SNode; import jetbrains.mps.smodel.IOperationContext; import jetbrains.mps.bootstrap.smodelLanguage.generator.smodelAdapter.SPropertyOperations; <BUG>import jetbrains.mps.ide.command.CommandProcessor...
import jetbrains.mps.closures.runtime.Wrappers; import jetbrains.mps.bootstrap.smodelLanguage.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.core.constraints.INamedConcept_Behavior; import jetbrains.mps.ide.IDEProjectFrame;
43,710
this.filterMethod = filterMethod; this.output.clear(); { ICursor<TestOutputComponent.Message> _zCursor6 = CursorFactory.createCursor(this.messages); try { <BUG>while(_zCursor6.moveToNext()) { </BUG> TestOutputComponent.Message message = _zCursor6.getCurrent(); this.append(message); }
while (_zCursor6.moveToNext()) {
43,711
if (message.matches(this.filterClass, this.filterMethod)) { if (message.isError()) { this.output.appendError(message.getMessage()); } else if (message.isInternal()) { this.output.appendInternal(message.getMessage()); <BUG>} else {</BUG> this.output.append(message.getMessage()); }
} else {
43,712
import jetbrains.mps.ide.ui.MPSTreeNode; import jetbrains.mps.smodel.SNode; import jetbrains.mps.smodel.IOperationContext; import jetbrains.mps.ide.icons.IconManager; import jetbrains.mps.bootstrap.smodelLanguage.generator.smodelAdapter.SPropertyOperations; <BUG>import jetbrains.mps.bootstrap.smodelLanguage.generator.s...
import jetbrains.mps.closures.runtime.Wrappers; import jetbrains.mps.core.constraints.INamedConcept_Behavior; import jetbrains.mps.ide.IDEProjectFrame;
43,713
this.aloneError = new JLabel("Error", SwingConstants.RIGHT); this.aloneError.setForeground(Color.RED); this.aloneError.setFont(boldFont); } public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { <BUG>TestStatisticsRow rowValue = (TestStati...
TestStatisticsRow rowValue = (TestStatisticsRow) value;
43,714
case 0: this.text.setText(rowValue.getText()); String additionalText = rowValue.getAdditionalText(); if (additionalText != null) { this.advancedText.setText(" (" + additionalText + ")"); <BUG>} else {</BUG> this.advancedText.setText(""); }
} else {
43,715
result = this.aloneFailure; } if (e > 0) { result = this.aloneError; } <BUG>} else {</BUG> this.simpleField.setText(""); result = this.simpleField;
} else {
43,716
if (isSelected) { if (!(keepForeground)) { result.setForeground(table.getSelectionForeground()); } result.setBackground(table.getSelectionBackground()); <BUG>} else {</BUG> if (!(keepForeground)) { result.setForeground(table.getForeground());
} else {
43,717
result.setEnabled(table.isEnabled()); if (adjustFont != null) { if (container) { Font font = table.getFont(); adjustFont.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); <BUG>} else {</BUG> adjustFont.setFont(table.getFont()); }
} else {
43,718
import java.util.HashMap; import jetbrains.mps.smodel.SNode; import jetbrains.mps.core.constraints.INamedConcept_Behavior; import jetbrains.mps.bootstrap.smodelLanguage.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.baseLanguage.ext.collections.internal.query.MapOperations; <BUG>public class TestName...
public class TestNameMap<C, M> { private Map<String, C> classToTestCase;
43,719
public long getElapsedTime() { long elapsedTime = 0; { ICursor<TestStatisticsRow> _zCursor11 = CursorFactory.createCursor(this.rows); try { <BUG>while(_zCursor11.moveToNext()) { </BUG> TestStatisticsRow row = _zCursor11.getCurrent(); { long methodTime = row.getElapsedTime();
while (_zCursor11.moveToNext()) {
43,720
public int getSuccessful() { int count = 0; { ICursor<TestStatisticsRow> _zCursor12 = CursorFactory.createCursor(this.rows); try { <BUG>while(_zCursor12.moveToNext()) { </BUG> TestStatisticsRow row = _zCursor12.getCurrent(); count = count + row.getSuccessful(); }
while (_zCursor12.moveToNext()) {
43,721
public int getErrored() { int count = 0; { ICursor<TestStatisticsRow> _zCursor13 = CursorFactory.createCursor(this.rows); try { <BUG>while(_zCursor13.moveToNext()) { </BUG> TestStatisticsRow row = _zCursor13.getCurrent(); count = count + row.getErrored(); }
while (_zCursor13.moveToNext()) {
43,722
public int getFailed() { int count = 0; { ICursor<TestStatisticsRow> _zCursor14 = CursorFactory.createCursor(this.rows); try { <BUG>while(_zCursor14.moveToNext()) { </BUG> TestStatisticsRow row = _zCursor14.getCurrent(); count = count + row.getFailed(); }
while (_zCursor14.moveToNext()) {
43,723
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> a[i][j] = operator.applyAsBoolean(a[i][j]); }
public boolean[] row(final int rowIndex) { N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex); return a[rowIndex];
43,724
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> result[i][j] = zipFunction.apply(a[i][j], b[i][j]); }
public boolean get(final int i, final int j) { return a[i][j];
43,725
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]); }
return new BooleanMatrix(c);
43,726
} public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) { this.maxConcurrentThreadNumber = maxConcurrentThreadNumber; this.keepAliveTime = keepAliveTime; this.unit = unit; <BUG>} public AsyncExecutor(final ExecutorService executorService) { this(8, 300, TimeUnit.SECONDS); this.executorS...
[DELETED]
43,727
results.add(execute(cmd)); } return results; } public <T> CompletableFuture<T> execute(final Callable<T> command) { <BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command); getExecutorService().execute(future);</BUG> return future; } public <T> List<CompletableFuture<T>> execute(final Callable<...
final CompletableFuture<T> future = new CompletableFuture<>(this, command); getExecutorService().execute(future);
43,728
package fj.data.properties; import fj.P2; import fj.Semigroup; import fj.data.List; import fj.data.Validation; <BUG>import fj.test.Arbitrary; import fj.test.Property;</BUG> import fj.test.runner.PropertyTestRunner; import org.junit.runner.RunWith; import static fj.test.Arbitrary.*;
import fj.test.Gen; import fj.test.Property;
43,729
import static fj.test.Property.implies; import static fj.test.Property.prop; @RunWith(PropertyTestRunner.class) public class ValidationProperties { public Property partition() { <BUG>Arbitrary<List<Validation<String, Integer>>> al = arbList(arbValidation(arbUSASCIIString, arbInteger)); </BUG> return Property.property(a...
Gen<List<Validation<String, Integer>>> al = arbList(arbValidation(arbUSASCIIString, arbInteger));
43,730
boolean b3 = p._2().map(s -> Validation.<String, Integer>success(s)).equals(list.filter(v -> v.isSuccess())); return prop(b1 && b2 && b3); }); } public Property sequenceNonCumulative() { <BUG>Arbitrary<List<Validation<String, Integer>>> al = arbList(arbValidation(arbUSASCIIString, arbInteger)); </BUG> return Property.p...
Gen<List<Validation<String, Integer>>> al = arbList(arbValidation(arbUSASCIIString, arbInteger));
43,731
return arbF(Coarbitrary.coarbLcgRng(), arbP2(arbLcgRng(), arbInteger)); } public static Coarbitrary<State<LcgRng, Integer>> coarbState() { return Coarbitrary.coarbState(Arbitrary.arbLcgRng(), (LcgRng s, Integer j) -> (long) (j >= 0 ? 2 * j : -2 * j + 1)); } <BUG>public static Arbitrary<F<Integer, State<LcgRng, Integer>...
public static Gen<F<Integer, State<LcgRng, Integer>>> arbBindable() {
43,732
}); PropertyAssert.assertResult(p); } @Test public void testFlatMapProp() { <BUG>Arbitrary<F<Integer, Reader<Integer, Integer>>> a = arbF(coarbInteger, arbReader()); </BUG> Property p = property( arbF(coarbInteger, arbInteger), a,
Gen<F<Integer, Reader<Integer, Integer>>> a = arbF(coarbInteger, arbReader());
43,733
import fj.Equal; import fj.Ord; import fj.data.List; import fj.data.Set; import fj.data.Stream; <BUG>import fj.test.Arbitrary; import fj.test.Property;</BUG> import fj.test.reflect.CheckParams; import fj.test.runner.PropertyTestRunner; import org.junit.runner.RunWith;
import fj.test.Gen; import fj.test.Property;
43,734
import static fj.test.Property.property; @RunWith(PropertyTestRunner.class) @CheckParams(maxSize = 10000) public class SetProperties { public final static int maxSize = 20; <BUG>public final static Arbitrary<Set<Integer>> as = Arbitrary.arbSet(Ord.intOrd, Arbitrary.arbInteger, maxSize); </BUG> public final static Equal...
public final static Gen<Set<Integer>> as = Arbitrary.arbSet(Ord.intOrd, Arbitrary.arbInteger, maxSize);
43,735
package fj.data; import fj.Equal; import fj.F; import fj.data.test.PropertyAssert; <BUG>import fj.test.Arbitrary; import fj.test.Property;</BUG> import org.junit.Assert; import org.junit.Test; import static fj.data.test.PropertyAssert.assertResult;
import fj.test.Gen; import fj.test.Property;
43,736
import org.jboss.arquillian.core.api.Instance;</BUG> import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; import java.lang.annotation.Annotation; <BUG>import java.util.ArrayList; import j...
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.arquillian.kubernetes.Session; import io.fabric8.kubernetes.api.model.ServiceList; import io.fabric8.kubernetes.client.KubernetesClient; import org.jboss.arquillian.core.api.Instance;
43,737
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.annotations.ServiceName; import io.fabric8.arquillian.kubernetes.Session; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; import io.fabric8.kubernetes.api.model.Service; import org.jboss.arquillian.core.api.Instance;</BUG> import org.jboss.arq...
import io.fabric8.kubernetes.client.KubernetesClient; import org.jboss.arquillian.core.api.Instance;
43,738
} @Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { KubernetesClient client = this.clientInstance.get(); Session session = sessionInstance.get(); <BUG>for (Service service : client.getServices(session.getNamespace()).getItems()) { </BUG> if ( qualifies(service, qualifiers) ) { retu...
for (Service service : client.services().inNamespace(session.getNamespace()).list().getItems()) {
43,739
package io.fabric8.arquillian.kubernetes.enricher; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; </BUG> import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.api.ArquillianResource;
import io.fabric8.kubernetes.client.KubernetesClient;
43,740
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Map; import java.util.Properties; <BUG>import java.util.Set; import java.util.SortedMap; import java.util.TreeMap;</BUG> public class Session { private final String id;
[DELETED]
43,741
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.annotations.ReplicationControllerName; import io.fabric8.arquillian.kubernetes.Session; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; import io.fabric8.kubernetes.api.model.ReplicationController; import org.jboss.arquillian.core.api.Instance...
import io.fabric8.kubernetes.client.KubernetesClient; import org.jboss.arquillian.core.api.Instance;
43,742
} @Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { KubernetesClient client = this.clientInstance.get(); Session session = sessionInstance.get(); <BUG>for (ReplicationController replicationController : client.getReplicationControllers(session.getNamespace()).getItems()) { </BUG> if...
for (ReplicationController replicationController : client.replicationControllers().inNamespace(session.getNamespace()).list().getItems()) {
43,743
this.configuration = configuration; } @Override public Boolean call() throws Exception { boolean result = true; <BUG>List<Service> services = kubernetesClient.getServices(session.getNamespace()).getItems(); </BUG> if (services.isEmpty()) { result = false; session.getLogger().warn("No services are available yet, waiting...
List<Service> services = kubernetesClient.services().inNamespace(session.getNamespace()).list().getItems();
43,744
package io.fabric8.arquillian.kubernetes; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; </BUG> import io.fabric8.utils.Strings; import org.jboss.arquillian.core.api.InstanceProducer; import org.jboss.arquillian.core.api.annotation.ApplicationScoped;
import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient;
43,745
public class ClientCreator { @Inject @ApplicationScoped private InstanceProducer<KubernetesClient> kubernetesProducer; public void createClient(@Observes Configuration config) { <BUG>KubernetesClient client; String masterUrl = config.getMasterUrl(); if (Strings.isNotBlank(masterUrl)) { client = new KubernetesClient(ma...
if (!Strings.isNullOrBlank(config.getMasterUrl())) { kubernetesProducer.set(new DefaultKubernetesClient(new DefaultKubernetesClient.ConfigBuilder().masterUrl(config.getMasterUrl()).build()));
43,746
import org.jboss.arquillian.core.api.Instance;</BUG> import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; import java.lang.annotation.Annotation; <BUG>import java.util.ArrayList; import j...
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.arquillian.kubernetes.Session; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.KubernetesClient; import org.jboss.arquillian.core.api.Instance;
43,747
package io.fabric8.arquillian.kubernetes; import io.fabric8.kubernetes.api.Controller; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; import org.jboss.arquillian.core.api.InstanceProducer;</BUG> import org.jboss.arquillian.core.api.annotation.ApplicationScoped; import org.jboss.arquillian.core.api.annotation....
import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.OpenShiftClient; import org.jboss.arquillian.core.api.InstanceProducer;
43,748
package io.fabric8.arquillian.kubernetes; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; </BUG> import io.fabric8.utils.MultiException; import static io.fabric8.arquillian.utils.Util.cleanupSession; public class ShutdownHook extends Thread {
import io.fabric8.kubernetes.client.KubernetesClient;
43,749
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.arquillian.kubernetes.Session; <BUG>import io.fabric8.kubernetes.api.KubernetesClient; </BUG> import io.fabric8.kubernetes.jolokia.JolokiaClients; import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.annotation.Inject;
import io.fabric8.kubernetes.client.KubernetesClient;
43,750
import org.jboss.arquillian.core.api.Instance;</BUG> import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; import java.lang.annotation.Annotation; <BUG>import java.util.ArrayList; import j...
package io.fabric8.arquillian.kubernetes.enricher; import io.fabric8.arquillian.kubernetes.Session; import io.fabric8.kubernetes.api.model.ReplicationControllerList; import io.fabric8.kubernetes.client.KubernetesClient; import org.jboss.arquillian.core.api.Instance;
43,751
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
43,752
} @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);
43,753
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);
43,754
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(
43,755
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 {
43,756
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;
43,757
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) {
43,758
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;
43,759
prop.put("memoryUsedAfterInitAGC", (memoryTotalAfterInitAGC - memoryFreeAfterInitAGC) / KB); prop.put("memoryUsedNow", (memoryTotalNow - memoryFreeNow) / MB); usedTotal = 0; currTotal = 0; dfltTotal = 0; <BUG>bestTotal = 0; req = sb.wordIndex.size();</BUG> chk = sb.wordIndex.assortmentsCacheChunkSizeAvg(); obj = sb.wor...
if (sb.wordIndex.useCollectionIndex) { prop.put("useRWICache", 0); } else { prop.put("useRWICache", 1); req = sb.wordIndex.size();
43,760
req = sb.urlPool.loadedURL.size(); chk = sb.urlPool.loadedURL.cacheNodeChunkSize(); obj = sb.urlPool.loadedURL.cacheObjectChunkSize(); slt = sb.urlPool.loadedURL.cacheNodeStatus(); ost = sb.urlPool.loadedURL.cacheObjectStatus(); <BUG>putprop(prop, env, "LURL", set); req = sb.sbStackCrawlThread.size();</BUG> chk = sb.s...
putprop(prop, env, "", "LURL", set); if (sb.sbStackCrawlThread.getDBType() != de.anomic.plasma.plasmaCrawlStacker.QUEUE_DB_TYPE_TREE) { prop.put("usePreNURLCache", 0); } else { prop.put("usePreNURLCache", 1); req = sb.sbStackCrawlThread.size();
43,761
req = sb.messageDB.size(); chk = sb.messageDB.cacheNodeChunkSize(); obj = sb.messageDB.cacheObjectChunkSize(); slt = sb.messageDB.cacheNodeStatus(); ost = sb.messageDB.cacheObjectStatus(); <BUG>putprop(prop, env, "Message", set); </BUG> req = sb.wikiDB.sizeOfTwo(); chk = sb.wikiDB.cacheNodeChunkSize(); obj = sb.wikiDB....
putprop(prop, env, "", "Message", set);
43,762
req = sb.wikiDB.sizeOfTwo(); chk = sb.wikiDB.cacheNodeChunkSize(); obj = sb.wikiDB.cacheObjectChunkSize(); slt = sb.wikiDB.cacheNodeStatus(); ost = sb.wikiDB.cacheObjectStatus(); <BUG>putprop(prop, env, "Wiki", set); </BUG> req = sb.blogDB.size(); chk = sb.blogDB.cacheNodeChunkSize(); obj = sb.blogDB.cacheObjectChunkSi...
putprop(prop, env, "", "Wiki", set);
43,763
req = sb.blogDB.size(); chk = sb.blogDB.cacheNodeChunkSize(); obj = sb.blogDB.cacheObjectChunkSize(); slt = sb.blogDB.cacheNodeStatus(); ost = sb.blogDB.cacheObjectStatus(); <BUG>putprop(prop, env, "Blog", set); </BUG> req = yacyCore.newsPool.dbSize(); chk = yacyCore.newsPool.cacheNodeChunkSize(); obj = yacyCore.newsPo...
putprop(prop, env, "", "Blog", set);
43,764
req = yacyCore.newsPool.dbSize(); chk = yacyCore.newsPool.cacheNodeChunkSize(); obj = yacyCore.newsPool.cacheObjectChunkSize(); slt = yacyCore.newsPool.cacheNodeStatus(); ost = yacyCore.newsPool.cacheObjectStatus(); <BUG>putprop(prop, env, "News", set); </BUG> req = plasmaSwitchboard.robots.size(); chk = plasmaSwitchbo...
putprop(prop, env, "", "News", set);
43,765
req = plasmaSwitchboard.robots.size(); chk = plasmaSwitchboard.robots.cacheNodeChunkSize(); obj = plasmaSwitchboard.robots.cacheObjectChunkSize(); slt = plasmaSwitchboard.robots.cacheNodeStatus(); ost = plasmaSwitchboard.robots.cacheObjectStatus(); <BUG>putprop(prop, env, "Robots", set); </BUG> req = sb.profiles.size()...
putprop(prop, env, "", "Robots", set);
43,766
req = sb.profiles.size(); chk = sb.profiles.cacheNodeChunkSize(); obj = sb.profiles.cacheObjectChunkSize(); slt = sb.profiles.cacheNodeStatus(); ost = sb.profiles.cacheObjectStatus(); <BUG>putprop(prop, env, "Profiles", set); </BUG> prop.put("usedTotal", usedTotal / MB); prop.put("currTotal", currTotal / MB); prop.put(...
putprop(prop, env, "", "Profiles", set);
43,767
if (this.initThead != null) { this.initThead.join(); } } catch (NullPointerException e) { } catch (InterruptedException e) {} <BUG>} private void openHashCache() {</BUG> if (newdb) { String newCacheName = "urlNotice4.table"; cacheStacksPath.mkdirs();
public boolean getUseNewDB() { return (urlIndexFile instanceof kelondroFlexTable); private void openHashCache() {
43,768
public ReportElement getBase() { return base; } @Override public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException { <BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo); PDPageContentStream pag...
PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo); PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
43,769
public PdfTextStyle(String config) { Assert.hasText(config); String[] split = config.split(","); Assert.isTrue(split.length == 3, "config must look like: 10,Times-Roman,#000000"); fontSize = Integer.parseInt(split[0]); <BUG>font = resolveStandard14Name(split[1]); color = new Color(Integer.valueOf(split[2].substring(1),...
font = getFont(split[1]); color = new Color(Integer.valueOf(split[2].substring(1), 16));
43,770
package cc.catalysts.boot.report.pdf.elements; import cc.catalysts.boot.report.pdf.config.PdfTextStyle; import cc.catalysts.boot.report.pdf.utils.ReportAlignType; import org.apache.pdfbox.pdmodel.PDPageContentStream; <BUG>import org.apache.pdfbox.pdmodel.font.PDFont; import org.slf4j.Logger;</BUG> import org.slf4j.Logg...
import org.apache.pdfbox.pdmodel.font.PDType1Font; import org.apache.pdfbox.util.Matrix; import org.slf4j.Logger;
43,771
addTextSimple(stream, textConfig, textX, nextLineY, ""); return nextLineY; } try { <BUG>String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, fixedText); </BUG> float x = calculateAlignPosition(textX, align, textConfig, allowedWidth, split[0]); if (!underline) { addTextSimple(stream, ...
String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
43,772
public static void addTextSimple(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { try { stream.setFont(textConfig.getFont(), textConfig.getFontSize()); stream.setNonStrokingColor(textConfig.getColor()); stream.beginText(); <BUG>stream.newLineAtOffset(textX, textY); stream.sh...
stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY)); stream.showText(text);
43,773
public static void addTextSimpleUnderlined(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { addTextSimple(stream, textConfig, textX, textY, text); try { float lineOffset = textConfig.getFontSize() / 8F; stream.setStrokingColor(textConfig.getColor()); <BUG>stream.setLineWidth...
stream.moveTo(textX, textY - lineOffset); stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
43,774
list.add(text.length()); return list; } public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) { String endPart = ""; <BUG>String shortenedText = text; List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); ...
List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); if (breakSplitted.size() > 1) {
43,775
package cc.catalysts.boot.report.pdf.elements; import org.apache.pdfbox.pdmodel.PDDocument; <BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; import java.io.IOException;</BUG> import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList;
import org.apache.pdfbox.pdmodel.PDPageContentStream; import java.io.IOException;
43,776
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;
43,777
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);
43,778
@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);
43,779
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);
43,780
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);
43,781
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);
43,782
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);
43,783
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;
43,784
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());
43,785
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 {
43,786
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);
43,787
import com.fincatto.nfe310.FabricaDeObjetosFake; import org.junit.Assert; import org.junit.Test; import java.math.BigDecimal; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFEnviaEventoCancelamentoTest { @Test public void deveObterEventosComoFoiSetado() {
import java.util.Collections; import java.util.List;
43,788
import com.fincatto.nfe310.FabricaDeObjetosFake; import com.fincatto.nfe310.classes.nota.NFNota; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFLoteEnvioTest { @Test public void devePermitirNotasComTamanho50() {
import java.util.Collections; import java.util.List;
43,789
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteEnvio loteEnvio = new NFLoteEnvio(); loteEnvio.setIdLote("333972757970401"); loteEnvio.setVersao("3.10"); loteEnvio.setIndicadorProcessamento(NFLoteIndicadorProcessamento.PROCESSAMENTO_ASSINCRONO); <BUG>loteEnvio.setNotas(Arrays.asList(FabricaDeObje...
loteEnvio.setNotas(Collections.singletonList(FabricaDeObjetosFake.getNFNota()));
43,790
import org.joda.time.DateTime; import org.joda.time.LocalDate; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; <BUG>import java.util.Arrays; public class FabricaDeObjetosFake {</BUG> public static NFInformacaoImpostoDevolvido getNFInformacaoImpostoDevolvido() { final NFInformacaoIm...
import java.util.Collections; public class FabricaDeObjetosFake {
43,791
info.setEmitente(FabricaDeObjetosFake.getNFNotaInfoEmitente()); info.setEntrega(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setExportacao(FabricaDeObjetosFake.getNFNotaInfoExportacao()); info.setIdentificador("89172658591754401086218048846976493475937081"); info.setInformacoesAdicionais(FabricaDeObjetosFake.getNFN...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
43,792
imposto.setValorTotalTributos(new BigDecimal("999999999999.99")); item.setImposto(imposto); item.setNumeroItem(990); item.setProduto(FabricaDeObjetosFake.getProdutoMedicamento()); item.setImpostoDevolvido(FabricaDeObjetosFake.getNFImpostoDevolvido()); <BUG>info.setItens(Arrays.asList(item)); info.setRetirada(FabricaDeO...
info.setItens(Collections.singletonList(item)); info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
43,793
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(referenciada));
43,794
produtoMedicamento.setCfop("1302"); produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produtoMedicamento.setCodigoDeBarras("36811963532505"); produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505"); produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);...
produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
43,795
produtoMedicamento.setValorSeguro(new BigDecimal("999999999999.99")); produtoMedicamento.setValorTotalBruto(new BigDecimal("999999999999.99")); produtoMedicamento.setValorUnitario(new BigDecimal("9999999999.9999999999")); produtoMedicamento.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999")); produtoMed...
produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
43,796
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal()); info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte()); info.setVersao(new BigDecimal("3.10")); <BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutori...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
43,797
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(FabricaDeObjetosFake.getNFInfoReferenciada()));
43,798
return compra; } public static NFNotaInfoCobranca getNFNotaInfoCobranca() { final NFNotaInfoCobranca cobranca = new NFNotaInfoCobranca(); cobranca.setFatura(FabricaDeObjetosFake.getNFNotaInfoFatura()); <BUG>cobranca.setDuplicatas(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoDuplicata())); </BUG> return cobranca; } p...
cobranca.setDuplicatas(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
43,799
</BUG> produto.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP"); produto.setExtipi("999"); produto.setCodigoEspecificadorSituacaoTributaria("9999999"); <BUG>produto.setMedicamentos(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoIte...
produto.setCfop("1302"); produto.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produto.setCodigoDeBarras("36811963532505"); produto.setCodigoDeBarrasTributavel("36811963532505"); produto.setCampoeValorNota(NFProdutoCompoeValorNota.SIM); produto.setDeclaracoesImportacao(Collections.singleton...
43,800
produto.setValorFrete(new BigDecimal("999999999999.99")); produto.setValorOutrasDespesasAcessorias(new BigDecimal("999999999999.99")); produto.setValorSeguro(new BigDecimal("999999999999.99")); produto.setValorTotalBruto(new BigDecimal("999999999999.99")); produto.setValorUnitario(new BigDecimal("9999999999.9999999999"...
produto.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));