Program: 16630
Project: 16630
Buggy source:
public MultipleAlignment analyze(Atom[] atoms,CESymmParameters param) throws StructureException {
  if (atoms.length < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.params=param;
  if (params.isMultipleAxes() && params.getRefineMethod() != RefineMethod.NOT_REFINED) {
    logger.warn("String_Node_Str");
    CeSymmIterative iterative=new CeSymmIterative(params);
    MultipleAlignment result=iterative.execute(atoms);
    axes=iterative.getSymmetryAxes();
    return result;
  }
  AFPChain afp=align(atoms,atoms,params);
  if (refined) {
    msa=SymmetryTools.fromAFP(afp,ca1);
    msa.putScore("String_Node_Str",1.0);
    if (this.params.getOptimization()) {
      ExecutorService executor=Executors.newCachedThreadPool();
      List<Future<MultipleAlignment>> future=new ArrayList<Future<MultipleAlignment>>();
      int seed=this.params.getSeed();
      for (int rep=0; rep < 4; rep++) {
        Callable<MultipleAlignment> worker=new SymmOptimizer(msa,axes,params,seed++);
        Future<MultipleAlignment> submit=executor.submit(worker);
        future.add(submit);
      }
      double maxScore=Double.NEGATIVE_INFINITY;
      double score=maxScore;
      MultipleAlignment result=msa;
      for (int rep=0; rep < future.size(); rep++) {
        try {
          result=future.get(rep).get();
          score=result.getScore(MultipleAlignmentScorer.MC_SCORE);
        }
 catch (        InterruptedException e) {
          logger.warn("String_Node_Str",e);
        }
catch (        ExecutionException e) {
          logger.warn("String_Node_Str",e);
        }
        if (score > maxScore) {
          msa=result;
          maxScore=score;
        }
      }
      msa.putScore("String_Node_Str",1.0);
      executor.shutdown();
    }
  }
 else {
    MultipleAlignmentEnsemble e=new MultipleAlignmentEnsembleImpl(afp,ca1,ca1,false);
    msa=e.getMultipleAlignment(0);
    logger.warn("String_Node_Str" + "String_Node_Str");
    msa.putScore("String_Node_Str",0.0);
  }
  return msa;
}

Fixed version (ground truth):
public MultipleAlignment analyze(Atom[] atoms,CESymmParameters param) throws StructureException {
  if (atoms.length < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.params=param;
  if (params.isMultipleAxes() && params.getRefineMethod() != RefineMethod.NOT_REFINED) {
    logger.warn("String_Node_Str");
    CeSymmIterative iterative=new CeSymmIterative(params);
    msa=iterative.execute(atoms);
    axes=iterative.getSymmetryAxes();
    if (SymmetryTools.isRefined(msa)) {
      refined=true;
    }
 else {
      afpChain=align(atoms,atoms,params);
    }
  }
 else {
    afpChain=align(atoms,atoms,params);
  }
  if (refined) {
    if (msa == null)     msa=SymmetryTools.fromAFP(afpChain,ca1);
    msa.putScore("String_Node_Str",1.0);
    if (this.params.getOptimization()) {
      ExecutorService executor=Executors.newCachedThreadPool();
      List<Future<MultipleAlignment>> future=new ArrayList<Future<MultipleAlignment>>();
      int seed=this.params.getSeed();
      for (int rep=0; rep < 4; rep++) {
        Callable<MultipleAlignment> worker=new SymmOptimizer(msa,axes,params,seed++);
        Future<MultipleAlignment> submit=executor.submit(worker);
        future.add(submit);
      }
      double maxScore=Double.NEGATIVE_INFINITY;
      double score=maxScore;
      MultipleAlignment result=msa;
      for (int rep=0; rep < future.size(); rep++) {
        try {
          result=future.get(rep).get();
          score=result.getScore(MultipleAlignmentScorer.MC_SCORE);
        }
 catch (        InterruptedException e) {
          logger.warn("String_Node_Str",e);
        }
catch (        ExecutionException e) {
          logger.warn("String_Node_Str",e);
        }
        if (score > maxScore) {
          msa=result;
          maxScore=score;
        }
      }
      msa.putScore("String_Node_Str",1.0);
      executor.shutdown();
    }
  }
 else {
    MultipleAlignmentEnsemble e=new MultipleAlignmentEnsembleImpl(afpChain,ca1,ca1,false);
    msa=e.getMultipleAlignment(0);
    logger.warn("String_Node_Str" + "String_Node_Str");
    msa.putScore("String_Node_Str",0.0);
  }
  return msa;
}