Buggy code:
public Boolean isPC ( ) { } public List < Power > getPowerList ( ) { } public Integer getPowerPoints ( ) { } public void setPowerPoints ( Integer powerPoints ) { } public Hashtable < String , EffectBase > getPresetEffects ( ) { } public Integer getRef ( ) { } public void setRef ( Integer ref ) { } public String getRegen ( ) { } public void setRegen ( String regen ) { } public String getResistance ( ) { } public void setResistance ( String resist ) { } public String getRole ( ) { } public void setRole ( String role ) { } public String getRole2 ( ) { } public void setRole2 ( String role2 ) { } public Integer getSaveBonus ( ) { } public void setSaveBonus ( Integer saveBonus ) { } public String getSenses ( ) { } public void setSenses ( String senses ) { } public String getSkills ( ) { } public void setSkills ( String skills ) { } public String getSource ( ) { } public void setSource ( String source ) { } public String getSpeed ( ) { } public void setSpeed ( String speed ) { } public String getStatsHTML ( ) { } public Integer getStr ( ) { } public void setStr ( Integer str ) { } public Integer getSurges ( ) { } public void setSurges ( Integer surges ) { } public Integer getSurgeValue ( ) { } public String getType ( ) { } public void setType ( String type ) { } public Boolean isValid ( ) { } public String getVulnerability ( ) { } public void setVulnerability ( String vuln ) { } public Integer getWill ( ) { } public void setWill ( Integer will ) { } public Integer getWis ( ) { } public void setWis ( Integer wis ) { } public Integer getXP ( ) { } public void setXP ( Integer xp ) { } private void clearAll ( ) { } public void presetEffectAdd ( EffectBase eff ) { } public void exportXML ( XMLStreamWriter writer ) throws XMLStreamException { } public Boolean importXML ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXML ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLDetails ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLStatBlock ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLRulesElementTally ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLLootTally ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLPowerStats ( XMLStreamReader reader ) throws XMLStreamException { } private void importCharFromCBXMLPowerURLs ( XMLStreamReader reader ) throws XMLStreamException { } public Boolean loadFromCBFile ( String filename ) { } public boolean loadFromMonsterFile ( String filename ) { } private String parseMonsterAttack ( XPath xpath , Document doc , String base ) throws XPathExpressionException { Node n ; String genDesc = "" ; n = ( ( Node ) ( xpath . evaluate ( ( base + "//Description//text()" ) , doc , XPathConstants . NODE ) ) ) ; if ( n != null ) { genDesc = n . getNodeValue ( ) ; } String range = "" ; n = ( ( Node ) ( xpath . evaluate ( ( base + "//Range//text()" ) , doc , XPathConstants . NODE ) ) ) ; if ( n != null ) { range = n . getNodeValue ( ) ; } String targets = "" ; n = ( ( Node ) ( xpath . evaluate ( ( base + "//Targets//text()" ) , doc , XPathConstants . NODE ) ) ) ; if ( n != null ) { targets = n . getNodeValue ( ) ; } String hit = parseMonsterEffect ( xpath , doc , ( base + "//Hit" ) ) ; String miss = parseMonsterEffect ( xpath , doc , ( base + "//Miss" ) ) ; String effect = parseMonsterEffect ( xpath , doc , ( base + "//Effect" ) ) ; String atkDesc = "" ; n = ( ( Node ) ( xpath . evaluate ( ( base + "//AttackBonuses//MonsterPowerAttackNumber//Defense//ReferencedObject//DefenseName//text()" ) , doc , XPathConstants . NODE ) ) ) ; if ( n != null ) { Node bonus = ( ( Node ) ( xpath . evaluate ( ( base + "//AttackBonuses//MonsterPowerAttackNumber//@FinalValue" ) , doc , XPathConstants . NODE ) ) ) ; if ( bonus != null ) { atkDesc += ( ( "+" + ( bonus . getNodeValue ( ) ) ) + "<seq2seq4repair_space>vs.<seq2seq4repair_space>" ) + ( n . getNodeValue ( ) ) ; } } String desc = "" ; if ( ! ( genDesc . isEmpty ( ) ) ) { desc += genDesc + "\n" ; } if ( ! ( atkDesc . isEmpty ( ) ) ) { desc += "Attack:<seq2seq4repair_space>" + range ; if ( ! ( targets . isEmpty ( ) ) ) { desc += ( "<seq2seq4repair_space>(" + targets ) + ");<seq2seq4repair_space>" ; } desc += atkDesc + "\n" ; } <START_BUG> if ( ! ( hit . trim ( ) . isEmpty ( ) ) ) { <END_BUG> desc += "Hit:<seq2seq4repair_space>" + hit ; } if ( ! ( miss . trim ( ) . isEmpty ( ) ) ) { desc += "Miss:<seq2seq4repair_space>" + miss ; } if ( ! ( effect . trim ( ) . isEmpty ( ) ) ) { desc += "Effect:<seq2seq4repair_space>" ; if ( atkDesc . isEmpty ( ) ) { desc += range ; if ( ! ( targets . isEmpty ( ) ) ) { desc += ( "<seq2seq4repair_space>(" + targets ) + ");<seq2seq4repair_space>" ; } } desc += effect ; } return desc . trim ( ) ; } private String parseMonsterEffect ( XPath xpath , Document doc , String base ) throws XPathExpressionException { } No newline ; at end ; of file ; }

Fix:
if ( ( ! ( atkDesc . isEmpty ( ) ) ) && ( ! ( hit . trim ( ) . isEmpty ( ) ) ) ) {