Buggy code:
public class SidechainMutator implements Mutator { private SidechainMutator ( ) { } public static Peptide mutateSidechain ( Peptide inputPeptide , Residue inputResidue , ProtoAminoAcid targetPAA ) { if ( ! ( inputPeptide . sequence . contains ( inputResidue ) ) ) throw new IllegalArgumentException ( "inputResidue<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>contained<seq2seq4repair_space>in<seq2seq4repair_space>inputPeptide" ) ; if ( inputResidue . description . equals ( targetPAA . residue . description ) ) return inputPeptide ; if ( ( ( ( inputResidue . aminoAcid . chirality ) == ( Chirality . L ) ) && ( ( targetPAA . residue . aminoAcid . chirality ) == ( Chirality . D ) ) ) || ( ( ( inputResidue . aminoAcid . chirality ) == ( Chirality . D ) ) && ( ( targetPAA . residue . aminoAcid . chirality ) == ( Chirality . L ) ) ) ) throw new IllegalArgumentException ( "chirality<seq2seq4repair_space>interchange<seq2seq4repair_space>forbidden<seq2seq4repair_space>--<seq2seq4repair_space>see<seq2seq4repair_space>javadoc<seq2seq4repair_space>for<seq2seq4repair_space>class" ) ; <START_BUG> if ( ( ( inputResidue . aminoAcid . chirality ) == ( Chirality . ACHIRAL ) ) && ( ( aminoAcid . chirality ) == ( Chirality . D ) ) ) <END_BUG> throw new IllegalArgumentException ( "can't<seq2seq4repair_space>handle<seq2seq4repair_space>mutations<seq2seq4repair_space>to<seq2seq4repair_space>D<seq2seq4repair_space>yet" ) ; int residueIndex = inputPeptide . sequence . indexOf ( inputResidue ) ; Peptide newPeptide = SidechainMutator . BackboneAnalysis . adjustBackboneAtomTypes ( inputPeptide , inputResidue , targetPAA ) ; if ( ( inputResidue . aminoAcid . isProline ( ) ) && ( ! ( targetPAA . residue . aminoAcid . isProline ( ) ) ) ) newPeptide = SidechainMutator . convertProlineToNonProline ( newPeptide , residueIndex , targetPAA ) ; else if ( ( ! ( inputResidue . aminoAcid . isProline ( ) ) ) && ( targetPAA . residue . aminoAcid . isProline ( ) ) ) newPeptide = SidechainMutator . convertNonProlineToProline ( newPeptide , residueIndex ) ; else if ( ( inputResidue . aminoAcid . isProline ( ) ) && ( targetPAA . residue . aminoAcid . isProline ( ) ) ) newPeptide = SidechainMutator . convertProlineToProline ( newPeptide , residueIndex ) ; SidechainMutator . Sidechain newSidechain = SidechainMutator . Sidechain . makeNewSidechain ( newPeptide , residueIndex , targetPAA ) ; newPeptide = SidechainMutator . deleteCurrentSidechain ( newPeptide , residueIndex ) ; newPeptide = SidechainMutator . addNewSidechain ( newPeptide , residueIndex , targetPAA , newSidechain ) ; String newName = SidechainMutator . generateName ( newPeptide ) ; newPeptide = RotamerMutator . mutateChis ( newPeptide , residueIndex ) ; return new Peptide ( newName , newPeptide . contents , newPeptide . connectivity , newPeptide . sequence , EnergyBreakdown . BLANK ) ; } private static Peptide convertProlineToNonProline ( Peptide peptide , int residueIndex , ProtoAminoAcid targetPAA ) { } private static Peptide convertNonProlineToProline ( Peptide peptide , int residueIndex ) { } private static Peptide convertProlineToProline ( Peptide peptide , int residueIndex ) { } public static String generateName ( Peptide peptide ) { } private static Peptide deleteCurrentSidechain ( Peptide peptide , int residueIndex ) { } private static Peptide addNewSidechain ( Peptide peptide , int residueIndex , ProtoAminoAcid targetPAA , SidechainMutator . Sidechain sidechain ) { } public static void checkProtoTorsion ( List < Atom > contents , ProtoTorsion torsion ) { } public static class BackboneAnalysis implements Immutable { public final Atom atomHN ; public final Atom atomN ; public final Atom atomCA ; public final Atom atomC ; public final Atom atomO ; public final Atom atomHA ; private BackboneAnalysis ( Atom atomHN , Atom atomN , Atom atomCA , Atom atomC , Atom atomO , Atom atomHA ) { } private static SidechainMutator . BackboneAnalysis getBackboneAnalysis ( Peptide inputPeptide , Residue residue ) { } private static SidechainMutator . BackboneAnalysis getBackboneAnalysis ( ProtoAminoAcid targetPAA ) { } public static Peptide adjustBackboneAtomTypes ( Peptide inputPeptide , Residue inputResidue , ProtoAminoAcid targetPAA ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } } public static class Sidechain extends Molecule { public static final long serialVersionUID = 1L ; public final Atom atomCB ; public final Atom atomCD ; public final List < Atom > chiAtoms ; private Sidechain ( String name , List < Atom > contents , SimpleWeightedGraph < Atom , DefaultWeightedEdge > connectivity , Atom atomCB , Atom atomCD , List < Atom > chiAtoms ) { } @ SuppressWarnings ( "unchecked" ) public static SidechainMutator . Sidechain makeNewSidechain ( Peptide peptide , int residueIndex , ProtoAminoAcid targetPAA ) { } } public static void main ( String [ ] args ) { } }

Fix:
if ( ( ( inputResidue . aminoAcid . chirality ) == ( Chirality . ACHIRAL ) ) && ( ( targetPAA . residue . aminoAcid . chirality ) == ( Chirality . D ) ) )