nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class URLConnectionUtil { private static final Logger log = LoggerFactory . getLogger ( URLConnectionUtil . class ) ; private URLConnectionUtil ( ) { } public static String readLine ( String urlString ) { } public static String readLine ( String urlString , HttpURLConnectionParam httpURLConnectionParam ) throws UncheckedIOException { } public static String getResponseBodyAsString ( String urlString ) { } public static String getResponseBodyAsString ( String urlString , HttpURLConnectionParam httpURLConnectionParam ) throws UncheckedIOException { } private static HttpURLConnection getHttpURLConnection ( String urlString , HttpURLConnectionParam httpURLConnectionParam ) throws UncheckedIOException { HttpURLConnection httpURLConnection = null ; try { <START_BUG> URLConnectionUtil . log . debug ( "urlString:{}" , urlString ) ; <END_BUG> URL url = new URL ( urlString ) ; Proxy proxy = URLConnectionUtil . getProxy ( httpURLConnectionParam . getProxyAddress ( ) , httpURLConnectionParam . getProxyPort ( ) ) ; if ( Validator . isNotNullOrEmpty ( proxy ) ) { URLConnectionUtil . log . debug ( "use<seq2seq4repair_space>proxy:{}" , proxy . toString ( ) ) ; httpURLConnection = ( ( HttpURLConnection ) ( url . openConnection ( proxy ) ) ) ; } else { httpURLConnection = ( ( HttpURLConnection ) ( url . openConnection ( ) ) ) ; } int connectTimeout = httpURLConnectionParam . getConnectTimeout ( ) ; int readTimeout = httpURLConnectionParam . getReadTimeout ( ) ; httpURLConnection . setConnectTimeout ( connectTimeout ) ; httpURLConnection . setReadTimeout ( readTimeout ) ; return httpURLConnection ; } catch ( MalformedURLException e ) { URLConnectionUtil . log . error ( e . getClass ( ) . getName ( ) , e ) ; } catch ( IOException e ) { throw new UncheckedIOException ( e ) ; } return null ; } private static Proxy getProxy ( String proxyAddress , Integer proxyPort ) { } }

Fix:
URLConnectionUtil . log . debug ( "url<seq2seq4repair_space>String:[{}]" , urlString ) ;
Buggy code:
public interface IContextListener { <START_BUG> void contextChanged ( ContextEvent contextEvent ) ; <END_BUG> }

Fix:
void contextChanged ( IContextEvent contextEvent ) ;
Buggy code:
public class RandomValueGenerator { public static String getGeneratorValue ( Field field ) { } public static String getGeneratorValue ( Class < ? > clazz ) { if ( ( clazz . equals ( int . class ) ) || ( clazz . equals ( Integer . class ) ) ) { return "RandomUtils.nextInt(0,<seq2seq4repair_space>10)" ; } if ( ( clazz . equals ( short . class ) ) || ( clazz . equals ( Short . class ) ) ) { return "(short)<seq2seq4repair_space>RandomUtils.nextInt(0,<seq2seq4repair_space>10)" ; } if ( ( clazz . equals ( long . class ) ) || ( clazz . equals ( Long . class ) ) ) { return "RandomUtils.nextLong(0,<seq2seq4repair_space>10)" ; } if ( ( clazz . equals ( double . class ) ) || ( clazz . equals ( Double . class ) ) ) { return "RandomUtils.nextDouble(0.0,<seq2seq4repair_space>10.0)" ; } if ( ( clazz . equals ( float . class ) ) || ( clazz . equals ( Float . class ) ) ) { return "RandomUtils.nextFloat(0.0f,<seq2seq4repair_space>10.0f)" ; } if ( clazz . equals ( String . class ) ) { return "RandomStringUtils.randomAlphabetic(10)" ; } if ( clazz . equals ( Date . class ) ) { <START_BUG> return "new<seq2seq4repair_space>Date(RandomUtils.nextLong(0<seq2seq4repair_space>,1000))" ; <END_BUG> } return "null" ; } No newline ; at end ; of file ; }

Fix:
return "new<seq2seq4repair_space>Date(RandomUtils.nextLong(0<seq2seq4repair_space>,((long)<seq2seq4repair_space>1000<seq2seq4repair_space>*<seq2seq4repair_space>60<seq2seq4repair_space>*<seq2seq4repair_space>60<seq2seq4repair_space>*<seq2seq4repair_space>60<seq2seq4repair_space>*<seq2seq4repair_space>24<seq2seq4repair_space>*<seq2seq4repair_space>30<seq2seq4repair_space>*<seq2seq4repair_space>365<seq2seq4repair_space>*<seq2seq4repair_space>30)))" ;
Buggy code:
public class WebMethodNoProtectedMethodRuleTest extends AbstractWebMethodPublicStaticFinalRuleTest { @ Override public IMethod getMethodToTeset ( ) { } @ Override public String getErrorMessage ( ) { <START_BUG> return JAXWSCoreMessages . WEBMETHOD_ONLY_ON_PUBLIC_METHODS_MESSAGE ; <END_BUG> } }

Fix:
return JAXWSCoreMessages . WEBMETHOD_ONLY_ON_PUBLIC_METHODS ;
Buggy code:
public class ProjectBinaryOutput extends BinaryOutput { private IProject project ; private IPath outputPath ; private JavaDevelopmentContextImpl dc ; public ProjectBinaryOutput ( IProject project , IPath outputPath , JavaDevelopmentContextImpl dc ) { } protected void basicPutBinary ( TypeStructureEntry tsEntry , byte [ ] binary , int crc ) { } private void deleteAllInContainer ( IContainer container ) { } public void deleteBinary ( IType type ) { } private void deleteClassesInContainer ( IContainer container ) { } public void garbageCollect ( IState [ ] statesInUse ) { } public byte [ ] getBinary ( TypeStructureEntry tsEntry , IType type ) { } private IContainer getContainer ( IPath path ) { } private IFile getFile ( IPath path ) { } IPath getOutputPath ( ) { } private IPath getPathForBinary ( IType type ) { } IContainer makeContainersIfNecessary ( IPath path ) { } public void scrubOutput ( ) { IJavaProject projectElement = JavaCore . create ( this . project ) ; IClasspathEntry [ ] entries ; try { <START_BUG> entries = projectElement . getExpandedClasspath ( true ) ; <END_BUG> } catch ( JavaModelException e ) { throw this . dc . internalException ( e ) ; } boolean flushAllOutput = true ; boolean hasSource = false ; for ( int i = 0 , length = entries . length ; i < length ; i ++ ) { IClasspathEntry entry = entries [ i ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_SOURCE ) ) { hasSource = true ; if ( this . outputPath . equals ( entry . getPath ( ) ) ) { flushAllOutput = false ; break ; } } } if ( hasSource ) { if ( flushAllOutput ) { deleteAllInContainer ( getContainer ( this . outputPath ) ) ; } else { deleteClassesInContainer ( getContainer ( this . outputPath ) ) ; } } } }

Fix:
entries = projectElement . getResolvedClasspath ( true ) ;
Buggy code:
public class IPTC extends Metadata { private IPTCReader reader ; private Map < String , List < IPTCDataSet > > datasetMap ; public static void showIPTC ( byte [ ] iptc ) { } public static void showIPTC ( InputStream is ) { } public IPTC ( ) { } public IPTC ( byte [ ] data ) { } public void addDataSet ( IPTCDataSet dataSet ) { } public String getAsString ( String key ) { List < IPTCDataSet > list = getDataSet ( key ) ; String value = "" ; if ( list != null ) { <START_BUG> if ( ( list . size ( ) ) == 0 ) { <END_BUG> value = list . get ( 0 ) . getDataAsString ( ) ; } else { for ( int i = 0 ; i < ( ( list . size ( ) ) - 1 ) ; i ++ ) value += ( list . get ( i ) . getDataAsString ( ) ) + ";" ; value += list . get ( ( ( list . size ( ) ) - 1 ) ) . getDataAsString ( ) ; } } return value ; } public Map < String , List < IPTCDataSet > > getDataSet ( ) { } public List < IPTCDataSet > getDataSet ( String key ) { } public IPTCReader getReader ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( list . size ( ) ) == 1 ) {
Buggy code:
public class GenericLocalRemoteServiceTest extends AbstractLocalRemoteServiceTest { protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> container = getContainerFactory ( ) . createContainer ( HOST_CONTAINER_TYPE ) ; <END_BUG> containerAdapter = ( ( IRemoteServiceContainerAdapter ) ( container . getAdapter ( IRemoteServiceContainerAdapter . class ) ) ) ; } protected void tearDown ( ) throws Exception { } }

Fix:
container = getContainerFactory ( ) . createContainer ( CONSUMER_CONTAINER_TYPE ) ;
Buggy code:
@ WebServlet ( "//SubGameList" ) public class SubGameList extends HttpServlet { private static final long serialVersionUID = 1L ; public SubGameList ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { System . out . println ( "SubGameList<seq2seq4repair_space>entered" ) ; String userID = request . getParameter ( "id" ) ; User current_user = HibernateSupport . readOneObjectByID ( User . class , Integer . parseInt ( userID ) ) ; String gameID = request . getParameter ( "gameID" ) ; Game current_game = HibernateSupport . readOneObjectByID ( Game . class , Integer . parseInt ( gameID ) ) ; ArrayList < Level > levels = current_game . getLevels ( ) ; String levelID = request . getParameter ( "levelID" ) ; Level current_level = new Level ( ) ; if ( ( levels . size ( ) ) != 0 ) { if ( ( Integer . parseInt ( levelID ) ) == ( - 1 ) ) { current_level = current_game . getLevels ( ) . get ( 0 ) ; } else { current_level = HibernateSupport . readOneObjectByID ( Level . class , Integer . parseInt ( levelID ) ) ; } } request . setAttribute ( "levels" , levels ) ; request . setAttribute ( "current_level" , current_level ) ; <START_BUG> request . getRequestDispatcher ( "SubGameList.jsp" ) . include ( request , response ) ; <END_BUG> } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
request . getRequestDispatcher ( "subGameList.jsp" ) . include ( request , response ) ;
Buggy code:
public class FileUtils { private static Object lockReflection = new Object ( ) ; private static Method setLastModified = null ; public static void copyFile ( String sourceFile , String destFile ) throws IOException { } public static void copyFile ( String sourceFile , String destFile , FilterSet filterSet ) throws IOException { } public static void copyFile ( String sourceFile , String destFile , FilterSet filterSet , boolean overwrite ) throws IOException { } public static void copyFile ( String sourceFile , String destFile , FilterSet filterSet , boolean overwrite , boolean preserveLastModified ) throws IOException { } public static void copyFile ( File sourceFile , File destFile ) throws IOException { } public static void copyFile ( File sourceFile , File destFile , FilterSet filterSet ) throws IOException { } public static void copyFile ( File sourceFile , File destFile , FilterSet filterSet , boolean overwrite ) throws IOException { } public static void copyFile ( File sourceFile , File destFile , FilterSet filterSet , boolean overwrite , boolean preserveLastModified ) throws IOException { if ( ( overwrite || ( ! ( destFile . exists ( ) ) ) ) || ( ( destFile . lastModified ( ) ) < ( sourceFile . lastModified ( ) ) ) ) { if ( ( destFile . exists ( ) ) && ( destFile . isFile ( ) ) ) { destFile . delete ( ) ; } File parent = new File ( destFile . getParent ( ) ) ; if ( ! ( parent . exists ( ) ) ) { parent . mkdirs ( ) ; } <START_BUG> if ( filterSet != null ) { <END_BUG> BufferedReader in = new BufferedReader ( new FileReader ( sourceFile ) ) ; BufferedWriter out = new BufferedWriter ( new FileWriter ( destFile ) ) ; int length ; String newline = null ; String line = in . readLine ( ) ; while ( line != null ) { if ( ( line . length ( ) ) == 0 ) { out . newLine ( ) ; } else { newline = filterSet . replaceTokens ( line ) ; out . write ( newline ) ; out . newLine ( ) ; } line = in . readLine ( ) ; } out . close ( ) ; in . close ( ) ; } else { FileInputStream in = new FileInputStream ( sourceFile ) ; FileOutputStream out = new FileOutputStream ( destFile ) ; byte [ ] buffer = new byte [ 8 * 1024 ] ; int count = 0 ; do { out . write ( buffer , 0 , count ) ; count = in . read ( buffer , 0 , buffer . length ) ; } while ( count != ( - 1 ) ) ; in . close ( ) ; out . close ( ) ; } if ( preserveLastModified ) { FileUtils . setFileLastModified ( destFile , sourceFile . lastModified ( ) ) ; } } } public static void setFileLastModified ( File file , long time ) throws BuildException { } }

Fix:
if ( ( filterSet != null ) && ( filterSet . hasFilters ( ) ) ) {
Buggy code:
public class ClassFile extends Openable implements IClassFile { protected BinaryType fBinaryType = null ; protected ClassFile ( IPackageFragment parent , String name ) { } public void codeComplete ( int offset , ICodeCompletionRequestor requestor ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Hashtable newElements , IResource underlyingResource ) throws JavaModelException { } private IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public IType getType ( ) throws JavaModelException { } public WorkingCopy getWorkingCopy ( ) { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { SourceMapper mapper = getSourceMapper ( ) ; if ( mapper != null ) { char [ ] contents = mapper . findSource ( getType ( ) ) ; if ( contents != null ) { <START_BUG> IBufferManager bufManager = getBufferManager ( ) ; <END_BUG> IBuffer buf = bufManager . openBuffer ( contents , pm , this , isReadOnly ( ) ) ; mapper . mapSource ( getType ( ) , contents ) ; return buf ; } } else { String qualifiedName = getType ( ) . getFullyQualifiedName ( ) ; NameLookup lookup = ( ( JavaProject ) ( getJavaProject ( ) ) ) . getNameLookup ( ) ; ICompilationUnit cu = lookup . findCompilationUnit ( qualifiedName ) ; if ( cu != null ) { return cu . getBuffer ( ) ; } } return null ; } static char [ ] simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } }

Fix:
BufferManager bufManager = getBufferManager ( ) ;
Buggy code:
public class CacheConfig { private static final String CACHE_PROPERTIES_FILE = "cache.properties.file" ; private static final String CLASS_PATH_PREFIX = "classpath:" ; private static final String FILE_PATH_PREFIX = "file:" ; private static final Logger logger = LoggerFactory . getLogger ( CacheConfig . class ) ; private static volatile Properties properties ; private static final String [ ] SUFFIXS = new String [ ] { "Client" } ; public static void initProperties ( ) { } public static Properties getProperties ( ) { } public static String getProperty ( String key ) { } public static String getProperty ( String key , String defaultValue ) { } public static int getProperty ( String key , int defaultValue ) { } public static short getProperty ( String key , short defaultValue ) { } public static long getProperty ( String key , long defaultValue ) { } public static float getProperty ( String key , float defaultValue ) { } public static double getProperty ( String key , double defaultValue ) { } public static boolean getProperty ( String key , boolean defaultValue ) { } private static Properties loadProperties ( String propertyFile ) throws IOException { } public static InputStream getConfigurationInputStream ( String propertyFile ) throws FileNotFoundException { } public static void appendProperties ( Object object , Class < ? > owner ) { Field [ ] fields = object . getClass ( ) . getDeclaredFields ( ) ; String prefix = ( "cache." + ( CacheConfig . getTagName ( owner ) ) ) + "." ; for ( Field field : fields ) { Method setMethod = CacheConfig . getSetMethod ( object . getClass ( ) , field ) ; if ( ( setMethod != null ) && ( CacheConfig . checkIsBasicType ( field . getType ( ) ) ) ) { String property = StringUtils . camelToSplitName ( field . getName ( ) , "." ) ; String configValue = null ; <START_BUG> if ( CacheConfig . getProperties ( ) . contains ( ( prefix + property ) ) ) { <END_BUG> try { configValue = CacheConfig . getProperty ( ( prefix + property ) ) ; setMethod . invoke ( object , CacheConfig . casePrimitiveType ( field . getType ( ) , configValue ) ) ; } catch ( IllegalAccessException e ) { CacheConfig . logger . debug ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>value<seq2seq4repair_space>[" + configValue ) + "]<seq2seq4repair_space>property<seq2seq4repair_space>[" ) + ( field . getName ( ) ) ) + "]<seq2seq4repair_space>" ) , e ) ; } catch ( InvocationTargetException e ) { CacheConfig . logger . debug ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>value<seq2seq4repair_space>[" + configValue ) + "]<seq2seq4repair_space>property<seq2seq4repair_space>[" ) + ( field . getName ( ) ) ) + "]<seq2seq4repair_space>" ) , e ) ; } } } } } private static String getTagName ( Class < ? > cls ) { } protected static Object casePrimitiveType ( Class < ? > targetType , Object value ) { } protected static Method getSetMethod ( Class < ? > clazz , Field field ) { } public static boolean checkIsBasicType ( Class < ? > targetType ) { } }

Fix:
if ( CacheConfig . getProperties ( ) . containsKey ( ( prefix + property ) ) ) {
Buggy code:
public class MimeTypeLookup { private Hashtable extTable ; public MimeTypeLookup ( ) { } private boolean loadExtensionList ( ) { InputStream extList ; try { <START_BUG> extList = DiskIO . getResourceStream ( "org//columba//modules//mail//composer//ext2mime.xml" ) ; <END_BUG> } catch ( IOException e ) { System . err . println ( e ) ; return false ; } DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; Document document ; try { DocumentBuilder builder = factory . newDocumentBuilder ( ) ; builder . setErrorHandler ( new ErrorHandler ( ) { public void fatalError ( SAXParseException exception ) throws SAXException { } public void error ( SAXParseException e ) throws SAXParseException { throw e ; } public void warning ( SAXParseException err ) throws SAXParseException { System . out . println ( ( ( ( ( "**<seq2seq4repair_space>Warning" + ",<seq2seq4repair_space>line<seq2seq4repair_space>" ) + ( err . getLineNumber ( ) ) ) + ",<seq2seq4repair_space>uri<seq2seq4repair_space>" ) + ( err . getSystemId ( ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>" + ( err . getMessage ( ) ) ) ) ; } } ) ; document = builder . parse ( extList ) ; Node mimeNode ; Node extNode ; NodeList rootNodes = document . getFirstChild ( ) . getChildNodes ( ) ; NodeList mimeNodes ; String mimeTypeName ; String ext ; for ( int i = 0 ; i < ( rootNodes . getLength ( ) ) ; i ++ ) { mimeTypeName = null ; mimeNode = rootNodes . item ( i ) ; if ( mimeNode . getNodeName ( ) . equals ( "mime-type" ) ) { mimeNodes = mimeNode . getChildNodes ( ) ; for ( int j = 0 ; j < ( mimeNodes . getLength ( ) ) ; j ++ ) { if ( mimeNodes . item ( j ) . getNodeName ( ) . equals ( "name" ) ) { mimeTypeName = mimeNodes . item ( j ) . getFirstChild ( ) . toString ( ) ; break ; } } if ( mimeTypeName == null ) break ; for ( int j = 0 ; j < ( mimeNodes . getLength ( ) ) ; j ++ ) { if ( mimeNodes . item ( j ) . getNodeName ( ) . equals ( "ext" ) ) { ext = mimeNodes . item ( j ) . getFirstChild ( ) . toString ( ) ; extTable . put ( ext , mimeTypeName ) ; } } } } } catch ( SAXParseException spe ) { System . out . println ( ( ( ( ( "\n**<seq2seq4repair_space>Parsing<seq2seq4repair_space>error" + ",<seq2seq4repair_space>line<seq2seq4repair_space>" ) + ( spe . getLineNumber ( ) ) ) + ",<seq2seq4repair_space>uri<seq2seq4repair_space>" ) + ( spe . getSystemId ( ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>" + ( spe . getMessage ( ) ) ) ) ; Exception x = spe ; if ( ( spe . getException ( ) ) != null ) x = spe . getException ( ) ; x . printStackTrace ( ) ; } catch ( SAXException sxe ) { Exception x = sxe ; if ( ( sxe . getException ( ) ) != null ) x = sxe . getException ( ) ; x . printStackTrace ( ) ; } catch ( ParserConfigurationException pce ) { pce . printStackTrace ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } return true ; } public String getMimeType ( String ext ) { } }

Fix:
extList = DiskIO . getResourceStream ( "org//columba//mail//composer//ext2mime.xml" ) ;
Buggy code:
public class ModuleConfigProcessor implements DeploymentUnitProcessor { public static final long PRIORITY = MODULARIZE . plus ( 100L ) ; private static final Dependency [ ] NO_DEPS = new ModuleConfig . Dependency [ 0 ] ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { if ( ( context . getAttachment ( ATTACHMENT_KEY ) ) != null ) return ; final VirtualFile deploymentRoot = getVirtualFileAttachment ( context ) ; final MountHandle deploymentRootMountHandler = context . getAttachment ( MountHandle . ATTACHMENT_KEY ) ; <START_BUG> final ModuleIdentifier moduleIdentifier = new ModuleIdentifier ( "org.jboss.deployments" , deploymentRoot . getName ( ) , "noversion" ) ; <END_BUG> final ModuleConfig [ ] resourceRoots = new ModuleConfig . ResourceRoot [ ] { new ModuleConfig . ResourceRoot ( deploymentRoot , deploymentRootMountHandler ) } ; final ModuleDependencies dependenciesAttachment = ModuleDependencies . getAttachedDependencies ( context ) ; final ModuleConfig [ ] dependencies = ( dependenciesAttachment != null ) ? dependenciesAttachment . getDependencies ( ) : ModuleConfigProcessor . NO_DEPS ; final ModuleConfig moduleConfig = new ModuleConfig ( moduleIdentifier , dependencies , resourceRoots ) ; context . putAttachment ( ATTACHMENT_KEY , moduleConfig ) ; } }

Fix:
final ModuleIdentifier moduleIdentifier = ModuleIdentifier . create ( ( ( "org.jboss.deployments" + "." ) + ( deploymentRoot . getName ( ) ) ) ) ;
Buggy code:
public class WebSession extends Session { private static final long serialVersionUID = 1L ; private static final Logger logger = LoggerFactory . getLogger ( WebSession . class ) ; private static final IFeedbackMessageFilter MESSAGES_FOR_COMPONENTS = new IFeedbackMessageFilter ( ) { private static final long serialVersionUID = 1L ; public boolean accept ( FeedbackMessage message ) { } } ; private static final IFeedbackMessageFilter RENDERED_SESSION_SCOPED_MESSAGES = new IFeedbackMessageFilter ( ) { private static final long serialVersionUID = 1L ; public boolean accept ( FeedbackMessage message ) { } } ; private static final MetaDataKey < Boolean > BROWSER_WAS_POLLED_KEY = new MetaDataKey < Boolean > ( ) { private static final long serialVersionUID = 1L ; } ; public WebSession ( Request request ) { } @ Override public void cleanupFeedbackMessages ( ) { if ( ( ( ( Application . get ( ) . getRequestCycleSettings ( ) . getRenderStrategy ( ) ) != ( RenderStrategy . REDIRECT_TO_RENDER ) ) || ( ( ( org . apache . wicket . request . http . WebRequest ) ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . getRequest ( ) ) ) . isAjax ( ) ) ) || ( ! ( ( ( org . apache . wicket . request . http . WebResponse ) ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . getResponse ( ) ) ) . isRedirect ( ) ) ) ) { if ( ( getFeedbackMessages ( ) . clear ( WebSession . RENDERED_SESSION_SCOPED_MESSAGES ) ) > 0 ) { dirty ( ) ; } <START_BUG> if ( DEVELOPMENT . equals ( getApplication ( ) . getConfigurationType ( ) ) ) { <END_BUG> List < FeedbackMessage > messages = getFeedbackMessages ( ) . messages ( WebSession . MESSAGES_FOR_COMPONENTS ) ; for ( FeedbackMessage message : messages ) { if ( ! ( message . isRendered ( ) ) ) { WebSession . logger . warn ( "Component-targetted<seq2seq4repair_space>feedback<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>left<seq2seq4repair_space>unrendered.<seq2seq4repair_space>This<seq2seq4repair_space>could<seq2seq4repair_space>be<seq2seq4repair_space>because<seq2seq4repair_space>you<seq2seq4repair_space>are<seq2seq4repair_space>missing<seq2seq4repair_space>a<seq2seq4repair_space>FeedbackPanel<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>page.<seq2seq4repair_space>Message:<seq2seq4repair_space>{}" , message ) ; } } } cleanupComponentFeedbackMessages ( ) ; } } protected void cleanupComponentFeedbackMessages ( ) { } @ Override public void invalidate ( ) { } public boolean authenticate ( final String username , final String password ) { } @ Override public WebClientInfo getClientInfo ( ) { } protected WebPage newBrowserInfoPage ( String url ) { } }

Fix:
if ( getApplication ( ) . usesDevelopmentConfig ( ) ) {
Buggy code:
public class MetaClass implements KMetaClass { private String _name ; private int _index ; private KMeta [ ] _meta ; private KStringMap < Integer > _indexes = null ; private KInferAlg _alg ; private KMetaInferInput [ ] _cachedInputs = null ; private KMetaInferOutput [ ] _cachedOutputs = null ; private long _temporalResolution = 1 ; protected MetaClass ( String p_name , int p_index , KInferAlg p_alg ) { } public void init ( KMeta [ ] p_metaElements ) { } @ Override public KMeta metaByName ( String name ) { } @ Override public KMetaAttribute attribute ( String name ) { } @ Override public KMetaReference reference ( String name ) { } @ Override public KMetaOperation operation ( String name ) { KMeta resolved = metaByName ( name ) ; <START_BUG> if ( ( resolved != null ) && ( ( resolved . metaType ( ) ) == ( MetaType . OUTPUT ) ) ) { <END_BUG> return ( ( KMetaOperation ) ( resolved ) ) ; } return null ; } @ Override public KMeta [ ] metaElements ( ) { } public int index ( ) { } public String metaName ( ) { } @ Override public MetaType metaType ( ) { } @ Override public KMeta meta ( int index ) { } @ Override public KMetaAttribute addAttribute ( String attributeName , KType p_type ) { } private KMetaAttribute internal_addatt ( String attributeName , KType p_type ) { } @ Override public KMetaReference addReference ( String referenceName , KMetaClass p_metaClass , String oppositeName , boolean toMany ) { } private KMetaReference internal_addref ( String referenceName , KMetaClass p_metaClass , String oppositeName , boolean toMany ) { } private KMetaReference getOrCreate ( String p_name , String p_oppositeName , KMetaClass p_oppositeClass , boolean p_visible , boolean p_single ) { } @ Override public KMetaOperation addOperation ( String operationName ) { } @ Override public KInferAlg inferAlg ( ) { } @ Override public KMetaDependency addDependency ( String dependencyName , int referredMetaClassIndex ) { } @ Override public KMetaInferInput addInput ( String p_name , String p_extractor ) { } @ Override public KMetaInferOutput addOutput ( String p_name , KType p_type ) { } @ Override public KMetaDependencies dependencies ( ) { } @ Override public KMetaInferInput [ ] inputs ( ) { } private synchronized void cacheInputs ( ) { } @ Override public KMetaInferOutput [ ] outputs ( ) { } @ Override public long temporalResolution ( ) { } @ Override public void setTemporalResolution ( long p_tempo ) { } private synchronized void cacheOuputs ( ) { } private void clearCached ( ) { } private void internal_add_meta ( KMeta p_new_meta ) { } }

Fix:
if ( ( resolved != null ) && ( ( resolved . metaType ( ) ) == ( MetaType . OPERATION ) ) ) {
Buggy code:
public class Property extends Task { protected Path classpath ; protected String env ; protected File file ; protected String name ; protected Reference ref ; protected String resource ; protected String value ; public Property ( ) { } public void setClasspath ( Path classpath ) throws TaskException { } public void setClasspathRef ( Reference r ) throws TaskException { } public void setEnvironment ( String env ) { } public void setFile ( File file ) { } public void setLocation ( File location ) { } public void setName ( String name ) { } public void setRefid ( Reference ref ) { } public void setResource ( String resource ) { } public void setValue ( String value ) { } public String getEnvironment ( ) { } public File getFile ( ) { } public Reference getRefid ( ) { } public String getResource ( ) { } public String getValue ( ) { } public Path createClasspath ( ) throws TaskException { if ( ( this . classpath ) == null ) { <START_BUG> this . classpath = new Path ( getProject ( ) ) ; <END_BUG> } return this . classpath . createPath ( ) ; } public void execute ( ) throws TaskException { } public String toString ( ) { } protected void addProperties ( Properties props ) throws TaskException { } protected void addProperty ( String n , String v ) throws TaskException { } protected void loadEnvironment ( String prefix ) throws TaskException { } protected void loadFile ( File file ) throws TaskException { } protected void loadResource ( String name ) throws TaskException { } }

Fix:
this . classpath = new Path ( ) ;
Buggy code:
public class Sessions { private final Map < SessionId , ACUserContainer > sessionUserMap ; public Sessions ( ) { } @ SuppressWarnings ( "restriction" ) public void add ( ESAuthenticationInformation authenticationInformation ) { } public void isValid ( ESSessionId sessionId ) throws AccessControlException { <START_BUG> if ( ! ( sessionUserMap . containsKey ( sessionId ) ) ) { <END_BUG> throw new org . eclipse . emf . emfstore . internal . server . exceptions . SessionTimedOutException ( Messages . AccessControlImpl_SessionID_Unknown ) ; } } public ACUser getUser ( ESSessionId sessionId ) throws AccessControlException { } public ACUser getRawUser ( ESSessionId sessionId ) { } public void remove ( ESSessionId sessionId ) { } @ SuppressWarnings ( "restriction" ) private static SessionId toInternalSession ( ESSessionId sessionId ) { } }

Fix:
if ( ! ( sessionUserMap . containsKey ( Sessions . toInternalSession ( sessionId ) ) ) ) {
Buggy code:
public class JBossConfiguration extends Configuration { protected final int managementPort ; protected final String profile ; protected final JBossConfiguration . Mode mode ; protected final File script ; protected JBossConfiguration ( JBossConfiguration . Builder < ? > builder ) { } public static JBossConfiguration . Builder < ? > builder ( ) { } public String getProfile ( ) { } public int getManagementPort ( ) { } public JBossConfiguration . Mode getMode ( ) { } public File getBaseDir ( ) { } public File getConfigurationFolder ( ) { } @ Override public List < String > generateCommand ( ) { if ( ! ( script . exists ( ) ) ) { throw new IllegalStateException ( String . format ( "Script<seq2seq4repair_space>'%s'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" , script . getAbsolutePath ( ) ) ) ; } final List < String > cmd = new ArrayList < > ( ) ; if ( SystemUtils . IS_OS_WINDOWS ) { cmd . add ( "cmd" ) ; cmd . add ( "//c" ) ; cmd . add ( script . getAbsolutePath ( ) ) ; } else { <START_BUG> cmd . add ( "//bin//sh" ) ; <END_BUG> cmd . add ( script . getAbsolutePath ( ) ) ; } cmd . add ( "-c" ) ; cmd . add ( profile ) ; return cmd ; } public static enum Mode { STANDALONE ( "standalone" ) , MANAGEMENT ( "management" ) ; private final String mode ; Mode ( String mode ) { } public String getValue ( ) { } } public static abstract class Builder < T extends JBossConfiguration . Builder < T > > extends Configuration . Builder < T > { protected int managementPort ; protected String profile ; protected JBossConfiguration . Mode mode ; protected File script ; public Builder ( ) { } public T managementPort ( int managementPort ) { } public T profile ( String profile ) { } public T mode ( JBossConfiguration . Mode mode ) { } public JBossConfiguration build ( ) { } } private static class Builder2 extends JBossConfiguration . Builder < JBossConfiguration . Builder2 > { @ Override protected JBossConfiguration . Builder2 self ( ) { } } }

Fix:
cmd . add ( "//bin//bash" ) ;
Buggy code:
public class KnxCommunicationObject extends Observable implements Observer { private final KnxBusConnection knxBusConnection ; private final Container taskContainer ; private final Container resultContainer ; private final Container errorContainer ; private final String hostIp ; private final String gatewayIp ; private final int gatewayPort ; private final Timer timer = new Timer ( ) ; private static final List < KnxCommunicationObject > communicationObjects = new LinkedList < KnxCommunicationObject > ( ) ; private KnxCommunicationObject ( ) { } private KnxCommunicationObject ( String hostIp , String gatewayIp , int gatewayPort ) throws UnknownHostException { } public void writeBoolean ( GroupAddress groupAddress , boolean value ) { } public void writeFloat ( GroupAddress groupAddress , float value ) { } public void readBoolean ( GroupAddress groupAddress ) { } public void readFloat ( GroupAddress groupAddress ) { } public void readControl ( GroupAddress groupAddress ) { } public void readPeriodicBoolean ( GroupAddress groupAddress , int refreshRate ) { } public void readPeriodicFloat ( GroupAddress groupAddress , int refreshRate ) { } public void readPeriodicControl ( GroupAddress groupAddress , int refreshRate ) { } public boolean readBooleanFromResults ( GroupAddress groupAddress ) throws NotInResultsException { } public float readFloatFromResults ( GroupAddress groupAddress ) throws NotInResultsException { } public byte readControlFromResults ( GroupAddress groupAddress ) throws NotInResultsException { } public boolean isConnected ( ) { } @ Override public void update ( Observable observable , Object data ) { if ( data instanceof Boolean ) { <START_BUG> if ( ! ( ( Boolean ) ( data ) ) ) { <END_BUG> timer . cancel ( ) ; } } this . setChanged ( ) ; this . notifyObservers ( data ) ; } public static KnxCommunicationObject getInstance ( String hostIp , String gatewayIp ) throws UnknownHostException { } public static KnxCommunicationObject getInstance ( String hostIp , String gatewayIp , int port ) throws UnknownHostException { } public Object [ ] getErrorObjects ( ) { } public Object [ ] getResultObjects ( ) { } private class ContinuousRead extends TimerTask { KnxComparableObject knxComparableObject ; private ContinuousRead ( KnxComparableObject knxObject ) { } @ Override public void run ( ) { } } No newline ; at end ; of file ; }

Fix:
if ( knxBusConnection . terminated ( ) ) {
Buggy code:
final class PhysicsBodyImp implements BodyImp { private final float density ; private final float friction ; private final Body imp ; private final Physics physics ; private final List < Shape > shapes ; PhysicsBodyImp ( final Physics physics , final Body body , final BodyImp oldImp ) { } @ Override public void addShape ( final Shape shape ) { } @ Override public void applyForce ( final float fx , final float fy ) { } @ Override public void applyTorque ( final float torque ) { } @ Override public boolean belongsTo ( final Physics physics ) { } @ Override public void destroy ( ) { } @ Override public void drawOverlay ( final Canvas canvas ) { if ( physics . isDebugging ( ) ) { canvas . setColor ( RED ) ; <START_BUG> canvas . setLineWidth ( 0.01 ) ; <END_BUG> canvas . fillCircle ( 0 , 0 , 0.1 ) ; canvas . drawPolyline ( 0 , 0 , 1 , 0 ) ; for ( final Shape shape : shapes ) { shape . draw ( canvas ) ; } canvas . drawText ( 0.1 , ( - 0.5 ) , ( "angle=" + ( Convert . toString ( Math . toDegrees ( getAngleRad ( ) ) , 0 ) ) ) ) ; } } @ Override public float getAngleRad ( ) { } @ Override public float getAngularDamping ( ) { } @ Override public float getAngularVelocity ( ) { } @ Override public float getDamping ( ) { } @ Override public float getDensity ( ) { } @ Override public float getFriction ( ) { } @ Override public float getMass ( ) { } @ Override public Physics getPhysics ( ) { } @ Override public Shape [ ] getShapes ( ) { } @ Override public BodyType getType ( ) { } @ Override public float getVx ( ) { } @ Override public float getVy ( ) { } @ Override public float getX ( ) { } @ Override public float getY ( ) { } @ Override public boolean isRotationFixed ( ) { } @ Override public void setAngleRad ( final float rotation ) { } @ Override public void setAngularDamping ( final float angularDamping ) { } @ Override public void setAngularVelocity ( final float angularVelocity ) { } @ Override public void setDamping ( final float damping ) { } @ Override public void setDensity ( final float density ) { } @ Override public void setFriction ( final float friction ) { } @ Override public void setPosition ( final float x , final float y ) { } @ Override public void setRotationFixed ( final boolean rotationFixed ) { } @ Override public void setType ( final BodyType type ) { } @ Override public void setVelocity ( final float vx , final float vy ) { } @ Override public String toString ( ) { } private static org . jbox2d . dynamics . BodyType convert ( final BodyType bodyType ) { } private static Shape convert ( final Shape shape , final float scale ) { } private static Shape convertCircle ( final Circle circle , final float scale ) { } private static Shape convertPolygon ( final Polygon polygon , final float scale ) { } private static Shape convertPolygonalChain ( final Polyline chain , final float scale ) { } }

Fix:
canvas . setLineWidth ( 1 ) ;
Buggy code:
public class MongoStorageTest extends GenericStorageServiceTest { MongoStorage mongo ; @ Override public void getDatabase ( ) { <START_BUG> mongo = new MongoStorage ( "127.0.0.1" , "presage-test" ) ; <END_BUG> try { mongo . start ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } mongo . db . dropDatabase ( ) ; mongo . db = mongo . mongo . getDB ( mongo . dbName ) ; this . db = mongo ; this . sto = mongo ; } }

Fix:
mongo = new MongoStorage ( "ee-sm1106.ee.ic.ac.uk" , "presage-test" ) ;
Buggy code:
public class Input { String srcIp ; String destIp ; String controllerIp ; public void setSrcIp ( String srcIp ) { } public void setDestIp ( String destIp ) { } public void setControllerIp ( String controllerIp ) { } public String getSrcIp ( ) { } public String getDestIp ( ) { } public String getControllerIp ( ) { } public String toString ( ) { <START_BUG> return ( ( "srcIp:<seq2seq4repair_space>" + ( srcIp ) ) + "destIp:<seq2seq4repair_space>" ) + ( destIp ) ; <END_BUG> } }

Fix:
return ( ( "The<seq2seq4repair_space>flow<seq2seq4repair_space>from<seq2seq4repair_space>" + ( srcIp ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destIp ) ;
Buggy code:
public class ConfigurationClassPostProcessor extends AbstractConfigurationClassProcessor implements BeanFactoryPostProcessor , Ordered { private static final Log logger = LogFactory . getLog ( ConfigurationClassPostProcessor . class ) ; static String CGLIB_TEST_CLASS = "net.sf.cglib.proxy.Callback" ; private DefaultListableBeanFactory beanFactory ; public int getOrder ( ) { } public void postProcessBeanFactory ( ConfigurableListableBeanFactory clBeanFactory ) throws BeansException { } @ Override protected ConfigurationParser createConfigurationParser ( ) { <START_BUG> return new ConfigurationParser ( beanFactory . getBeanClassLoader ( ) ) ; <END_BUG> } @ Override protected BeanDefinitionRegistry getConfigurationBeanDefinitions ( boolean includeAbstractBeanDefs ) { } @ Override protected void validateModel ( ConfigurationModel model ) { } private void enhanceConfigurationClasses ( ) { } private void assertCglibIsPresent ( BeanDefinitionRegistry configBeanDefs ) { } private static boolean isConfigClass ( BeanDefinition beanDef ) { } }

Fix:
return new ConfigurationParser ( this . getProblemReporter ( ) , beanFactory . getBeanClassLoader ( ) ) ;
Buggy code:
public class ReceiveSendAction extends FrameAction { public ReceiveSendAction ( AbstractFrameController controller ) { } public void actionPerformed ( ActionEvent evt ) { ListIterator iterator = popServerCollection . getServerIterator ( ) ; while ( iterator . hasNext ( ) ) { POP3ServerController controller = ( ( POP3ServerController ) ( iterator . next ( ) ) ) ; boolean excludeFromCheckAll = controller . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "exclude_from_checkall" , false ) ; if ( excludeFromCheckAll ) continue ; POP3CommandReference [ ] r = new POP3CommandReference [ 1 ] ; <START_BUG> r [ 0 ] = new POP3CommandReference ( controller . getServer ( ) ) ; <END_BUG> FetchNewMessagesCommand c = new FetchNewMessagesCommand ( r ) ; processor . addOp ( c ) ; } } }

Fix:
r [ 0 ] = new POP3CommandReference ( controller ) ;
Buggy code:
public final class StringsTest extends TestCase { public void test ( ) { } public void testBeforeFirst ( ) { } public void testAfterFirst ( ) { } public void testAfterLast ( ) { } public void testBeforeLastPathComponent ( ) { } public void testCapitalize ( ) { } public void testEscapeMarkup ( ) { } public void testEscapeMarkupWhiteSpace ( ) { } public void testEscapeMarkupUnicode ( ) throws UnsupportedEncodingException { } public void testReplaceHtmlEscapeNumber ( ) throws UnsupportedEncodingException { } private String convertNonASCIIString ( String str ) throws UnsupportedEncodingException { } public void testFirstPathComponent ( ) { } public void testIsEmpty ( ) { } public void testIsTrue ( ) throws StringValueConversionException { } public void testReplaceAll ( ) { } public void testSplit ( ) { } public void testStripEnding ( ) { } public void testToBoolean ( ) throws StringValueConversionException { } public void testToChar ( ) throws StringValueConversionException { } public void testToMultilineMarkup ( ) { } public void testToString ( ) { } public void testToStringThrowable ( ) { NullPointerException np = new NullPointerException ( "null<seq2seq4repair_space>test" ) ; WicketRuntimeException wre = new WicketRuntimeException ( "null<seq2seq4repair_space>test" , np ) ; String exceptionString = Strings . toString ( wre ) ; assertTrue ( ( ( exceptionString . length ( ) ) > 1 ) ) ; <START_BUG> assertTrue ( exceptionString . contains ( "WicketRuntimeException" ) ) ; <END_BUG> } private void assertEquals ( String [ ] expected , String [ ] actual ) { } private String stringValue ( String [ ] arrayOfStrings ) { } }

Fix:
assertTrue ( ( ( exceptionString . indexOf ( "WicketRuntimeException" ) ) != ( - 1 ) ) ) ;
Buggy code:
public class SumProductDiscrete extends SDiscreteVariableDoubleArray { private boolean _calculateDerivative = false ; protected boolean _dampingInUse = false ; protected SumProductDiscreteEdge [ ] _edges ; @ Nullable private double [ ] [ ] [ ] _outMessageDerivative ; public SumProductDiscrete ( Discrete var , ISolverFactorGraph parent ) { } @ Override public void initialize ( ) { } public Variable getVariable ( ) { } public void setCalculateDerivative ( boolean val ) { } @ Override public double getScore ( ) { } @ Deprecated public void setDamping ( int portIndex , double dampingVal ) { } public double getDamping ( int portIndex ) { } @ Override protected void doUpdateEdge ( int outPortNum ) { } @ Override protected void doUpdate ( ) { } @ Override public double [ ] getBelief ( ) { } public double [ ] getNormalizedInputs ( ) { } public double [ ] getUnormalizedBelief ( ) { } @ Override public double getInternalEnergy ( ) { } @ Override public double getBetheEntropy ( ) { } public double calculatedf ( double f , int weightIndex , int domain ) { } public double calculateDerivativeOfBelief ( int weightIndex , int domain ) { } public double calculateDerivativeOfInternalEnergyWithRespectToWeight ( int weightIndex ) { } public double calculateDerivativeOfBetheEntropyWithRespectToWeight ( int weightIndex ) { } private double calculateProdFactorMessagesForDomain ( int outPortNum , int d ) { } public void updateDerivativeForWeightNumAndDomainItem ( int outPortNum , int weight , int d ) { } public double calculatedg ( int outPortNum , int wn ) { } public void initializeDerivativeMessages ( int weights ) { } @ Deprecated public double [ ] getMessageDerivative ( int wn , Factor f ) { } @ Internal public double [ ] getMessageDerivative ( int wn , int edgeNumber ) { } public double calculatedf ( int outPortNum , double f , int d , int wn ) { } public void updateDerivativeForWeightNum ( int outPortNum , int weight ) { } public void updateDerivative ( int outPortNum ) { } @ Override protected double [ ] createDefaultMessage ( ) { } @ Override protected boolean supportsMessageEvents ( ) { } private void configureDampingFromOptions ( ) { final int size = getSiblingCount ( ) ; double [ ] dampingParams = getReplicatedNonZeroListFromOptions ( nodeSpecificDamping , damping , size , null ) ; if ( ( ( dampingParams . length ) > 0 ) && ( ( dampingParams . length ) != size ) ) { DimpleEnvironment . logWarning ( "%s<seq2seq4repair_space>has<seq2seq4repair_space>wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>parameters<seq2seq4repair_space>for<seq2seq4repair_space>%s\n" , nodeSpecificDamping , this ) ; dampingParams = ArrayUtil . EMPTY_DOUBLE_ARRAY ; } _dampingInUse = ( dampingParams . length ) > 0 ; if ( _dampingInUse ) { for ( int i = 0 ; i < size ; ++ i ) { <START_BUG> _edges [ i ] . _damping = dampingParams [ i ] ; <END_BUG> } } } @ Override @ SuppressWarnings ( "null" ) public SumProductDiscreteEdge getSiblingEdgeState ( int siblingIndex ) { } }

Fix:
getSiblingEdgeState ( i ) . _damping = dampingParams [ i ] ;
Buggy code:
public class InterfacciaGrafica { private final JPanel interfacciaGrafica = new JPanel ( new BorderLayout ( 3 , 3 ) ) ; private JButton [ ] [ ] quadratiScacchiera = new JButton [ 8 ] [ 8 ] ; private final Image [ ] immagine = new Image [ 12 ] ; private JPanel scacchiera ; private final JLabel messaggioInfo = new JLabel ( "Tocca<seq2seq4repair_space>Al<seq2seq4repair_space>Bianco<seq2seq4repair_space>//<seq2seq4repair_space>Nero" ) ; private static final String colonne = "ABCDEFGH" ; InterfacciaGrafica ( ) { } private final void iniziaPartita ( ) { messaggioInfo . setText ( "Fai<seq2seq4repair_space>Una<seq2seq4repair_space>Mossa<seq2seq4repair_space>!!!" ) ; try { <START_BUG> immagine [ 0 ] = ImageIO . read ( getClass ( ) . getResource ( "immagini//pedina.png" ) ) ; <END_BUG> } catch ( IOException e ) { } for ( int i = 0 ; i < 8 ; i ++ ) { quadratiScacchiera [ i ] [ 0 ] . setIcon ( new ImageIcon ( immagine [ 0 ] ) ) ; } for ( int i = 0 ; i < 8 ; i ++ ) { quadratiScacchiera [ i ] [ 1 ] . setIcon ( new ImageIcon ( immagine [ 0 ] ) ) ; } for ( int i = 0 ; i < 8 ; i ++ ) { quadratiScacchiera [ i ] [ 6 ] . setIcon ( new ImageIcon ( immagine [ 0 ] ) ) ; } for ( int i = 0 ; i < 8 ; i ++ ) { quadratiScacchiera [ i ] [ 7 ] . setIcon ( new ImageIcon ( immagine [ 0 ] ) ) ; } } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
immagine [ 0 ] = ImageIO . read ( getClass ( ) . getResource ( "..//immagini//pedina.png" ) ) ;