Buggy code:
@ SuppressWarnings ( "unused" ) public class YAML { private HashMap < String , String > data ; private List < String > writeHistory ; private HashSet < String > keys ; private HashSet < String > emptyKeys ; public YAML ( ) { } public YAML ( File file ) throws YAMLInvalidContentException , IOException { } public YAML ( InputStream stream ) throws YAMLInvalidContentException , IOException { } public YAML ( String dataString ) throws YAMLInvalidContentException { } public void load ( File file ) throws YAMLInvalidContentException , IOException { } public void load ( InputStream stream ) throws YAMLInvalidContentException , IOException { } public void load ( String dataString ) throws YAMLInvalidContentException { } public void save ( File file ) throws YAMLNotInitializedException , FileNotFoundException { } public OutputStream saveAsStream ( ) throws YAMLNotInitializedException , IOException { } public String saveAsString ( ) throws YAMLNotInitializedException { } public boolean isSet ( String key ) { } public int getLogicalLineCount ( ) throws YAMLNotInitializedException { } public String getLogicalLine ( int lineIndex ) throws YAMLNotInitializedException { } public YAML getSection ( String key ) throws YAMLNotInitializedException { } public HashSet < String > getKeys ( ) { } public HashSet < String > getKeys ( boolean subKeys ) { } public HashSet < String > getKeys ( boolean subKeys , boolean empty ) { } public byte getByte ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public byte getByte ( String key , byte defaultValue ) throws NumberFormatException { } public List < Byte > getByteList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Byte > getByteList ( String key , List < Byte > defaultValue ) throws NumberFormatException { } public short getShort ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public short getShort ( String key , short defaultValue ) throws NumberFormatException { } public List < Short > getShortList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Short > getShortList ( String key , List < Short > defaultValue ) throws NumberFormatException { } public int getInt ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public int getInt ( String key , int defaultValue ) throws NumberFormatException { } public List < Integer > getIntList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Integer > getIntList ( String key , List < Integer > defaultValue ) throws NumberFormatException { } public long getLong ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public long getLong ( String key , long defaultValue ) throws NumberFormatException { } public List < Long > getLongList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Long > getLongList ( String key , List < Long > defaultValue ) throws NumberFormatException { } public float getFloat ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public float getFloat ( String key , float defaultValue ) throws NumberFormatException { } public List < Float > getFloatList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Float > getFloatList ( String key , List < Float > defaultValue ) throws NumberFormatException { } public double getDouble ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public double getDouble ( String key , double defaultValue ) throws NumberFormatException { } public List < Double > getDoubleList ( String key ) throws YAMLKeyNotFoundException , NumberFormatException { } public List < Double > getDoubleList ( String key , List < Double > defaultValue ) throws NumberFormatException { } public boolean getBoolean ( String key ) throws YAMLKeyNotFoundException { } public boolean getBoolean ( String key , boolean defaultValue ) { } public List < Boolean > getBooleanList ( String key ) throws YAMLKeyNotFoundException { } public List < Boolean > getBooleanList ( String key , List < Boolean > defaultValue ) { } public char getChar ( String key ) throws YAMLInvalidContentException , YAMLKeyNotFoundException { } public char getChar ( String key , char defaultValue ) throws YAMLInvalidContentException { } public List < Character > getCharList ( String key ) throws YAMLInvalidContentException , YAMLKeyNotFoundException { } public List < Character > getCharList ( String key , List < Character > defaultValue ) throws YAMLInvalidContentException { } public String getString ( String key ) throws YAMLKeyNotFoundException { } public String getString ( String key , String defaultValue ) { } public List < String > getStringList ( String key ) throws YAMLKeyNotFoundException { } public List < String > getStringList ( String key , List < String > defaultValue ) { } public void set ( String key , Object value ) { } public void clear ( ) { } public void dispose ( ) { } private void saveToWriteHistory ( String content ) { } private void saveValues ( String key , String valueString ) throws YAMLInvalidContentException { } private String getValue ( String valueString ) throws YAMLInvalidContentException { } private String getIndentation ( String key ) { } private String getWriteKey ( String key ) { } private String getWriteValue ( String key ) { key = data . get ( key ) . replace ( "\\" , "\\\\" ) . replace ( "\"" , "\\\"" ) ; <START_BUG> if ( ( key . indexOf ( '<seq2seq4repair_space>' ) ) >= 0 ) { <END_BUG> return ( '"' + key ) + '"' ; } return key ; } private String getKeyValuePair ( String writeLine , boolean indentation ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( ( ( key . indexOf ( '<seq2seq4repair_space>' ) ) >= 0 ) || ( ( key . indexOf ( '{' ) ) >= 0 ) ) || ( ( key . indexOf ( '}' ) ) >= 0 ) ) || ( ( key . indexOf ( '[' ) ) >= 0 ) ) || ( ( key . indexOf ( ']' ) ) >= 0 ) ) {