id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
22,501
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 );
22,502
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_();
22,503
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_();
22,504
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_();
22,505
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
22,506
private void setAccountTitle(final int subAccount) { String suffix = ""; if (mService.showBalanceInTitle()) { Coin balance = mService.getCoinBalance(subAccount); if (balance == null) <BUG>balance = Coin.valueOf(0); </BUG> suffix = formatValuePostfix(balance); } else if (mService.haveSubaccounts()) { final Map<String, ?...
balance = Coin.ZERO;
22,507
import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.greenaddress.greenapi.GAException; <BUG>import com.greenaddress.greenapi.Network; impor...
import com.greenaddress.greenapi.JSONMap; import com.greenaddress.greenapi.Output;
22,508
if (txSize == null) txSize = tx.getMessageSize(); final long requiredFeeDelta = txSize + tx.getInputs().size() * 4; final List<TransactionInput> oldInputs = new ArrayList<>(tx.getInputs()); tx.clearInputs(); <BUG>for (int i = 0; i < txItem.eps.size(); ++i) { final Map<String, Object> ep = (Map) txItem.eps.get(i); if ((...
for (final JSONMap ep : txItem.eps) { if (ep.getBool("is_credit")) final TransactionInput oldInput = oldInputs.get(ep.getInt("pt_idx"));
22,509
final TransactionInput newInput = new TransactionInput( Network.NETWORK, null, oldInput.getScriptBytes(), oldInput.getOutpoint(), <BUG>Coin.valueOf(Long.valueOf((String) ep.get("value"))) );</BUG> newInput.setSequenceNumber(0); tx.addInput(newInput); }
ep.getCoin("value")
22,510
new CB.Toast<ArrayList>(TransactionActivity.this) { @Override public void onSuccess(final ArrayList result) { Coin remaining = finalRemaining; final List<ListenableFuture<byte[]>> scripts = new ArrayList<>(); <BUG>final List<Map<String, Object>> moreInputs = new ArrayList<>(); for (final Object utxo_ : result) { final...
final List<JSONMap> moreInputs = new ArrayList<>(); for (final Object o : result) { final JSONMap utxo = new JSONMap((Map<String, Object>) o); remaining = remaining.subtract(utxo.getCoin("value")); scripts.add(mService.createOutScript(utxo.getInt("subaccount"), utxo.getInt("pointer")));
22,511
public PeerGroup getSPVPeerGroup() { return mSPV.getPeerGroup(); } public int getSPVHeight() { return mSPV.getSPVHeight(); } public int getSPVBlocksRemaining() { return mSPV.getSPVBlocksRemaining(); } public Coin getSPVVerifiedBalance(final int subAccount) { final Coin balance = mSPV.getVerifiedBalance(subAccount); <BU...
return balance == null ? Coin.ZERO : balance;
22,512
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
22,513
package co.cask.cdap.template.etl.common; import co.cask.cdap.api.Resources; <BUG>import com.google.common.base.Optional; import java.util.List;</BUG> public class ETLConfig { private final ETLStage source; private final ETLStage sink;
import com.google.common.collect.Lists; import java.util.List;
22,514
return source; } public ETLStage getSink() { return sink; } <BUG>public Optional<List<ETLStage>> getTransforms() { return Optional.fromNullable(transforms); }</BUG> public Resources getResources() { return resources;
public List<ETLStage> getTransforms() { return transforms != null ? transforms : Lists.<ETLStage>newArrayList();
22,515
rows.close(); } } }); initializeSource(context, config.getSource()); <BUG>List<Transformation> transforms = initializeTransforms(context, config.getTransforms().or(Lists.<ETLStage>newArrayList()));</BUG> initializeSink(context, config.getSink()); transformExecutor = new TransformExecutor(transforms, transformMetrics);...
List<Transformation> transforms = initializeTransforms(context, config.getTransforms());
22,516
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;
22,517
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;
22,518
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()));
22,519
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 {
22,520
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()));
22,521
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());
22,522
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));
22,523
produtoMedicamento.setCfop("1302"); produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produtoMedicamento.setCodigoDeBarras("36811963532505"); produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505"); produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);...
produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
22,524
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"));
22,525
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()));
22,526
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()));
22,527
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()));
22,528
</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...
22,529
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"));
22,530
medicamento.setQuantidade(new BigDecimal("9999999.999")); return medicamento; } public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() { final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao(); <BUG>declaraoImpo...
declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
22,531
public static NFNotaInfoVolume getNFNotaInfoVolume() { final NFNotaInfoVolume volume = new NFNotaInfoVolume(); volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb"); final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre(); notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLb...
volume.setLacres(Collections.singletonList(notaInfoLacre));
22,532
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno(); retorno.setAmbiente(NFAmbiente.HOMOLOGACAO); retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNz...
retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
22,533
import org.sleuthkit.autopsy.timeline.filters.TypeFilter; import org.sleuthkit.autopsy.timeline.zooming.DescriptionLOD; import org.sleuthkit.autopsy.timeline.zooming.ZoomParams; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; <BUG>public class EventClusterNode extends Stac...
public class EventClusterNode extends StackPane implements DetailViewNode<EventClusterNode> {
22,534
private final ImageView eventTypeImageView = new ImageView(); private final Pane subNodePane = new Pane(); private final SimpleObjectProperty<ContextMenu> contextMenu = new SimpleObjectProperty<>(); private Background spanFill; private final Button plusButton = new Button(null, new ImageView(PLUS)) { <BUG>{ setMinSize(...
configureLODButton(this);
22,535
); Tooltip.install(EventClusterNode.this, tooltip); } } @Override <BUG>public Pane getSubNodePane() { return subNodePane; }</BUG> synchronized public EventCluster getEvent() { return aggEvent;
public List<EventClusterNode> getSubNodes() { return subNodePane.getChildrenUnmodifiable().stream() .map(EventClusterNode.class::cast) .collect(Collectors.toList());
22,536
private final Axis<EventCluster> verticalAxis = new EventAxis(); private final Map<EventType, XYChart.Series<DateTime, EventCluster>> eventTypeToSeriesMap = new ConcurrentHashMap<>(); private final ScrollBar vertScrollBar = new ScrollBar(); private final Region region = new Region(); private final ObservableList<EventC...
private final ObservableList<DetailViewNode<?>> highlightedNodes = FXCollections.synchronizedObservableList(FXCollections.observableArrayList());
22,537
setRight(vBox); dateAxis.setAutoRanging(false); region.minHeightProperty().bind(dateAxis.heightProperty()); vertScrollBar.visibleAmountProperty().bind(chart.heightProperty().multiply(100).divide(chart.getMaxVScroll())); requestLayout(); <BUG>highlightedNodes.addListener((ListChangeListener.Change<? extends EventCluster...
highlightedNodes.addListener((ListChangeListener.Change<? extends DetailViewNode<?>> change) -> {
22,538
} }); setOnMouseClicked((MouseEvent t) -> { requestFocus(); }); <BUG>this.onScrollProperty().set((EventHandler<ScrollEvent>) (ScrollEvent t) -> { vertScrollBar.valueProperty().set(Math.max(0, Math.min(100, vertScrollBar.getValue() - t.getDeltaY() / 200.0)));</BUG> }); this.setOnKeyPressed((KeyEvent t) -> { switch (t.ge...
this.onScrollProperty().set((ScrollEvent t) -> { vertScrollBar.valueProperty().set(Math.max(0, Math.min(100, vertScrollBar.getValue() - t.getDeltaY() / 200.0)));
22,539
public void setSelectionModel(MultipleSelectionModel<TreeItem<NavTreeNode>> selectionModel) { this.treeSelectionModel = selectionModel; treeSelectionModel.getSelectedItems().addListener((Observable observable) -> { highlightedNodes.clear(); for (TreeItem<NavTreeNode> tn : treeSelectionModel.getSelectedItems()) { <BUG>f...
for (DetailViewNode<?> n : chart.getNodes((DetailViewNode<?> t) -> t.getDescription().equals(tn.getValue().getDescription()))) { highlightedNodes.add(n);
22,540
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
22,541
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integ...
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
22,542
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static Descript...
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
22,543
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
22,544
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; impo...
[DELETED]
22,545
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
22,546
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateT...
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
22,547
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); ...
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
22,548
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public st...
public static final WeekDay JAVA8 = new WeekDay(1, false);
22,549
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.g...
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
22,550
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefini...
date.getYear(), date.getMonthValue(),
22,551
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
22,552
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
22,553
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(da...
[DELETED]
22,554
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
22,555
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; i...
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
22,556
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
22,557
package com.pushtorefresh.storio.contentresolver.queries; import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; <BUG>import java.util.List; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;</BUG> import static com.pushtorefresh.storio.internal....
import static com.pushtorefresh.storio.internal.Checks.checkNotEmpty; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;
22,558
public List<String> whereArgs() { return whereArgs; } @NonNull public String sortOrder() { <BUG>return sortOrder; }</BUG> @Override public boolean equals(Object o) { if (this == o) return true;
public CompleteBuilder toBuilder() { return new CompleteBuilder(this);
22,559
checkNotNull(uri, "Please specify uri"); return new CompleteBuilder(uri); } @NonNull public CompleteBuilder uri(@NonNull String uri) { <BUG>checkNotNull(uri, "Uri should not be null"); </BUG> return new CompleteBuilder(Uri.parse(uri)); } }
checkNotEmpty(uri, "Uri should not be null");
22,560
return new CompleteBuilder(Uri.parse(uri)); } } public static final class CompleteBuilder { @NonNull <BUG>private final Uri uri; private List<String> columns;</BUG> private String where; private List<String> whereArgs; private String sortOrder;
private Uri uri; private List<String> columns;
22,561
package com.pushtorefresh.storio.contentresolver.queries; import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; <BUG>import java.util.List; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;</BUG> import static com.pushtorefresh.storio.internal....
import static com.pushtorefresh.storio.internal.Checks.checkNotEmpty; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;
22,562
public String where() { return where; } @NonNull public List<String> whereArgs() { <BUG>return whereArgs; }</BUG> @Override public boolean equals(Object o) { if (this == o) return true;
public CompleteBuilder toBuilder() { return new CompleteBuilder(this);
22,563
checkNotNull(uri, "Please specify uri"); return new CompleteBuilder(uri); } @NonNull public CompleteBuilder uri(@NonNull String uri) { <BUG>checkNotNull(uri, "Uri should not be null"); </BUG> return new CompleteBuilder(Uri.parse(uri)); } }
checkNotEmpty(uri, "Uri should not be null");
22,564
package com.pushtorefresh.storio.contentresolver.queries; import android.net.Uri; <BUG>import android.support.annotation.NonNull; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;</BUG> public final class InsertQuery { @NonNull private final Uri uri;
import static com.pushtorefresh.storio.internal.Checks.checkNotEmpty; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;
22,565
private InsertQuery(@NonNull Uri uri) { this.uri = uri; } @NonNull public Uri uri() { <BUG>return uri; }</BUG> @Override public boolean equals(Object o) { if (this == o) return true;
public CompleteBuilder toBuilder() { return new CompleteBuilder(this);
22,566
checkNotNull(uri, "Please specify uri"); return new CompleteBuilder(uri); } @NonNull public CompleteBuilder uri(@NonNull String uri) { <BUG>checkNotNull(uri, "Uri should not be null"); </BUG> return new CompleteBuilder(Uri.parse(uri)); } }
checkNotEmpty(uri, "Uri should not be null");
22,567
package com.pushtorefresh.storio.contentresolver.queries; import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; <BUG>import java.util.List; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;</BUG> import static com.pushtorefresh.storio.internal....
import static com.pushtorefresh.storio.internal.Checks.checkNotEmpty; import static com.pushtorefresh.storio.internal.Checks.checkNotNull;
22,568
public String where() { return where; } @NonNull public List<String> whereArgs() { <BUG>return whereArgs; }</BUG> @Override public boolean equals(Object o) { if (this == o) return true;
public CompleteBuilder toBuilder() { return new CompleteBuilder(this);
22,569
checkNotNull(uri, "Please specify uri"); return new CompleteBuilder(uri); } @NonNull public CompleteBuilder uri(@NonNull String uri) { <BUG>checkNotNull(uri, "Uri should not be null"); </BUG> return new CompleteBuilder(Uri.parse(uri)); } }
checkNotEmpty(uri, "Uri should not be null");
22,570
package com.tbruyelle.rxpermissions; import android.Manifest; <BUG>import android.annotation.TargetApi; import android.content.Context;</BUG> import android.content.pm.PackageManager; import android.os.Build; import org.junit.Before;
import android.app.Activity; import android.content.Context;
22,571
mCtx.startActivity(intent); } public boolean isGranted(String... permissions) { return !isMarshmallow() || hasPermission_(permissions); } <BUG>private boolean isMarshmallow() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;</BUG> } @TargetApi(Build.VERSION_CODES.M) private boolean hasPermission_(String... permi...
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
22,572
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
22,573
super.onResume(); if (!mIsConnected) { mTango = new Tango(AugmentedRealityActivity.this, new Runnable() { @Override public void run() { <BUG>try { connectTango();</BUG> setupRenderer(); mIsConnected = true; } catch (TangoOutOfDateException e) {
TangoSupport.initialize(); connectTango();
22,574
if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) { mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics); mCameraPoseTimestamp = lastFramePose.timestamp;</BUG> } else { <BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread); }</BUG> } } } @Override
mRenderer.updateRenderCameraPose(lastFramePose); mCameraPoseTimestamp = lastFramePose.timestamp; Log.w(TAG, "Can't get device pose at time: " +
22,575
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
22,576
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
22,577
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
22,578
return RESOURCES.getBooleanProperty("strong.variables.format.enabled", true); } public static boolean isVariableAutoCastingEnabled() { return RESOURCES.getBooleanProperty("variables.autocast.enabled", true); } <BUG>public static boolean isVariableTreatEmptyStringsAsNulls() { return RESOURCES.getBooleanProperty("variabl...
[DELETED]
22,579
ProcessDefinition parentProcessDefinition = processDefinitionLoader.getDefinition(nodeProcess.getProcess()); Node node = parentProcessDefinition.getNodeNotNull(nodeProcess.getParentToken().getNodeId()); multiSubprocessFlagsMap.put(process, node instanceof MultiSubprocessNode); if (node instanceof SubprocessNode) { Subp...
boolean baseProcessIdMode = subprocessNode.isInBaseProcessIdMode();
22,580
if (!readVariableNames.isEmpty()) { String readVariableName = name; String readVariableNameRemainder = ""; while (!readVariableNames.containsKey(readVariableName)) { if (readVariableName.contains(UserType.DELIM)) { <BUG>int lastIndex = readVariableName.lastIndexOf(UserType.DELIM); readVariableNameRemainder = readVariab...
readVariableNameRemainder = readVariableName.substring(lastIndex) + readVariableNameRemainder; } else if (readVariableName.contains(VariableFormatContainer.COMPONENT_QUALIFIER_START)) { int lastIndex = readVariableName.lastIndexOf(VariableFormatContainer.COMPONENT_QUALIFIER_START); readVariableNameRemainder = readVaria...
22,581
String syncVariableNameRemainder = ""; while (!syncVariableNames.containsKey(syncVariableName)) { if (syncVariableName.contains(UserType.DELIM)) { int lastIndex = syncVariableName.lastIndexOf(UserType.DELIM); syncVariableNameRemainder = syncVariableName.substring(lastIndex) + syncVariableNameRemainder; <BUG>syncVariabl...
} else if (syncVariableName.contains(VariableFormatContainer.COMPONENT_QUALIFIER_START)) { int lastIndex = syncVariableName.lastIndexOf(VariableFormatContainer.COMPONENT_QUALIFIER_START); } else {
22,582
import joynr.SubscriptionReply; import joynr.SubscriptionRequest; import joynr.SubscriptionStop; import org.slf4j.Logger; import org.slf4j.LoggerFactory; <BUG>public class JoynrMessageFactory { private final Set<JoynrMessageProcessor> messageProcessors;</BUG> private ObjectMapper objectMapper; @Inject(optional = true) ...
private static final String REQUEST_REPLY_ID_CUSTOM_HEADER = "z4"; private final Set<JoynrMessageProcessor> messageProcessors;
22,583
context.setCurrentType(Boolean.TYPE); return result; } catch (NullPointerException e) { e.printStackTrace(); throw new UnsupportedCompilationException("evaluation resulted in null expression."); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)...
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,584
context.setCurrentType(Boolean.TYPE); return result; } catch (NullPointerException e) { e.printStackTrace(); throw new UnsupportedCompilationException("evaluation resulted in null expression."); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)...
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,585
result = pa.getSourceAccessor(context, context.getCurrentObject(), srcString); _getterClass = context.getCurrentType(); } } } <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)t; else throw new RuntimeException(t);</BUG> }
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,586
} _getterClass = context.getCurrentType(); } } } <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)t; else throw new RuntimeException(t);</BUG> }
} catch (Throwable t) throw OgnlOps.castToRuntime(t); if (m != null) _getterClass = m.getReturnType(); context.setCurrentType(m.getReturnType()); context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
22,587
result += ")"; context.setCurrentObject(target); context.setCurrentType(Object.class); } catch (NullPointerException e) { throw new UnsupportedCompilationException("evaluation resulted in null expression."); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilat...
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,588
result += "if(" + first + "){"; result += second; result += "; } "; context.setCurrentObject(target); context.setCurrentType(Object.class); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)t; else throw new RuntimeException(t);</BUG> }
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,589
result += " : "; result += (mismatched ? " ($w) " : "") + second; result += ")"; context.setCurrentObject(target); context.setCurrentType(Boolean.TYPE); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException) t; else throw new RuntimeException(t);</B...
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,590
result += first; result += " : "; result += second; context.setCurrentObject(target); context.setCurrentType(Boolean.TYPE); <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException) t; else throw new RuntimeException(t);</BUG> }
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,591
} if (prevCast != null) { context.put(ExpressionCompiler.PRE_CAST, prevCast); } } <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)t; else throw new RuntimeException(t);</BUG> }
result += parmString; } catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,592
} else result += value; context.put("_currentChain", result); } } <BUG>} catch (Throwable t) { if (UnsupportedCompilationException.class.isInstance(t)) throw (UnsupportedCompilationException)t; else throw new RuntimeException(t);</BUG> }
} catch (Throwable t) throw OgnlOps.castToRuntime(t);
22,593
private volatile IndexProvider localIndexProvider; private final int machineId; private volatile MasterServer masterServer; private final AtomicBoolean reevaluatingMyself = new AtomicBoolean(); private ScheduledExecutorService updatePuller; <BUG>private volatile Machine cachedMaster = Machine.NO_MACHINE; private volati...
[DELETED]
22,594
System.out.println( "looked up master " + master ); master = broker.getMasterReally(); <BUG>} boolean iAmCurrentlyMaster = masterServer != null; boolean restarted = false; if ( cachedMaster.getMachineId() != master.other().getMachineId() ) {</BUG> if ( master.other().getMachineId() == machineId ) { if ( this.localGraph...
[DELETED]
22,595
if ( this.localGraph == null || !iAmCurrentlyMaster ) { internalShutdown(); startAsMaster(); restarted = true; <BUG>} }</BUG> else { if ( this.localGraph == null || iAmCurrentlyMaster )
broker.rebindMaster();
22,596
startAsSlave(); tryToEnsureIAmNotABrokenMachine( master ); restarted = true; } } <BUG>} if ( masterServer != null ) { broker.rebindMaster(); }</BUG> if ( restarted )
[DELETED]
22,597
this.localGraph.registerKernelEventHandler( handler ); } this.localDataSourceManager = localGraph.getConfig().getTxModule().getXaDataSourceManager(); } <BUG>cachedMaster = master.other(); started = true;</BUG> } finally {
[DELETED]
22,598
connectedSlaveChannels.remove( channel ); } } public void shutdown() { <BUG>deadConnectionsPoller.shutdown(); channelGroup.close().awaitUninterruptibly();</BUG> } private boolean channelIsClosed( Channel channel ) {
System.out.println( "Master server shutdown, closing all channels" ); channelGroup.close().awaitUninterruptibly();
22,599
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() );
22,600
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_();