id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
25,801
private int syncCompletedChangedCount; private int syncTotalChangedCount; private OnSyncProgressChangeObservable onSyncProgressChangeObservable; private OnSyncUnauthorizedObservable onSyncUnauthorizedObservable; public enum AuthenticationType { FACEBOOK, ALL } <BUG>public static AuthenticationType authenticationType = ...
private ToDoLitePreferences preferences; private void initDatabase() {
25,802
assertThat(entry.getPortfolioTransaction().getDate(), is(LocalDate.parse("2016-11-22"))); assertThat(entry.getPortfolioTransaction().getUnitSum(Unit.Type.FEE), is(Money.of("EUR", Values.Amount.factorize(11.40)))); assertThat(entry.getPortfolioTransaction().getShares(), is(Values.Share.factorize(20))); } <BUG>@Test publ...
public void testWertpapierKauf5() throws IOException
25,803
package com.intellij.codeInspection; import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.util.xmlb.annotations.Attribute; <BUG>public class LocalInspectionEP extends InspectionEP { public final static ExtensionPointName<LocalInspectionEP> LOCAL_INSPECTION = ExtensionPointName.create("com.inte...
import org.jetbrains.annotations.Nullable; public class LocalInspectionEP extends InspectionEP implements LocalInspectionTool.LocalDefaultNameProvider { public final static ExtensionPointName<LocalInspectionEP> LOCAL_INSPECTION = ExtensionPointName.create("com.intellij.localInspection");
25,804
import com.intellij.util.ArrayUtil; import com.intellij.util.xmlb.annotations.Attribute; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.Nullable; import java.util.ResourceBundle; <BUG>public class InspectionEP extends LanguageExtensionPoint { public final static ExtensionPointName<InspectionEP> ...
public class InspectionEP extends LanguageExtensionPoint implements InspectionProfileEntry.DefaultNameProvider { public final static ExtensionPointName<InspectionEP> GLOBAL_INSPECTION = ExtensionPointName.create("com.intellij.globalInspection");
25,805
return CommonBundle.message(resourceBundle, key); } private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.InspectionEP"); public InspectionProfileEntry instantiateTool() { try { <BUG>return instantiate(implementationClass, ApplicationManager.getApplication().getPicoContainer()); }</BUG> ca...
final InspectionProfileEntry entry = instantiate(implementationClass, ApplicationManager.getApplication().getPicoContainer()); entry.myNameProvider = this; return entry;
25,806
import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public abstract class LocalInspectionTool extends InspectionProfileEntry { public static final LocalInspectionTool[] EMPTY_ARRAY = new LocalInspectionTool[0]; <BUG>private static final Logger LO...
interface LocalDefaultNameProvider extends DefaultNameProvider { @Nullable String getID(); @Nullable String getAlternativeID(); } @Language("RegExp")
25,807
public static final String GENERAL_GROUP_NAME = InspectionsBundle.message("inspection.general.tools.group.name"); private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.InspectionProfileEntry"); private static final SkipDefaultValuesSerializationFilters DEFAULT_FILTER = new SkipDefaultValues...
interface DefaultNameProvider { @Nullable String getShortName(); @Nullable String getDisplayName(); @Nullable String getGroupDisplayName();
25,808
private void initializeState(String scriptName) { this.scriptCacheDir = new File(settings.getProjectWorkDir(), "scriptCache"); this.console = GrailsConsole.getInstance(); boolean skipPlugins = scriptName != null && ("UninstallPlugin".equals(scriptName) || "InstallPlugin".equals(scriptName)); console.updateStatus("Confi...
if("DependencyReport".equals(scriptName)) { configurer.setExitOnResolveError(false); this.classLoader = configurer.configuredClassLoader();
25,809
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; <BUG>import java.util.Set; import org.codehaus.groovy.grails.resolve.IvyDependencyManager;</BUG> import org.codehaus.groovy.grails.resolve.ResolveException; public class ClasspathConfi...
import org.apache.ivy.core.report.ResolveReport; import org.codehaus.groovy.grails.resolve.IvyDependencyManager;
25,810
File[] files = projectWorkDir.listFiles(new FilenameFilter() { public boolean accept(File file, String s) { return s.endsWith(".resolve"); } }); <BUG>if(files != null) { </BUG> for (File file : files) { file.delete(); }
if (files != null) {
25,811
for (File file : dir.listFiles()) { boolean include = true; for (Object me : excludes) { String exclude = me.toString(); if (file.getName().contains(exclude)) { <BUG>include = false; break; }</BUG> } if (include) { urls.add(file.toURI().toURL());
include = false;
25,812
Class<?> loaderClass = loader.getClass(); Method method = loaderClass.getMethod("addURL", URL.class); for (URL url : urls) { method.invoke(loader, url); } <BUG>} catch (Exception ex) { </BUG> throw new RuntimeException( "Cannot dynamically add URLs to GrailsScriptRunner's" +
} catch (Exception ex) {
25,813
} else { collapsedDatum.combine( fullDatum ); // using combine instead of increment in order to calculate overall aggregateQReported } } for( int iii = 0; iii < dataCollapsedByCovariate.size(); iii++ ) { <BUG>if( iii == 0 || !(qscore < IGNORE_QSCORES_LESS_THAN) ) { // use all data for the plot versus reported quality, ...
covariateCollapsedKey[0] = key[0]; // Make a new key with the read group ... Object theCovariateElement = key[iii + 1]; // and the given covariate
25,814
output = new PrintStream(new FileOutputStream(OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat")); } catch (FileNotFoundException e) { System.err.println("Can't create file: " + OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat"); System.exit(-1); } <BUG>output.println("Covariate\...
for( Object covariateKey : ((Map)dataManager.getCollapsedTable(iii).data.get(readGroupKey)).keySet()) { output.print( covariateKey.toString() + "\t" ); // Covariate RecalDatum thisDatum = (RecalDatum)((Map)dataManager.getCollapsedTable(iii).data.get(readGroupKey)).get(covariateKey);
25,815
package tk.wurst_client.alts; <BUG>import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream;</BUG> import java.io.IOException; import java.io.ObjectInputStream;
[DELETED]
25,816
new File(WurstFolders.RSA.toFile(), "wurst_rsa")); </BUG> SecretKey aesKey = <BUG>getAesKey(new File(WurstFolders.MAIN.toFile(), "key"), rsaKeyPair); </BUG> try { encryptCipher = Cipher.getInstance("AES/CFB8/NoPadding"); encryptCipher.init(Cipher.ENCRYPT_MODE, aesKey,
private final Cipher encryptCipher; private final Cipher decryptCipher; public Encryption() KeyPair rsaKeyPair = getRsaKeyPair(WurstFolders.RSA.resolve("wurst_rsa.pub"), WurstFolders.RSA.resolve("wurst_rsa")); getAesKey(WurstFolders.MAIN.resolve("key"), rsaKeyPair);
25,817
System.out.println("Generating RSA keypair."); KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); generator.initialize(1024); KeyPair pair = generator.generateKeyPair(); KeyFactory factory = KeyFactory.getInstance("RSA"); <BUG>try(ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(p...
try(ObjectOutputStream out = new ObjectOutputStream(Files.newOutputStream(publicFile)))
25,818
System.out.println("Generating AES key."); KeyGenerator keygen = KeyGenerator.getInstance("AES"); keygen.init(128); SecretKey key = keygen.generateKey(); Cipher rsaCipher = Cipher.getInstance("RSA"); <BUG>rsaCipher.init(Cipher.ENCRYPT_MODE, keyPair.getPublic()); Files.write(file.toPath(), rsaCipher.doFinal(key.getEnco...
rsaCipher.init(Cipher.ENCRYPT_MODE, pair.getPublic()); Files.write(path, rsaCipher.doFinal(key.getEncoded()));
25,819
import org.kohsuke.stapler.DataBoundConstructor; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import com.google.common.cache.Cache; <BUG>import com.google.common.cache.CacheBuilder; import java.io.File;</BUG> import java.io.FileInputStream; import java.io.Fi...
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File;
25,820
import java.io.ObjectOutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.Date; <BUG>import java.util.List; import java.util.logging.Logger;</BUG> import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.pa...
import java.util.logging.Level; import java.util.logging.Logger;
25,821
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; public class JMeterParser extends PerformanceReportParser { private static final Logger LOGGER = Logger.getLogger(JMeterParser.class.getName()); <BUG>private static final Cache<String, P...
private static final Cache<String, PerformanceReport> cache = CacheBuilder.newBuilder().maximumSize(1000).build();
25,822
ObjectInputStream in = null; synchronized (JMeterParser.class) { try { PerformanceReport r = cache.getIfPresent(fser); if (r == null) { <BUG>in = new ObjectInputStream(new FileInputStream(fser)); r = (PerformanceReport) in.readObject(); }</BUG> result.add(r);
in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(fser))); cache.put(fser, r); }
25,823
import org.kohsuke.stapler.Stapler; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Locale; public abstract class AbstractReport { <BUG>private NumberFormat percentFormat; private NumberFormat dataFormat; abstract public int countErrors();</BUG> abstract public double errorPercent(); pub...
private final NumberFormat percentFormat = new DecimalFormat("0.0"); private final NumberFormat dataFormat = new DecimalFormat("#,###"); abstract public int countErrors();
25,824
return "graph.gif"; } public String getUrlName() { return PLUGIN_NAME; } <BUG>public PerformanceProjectAction(AbstractProject project) { </BUG> this.project = project; } private JFreeChart createErrorsChart(CategoryDataset dataset) {
public PerformanceProjectAction(AbstractProject<?, ?> project) {
25,825
if (CONFIGURE_LINK.equals(link)) { return createUserConfiguration(request); } else if (TRENDREPORT_LINK.equals(link)) { return createTrendReport(request); } else if (TESTSUITE_LINK.equals(link)) { <BUG>return createTestsuiteReport(request, response); } else {</BUG> return null; } }
return createTestsuiteReport(request); } else {
25,826
CategoryDataset dataSet = getTrendReportData(request, filename).build(); TrendReportDetail report = new TrendReportDetail(project, PLUGIN_NAME, request, filename, dataSet); return report; } <BUG>private Object createTestsuiteReport(final StaplerRequest request, final StaplerResponse response) {</BUG> String filename =...
private Object createTestsuiteReport(final StaplerRequest request) {
25,827
package hudson.plugins.performance; import java.util.Date; import java.io.Serializable; public class HttpSample implements Serializable, Comparable<HttpSample> { <BUG>private static final long serialVersionUID = -1980997520755400556L; </BUG> private long duration; private boolean successful; private boolean errorObtain...
private static final long serialVersionUID = -3531990216789038711L;
25,828
if (accountIndentifer instanceof String) { accountFound = plugin.getDatabase().deleteAccount((String) accountIndentifer); } else { accountFound = plugin.getDatabase().deleteAccount((UUID) accountIndentifer); } <BUG>if (accountFound) { src.sendMessage(plugin.getConfigManager().getTextConfig() .getAccountDeleted(accountI...
src.sendMessage(plugin.getConfigManager().getTextConfig().getAccountDeleted(accountIndentifer.toString()));
25,829
this.accountIndentifer = playerName; this.password = password; } @Override public void run() { <BUG>Account account = null; if (accountIndentifer instanceof String) {</BUG> account = plugin.getDatabase().loadAccount((String) accountIndentifer); } else { account = plugin.getDatabase().loadAccount((UUID) accountIndentife...
Account account; if (accountIndentifer instanceof String) {
25,830
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
25,831
} @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);
25,832
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);
25,833
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(
25,834
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 {
25,835
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;
25,836
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) {
25,837
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;
25,838
new Integer(j), err.getStatusCode(), err.getMessage()); } } else { <BUG>if(log.isDebug()) logDebug("Found error from SalesForce and raising the exception"); com.sforce.soap.partner.Error err = data.saveResult[j].getErrors()[0];</BUG> throw new KettleException(BaseMessages.getString(PKG, "SalesforceInsert.Error.FlushBuf...
if(log.isDebug()) logDebug(BaseMessages.getString(PKG, "SalesforceInsert.ErrorFound")); com.sforce.soap.partner.Error err = data.saveResult[j].getErrors()[0];
25,839
public UpsertResult[] upsert(String upsertField, SObject[] sfBuffer) throws KettleException { try { return getBinding().upsert(upsertField, sfBuffer); }catch(Exception e) { <BUG>throw new KettleException("Erreur while doing upsert operation!", e); }</BUG> } public SaveResult[] insert(SObject[] sfBuffer) throws KettleEx...
throw new KettleException(BaseMessages.getString(PKG, "SalesforceInput.ErrorUpsert"), e);
25,840
public SaveResult[] insert(SObject[] sfBuffer) throws KettleException { try { return getBinding().create(sfBuffer); }catch(Exception e) { <BUG>throw new KettleException("Erreur while doing insert operation!", e); }</BUG> } public SaveResult[] update(SObject[] sfBuffer) throws KettleException {
throw new KettleException(BaseMessages.getString(PKG, "SalesforceInput.ErrorInsert"), e);
25,841
public SaveResult[] update(SObject[] sfBuffer) throws KettleException { try { return getBinding().update(sfBuffer); }catch(Exception e) { <BUG>throw new KettleException("Erreur while doing update operation!", e); }</BUG> } public DeleteResult[] delete(String[] id) throws KettleException {
throw new KettleException(BaseMessages.getString(PKG, "SalesforceInput.ErrorUpdate"), e);
25,842
public DeleteResult[] delete(String[] id) throws KettleException { try { return getBinding().delete(id); }catch(Exception e) { <BUG>throw new KettleException("Erreur while doing delete operation!", e); }</BUG> } public String toString() {
throw new KettleException(BaseMessages.getString(PKG, "SalesforceInput.ErrorDelete"), e);
25,843
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
25,844
} @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);
25,845
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);
25,846
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(
25,847
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 {
25,848
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;
25,849
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) {
25,850
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;
25,851
package org.fenixedu.academic.domain; <BUG>import java.util.List; import com.google.common.base.Function; import com.google.common.base.Splitter; import com.google.common.collect.Iterables;</BUG> import com.google.common.collect.Lists;
import java.util.Arrays; import java.util.stream.Collectors;
25,852
import org.fenixedu.bennu.core.annotation.GroupOperator;</BUG> import org.fenixedu.bennu.core.domain.Bennu; import org.fenixedu.bennu.core.domain.User; import org.joda.time.DateTime; <BUG>import com.google.common.base.Function; import com.google.common.base.Predicates; import com.google.common.collect.FluentIterable;</...
package org.fenixedu.academic.domain.accessControl; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import org.fenixedu.bennu.core.annotation.GroupOperator;
25,853
import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.SortedSet; <BUG>import java.util.TreeSet; import java.util.stream.Collectors;</BUG> import org.apache.commons.collections.comparators.ReverseComparator; import org.apache.commons.lang.StringUtils; import org.fen...
import java.util.function.Predicate; import java.util.stream.Collectors;
25,854
return getExecutionDegrees(null); } public List<ExecutionDegree> getExecutionDegrees(final AcademicInterval academicInterval) { if (academicInterval == null) { return getInternalExecutionDegrees(); <BUG>} return FluentIterable.from(getInternalExecutionDegrees()).filter(new Predicate<ExecutionDegree>() { @Override publi...
return getInternalExecutionDegrees().stream().filter(input -> academicInterval.equals(input.getAcademicInterval())) .collect(Collectors.toList());
25,855
package org.fenixedu.academic.domain.candidacyProcess; import java.util.ArrayList; import java.util.List; <BUG>import java.util.Set; import org.apache.commons.collections.CollectionUtils;</BUG> import org.apache.commons.collections.Predicate; import org.apache.commons.lang.StringUtils; import org.fenixedu.academic.doma...
import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils;
25,856
import org.fenixedu.academic.domain.person.IDDocumentType; import org.fenixedu.academic.util.Bundle; import org.fenixedu.bennu.core.domain.Bennu; import org.fenixedu.bennu.core.i18n.BundleUtil; import org.joda.time.DateTime; <BUG>import com.google.common.collect.Iterables; import com.google.common.collect.Sets;</BUG> a...
[DELETED]
25,857
import org.fenixedu.academic.util.Money; import org.fenixedu.bennu.core.domain.Bennu; import org.joda.time.LocalDate; import org.joda.time.YearMonthDay; import pt.ist.fenixframework.Atomic; <BUG>import com.google.common.collect.Iterables; import com.google.common.collect.Sets;</BUG> public class IndividualCandidacyPaym...
[DELETED]
25,858
final YearMonthDay startDate, final YearMonthDay endDate, final Money minAmount, final Money maxAmount) { IndividualCandidacyPaymentCode paymentCode = getAvailablePaymentCodeForReuse(); paymentCode.reuse(startDate, endDate, minAmount, maxAmount, null); return paymentCode; } <BUG>protected static IndividualCandidacyPaym...
return (IndividualCandidacyPaymentCode) Bennu.getInstance().getPaymentCodesSet().stream() .filter((IndividualCandidacyPaymentCode.class)::isInstance).filter(PaymentCode::isAvailableForReuse).findFirst() .orElse(null);
25,859
package org.fenixedu.academic.domain.accessControl; import java.util.ArrayList; import java.util.HashSet; import java.util.List; <BUG>import java.util.Set; import org.fenixedu.academic.domain.Attends;</BUG> import org.fenixedu.academic.domain.CurricularYear; import org.fenixedu.academic.domain.Degree; import org.fenixe...
import java.util.stream.Collectors; import java.util.stream.Stream; import org.fenixedu.academic.domain.Attends;
25,860
import org.fenixedu.bennu.core.i18n.BundleUtil; import org.fenixedu.spaces.domain.Space; import org.joda.time.DateTime; import com.google.common.base.Joiner; import com.google.common.base.Objects; <BUG>import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable;</BUG> import com.google.comm...
[DELETED]
25,861
return true; } } return false; } <BUG>}; } private static FluentIterable<Registration> filterCurricularYear(FluentIterable<Registration> registrations, </BUG> final CurricularYear curricularYear, final ExecutionYear executionYear) {
private static Stream<Registration> filterCurricularYear(Stream<Registration> registrations,
25,862
</BUG> final CurricularYear curricularYear, final ExecutionYear executionYear) { if (curricularYear == null) { return registrations; } <BUG>return registrations.filter(new Predicate<Registration>() { @Override public boolean apply(Registration registration) { return registration.getCurricularYear(executionYear) == curr...
return true; return false; private static Stream<Registration> filterCurricularYear(Stream<Registration> registrations,
25,863
if (reg.getDegreeType() == type && reg.isActive()) { registrations.add(reg); } }); } <BUG>return FluentIterable.from(registrations); } private static FluentIterable<Registration> getRegistrations(Degree degree) { </BUG> Set<Registration> registrations = new HashSet<>();
return registrations.stream(); private static Stream<Registration> getRegistrations(Degree degree) {
25,864
if (studentCurricularPlan.isActive()) { registrations.add(studentCurricularPlan.getRegistration()); } } } <BUG>return FluentIterable.from(registrations); } private static FluentIterable<Registration> getRegistrations() { </BUG> Set<Registration> registrations = new HashSet<>();
return registrations.stream(); private static Stream<Registration> getRegistrations() {
25,865
} } }); } } 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];
25,866
} } }); } } 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];
25,867
} } }); } } 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);
25,868
} 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]
25,869
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);
25,870
import net.buycraft.plugin.execution.strategy.CommandExecutor; import net.buycraft.plugin.execution.strategy.PostCompletedCommandsTask; import net.buycraft.plugin.execution.strategy.QueuedCommandExecutor; import net.buycraft.plugin.shared.config.BuycraftConfiguration; import net.buycraft.plugin.shared.config.BuycraftI1...
import net.buycraft.plugin.util.BugsnagNilLogger; import net.buycraft.plugin.util.BuycraftBeforeNotify; import okhttp3.Cache;
25,871
private IBuycraftPlatform platform; @Getter private CommandExecutor commandExecutor; @Getter private BuycraftI18n i18n; <BUG>private PostCompletedCommandsTask completedCommandsTask; @Override</BUG> public void onEnable() { GUIUtil.setPlugin(this); platform = new BukkitBuycraftPlatform(this);
private Client bugsnagClient; @Override
25,872
public void run() { AnalyticsUtil.postServerInformation(BuycraftPlugin.this); } }, 0, 20 * TimeUnit.DAYS.toSeconds(1)); } <BUG>Client bugsnagClient = new Client("cac4ea0fdbe89b5004d8ab8d5409e594", false); bugsnagClient.setAppVersion(getDescription().getVersion()); bugsnagClient.setLogger(new BugsnagNilLogger()); Bukkit...
[DELETED]
25,873
import net.buycraft.plugin.execution.strategy.CommandExecutor; import net.buycraft.plugin.execution.strategy.PostCompletedCommandsTask; import net.buycraft.plugin.execution.strategy.QueuedCommandExecutor; import net.buycraft.plugin.shared.config.BuycraftConfiguration; import net.buycraft.plugin.shared.config.BuycraftI1...
import net.buycraft.plugin.util.BugsnagNilLogger; import net.buycraft.plugin.util.BuycraftBeforeNotify; import net.md_5.bungee.api.plugin.Plugin;
25,874
import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; import java.io.File; import java.io.IOException; public interface Context { <BUG>String name(); PersistentResource createPersistentResource(EPackage ePackage, File file) throws IOException; PersistentResource createTransientResource(EPackage...
String uriScheme(); PersistenceBackendFactory persistenceBackendFactory(); URI createURI(URI uri); URI createFileURI(File file);
25,875
<BUG>package fr.inria.atlanmod.neoemf.data; import fr.inria.atlanmod.neoemf.data.store.FeatureCachingStoreDecorator;</BUG> import fr.inria.atlanmod.neoemf.data.store.IsSetCachingStoreDecorator; import fr.inria.atlanmod.neoemf.data.store.LoadedObjectCounterStoreDecorator; import fr.inria.atlanmod.neoemf.data.store.Loggi...
import fr.inria.atlanmod.neoemf.CoreTest; import fr.inria.atlanmod.neoemf.context.Context; import fr.inria.atlanmod.neoemf.context.CoreContext; import fr.inria.atlanmod.neoemf.data.store.FeatureCachingStoreDecorator;
25,876
protected File file() { return file; } @Before public final void registerFactories() throws InvalidDataStoreException, InvalidOptionsException { <BUG>PersistenceBackendFactoryRegistry.register(uriScheme(), persistenceBackendFactory()); file = newFile(name()); </BUG> }
PersistenceBackendFactoryRegistry.register(context().uriScheme(), context().persistenceBackendFactory()); file = newFile(context().name());
25,877
private static final String MOCK_1 = "mock1"; private static final String MOCK_2 = "mock2"; private final PersistenceBackendFactory persistenceBackendFactory1 = mock(PersistenceBackendFactory.class); private final PersistenceBackendFactory persistenceBackendFactory2 = mock(PersistenceBackendFactory.class); @Before <BUG...
public void unregisterFactories() { PersistenceBackendFactoryRegistry.unregisterAll();
25,878
import org.apache.http.NameValuePair; import org.joda.time.DateTime; public class GetTariffsRequest extends AbstractGetNRequest implements Serializable { private static final long serialVersionUID = 1L; private Long lseId; <BUG>private Long distributionLseId; private Long masterTariffId; private String[] customerClasse...
[DELETED]
25,879
private String[] customerClasses; private String[] tariffTypes; private String zipCode;</BUG> private DateTime effectiveOn; private DateTime fromDateTime; <BUG>private DateTime toDateTime; private String accountId; private String providerAccountId; private Boolean populateProperties; private Boolean populateRates;</BUG...
private String[] serviceTypes; private String[] chargeTypes; private String zipCode; private Boolean populateRates;
25,880
return accountId; } public void setAccountId(String accountId) { this.accountId = accountId; } <BUG>public String getProviderAccountId() { return providerAccountId; } public void setProviderAccountId(String providerAccountId) { this.providerAccountId = providerAccountId; }</BUG> public Boolean getPopulateProperties() {...
[DELETED]
25,881
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
25,882
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_()...
sink.lineBreak(); sink.section1_();
25,883
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
25,884
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
25,885
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
25,886
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
25,887
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
25,888
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
25,889
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.List; <BUG>import java.util.Optional; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandDel...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
25,890
.append(Text.of(TextColors.GREEN, "Usage: ")) .append(getUsage(source)) .build()); return CommandResult.empty(); } else if (isIn(REGIONS_ALIASES, parse.args[0])) { <BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); IRegion region = FGManager.getInstance().getRegion(parse.args[1...
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
25,891
</BUG> isWorldRegion = true; } if (region == null) <BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!")); if (region instanceof GlobalWorldRegion) { </BUG> throw new CommandException(Text.of("You may not delete the global region!")); }
if (world == null) throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!")); if (world == null) throw new CommandException(Text.of("Must specify a world!")); region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null); throw new CommandException(Text.of("No region exis...
25,892
source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region" ); return CommandResult.success(); } else if (isIn(HANDLERS_ALIASES, parse.args[0])) { if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[...
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
25,893
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
25,894
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
25,895
@Dependency(id = "foxcore") }, description = "A world protection plugin built for SpongeAPI. Requires FoxCore.", authors = {"gravityfox"}, url = "https://github.com/FoxDenStudio/FoxGuard") <BUG>public final class FoxGuardMain { public final Cause pluginCause = Cause.builder().named("plugin", this).build(); private stat...
private static FoxGuardMain instanceField;
25,896
private UserStorageService userStorage; private EconomyService economyService = null; private boolean loaded = false; private FCCommandDispatcher fgDispatcher; public static FoxGuardMain instance() { <BUG>return instanceField; }</BUG> @Listener public void construct(GameConstructionEvent event) { instanceField = this;
} public static Cause getCause() { return instance().pluginCause; }
25,897
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
25,898
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.*; <BUG>import java.util.stream.Collectors; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class Comm...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
25,899
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
25,900
private static FGStorageManager instance; private final Logger logger = FoxGuardMain.instance().getLogger();</BUG> private final Set<LoadEntry> loaded = new HashSet<>(); private final Path directory = getDirectory(); private final Map<String, Path> worldDirectories; <BUG>private FGStorageManager() { defaultModifiedMap ...
public final HashMap<IFGObject, Boolean> defaultModifiedMap; private final UserStorageService userStorageService; private final Logger logger = FoxGuardMain.instance().getLogger(); userStorageService = FoxGuardMain.instance().getUserStorage(); defaultModifiedMap = new CacheMap<>((k, m) -> {