Buggy code:
public class JavaClass extends Visitor implements JavaScope , Translatable { private static Map < String , JavaClass > classes = new HashMap < String , JavaClass > ( ) ; private List < JavaConstructor > constructors ; private JavaType extension ; private List < JavaField > fields ; private JavaFile file ; private boolean isAbstract ; private boolean isFinal ; private boolean isStatic ; private List < JavaMethod > methods ; private String name ; private JavaClass parent ; private Map < String , JavaType > variables ; private JavaVisibility visibility ; private LinkedHashMap < String , JavaMethod > vtable ; public JavaClass ( GNode n , JavaFile f ) { } public JavaType getExtension ( ) { } public JavaFile getFile ( ) { } public List < JavaField > getFields ( ) { } public JavaConstructor getConstructor ( String name ) { } public JavaMethod getMethod ( String name ) { } public String getName ( ) { } public JavaClass getParent ( ) { } public JavaScope getParentScope ( ) { } public JavaScope getVariableScope ( String name ) { } public JavaType getVariableType ( String name ) { } public JavaVisibility getVisibility ( ) { } public LinkedHashMap < String , JavaMethod > getVTable ( ) { } public boolean hasName ( String type ) { } public boolean hasParent ( ) { } public boolean isAbstract ( ) { } public boolean isFinal ( ) { } public boolean isInScope ( String name ) { } public boolean isVariableStatic ( String name ) { } public void addVariable ( String name , JavaType type ) { } public void setParent ( JavaClass parent ) { } public void visitClassBody ( GNode n ) { } public void visitConstructorDeclaration ( GNode n ) { } public void visitExtension ( GNode n ) { } public void visitFieldDeclaration ( GNode n ) { } public void visitMethodDeclaration ( GNode n ) { } public void visitModifiers ( GNode n ) { } public void initializeVTable ( ) { } public Printer translateHeader ( Printer out ) { } public Printer translateArrayTemplate ( Printer out ) { Map < String , Integer > arrays = JavaType . getArrayDimensions ( ) ; if ( arrays . containsKey ( name ) ) { int dim = arrays . get ( name ) ; for ( int i = 1 ; i <= dim ; i ++ ) { JavaType t ; if ( getFile ( ) . getPackage ( ) . getNamespace ( ) . equals ( "" ) ) t = new JavaType ( name , i ) ; else t = new JavaType ( name , getFile ( ) . getPackage ( ) , i ) ; t . translateArraySpecialization ( out ) ; } } <START_BUG> if ( getFile ( ) . isMain ( ) ) { <END_BUG> Set < String > keys = arrays . keySet ( ) ; for ( String key : keys ) { if ( ( ( ( key . equals ( "Object" ) ) || ( key . equals ( "Class" ) ) ) || ( key . equals ( "String" ) ) ) || ( JavaType . isPrimitive ( key ) ) ) { int dim = arrays . get ( key ) ; int i = ( key . equals ( "Object" ) ) ? 2 : 1 ; for ( ; i <= dim ; i ++ ) { JavaType t = new JavaType ( key , i ) ; t . translateArraySpecialization ( out ) ; } } } } return out ; } public Printer translate ( Printer out ) { } public static void addClass ( String name , JavaClass cls ) { } public static JavaClass getJavaClass ( String name ) { } public static Set < String > getJavaClassList ( ) { } }

Fix:
if ( ( getFile ( ) . isMain ( ) ) && ( ( visibility ) == ( JavaVisibility . PUBLIC ) ) ) {