nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Commandline { private Vector arguments = new Vector ( ) ; private String executable = null ; public Commandline ( String to_process ) { } public Commandline ( ) { } public class Argument { private String [ ] parts ; private Reference pathRef ; public void setValue ( String value ) { } public void setLine ( String line ) { } public void setPath ( Path value ) { } public void setFile ( File value ) { } public String [ ] getParts ( ) { } } public Commandline . Argument createArgument ( ) { } public void setExecutable ( String executable ) { } public String getExecutable ( ) { } public void addArguments ( String [ ] line ) { } public String [ ] getCommandline ( ) { } public String [ ] getArguments ( ) { } public String toString ( ) { } public static String toString ( String [ ] line ) { } public static String [ ] translateCommandline ( String to_process ) { if ( ( to_process == null ) || ( ( to_process . length ( ) ) == 0 ) ) { return new String [ 0 ] ; } final int normal = 0 ; final int inQuote = 1 ; final int inDoubleQuote = 2 ; int state = normal ; StringTokenizer tok = new StringTokenizer ( to_process , "\\\"\'<seq2seq4repair_space>" , true ) ; Vector v = new Vector ( ) ; StringBuffer current = new StringBuffer ( ) ; while ( tok . hasMoreTokens ( ) ) { String nextTok = tok . nextToken ( ) ; switch ( state ) { case inQuote : if ( "\'" . equals ( nextTok ) ) { state = normal ; } else { current . append ( nextTok ) ; } break ; case inDoubleQuote : if ( "\"" . equals ( nextTok ) ) { state = normal ; } else { current . append ( nextTok ) ; } break ; default : if ( "\'" . equals ( nextTok ) ) { state = inQuote ; } else if ( "\"" . equals ( nextTok ) ) { state = inDoubleQuote ; } else if ( "<seq2seq4repair_space>" . equals ( nextTok ) ) { if ( ( current . length ( ) ) != 0 ) { v . addElement ( current . toString ( ) ) ; current . setLength ( 0 ) ; } } else if ( "\\" . equals ( nextTok ) ) { if ( tok . hasMoreTokens ( ) ) { String escapedToken = tok . nextToken ( ) ; char escapedChar = escapedToken . charAt ( 0 ) ; <START_BUG> if ( ( ( escapedChar == '\\' ) || ( escapedChar == '\'' ) ) || ( escapedChar == '\"' ) ) { <END_BUG> current . append ( escapedToken ) ; } else { current . append ( ( "\\" + escapedToken ) ) ; } } else { current . append ( "\\" ) ; } } else { current . append ( nextTok ) ; } break ; } } if ( ( current . length ( ) ) != 0 ) { v . addElement ( current . toString ( ) ) ; } if ( ( state == inQuote ) || ( state == inDoubleQuote ) ) { throw new BuildException ( ( "unbalanced<seq2seq4repair_space>quotes<seq2seq4repair_space>in<seq2seq4repair_space>" + to_process ) ) ; } String [ ] args = new String [ v . size ( ) ] ; v . copyInto ( args ) ; return args ; } public int size ( ) { } }

Fix:
if ( ( ( ( escapedChar == '\\' ) || ( escapedChar == '\'' ) ) || ( escapedChar == '\"' ) ) || ( escapedChar == '<seq2seq4repair_space>' ) ) {
Buggy code:
public class BoardCanvas extends JPanel implements ActionListener , MouseListener , MouseMotionListener { public static int TOOLTIP_WIDTH = 150 ; public static int TOOLTIP_HEIGHT = 40 ; private Image boardImage ; private Image resizedBoardImage ; private Image cardsSeenImage ; private Image cardsSeenResized ; private Image moveImage ; private CluedoFrame frame ; private List < Square > possiblePath ; private Queue < Square > movingPlayerQueue = new LinkedList < Square > ( ) ; private Timer timer = new Timer ( 100 , this ) ; private Player currentPlayer ; private boolean playerMoving = false ; private String toolTipLine1 ; private String toolTipLine2 ; private int toolTipX ; private int toolTipY ; private GameOfCluedo game ; public BoardCanvas ( CluedoFrame frame , GameOfCluedo game ) { } protected void paintComponent ( Graphics g ) { } @ Override public void paint ( Graphics g ) { int pixel = game . getPixelSize ( ) ; g . drawImage ( resizedBoardImage , 0 , 0 , null ) ; if ( ( possiblePath ) != null ) { for ( Square sq : possiblePath ) { int x = frame . convertColToX ( sq . col ( ) ) ; int y = frame . convertRowToY ( sq . row ( ) ) ; g . drawImage ( moveImage , x , y , null ) ; } } for ( Player p : frame . getPlayers ( ) ) { <START_BUG> p . draw ( g ) ; <END_BUG> } if ( ( toolTipLine1 ) != null ) { showToolTip ( toolTipLine1 , toolTipLine2 , toolTipX , toolTipY , g ) ; } if ( game . cardsSeenWindow ( ) ) { drawCardsSeen ( g , pixel ) ; } } private void drawCardsSeen ( Graphics g , int pixel ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } public void movePlayer ( GameOfCluedo game , int goalRow , int goalCol ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } @ Override public void mouseDragged ( MouseEvent e ) { } private void showToolTip ( String line1 , String line2 , int x , int y , Graphics g ) { } @ Override public void mouseMoved ( MouseEvent e ) { } private void setToolTipToNull ( ) { } public void displayShortestPath ( int startRow , int startCol ) { } public void enableDaveMode ( ) { } @ Override public void actionPerformed ( ActionEvent e ) { } }

Fix:
p . draw ( g , frame ) ;
Buggy code:
public class ExecutionTimeInterceptor extends AbstractEJBInterceptor { public static final InterceptorFactory FACTORY = new ImmediateInterceptorFactory ( new ExecutionTimeInterceptor ( ) ) ; private ExecutionTimeInterceptor ( ) { } @ Override public Object processInvocation ( final InterceptorContext context ) throws Exception { final EJBComponent component = getComponent ( context , EJBComponent . class ) ; if ( ! ( component . isStatisticsEnabled ( ) ) ) return context . proceed ( ) ; final Long startWaitTime = ( ( Long ) ( context . getPrivateData ( START_WAIT_TIME ) ) ) ; final long waitTime = ( ( startWaitTime != null ) && ( startWaitTime != 0L ) ) ? ( System . currentTimeMillis ( ) ) - startWaitTime : 0L ; component . getInvocationMetrics ( ) . startInvocation ( ) ; final long start = System . currentTimeMillis ( ) ; try { return context . proceed ( ) ; } finally { final long executionTime = ( System . currentTimeMillis ( ) ) - start ; <START_BUG> component . getInvocationMetrics ( ) . finishInvocation ( waitTime , executionTime ) ; <END_BUG> } } }

Fix:
component . getInvocationMetrics ( ) . finishInvocation ( context . getMethod ( ) , waitTime , executionTime ) ;
Buggy code:
public class HibernatePersistenceProviderAdaptor implements PersistenceProviderAdaptor { private static final String DEFAULT_REGION_FACTORY = "org.jboss.as.jpa.hibernate.cache.infinispan.InfinispanRegionFactory" ; private static final String DEFAULT_CACHE_CONTAINER = "hibernate" ; private static final String DEFAULT_ENTITY_CACHE = "entity" ; private static final String DEFAULT_COLLECTION_CACHE = "entity" ; private static final String DEFAULT_QUERY_CACHE = "local-query" ; private static final String DEFAULT_TIMESTAMPS_CACHE = "timestamps" ; public static final String SCANNER = "hibernate.ejb.resource_scanner" ; private static final String HIBERNATE_ANNOTATION_SCANNER_CLASS = "org.jboss.as.jpa.hibernate3.HibernateAnnotationScanner" ; @ Override public void injectJtaManager ( JtaManager jtaManager ) { } @ Override public void addProviderProperties ( Map properties , PersistenceUnitMetadata pu ) { } private void addAnnotationScanner ( PersistenceUnitMetadata pu ) { } @ Override public Iterable < ServiceName > getProviderDependencies ( PersistenceUnitMetadata pu ) { } private ServiceName getCacheConfigServiceName ( String container , String cache ) { <START_BUG> return JBOSS . append ( "infinispan" , container , "config" , cache ) ; <END_BUG> } private void putPropertyIfAbsent ( Map properties , String property , Object value ) { } @ Override public void beforeCreateContainerEntityManagerFactory ( PersistenceUnitMetadata pu ) { } @ Override public void afterCreateContainerEntityManagerFactory ( PersistenceUnitMetadata pu ) { } @ Override public ManagementAdaptor getManagementAdaptor ( ) { } }

Fix:
return JBOSS . append ( "infinispan" , container , cache , "config" ) ;
Buggy code:
public class DevOutListFragment extends Fragment implements DevOutAdapter . DeviceSelectedListener { private static final int DEVICE_CHECKIN_REQUEST = 48879 ; private final String TAG = "HANS" ; private ArrayList < ParseProxyObject > checkouts ; private RecyclerView myrecyclerview ; private Adapter myadapter ; private LayoutManager mylayoutmgr ; private boolean isDualPane ; private int currentPos ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onResume ( ) { } private Task < Void > findUserImageAsync ( final ParseObject obj ) throws ParseException { return Task . call ( new Callable < Void > ( ) { @ Override public Void call ( ) throws Exception { ParseObject usrObj = obj . getParseObject ( "user_obj" ) ; usrObj . fetchIfNeeded ( ) ; ParseFile pf = usrObj . getParseFile ( "user_photo" ) ; <START_BUG> if ( ( ImageStore . get ( pf . getUrl ( ) ) ) == null ) { <END_BUG> Drawable d = Drawable . createFromStream ( new ByteArrayInputStream ( pf . getData ( ) ) , "" ) ; ImageStore . put ( usrObj . getObjectId ( ) , d ) ; } return null ; } } ) ; } public void updateDeviceList ( ) { } private void showDetails ( int pos ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onDeviceSelected ( int pos ) { } }

Fix:
if ( ( pf != null ) && ( ( ImageStore . get ( pf . getUrl ( ) ) ) == null ) ) {
Buggy code:
public class DoubleProperty extends NumberProperty { private static final long serialVersionUID = 240L ; private double value ; private double savedValue ; public DoubleProperty ( String name , double value ) { } public DoubleProperty ( ) { } public void setValue ( float value ) { } @ Override protected void setNumberValue ( Number n ) { } @ Override protected void setNumberValue ( String n ) throws NumberFormatException { } public String getStringValue ( ) { } public Object getObjectValue ( ) { <START_BUG> return new Double ( value ) ; <END_BUG> } @ Override public DoubleProperty clone ( ) { } @ Override public boolean getBooleanValue ( ) { } @ Override public double getDoubleValue ( ) { } @ Override public float getFloatValue ( ) { } @ Override public int getIntValue ( ) { } @ Override public long getLongValue ( ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
return Double . valueOf ( value ) ;
Buggy code:
public class NodeListener implements Runnable { private int nodeId ; private Socket nodeSoc ; private NodeHiringServer hiringServer ; public volatile boolean running ; private ObjectInputStream objInput ; private ObjectOutputStream objOutput ; public NodeListener ( NodeHiringServer ns , int id , Socket s ) throws IOException { } private void sendToNode ( Message msg ) throws IOException { } private void initializeNode ( ) throws IOException { } private void handleHeartbeat ( HeartbeatTimer timer , Message msg ) { } private void handleInit ( Message msg ) { <START_BUG> int port = Integer . valueOf ( msg . getData ( ) . getValue ( ) ) ; <END_BUG> System . out . println ( ( ( ( ( "the<seq2seq4repair_space>node:" + ( this . nodeId ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>listening<seq2seq4repair_space>on<seq2seq4repair_space>port:" ) + port ) + "<seq2seq4repair_space>for<seq2seq4repair_space>other<seq2seq4repair_space>nodes" ) ) ; this . hiringServer . nodeComPortMap . put ( this . nodeId , port ) ; } @ Override public void run ( ) { } public int getNodeID ( ) { } public void setNodeFailure ( ) { } }

Fix:
int port = Integer . valueOf ( msg . getValue ( ) ) ;
Buggy code:
public class DocumentFragment implements Serializable , IVEXDocumentFragment { private IContent content ; private IVEXElement [ ] elements ; public DocumentFragment ( IContent content , IVEXElement [ ] elementArray ) { } public IContent getContent ( ) { } public int getLength ( ) { } public IVEXElement [ ] getElements ( ) { } public String [ ] getNodeNames ( ) { IVEXNode [ ] nodes = this . getNodes ( ) ; String [ ] names = new String [ nodes . length ] ; for ( int i = 0 ; i < ( nodes . length ) ; i ++ ) { if ( ( nodes [ i ] ) instanceof Text ) { <START_BUG> names [ i ] = Validator . PCDATA ; <END_BUG> } else { names [ i ] = ( ( IVEXElement ) ( nodes [ i ] ) ) . getName ( ) ; } } return names ; } public IVEXNode [ ] getNodes ( ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } private void writeElement ( IVEXElement element , ObjectOutputStream out ) throws IOException { } private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } private Element readElement ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } }

Fix:
names [ i ] = IValidator . PCDATA ;
Buggy code:
@ XmlType ( name = "fileMappingRule" ) @ XmlRootElement ( name = "rule" ) @ XmlAccessorOrder ( XmlAccessOrder . ALPHABETICAL ) public class FileMappingRule implements Serializable { private String pattern ; private String rule ; public FileMappingRule ( ) { } public FileMappingRule ( String pattern , String rule ) { } public FileMappingRule ( String rule ) { } <START_BUG> @ XmlAttribute ( name = "apply-to" , required = false ) <END_BUG> @ XmlJavaTypeAdapter ( StringTrimAdapter . class ) public String getPattern ( ) { return pattern ; } @ XmlValue @ XmlJavaTypeAdapter ( StringTrimAdapter . class ) public String getRule ( ) { } public void setPattern ( String pattern ) { } public void setRule ( String rule ) { } }

Fix:
@ XmlAttribute ( name = "pattern" , required = false )
Buggy code:
public class MoveMessageCommand extends CopyMessageCommand { public MoveMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { super . execute ( worker ) ; FolderCommandReference [ ] r = adapter . getSourceFolderReferences ( ) ; for ( int i = 0 ; i < ( r . length ) ; i ++ ) { Object [ ] uids = r [ i ] . getUids ( ) ; Folder srcFolder = ( ( Folder ) ( r [ i ] . getFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( srcFolder . getObservable ( ) ) ) . setWorker ( worker ) ; srcFolder . setLastSelection ( null ) ; uids = r [ i ] . getUids ( ) ; <START_BUG> log . debug ( ( ( ( "src=" + srcFolder ) + "<seq2seq4repair_space>dest=" ) + ( destFolder ) ) ) ; <END_BUG> worker . setDisplayText ( ( ( "Moving<seq2seq4repair_space>messages<seq2seq4repair_space>to<seq2seq4repair_space>" + ( destFolder . getName ( ) ) ) + "..." ) ) ; worker . setProgressBarMaximum ( uids . length ) ; srcFolder . markMessage ( uids , MARK_AS_EXPUNGED ) ; srcFolder . expungeFolder ( ) ; worker . clearDisplayTextWithDelay ( ) ; } } }

Fix:
log . info ( ( ( ( "src=" + srcFolder ) + "<seq2seq4repair_space>dest=" ) + ( destFolder ) ) ) ;
Buggy code:
public class VersionedOffHeapCacheExample { public static void main ( String [ ] args ) { OffHeapByteBufferStore bufferStore = new OffHeapByteBufferStore ( 10000 , 10 ) ; final Cache < String , VersionedItem < String > > cache = CacheBuilder . versionedOffHeapCache ( ) . storage ( bufferStore ) . build ( ) ; ExecutorService service = Executors . newFixedThreadPool ( 3 ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { service . execute ( new Runnable ( ) { public void run ( ) { try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } while ( true ) { try { VersionedItem < String > value = cache . get ( "apple" ) ; String newValue = VersionedOffHeapCacheExample . getRandomString ( ) ; if ( value == null ) { cache . put ( "apple" , new com . cetsoft . imcache . cache . SimpleItem < String > ( newValue ) ) ; } else { value . update ( newValue ) ; cache . put ( "apple" , value ) ; } <START_BUG> System . out . println ( value . getValue ( ) ) ; <END_BUG> break ; } catch ( StaleItemException ex ) { ex . printStackTrace ( ) ; } } VersionedItem < String > item = cache . get ( "apple" ) ; System . out . println ( item . getVersion ( ) ) ; } } ) ; } } private static String getRandomString ( ) { } }

Fix:
System . out . println ( cache . get ( "apple" ) . getValue ( ) ) ;
Buggy code:
public class ReceivedTextFragment extends ListFragment implements CommunicationsManager . CommunicationEventsListener { private static int TEXT_ADDED = 0 ; private static int TEXT_DELETED = 1 ; private List < Map < String , String > > receivedTexts ; private SimpleAdapter simpleAdapter ; private Handler handler ; @ Override public void onCreate ( Bundle savedInstanceState ) { Log . i ( "netclip" , "ReceivedTextFragment.onCreate" ) ; super . onCreate ( savedInstanceState ) ; this . handler = new Handler ( Looper . getMainLooper ( ) ) { @ Override public void handleMessage ( Message message ) { ReceivedTextFragment . this . handleMessage ( message ) ; } } ; this . receivedTexts = new ArrayList < Map < String , String > > ( ) ; <START_BUG> this . simpleAdapter = new SimpleAdapter ( this . getContext ( ) , this . receivedTexts , layout . simple_list_item_2 , new String [ ] { "text" , "time" } , new int [ ] { id . text1 , id . text2 } ) ; <END_BUG> this . setListAdapter ( this . simpleAdapter ) ; } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onDestroyView ( ) { } @ Override public void onNewReceivedText ( ReceivedText rt ) { } @ Override public void onDeletedText ( int index ) { } public void handleMessage ( Message message ) { } private void addReceivedText ( ReceivedText rt ) { } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } }

Fix:
this . simpleAdapter = new SimpleAdapter ( this . getActivity ( ) , this . receivedTexts , layout . simple_list_item_2 , new String [ ] { "text" , "time" } , new int [ ] { id . text1 , id . text2 } ) ;
Buggy code:
public class TestNearSpansOrdered extends LuceneTestCase { protected IndexSearcher searcher ; protected Directory directory ; protected IndexReader reader ; public static final String FIELD = "field" ; @ Override public void tearDown ( ) throws Exception { } @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; for ( int i = 0 ; i < ( docFields . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newTextField ( TestNearSpansOrdered . FIELD , docFields [ i ] , NO ) ) ; writer . addDocument ( doc ) ; } reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; } protected String [ ] docFields = new String [ ] { "w1<seq2seq4repair_space>w2<seq2seq4repair_space>w3<seq2seq4repair_space>w4<seq2seq4repair_space>w5" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>w2<seq2seq4repair_space>w3<seq2seq4repair_space>zz" , "w1<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3<seq2seq4repair_space>zz" } ; protected SpanNearQuery makeQuery ( String s1 , String s2 , String s3 , int slop , boolean inOrder ) { } protected SpanNearQuery makeQuery ( ) { } public void testSpanNearQuery ( ) throws Exception { } public String s ( Spans span ) { } public String s ( int doc , int start , int end ) { } public void testNearSpansNext ( ) throws Exception { } public void testNearSpansSkipToLikeNext ( ) throws Exception { } public void testNearSpansNextThenSkipTo ( ) throws Exception { } public void testNearSpansNextThenSkipPast ( ) throws Exception { } public void testNearSpansSkipPast ( ) throws Exception { } public void testNearSpansSkipTo0 ( ) throws Exception { } public void testNearSpansSkipTo1 ( ) throws Exception { } public void testSpanNearScorerSkipTo1 ( ) throws Exception { } public void testSpanNearScorerExplain ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class SongListFragment extends Fragment { private static final String TAG = SongListFragment . class . getCanonicalName ( ) ; private RecyclerView mRecyclerView ; private SongAdapter mAdapter ; private LayoutManager mLayoutManager ; private FloatingActionButton buttonAddSongsToPlaylist ; private Context mContext ; private List < Song > songList ; private Playlist currentPlaylist ; public SongListFragment ( ) { } public SongListFragment ( Playlist currentPlaylist ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_song_list , container , false ) ; mRecyclerView = ( ( RecyclerView ) ( view . findViewById ( songs_view ) ) ) ; buttonAddSongsToPlaylist = ( ( FloatingActionButton ) ( view . findViewById ( add_song_button ) ) ) ; <START_BUG> buttonAddSongsToPlaylist . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorAccent ) ) ; <END_BUG> buttonAddSongsToPlaylist . setVisibility ( ( currentPlaylist . name . equals ( getResources ( ) . getString ( all_songs_playlist_name ) ) ? View . GONE : View . VISIBLE ) ) ; buttonAddSongsToPlaylist . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { getActivity ( ) . getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( main_fragment , new PickSongFragment ( currentPlaylist . name , false ) ) . addToBackStack ( null ) . commit ( ) ; } } ) ; mRecyclerView . setHasFixedSize ( true ) ; ( ( itukraine . com . ua . bestmobile . MainActivity ) ( getActivity ( ) ) ) . getToolbar ( ) . setTitle ( currentPlaylist . name ) ; mLayoutManager = new android . support . v7 . widget . LinearLayoutManager ( mContext ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; if ( currentPlaylist . name . equals ( getResources ( ) . getString ( all_songs_playlist_name ) ) ) { songList = MusicUtil . getInstance ( ) . getAllSongs ( mContext ) ; } else { songList = MusicUtil . getInstance ( ) . getSongsByID ( mContext , currentPlaylist . songsId ) ; } mAdapter = new SongAdapter ( mContext , songList ) ; mRecyclerView . setAdapter ( mAdapter ) ; mRecyclerView . addItemDecoration ( new itukraine . com . ua . bestmobile . view . RecyclerViewLineDevider ( getResources ( ) ) ) ; mRecyclerView . addOnItemTouchListener ( new RecyclerItemClickListener ( mContext , new SongListFragment . OnItemClickListener ( ) ) ) ; return view ; } @ Override public void onAttach ( Context context ) { } private void displayConfirmDeleteDialog ( final int position ) { } private class OnItemClickListener extends RecyclerItemClickListener . SimpleOnItemClickListener { @ Override public void onItemClick ( View childView , int position ) { } @ Override public void onItemLongPress ( View childView , final int position ) { } } }

Fix:
buttonAddSongsToPlaylist . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorPrimary ) ) ;
Buggy code:
public abstract class CreateElementInCUOperation extends JavaModelOperation { protected IDOMCompilationUnit fCUDOM ; protected static final int INSERT_LAST = 1 ; protected static final int INSERT_AFTER = 2 ; protected static final int INSERT_BEFORE = 3 ; protected int fInsertionPolicy = CreateElementInCUOperation . INSERT_LAST ; protected IJavaElement fAnchorElement = null ; protected boolean fCreationOccurred = true ; protected DOMNode fCreatedElement ; protected int fInsertionPosition = - 1 ; protected int fReplacementLength = - 1 ; public CreateElementInCUOperation ( IJavaElement parentElement ) { } protected void checkCanceled ( ) { } public void createAfter ( IJavaElement sibling ) { } public void createBefore ( IJavaElement sibling ) { } protected void executeOperation ( ) throws JavaModelException { } protected abstract IDOMNode generateElementDOM ( ) throws JavaModelException { } protected void generateNewCompilationUnitDOM ( ICompilationUnit cu ) throws JavaModelException { } protected abstract IJavaElement generateResultHandle ( ) { } protected IJavaElement [ ] generateResultHandles ( ) { } protected ICompilationUnit getCompilationUnit ( ) { } protected int getMainAmountOfWork ( ) { } public abstract String getMainTaskName ( ) { } protected ISchedulingRule getSchedulingRule ( ) { <START_BUG> return getParentElement ( ) . getResource ( ) ; <END_BUG> } protected void initializeDefaultPosition ( ) { } protected void insertDOMNode ( IDOMNode parent , IDOMNode child ) { } protected void setAlteredName ( String newName ) { } protected void setRelativePosition ( IJavaElement sibling , int policy ) throws IllegalArgumentException { } public IJavaModelStatus verify ( ) { } }

Fix:
return getParentElement ( ) . getSchedulingRule ( ) ;
Buggy code:
public abstract class AbstractScriptableParameter extends AbstractUnoChoiceParameter implements ScriptableParameter < Map < Object , Object > > { private static final long serialVersionUID = - 1718340722437175976L ; protected static final String SEPARATOR = "__LESEP__" ; protected final Script script ; private volatile int visibleItemCount = 1 ; protected AbstractScriptableParameter ( String name , String description , Script script ) { } public Script getScript ( ) { } public Map < Object , Object > getParameters ( ) { } public Map < Object , Object > getChoices ( ) { } @ SuppressWarnings ( "unchecked" ) public Map < Object , Object > getChoices ( Map < Object , Object > parameters ) { } public String getChoicesAsString ( ) { } public String getChoicesAsString ( Map < Object , Object > parameters ) { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private Object eval ( Map < Object , Object > parameters ) { } @ Override public ParameterValue getDefaultParameterValue ( ) { if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . entering ( AbstractUnoChoiceParameter . class . getName ( ) , "getDefaultParameterValue" ) ; } Object firstElement = "" ; final Map < Object , Object > choices = getChoices ( Collections . < Object , Object > emptyMap ( ) ) ; if ( ( choices != null ) && ( ( choices . size ( ) ) > 0 ) ) { <START_BUG> firstElement = choices . get ( 0 ) ; <END_BUG> } final String name = getName ( ) ; final String value = ObjectUtils . toString ( firstElement , "" ) ; final StringParameterValue stringParameterValue = new StringParameterValue ( name , value ) ; return stringParameterValue ; } public int getVisibleItemCount ( ) { } }

Fix:
firstElement = choices . entrySet ( ) . iterator ( ) . next ( ) . getValue ( ) ;
Buggy code:
public class OfferListingAdapter extends ArrayAdapter < ParseObject > { public OfferListingAdapter ( Context context , ArrayList < ParseObject > objects ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { ParseObject object = getItem ( position ) ; if ( convertView == null ) { convertView = LayoutInflater . from ( getContext ( ) ) . inflate ( main_list_item , parent , false ) ; } TextView title = ( ( TextView ) ( convertView . findViewById ( item_row_title ) ) ) ; TextView price = ( ( TextView ) ( convertView . findViewById ( item_row_price ) ) ) ; TextView description = ( ( TextView ) ( convertView . findViewById ( item_row_description ) ) ) ; title . setText ( object . getString ( "Title" ) ) ; <START_BUG> price . setText ( object . getString ( "Price" ) ) ; <END_BUG> description . setText ( object . getString ( "Description" ) ) ; return convertView ; } }

Fix:
price . setText ( ( "$" + ( object . getString ( "Price" ) ) ) ) ;
Buggy code:
public class Tomcat extends Log { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.resources" ) ; private String action = "start" ; String configFile = null ; static final String DEFAULT_CONFIG = "conf//server.xml" ; public Tomcat ( ) { } public void execute ( ) throws Exception { } public void stop ( ) throws Exception { } public void start ( ) throws Exception { EmbededTomcat tcat = new EmbededTomcat ( ) ; PathSetter pS = new PathSetter ( ) ; tcat . addInterceptor ( pS ) ; <START_BUG> ServerXmlInterceptor sxmlConf = new ServerXmlInterceptor ( ) ; <END_BUG> sxmlConf . setConfig ( configFile ) ; tcat . addInterceptor ( sxmlConf ) ; tcat . initContextManager ( ) ; tcat . start ( ) ; } public void setAction ( String s ) { } public static void main ( String [ ] args ) { } public static void printUsage ( ) { } public boolean processArgs ( String [ ] args ) { } }

Fix:
ServerXmlReader sxmlConf = new ServerXmlReader ( ) ;
Buggy code:
@ Deprecated public class RelativePathService extends org . jboss . as . controller . services . path . RelativePathService { @ Deprecated public static ServiceController < String > addService ( final String name , final String relativePath , final String relativeTo , final ServiceTarget serviceTarget ) { } @ Deprecated public static ServiceController < String > addService ( final String name , final String relativePath , final String relativeTo , final ServiceTarget serviceTarget , final List < ServiceController < ? > > newControllers , final ServiceListener ... listeners ) { } @ Deprecated public static ServiceController < String > addService ( final ServiceName name , final String relativePath , final String relativeTo , final ServiceTarget serviceTarget ) { } @ Deprecated public static ServiceController < String > addService ( final ServiceName name , final String path , boolean possiblyAbsolute , final String relativeTo , final ServiceTarget serviceTarget , final List < ServiceController < ? > > newControllers , final ServiceListener ... listeners ) { <START_BUG> return RelativePathService . addService ( name , path , possiblyAbsolute , relativeTo , serviceTarget , newControllers ) ; <END_BUG> } @ Deprecated public static void addService ( final ServiceName name , final ModelNode element , final ServiceTarget serviceTarget ) { } @ Deprecated public RelativePathService ( final String relativePath ) { } }

Fix:
return org . jboss . as . controller . services . path . RelativePathService . addService ( name , path , possiblyAbsolute , relativeTo , serviceTarget , newControllers , listeners ) ;
Buggy code:
public class GremlinServerAuthIntegrateTest extends AbstractGremlinServerIntegrationTest { @ Override public Settings overrideSettings ( final Settings settings ) { } @ Test public void shouldFailIfSslEnabledOnServerButNotClient ( ) throws Exception { final Cluster cluster = Cluster . build ( ) . create ( ) ; final Client client = cluster . connect ( ) ; try { client . submit ( "1+1" ) . all ( ) . get ( ) ; fail ( "This<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>succeed<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>client<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>enable<seq2seq4repair_space>SSL" ) ; } catch ( Exception ex ) { final Throwable root = ExceptionUtils . getRootCause ( ex ) ; assertEquals ( TimeoutException . class , root . getClass ( ) ) ; <START_BUG> assertEquals ( "Timed<seq2seq4repair_space>out<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>available<seq2seq4repair_space>host." , root . getMessage ( ) ) ; <END_BUG> } finally { cluster . close ( ) ; } } @ Test public void shouldAuthenticateWithPlainText ( ) throws Exception { } @ Test public void shouldAuthenticateOverSslWithPlainText ( ) throws Exception { } @ Test public void shouldFailAuthenticateWithPlainTextNoCredentials ( ) throws Exception { } @ Test public void shouldFailAuthenticateWithPlainTextBadPassword ( ) throws Exception { } @ Test public void shouldFailAuthenticateWithPlainTextBadUsername ( ) throws Exception { } @ Test public void shouldAuthenticateWithPlainTextOverJSONSerialization ( ) throws Exception { } @ Test public void shouldAuthenticateWithPlainTextOverGraphSONSerialization ( ) throws Exception { } @ Test public void shouldAuthenticateAndWorkWithVariablesOverJsonSerialization ( ) throws Exception { } @ Test public void shouldAuthenticateAndWorkWithVariablesOverGraphSONSerialization ( ) throws Exception { } }

Fix:
assertThat ( root . getMessage ( ) , startsWith ( "Timed<seq2seq4repair_space>out<seq2seq4repair_space>while<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>available<seq2seq4repair_space>host" ) ) ;
Buggy code:
@ With ( Security . class ) public class Users extends Controller { public static void createUser ( ) { } public static void getUserByLogin ( String loginName ) { } @ Secured public static void editUser ( long id ) { } public static void getUserPosts ( String loginName , String sort , int from , int limit ) { User user = User . find ( "byLoginName" , loginName ) . first ( ) ; if ( user == null ) { notFound ( ) ; } <START_BUG> Posts . renderPostsListJson ( sort , from , limit , "byAuthor" , user ) ; <END_BUG> } public static void getUserPostsCount ( String loginName ) { } }

Fix:
Posts . renderPostsListJson ( sort , from , limit , "author<seq2seq4repair_space>=<seq2seq4repair_space>?" , user ) ;
Buggy code:
public class tab_request extends Fragment implements View . OnClickListener { TextView [ ] tv = new TextView [ 10 ] ; Button [ ] B = new Button [ 10 ] ; TableLayout requesttable ; public void onCreate ( Bundle savedInstanceState ) { } public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onClick ( View view ) { UserController controller = Application . getUserController ( ) ; <START_BUG> controller . acceptRequest ( controller . GetActiveUserId ( ) , String . valueOf ( ( ( tv [ 1 ] . getId ( ) ) - 1 ) ) ) ; <END_BUG> } }

Fix:
controller . acceptRequest ( controller . GetActiveUserId ( ) , String . valueOf ( tv [ 1 ] . getId ( ) ) ) ;
Buggy code:
public class ZipArchiveOutputStreamTest extends TestCase { private Date time ; private ZipLong zl ; public ZipArchiveOutputStreamTest ( String name ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testZipLong ( ) throws Exception { } public void testAdjustToLong ( ) { <START_BUG> assertEquals ( ( ( long ) ( Integer . MAX_VALUE ) ) , ZipArchiveOutputStream . adjustToLong ( Integer . MAX_VALUE ) ) ; <END_BUG> assertEquals ( ( ( ( long ) ( Integer . MAX_VALUE ) ) + 1 ) , ZipArchiveOutputStream . adjustToLong ( ( ( Integer . MAX_VALUE ) + 1 ) ) ) ; assertEquals ( ( 2 * ( ( long ) ( Integer . MAX_VALUE ) ) ) , ZipArchiveOutputStream . adjustToLong ( ( 2 * ( Integer . MAX_VALUE ) ) ) ) ; } }

Fix:
assertEquals ( Integer . MAX_VALUE , ZipArchiveOutputStream . adjustToLong ( Integer . MAX_VALUE ) ) ;
Buggy code:
public class ADMService extends ADMMessageHandlerBase { public ADMService ( ) { } @ Override protected void onMessage ( @ NonNull final Intent intent ) { } @ Override protected void onRegistered ( @ NonNull final String registrationId ) { } @ Override protected void onUnregistered ( @ NonNull final String registrationId ) { } @ Override protected void onRegistrationError ( @ NonNull @ ADMError final String errorId ) { OPFPushLog . methodD ( ADMService . class , "onRegistrationError" , errorId ) ; final OPFError error = convertError ( errorId ) ; OPFPushLog . d ( ( "Converted<seq2seq4repair_space>error<seq2seq4repair_space>:<seq2seq4repair_space>" + error ) ) ; <START_BUG> org . onepf . opfpush . OPFPush . getHelper ( ) . getReceivedMessageHandler ( ) . onRegistrationError ( Constants . NAME , error ) ; <END_BUG> } @ NonNull private OPFError convertError ( @ NonNull @ ADMError final String errorId ) { } }

Fix:
OPFPush . getHelper ( ) . getReceivedMessageHandler ( ) . onError ( Constants . NAME , error ) ;
Buggy code:
public class Header { private int id ; private int flags ; private int [ ] counts ; private static Random random = new Random ( ) ; public static final int LENGTH = 12 ; private void init ( ) { } public Header ( int id ) { } public Header ( ) { } Header ( DNSInput in ) throws IOException { } public Header ( byte [ ] b ) throws IOException { } void toWire ( DNSOutput out ) { } public byte [ ] toWire ( ) { } private static boolean validFlag ( int bit ) { } private static void checkFlag ( int bit ) { } public void setFlag ( int bit ) { } public void unsetFlag ( int bit ) { } public boolean getFlag ( int bit ) { } boolean [ ] getFlags ( ) { } public int getID ( ) { } public void setID ( int id ) { } public void setRcode ( int value ) { } public int getRcode ( ) { } public void setOpcode ( int value ) { if ( ( value < 0 ) || ( value > 15 ) ) throw new IllegalArgumentException ( ( ( "DNS<seq2seq4repair_space>Opcode<seq2seq4repair_space>" + value ) + "is<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>range" ) ) ; <START_BUG> flags &= ~ 34815 ; <END_BUG> flags |= value << 11 ; } public int getOpcode ( ) { } void setCount ( int field , int value ) { } void incCount ( int field ) { } void decCount ( int field ) { } public int getCount ( int field ) { } public String printFlags ( ) { } String toStringWithRcode ( int newrcode ) { } public String toString ( ) { } public Object clone ( ) { } }

Fix:
flags &= 34815 ;
Buggy code:
public class CharacterKey extends NonModifierKey { private char character ; CharacterKey ( char character ) { } public char getCharacter ( ) { } public String toString ( ) { <START_BUG> return Character . toString ( character ) ; <END_BUG> } }

Fix:
return "" + ( character ) ;
Buggy code:
public class ProjectHandler extends ModelElementHandler { public static final String BASEDIR_ATTR = "basedir" ; public static final String NAME_ATTR = "name" ; public static final String DEFAULT_ATTR = "default" ; public static final String REF_ELEMENT = "ant:ref" ; public static final String INCLUDE_ELEMENT = "ant:include" ; public static final String TARGET_ELEMENT = "target" ; private Project project ; public ProjectHandler ( ) { } public ProjectHandler ( Project project ) { } public Project getProject ( ) throws NoProjectReadException { } public void processElement ( String elementName ) throws SAXParseException { if ( ( project ) == null ) { project = new Project ( getElementSource ( ) , getLocation ( ) ) ; setModelElement ( project ) ; project . setDefaultTarget ( getAttribute ( ProjectHandler . DEFAULT_ATTR ) ) ; project . setBase ( getAttribute ( ProjectHandler . BASEDIR_ATTR ) ) ; project . setName ( getAttribute ( ProjectHandler . NAME_ATTR ) ) ; <START_BUG> project . addAspectAttributes ( getAspectAttributes ( ) ) ; <END_BUG> } } public void startElement ( String uri , String localName , String qualifiedName , Attributes attributes ) throws SAXParseException { } protected void validateAttribute ( String attributeName , String attributeValue ) throws SAXParseException { } }

Fix:
addNamespaceAttributes ( ) ;
Buggy code:
public class ExampleRunner { public static void main ( String [ ] args ) throws Exception { } private static void usage ( Throwable t ) throws Exception { System . out . println ( ( "Caught<seq2seq4repair_space>" + ( t . toString ( ) ) ) ) ; System . out . println ( "Please<seq2seq4repair_space>make<seq2seq4repair_space>sure<seq2seq4repair_space>your<seq2seq4repair_space>standalone.xml<seq2seq4repair_space>includes<seq2seq4repair_space>the<seq2seq4repair_space>H2DS<seq2seq4repair_space>datasource<seq2seq4repair_space>in<seq2seq4repair_space>its<seq2seq4repair_space><profile><seq2seq4repair_space>element." ) ; System . out . println ( "An<seq2seq4repair_space>example<seq2seq4repair_space>configuration<seq2seq4repair_space>is<seq2seq4repair_space>as<seq2seq4repair_space>follows:\n" ) ; System . out . println ( "<subsystem<seq2seq4repair_space>xmlns=\"urn:jboss:domain:datasources:1.0\">" ) ; System . out . println ( "<seq2seq4repair_space><datasources>" ) ; <START_BUG> System . out . println ( "<seq2seq4repair_space><datasource<seq2seq4repair_space>jndi-name=\"java://H2DS\"<seq2seq4repair_space>enabled=\"true\"<seq2seq4repair_space>use-java-context=\"true\"<seq2seq4repair_space>pool-name=\"H2DS\">" ) ; <END_BUG> System . out . println ( "<seq2seq4repair_space><connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1<//connection-url>" ) ; System . out . println ( "<seq2seq4repair_space><driver-class>org.h2.Driver<//driver-class>" ) ; System . out . println ( "<seq2seq4repair_space><module>com.h2database.h2<//module>" ) ; System . out . println ( "<seq2seq4repair_space><pool><//pool>" ) ; System . out . println ( "<seq2seq4repair_space><security>" ) ; System . out . println ( "<seq2seq4repair_space><user-name>sa<//user-name>" ) ; System . out . println ( "<seq2seq4repair_space><password>sa<//password>" ) ; System . out . println ( "<seq2seq4repair_space><//security>" ) ; System . out . println ( "<seq2seq4repair_space><validation><//validation>" ) ; System . out . println ( "<seq2seq4repair_space><time-out><//time-out>" ) ; System . out . println ( "<seq2seq4repair_space><statement><//statement>" ) ; System . out . println ( "<seq2seq4repair_space><//datasource>" ) ; System . out . println ( "<seq2seq4repair_space><//datasources>" ) ; System . out . println ( "<//subsystem>" ) ; System . out . println ( "\nIf<seq2seq4repair_space>your<seq2seq4repair_space>profile<seq2seq4repair_space>already<seq2seq4repair_space>includes<seq2seq4repair_space>other<seq2seq4repair_space>datasource<seq2seq4repair_space>configurations,<seq2seq4repair_space>just<seq2seq4repair_space>add<seq2seq4repair_space>the<seq2seq4repair_space>nested<seq2seq4repair_space><datasource><seq2seq4repair_space>element<seq2seq4repair_space>above<seq2seq4repair_space>next<seq2seq4repair_space>to<seq2seq4repair_space>them." ) ; } }

Fix:
System . out . println ( "<seq2seq4repair_space><datasource<seq2seq4repair_space>jndi-name=\"java:jboss//datasources//ExampleDS\"<seq2seq4repair_space>enabled=\"true\"<seq2seq4repair_space>use-java-context=\"true\"<seq2seq4repair_space>pool-name=\"H2DS\">" ) ;
Buggy code:
public class AssemblyFinder { private static final Logger logger = LoggerFactory . getLogger ( AssemblyFinder . class ) ; private LatticeGraph lattice ; private StructureInterfaceList interfaces ; private int numEntities ; private int numInterfClusters ; private int [ ] xtalStoichiometry ; public AssemblyFinder ( Structure structure , StructureInterfaceList interfaces ) { } public int getNumEntities ( ) { } public Set < Assembly > getValidAssemblies ( ) { Set < Assembly > validSet = new HashSet < Assembly > ( ) ; List < Assembly > invalidNodes = new ArrayList < Assembly > ( ) ; <START_BUG> Assembly emptyAssembly = new Assembly ( interfaces , lattice . getGraph ( ) , new boolean [ numInterfClusters ] ) ; <END_BUG> Set < Assembly > prevLevel = new HashSet < Assembly > ( ) ; prevLevel . add ( emptyAssembly ) ; Set < Assembly > nextLevel = null ; for ( int k = 1 ; k <= ( numInterfClusters ) ; k ++ ) { AssemblyFinder . logger . debug ( "Traversing<seq2seq4repair_space>level<seq2seq4repair_space>{}<seq2seq4repair_space>of<seq2seq4repair_space>tree:<seq2seq4repair_space>{}<seq2seq4repair_space>parent<seq2seq4repair_space>nodes" , k , prevLevel . size ( ) ) ; nextLevel = new HashSet < Assembly > ( ) ; for ( Assembly p : prevLevel ) { List < Assembly > children = p . getChildren ( invalidNodes ) ; for ( Assembly c : children ) { if ( ! ( c . isValid ( ) ) ) { AssemblyFinder . logger . debug ( "Node<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>invalid,<seq2seq4repair_space>will<seq2seq4repair_space>prune<seq2seq4repair_space>off<seq2seq4repair_space>all<seq2seq4repair_space>of<seq2seq4repair_space>its<seq2seq4repair_space>children" , c . toString ( ) ) ; invalidNodes . add ( c ) ; } else { nextLevel . add ( c ) ; validSet . add ( c ) ; } } } prevLevel = new HashSet < Assembly > ( nextLevel ) ; } return validSet ; } }

Fix:
Assembly emptyAssembly = new Assembly ( interfaces , lattice . getGraph ( ) , new boolean [ numInterfClusters ] , numEntities ) ;
Buggy code:
public class DeploymentUndeployHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = UNDEPLOY ; static final ModelNode getOperation ( ModelNode address ) { } public static final DeploymentUndeployHandler INSTANCE = new DeploymentUndeployHandler ( ) ; private DeploymentUndeployHandler ( ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } public void execute ( OperationContext context , ModelNode operation ) { <START_BUG> ModelNode model = context . readModelForUpdate ( EMPTY_ADDRESS ) ; <END_BUG> final String deploymentUnitName = model . require ( RUNTIME_NAME ) . asString ( ) ; model . get ( ENABLED ) . set ( false ) ; DeploymentHandlerUtil . undeploy ( context , deploymentUnitName ) ; context . completeStep ( ) ; } }

Fix:
ModelNode model = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) ;
Buggy code:
public class CharacterView extends JPanel { private PlayerModel playerModel ; private Cell [ ] [ ] cellGrid ; private Image playerCharacterImage ; private ImageIcon playerCharacterIcon ; public CharacterView ( PlayerModel pM , int screenResolutionWidth , int screenResolutionHeight ) { } public void updateCharacterView ( String character , boolean isVisible ) { } private void fillCellGrid ( ) { int cellX = 0 ; int cellY = 0 ; try { playerCharacterImage = ImageIO . read ( new File ( "playerCharacter.png" ) ) ; } catch ( IOException e ) { } <START_BUG> playerCharacterImage = playerCharacterImage . getScaledInstance ( 64 , 64 , Image . SCALE_DEFAULT ) ; <END_BUG> playerCharacterIcon = new ImageIcon ( playerCharacterImage ) ; for ( int i = 0 ; i < 576 ; i ++ ) { add ( ( cellGrid [ cellX ] [ cellY ] = new Cell ( cellX , cellY , playerCharacterIcon ) ) ) ; if ( cellX < 31 ) cellX ++ ; else { cellX = 0 ; cellY ++ ; } } } }

Fix:
playerCharacterImage = playerCharacterImage . getScaledInstance ( 60 , 60 , Image . SCALE_DEFAULT ) ;