Buggy code:
public EOGeneratorModel ( IProject project , String lineInfo ) throws ParseException { } public EOGeneratorModel ( IProject project ) { } public EOGeneratorModel ( IPath projectPath ) { } public EOGeneratorModel ( ) { } public void setJava14 ( boolean java14 ) { } public boolean isJava14 ( ) { } public void setDefaultEOGeneratorPath ( String defaultEOGeneratorPath ) { } public String getDefaultEOGeneratorPath ( ) { } public void setDefaultTemplateDir ( String defaultTemplateDir ) { } public String getDefaultTemplateDir ( ) { } public String getDefaultJavaTemplate ( ) { } public void setDefaultJavaTemplate ( String defaultJavaTemplate ) { } public String getDefaultSubclassJavaTemplate ( ) { } public void setDefaultSubclassJavaTemplate ( String defaultSubclassJavaTemplate ) { } public void addPropertyChangeListener ( PropertyChangeListener listener ) { } public void addPropertyChangeListener ( String propertyName , PropertyChangeListener listener ) { } public void removePropertyChangeListener ( PropertyChangeListener listener ) { } public void removePropertyChangeListener ( String propertyName , PropertyChangeListener listener ) { } public void writeToFile ( IFile file , IProgressMonitor monitor ) throws IOException , CoreException { } protected static String toFullPath ( File workingDirectory , String path ) { } public String writeToString ( File workingDirectory ) { } public void readFromString ( String str ) throws ParseException { } public void readFromString ( String str , File workingDir ) throws ParseException { } protected void append ( StringBuffer _buffer , String _name , Boolean _value ) { } protected void append ( StringBuffer _buffer , String _name , String _value ) { } protected String escape ( String value , boolean quotes ) { } protected String nextTokenValue ( String previousToken , CommandLineTokenizer tokenizer ) throws ParseException { } public IPath getProjectPath ( ) { } public void addDefine ( EOGeneratorModel . Define define ) { } public void setDefine ( String name , String value ) { } public EOGeneratorModel . Define getDefineNamed ( String name ) { } public String getDefineValueNamed ( String name ) { } public List < EOGeneratorModel . Define > getDefines ( ) { } public void setDefines ( List < EOGeneratorModel . Define > defines ) { } public String getDestination ( ) { } public void setDestination ( String destination ) { } public String getEOGeneratorPath ( ) { } public void setEOGeneratorPath ( String eogeneratorPath ) { } public void setEOGeneratorPath ( String eogeneratorPath , boolean markAsDirty ) { } public Boolean getJavaClientCommon ( ) { } public Boolean isJavaClientCommon ( ) { } public void setJavaClientCommon ( Boolean javaClientCommon ) { } public Boolean getJavaClient ( ) { } public Boolean isJavaClient ( ) { } public void setJavaClient ( Boolean javaClient ) { } public Boolean getJava ( ) { } public Boolean isJava ( ) { } public void setJava ( Boolean java ) { } public String getJavaTemplate ( ) { } public void setJavaTemplate ( String javaTemplate ) { } protected boolean isNew ( String oldValue , String newValue ) { } public List < EOModelReference > getModels ( ) { } public void setModels ( List < EOModelReference > models ) { } public void addModel ( EOModelReference modelReference ) { } public Boolean getPackageDirs ( ) { } public Boolean isPackageDirs ( ) { } public void setPackageDirs ( Boolean packageDirs ) { } public List < EOModelReference > getRefModels ( ) { } public void setRefModels ( List < EOModelReference > refModels ) { } public void addRefModel ( EOModelReference modelReference ) { } public String getExtension ( ) { } public void setExtension ( String extension ) { } public String getSubclassDestination ( ) { } public void setSubclassDestination ( String subclassDestination ) { } public String getSubclassJavaTemplate ( ) { } public void setSubclassJavaTemplate ( String subclassJavaTemplate ) { } public String getTemplateDir ( ) { } public void setTemplateDir ( String templateDir ) { } public void setPrefix ( String prefix ) { } public String getPrefix ( ) { } public void setFilenameTemplate ( String filenameTemplate ) { } public String getFilenameTemplate ( ) { } public void setSuperclassPackage ( String superclassPackage ) { } public String getSuperclassPackage ( ) { } public Boolean getVerbose ( ) { } public Boolean isVerbose ( ) { } public void setVerbose ( Boolean verbose ) { } public void setLoadModelGroup ( Boolean loadModelGroup ) { } public Boolean isLoadModelGroup ( ) { } public Boolean getLoadModelGroup ( ) { } public void setDirty ( boolean dirty ) { } public boolean isDirty ( ) { } public boolean isModelReferenced ( EOModelReference modelReference ) { } public static class Define { private String _name ; private String _value ; public Define ( String name , String value ) { } public int hashCode ( ) { } public boolean equals ( Object obj ) { } public String getName ( ) { } public String getValue ( ) { } public void setValue ( String value ) { } } public static EOGeneratorModel createModelFromFile ( IFile file ) throws IOException , ParseException , CoreException { file . refreshLocal ( IResource . DEPTH_INFINITE , null ) ; InputStream eogenFileStream = file . getContents ( ) ; try { StringBuffer sb = new StringBuffer ( ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( eogenFileStream ) ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { <START_BUG> sb . append ( line . replace ( "\\$" , "" ) ) ; <END_BUG> } String string = sb . toString ( ) ; string . replace ( '\\' , '//' ) ; EOGeneratorModel model = new EOGeneratorModel ( file . getProject ( ) , string ) ; model . setEOGeneratorPath ( Preferences . getEOGeneratorPath ( ) , false ) ; return model ; } finally { eogenFileStream . close ( ) ; } } public static List < EOModelReference > createModelReferencesForModelGroup ( EOModelGroup modelGroup , List < EOModel > exceptModels ) { } }

Fix:
sb . append ( line . replaceFirst ( "\\\\$" , "" ) ) ;