Program: 179441
Project: 179441
Buggy source:
public static void main(String[] args) throws ParseException {
  configureLoggers();
  Symbol sym=Symbol.POZ;
  String from="String_Node_Str";
  String to="String_Node_Str";
  SignalGenerator<Quote> siggen=new MAVD(20,40,100);
  Wallet.getInstance().addPaper(new Paper(sym,100));
  final QuotesRegistrySimulator registry=new QuotesRegistrySimulator();
  final StocksSimulator observer=new StocksSimulator(sym,DATE_FORMAT.parse(from),DATE_FORMAT.parse(to));
  observer.getRunner().setDaemon(false);
  final CyclicBarrier cb=new CyclicBarrier(2);
  final DecisionMaker dmaker=new DecisionMaker(observer,siggen){
    @Override protected void handleNull(    NullEvent ne){
      try {
        cb.await();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
catch (      BrokenBarrierException e) {
        e.printStackTrace();
      }
      getObserver().stop();
    }
  }
;
  dmaker.setRegistry(registry);
  final double start=3000;
  final double[] finish=new double[1];
  DecisionListener dl=new DecisionListener(){
    Map<String,Object> dates=new HashMap<String,Object>();
    double cash=start;
    int number=0;
    double assets=0;
    @Override public void positionChange(    PositionEvent pe){
    }
    @Override public void decisionChange(    DecisionEvent de){
      Quote q=de.getQuote();
      String date=q.getDateString();
      if (dates.get(date) == null) {
        if (de.getSignalType() == SignalType.BUY) {
          dmaker.setPosition(Position.LONG);
          int n=(int)Math.ceil(cash / q.getClose());
          double fund=n * q.getClose();
          double tax=fund * 0.0028;
          double spread=n * 0.01;
          cash=cash - fund - tax- spread;
          number=n;
          assets=n * q.getClose() + cash;
          finish[0]=assets;
          System.out.println(q.getDateString() + "String_Node_Str" + "String_Node_Str"+ n+ "String_Node_Str"+ q.getClose()+ "String_Node_Str"+ String.format("String_Node_Str",assets)+ "String_Node_Str"+ "String_Node_Str"+ String.format("String_Node_Str",tax)+ "String_Node_Str"+ String.format("String_Node_Str",spread));
        }
 else {
          dmaker.setPosition(Position.SHORT);
          double fund=number * q.getClose();
          double tax=fund * 0.0028;
          double spread=number * 0.01;
          int n=number;
          cash=cash + fund - tax - spread;
          number=0;
          assets=cash;
          finish[0]=assets;
          System.out.println(q.getDateString() + "String_Node_Str" + "String_Node_Str"+ n+ "String_Node_Str"+ q.getClose()+ "String_Node_Str"+ String.format("String_Node_Str",assets)+ "String_Node_Str"+ "String_Node_Str"+ String.format("String_Node_Str",tax)+ "String_Node_Str"+ String.format("String_Node_Str",spread));
        }
      }
 else {
        return;
      }
      dates.put(date,true);
    }
  }
;
  dmaker.addDecisionListener(dl);
  dmaker.start();
  try {
    cb.await();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  BrokenBarrierException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + Math.round(100 * (finish[0] - start) / start) + "String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws ParseException {
  configureLoggers();
  Symbol sym=Symbol.IPL;
  String from="String_Node_Str";
  String to="String_Node_Str";
  SignalGenerator<Quote> siggen=new JMAC(7,14,10);
  Wallet.getInstance().addPaper(new Paper(sym,100));
  final QuotesRegistrySimulator registry=new QuotesRegistrySimulator();
  final StocksSimulator observer=new StocksSimulator(sym,DATE_FORMAT.parse(from),DATE_FORMAT.parse(to));
  observer.getRunner().setDaemon(false);
  final CyclicBarrier cb=new CyclicBarrier(2);
  final DecisionMaker dmaker=new DecisionMaker(observer,siggen){
    @Override protected void handleNull(    NullEvent ne){
      try {
        cb.await();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
catch (      BrokenBarrierException e) {
        e.printStackTrace();
      }
      getObserver().stop();
    }
  }
;
  dmaker.setRegistry(registry);
  final double start=3000;
  final double[] finish=new double[1];
  DecisionListener dl=new DecisionListener(){
    Map<String,Object> dates=new HashMap<String,Object>();
    double cash=start;
    int number=0;
    double assets=0;
    @Override public void positionChange(    PositionEvent pe){
    }
    @Override public void decisionChange(    DecisionEvent de){
      Quote q=de.getQuote();
      String date=q.getDateString();
      if (dates.get(date) == null) {
        if (de.getSignalType() == SignalType.BUY) {
          dmaker.setPosition(Position.LONG);
          int n=(int)Math.ceil(cash / q.getClose());
          double fund=n * q.getClose();
          double tax=fund * 0.0028;
          double spread=n * 0.01;
          cash=cash - fund - tax- spread;
          number=n;
          assets=n * q.getClose() + cash;
          finish[0]=assets;
          System.out.println(q.getDateString() + "String_Node_Str" + "String_Node_Str"+ n+ "String_Node_Str"+ q.getClose()+ "String_Node_Str"+ String.format("String_Node_Str",assets)+ "String_Node_Str"+ "String_Node_Str"+ String.format("String_Node_Str",tax)+ "String_Node_Str"+ String.format("String_Node_Str",spread));
        }
 else {
          dmaker.setPosition(Position.SHORT);
          double fund=number * q.getClose();
          double tax=fund * 0.0028;
          double spread=number * 0.01;
          int n=number;
          cash=cash + fund - tax - spread;
          number=0;
          assets=cash;
          finish[0]=assets;
          System.out.println(q.getDateString() + "String_Node_Str" + "String_Node_Str"+ n+ "String_Node_Str"+ q.getClose()+ "String_Node_Str"+ String.format("String_Node_Str",assets)+ "String_Node_Str"+ "String_Node_Str"+ String.format("String_Node_Str",tax)+ "String_Node_Str"+ String.format("String_Node_Str",spread));
        }
      }
 else {
        return;
      }
      dates.put(date,true);
    }
  }
;
  dmaker.addDecisionListener(dl);
  dmaker.start();
  try {
    cb.await();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  BrokenBarrierException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + Math.round(100 * (finish[0] - start) / start) + "String_Node_Str");
}