Program: 16722
Project: 16722
Buggy source:
/** 
 * Method that constructs a fake MultipleAlignment with two BlockSets, with two and one Blocks respectively. Used to test the correctness of the DataStructure. In the future it will be in the Test packages.
 * @param family name of the protein family
 * @param atomArrays
 * @return MultipleAlignment
 * @throws StructureException
 * @throws StructureAlignmentException
 */
private static MultipleAlignment fakeMultipleAlignment(String family,List<Atom[]> atomArrays) throws StructureException, StructureAlignmentException {
  MultipleAlignmentEnsemble ensemble=new MultipleAlignmentEnsembleImpl();
  ensemble.setAtomArrays(atomArrays,true);
  ensemble.setAlgorithmName("String_Node_Str");
  MultipleAlignment fakeMultAln=new MultipleAlignmentImpl(ensemble);
  if (family == "String_Node_Str") {
    BlockSet blockSet1=new BlockSetImpl(fakeMultAln);
    BlockSet blockSet2=new BlockSetImpl(fakeMultAln);
    Block block1=new BlockImpl(blockSet1);
    Block block2=new BlockImpl(blockSet1);
    Block block3=new BlockImpl(blockSet2);
    List<Integer> aligned11=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
    List<Integer> aligned12=Arrays.asList(29,30,31,32,33,34,35,36,37,38);
    List<Integer> aligned13=Arrays.asList(123,124,125,126,127,128,129,130,131,132,133,134);
    List<Integer> aligned21=Arrays.asList(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,null,27,28,29,30,31);
    List<Integer> aligned22=Arrays.asList(39,40,41,42,43,44,45,46,47,48);
    List<Integer> aligned23=Arrays.asList(133,134,135,136,137,138,139,140,141,142,143,144);
    List<Integer> aligned31=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
    List<Integer> aligned32=Arrays.asList(29,30,31,32,33,34,35,36,37,38);
    List<Integer> aligned33=Arrays.asList(117,118,119,120,121,122,123,124,125,126,127,128);
    List<Integer> aligned41=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,null,17,18,19,20,21);
    List<Integer> aligned42=Arrays.asList(30,31,32,33,34,35,36,37,38,39);
    List<Integer> aligned43=Arrays.asList(121,122,123,124,125,126,127,128,129,130,131,132);
    block1.getAlignRes().add(aligned11);
    block1.getAlignRes().add(aligned21);
    block1.getAlignRes().add(aligned31);
    block1.getAlignRes().add(aligned41);
    block2.getAlignRes().add(aligned12);
    block2.getAlignRes().add(aligned22);
    block2.getAlignRes().add(aligned32);
    block2.getAlignRes().add(aligned42);
    block3.getAlignRes().add(aligned13);
    block3.getAlignRes().add(aligned23);
    block3.getAlignRes().add(aligned33);
    block3.getAlignRes().add(aligned43);
    fakeMultAln.updateCache(PoseMethod.REFERENCE);
  }
  return fakeMultAln;
}

Fixed version (ground truth):
/** 
 * Method that constructs a fake MultipleAlignment with two BlockSets, with two and one Blocks respectively. Used to test the correctness of the DataStructure. In the future it will be in the Test packages.
 * @param family name of the protein family
 * @param atomArrays
 * @return MultipleAlignment
 * @throws StructureException
 * @throws StructureAlignmentException
 */
private static MultipleAlignment fakeMultipleAlignment(String family,List<Atom[]> atomArrays) throws StructureException, StructureAlignmentException {
  MultipleAlignmentEnsemble ensemble=new MultipleAlignmentEnsembleImpl();
  ensemble.setAtomArrays(atomArrays);
  ensemble.setAlgorithmName("String_Node_Str");
  MultipleAlignment fakeMultAln=new MultipleAlignmentImpl(ensemble);
  if (family == "String_Node_Str") {
    BlockSet blockSet1=new BlockSetImpl(fakeMultAln);
    BlockSet blockSet2=new BlockSetImpl(fakeMultAln);
    Block block1=new BlockImpl(blockSet1);
    Block block2=new BlockImpl(blockSet1);
    Block block3=new BlockImpl(blockSet2);
    List<Integer> aligned11=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
    List<Integer> aligned12=Arrays.asList(29,30,31,32,33,34,35,36,37,38);
    List<Integer> aligned13=Arrays.asList(123,124,125,126,127,128,129,130,131,132,133,134);
    List<Integer> aligned21=Arrays.asList(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,null,27,28,29,30,31);
    List<Integer> aligned22=Arrays.asList(39,40,41,42,43,44,45,46,47,48);
    List<Integer> aligned23=Arrays.asList(133,134,135,136,137,138,139,140,141,142,143,144);
    List<Integer> aligned31=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
    List<Integer> aligned32=Arrays.asList(29,30,31,32,33,34,35,36,37,38);
    List<Integer> aligned33=Arrays.asList(117,118,119,120,121,122,123,124,125,126,127,128);
    List<Integer> aligned41=Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,null,17,18,19,20,21);
    List<Integer> aligned42=Arrays.asList(30,31,32,33,34,35,36,37,38,39);
    List<Integer> aligned43=Arrays.asList(121,122,123,124,125,126,127,128,129,130,131,132);
    block1.getAlignRes().add(aligned11);
    block1.getAlignRes().add(aligned21);
    block1.getAlignRes().add(aligned31);
    block1.getAlignRes().add(aligned41);
    block2.getAlignRes().add(aligned12);
    block2.getAlignRes().add(aligned22);
    block2.getAlignRes().add(aligned32);
    block2.getAlignRes().add(aligned42);
    block3.getAlignRes().add(aligned13);
    block3.getAlignRes().add(aligned23);
    block3.getAlignRes().add(aligned33);
    block3.getAlignRes().add(aligned43);
    fakeMultAln.updateCache(PoseMethod.REFERENCE);
  }
  return fakeMultAln;
}