nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MapHelper { private static MapHelper ourInstance = new MapHelper ( ) ; public static final LatLng SARAJEVO = new LatLng ( 43.856259 , 18.413076 ) ; public static final LatLng MOSTAR = new LatLng ( 43.342273 , 17.812754 ) ; public static MapHelper getInstance ( ) { } private MapHelper ( ) { } public void setMapToLocation ( LatLng location , GoogleMap map ) { } public void setMapToLocation ( double lat , double lng , GoogleMap map ) { } public void drawMapRoute ( final List < LatLng > routes , final GoogleMap googleMap , Activity context ) { <START_BUG> if ( googleMap != null ) { <END_BUG> context . runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { if ( ( routes . size ( ) ) > 0 ) { googleMap . addMarker ( new MarkerOptions ( ) . position ( routes . get ( 0 ) ) . title ( "Pocetak" ) ) . setIcon ( BitmapDescriptorFactory . fromResource ( map_start ) ) ; googleMap . addMarker ( new MarkerOptions ( ) . position ( routes . get ( ( ( routes . size ( ) ) - 1 ) ) ) . title ( "Kraj" ) ) . setIcon ( BitmapDescriptorFactory . fromResource ( map_finish ) ) ; setMapToLocation ( routes . get ( 0 ) . latitude , routes . get ( 0 ) . longitude , googleMap ) ; } googleMap . addPolyline ( new PolylineOptions ( ) . addAll ( routes ) . width ( 5 ) . color ( RED ) ) ; } } ) ; } } public void drawCommentOnMap ( final Komentar komentar , final GoogleMap googleMap , final Activity context ) { } public void drawCommentsOnMap ( final List < Komentar > list , final GoogleMap googleMap , final Activity context ) { } }

Fix:
if ( ( googleMap != null ) && ( context != null ) ) {
Buggy code:
public class DBApp implements DBAppInterface { ArrayList < Table > tables = new ArrayList < Table > ( ) ; int KDTreeN ; int MaximumRowsCountinPage ; public static void main ( String [ ] args ) { } @ Override public void init ( ) { } @ Override public void createTable ( String strTableName , Hashtable < String , String > htblColNameType , Hashtable < String , String > htblColNameRefs , String strKeyColName ) throws DBAppException , IOException { } public void createIndex ( String strTableName , String strColName ) throws DBAppException { } @ Override public void createMultiDimIndex ( String strTableName , Hashtable < String , String > htblColNames ) throws DBAppException { } @ Override public void insertIntoTable ( String strTableName , Hashtable < String , String > htblColNameValue ) throws DBAppException { for ( Table table : tables ) { <START_BUG> if ( ( table . getName ( ) ) == strTableName ) { <END_BUG> try { Page tempPage = table . insertIntoPage ( htblColNameValue ) ; table . getLHT ( ) . put ( table . getSingleIndex ( ) , tempPage . getPage_id ( ) ) ; } catch ( ClassNotFoundException | IOException e ) { e . printStackTrace ( ) ; } } } } @ Override public void deleteFromTable ( String strTableName , Hashtable < String , String > htblColNameValue , String strOperator ) throws DBEngineException { } @ Override public Iterator selectFromTable ( String strTable , Hashtable < String , String > htblColNameValue , String strOperator ) throws DBEngineException { } @ Override public void saveAll ( ) throws DBEngineException { } }

Fix:
if ( table . getName ( ) . equalsIgnoreCase ( strTableName ) ) {
Buggy code:
public class FieldReferencePattern extends MultipleSearchPattern { protected char [ ] name ; protected char [ ] declaringQualification ; protected char [ ] declaringSimpleName ; protected char [ ] typeQualification ; protected char [ ] typeSimpleName ; protected boolean readAccess = true ; protected boolean writeAccess = true ; protected char [ ] decodedName ; private static char [ ] [ ] REF_TAGS = new char [ ] [ ] { FIELD_REF , REF } ; private static char [ ] [ ] REF_AND_DECL_TAGS = new char [ ] [ ] { FIELD_REF , REF , FIELD_DECL } ; public FieldReferencePattern ( char [ ] name , int matchMode , boolean isCaseSensitive , char [ ] declaringQualification , char [ ] declaringSimpleName , char [ ] typeQualification , char [ ] typeSimpleName , boolean readAccess , boolean writeAccess ) { } public void decodeIndexEntry ( IEntryResult entryResult ) { } public void feedIndexRequestor ( IIndexSearchRequestor requestor , int detailLevel , int [ ] references , IndexInput input , IJavaSearchScope scope ) throws IOException { } protected char [ ] [ ] getPossibleTags ( ) { } protected boolean hasNextQuery ( ) { } public char [ ] indexEntryPrefix ( ) { } protected void matchCheck ( AstNode node , MatchingNodeSet set ) { } protected int matchContainer ( ) { } protected boolean matchIndexEntry ( ) { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void resetQuery ( ) { } public String toString ( ) { } public int matchLevel ( AstNode node , boolean resolve ) { } private int matchLevel ( FieldReference fieldRef , boolean resolve ) { } private int matchLevel ( FieldDeclaration fieldDecl , boolean resolve ) { } private int matchLevel ( NameReference nameRef , boolean resolve ) { } private int matchLevel ( FieldBinding binding ) { if ( binding == null ) return INACCURATE_MATCH ; int level ; ReferenceBinding receiverBinding = binding . declaringClass ; if ( receiverBinding == null ) { <START_BUG> if ( binding == ( LengthField ) ) { <END_BUG> if ( ( ( this . declaringQualification ) == null ) && ( ( this . declaringSimpleName ) == null ) ) { return ACCURATE_MATCH ; } else { return IMPOSSIBLE_MATCH ; } } else { return INACCURATE_MATCH ; } } else { level = this . matchLevelForType ( this . declaringSimpleName , this . declaringQualification , receiverBinding ) ; if ( level == ( IMPOSSIBLE_MATCH ) ) { return IMPOSSIBLE_MATCH ; } } if ( ( this . declaringSimpleName ) == null ) { int newLevel = this . matchLevelForType ( this . typeSimpleName , this . typeQualification , binding . type ) ; switch ( newLevel ) { case IMPOSSIBLE_MATCH : return IMPOSSIBLE_MATCH ; case ACCURATE_MATCH : break ; default : level = newLevel ; break ; } } return level ; } }

Fix:
if ( binding == ( ArrayBinding . ArrayLength ) ) {
Buggy code:
public class WebPostagePage extends StampsWebPage { TestHelper testHelper = TestHelper . getInstance ( ) ; public WebPostagePage ( WebDriver driver ) { } public PostageBalanceDropDownModule clickBalanceDropDownMenu ( ) { } public PrintPostageModule getPrintPostageModule ( ) { } public void printSignedInUsername ( ) { } public String getSignedInUsername ( ) { <START_BUG> return new com . stamps . print . postage . elements . labels . startinglabels . SignedInUserSpan ( driver ) . getText ( ) ; <END_BUG> } public void signIn ( String user , String pw ) { } public void signOut ( ) { } public double getBalance ( boolean verbose ) { } public double getBalanceExpectingNewValue ( double oldBalance ) { } public boolean isSignedIn ( ) { } public void ensureUserIsSignedIn ( ) { } public void failIfSignedOut ( ) { } }

Fix:
return new com . stamps . print . postage . elements . labels . startinglabels . SignedInUserSpan ( driver ) . waitThenGetText ( ) ;
Buggy code:
public class EntityBeanSynchronizationInterceptor extends AbstractEJBInterceptor { private final Object threadLock = new Object ( ) ; private final OwnableReentrantLock lock = new OwnableReentrantLock ( ) ; @ Override public Object processInvocation ( InterceptorContext context ) throws Exception { } private void releaseInstance ( final EntityBeanComponentInstance instance , final boolean success ) { } private void releaseLock ( ) { } private class EntityBeanSynchronization implements Synchronization { private final EntityBeanComponentInstance componentInstance ; private final Object lockOwner ; EntityBeanSynchronization ( EntityBeanComponentInstance componentInstance , final Object lockOwner ) { } @ Override public void beforeCompletion ( ) { synchronized ( threadLock ) { try { <START_BUG> if ( ! ( componentInstance . isRemoved ( ) ) ) { <END_BUG> componentInstance . store ( ) ; } } catch ( Throwable t ) { lock . pushOwner ( lockOwner ) ; try { handleThrowableInTxSync ( componentInstance , t ) ; } finally { lock . popOwner ( ) ; } } } } @ Override public void afterCompletion ( int status ) { } private Error handleThrowableInTxSync ( final EntityBeanComponentInstance instance , final Throwable t ) { } } public static final InterceptorFactory FACTORY = new ComponentInstanceInterceptorFactory ( ) { @ Override protected Interceptor create ( final Component component , final InterceptorFactoryContext context ) { } } ; private Object getLockOwner ( final TransactionSynchronizationRegistry transactionSynchronizationRegistry ) { } }

Fix:
if ( ( ! ( componentInstance . isRemoved ( ) ) ) && ( ! ( componentInstance . isDiscarded ( ) ) ) ) {
Buggy code:
@ Singleton public class IdentityProviderUtils { private static final Logger LOGGER = LoggerFactory . getLogger ( IdentityProviderUtils . class ) ; public JsonElement executeGet ( final HttpTransport transport , final Credential . AccessMethod accessMethod , final String accessToken , final String endpoint , final String providerName ) { IdentityProviderUtils . LOGGER . debug ( "executeGet:<seq2seq4repair_space>endpoint<seq2seq4repair_space>{},<seq2seq4repair_space>providerName<seq2seq4repair_space>{}" , endpoint , providerName ) ; try { final GenericUrl url = new GenericUrl ( endpoint ) ; final HttpRequestFactory requestFactory = ( StringUtils . isNotBlank ( accessToken ) ) ? transport . createRequestFactory ( new Credential ( accessMethod ) . setAccessToken ( accessToken ) ) : transport . createRequestFactory ( ) ; final String response = requestFactory . buildGetRequest ( url ) . execute ( ) . parseAsString ( ) ; JsonElement jsonElement = new JsonParser ( ) . parse ( response ) ; IdentityProviderUtils . LOGGER . debug ( "executeGet<seq2seq4repair_space>response:<seq2seq4repair_space>{}" , jsonElement ) ; try { final JsonElement error = jsonElement . getAsJsonObject ( ) . get ( "error" ) ; if ( error != null ) { IdentityProviderUtils . LOGGER . error ( "Exception<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>caught<seq2seq4repair_space>during<seq2seq4repair_space>Identity<seq2seq4repair_space>Provider<seq2seq4repair_space>GET<seq2seq4repair_space>request<seq2seq4repair_space>execution" , error ) ; throw new com . devicehive . exceptions . HiveException ( String . format ( OAUTH_ACCESS_TOKEN_VERIFICATION_FAILED , providerName , error ) , FORBIDDEN . getStatusCode ( ) ) ; } } catch ( IllegalStateException ex ) { return jsonElement ; } return jsonElement ; } catch ( IOException e ) { IdentityProviderUtils . LOGGER . error ( "Exception<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>caught<seq2seq4repair_space>during<seq2seq4repair_space>Identity<seq2seq4repair_space>Provider<seq2seq4repair_space>GET<seq2seq4repair_space>request<seq2seq4repair_space>execution" , e ) ; <START_BUG> throw new com . devicehive . exceptions . HiveException ( Messages . IDENTITY_PROVIDER_API_REQUEST_ERROR , SERVICE_UNAVAILABLE . getStatusCode ( ) ) ; <END_BUG> } } public String executeGet ( final HttpTransport transport , final List < NameValuePair > params , final String endpoint , final String providerName ) { } public String executePost ( final HttpTransport transport , final Map < String , String > params , final String endpoint , final String providerName ) { } }

Fix:
throw new com . devicehive . exceptions . HiveException ( Messages . IDENTITY_PROVIDER_API_REQUEST_ERROR , UNAUTHORIZED . getStatusCode ( ) ) ;
Buggy code:
public class StressAsyncAppender extends Thread { static Category root = Category . getRoot ( ) ; static Random random = new Random ( 101 ) ; static final int LOOP_LENGTH = 24 ; static final int BRANCHING_FACTOR = 4 ; static int maxThreads ; static long msgCounter = 0 ; static int threadCounter = 0 ; static double LOG_2 = Math . log ( 2 ) ; static Object lock = new Object ( ) ; public static void main ( String [ ] args ) { } static void usage ( ) { } public StressAsyncAppender ( ) { } public void run ( ) { } public static void createChildren ( int n ) { } public static int maxThreadsConstrained ( int a ) { } public static int randomInt ( int n ) { } public void delay ( long millis ) { try { <START_BUG> Thread . currentThread ( ) . sleep ( millis ) ; <END_BUG> } catch ( Exception e ) { } } }

Fix:
Thread . sleep ( millis ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { } private static void splitUpDataset ( List < Interaction > interactions , List < Interaction > trainingSet , List < Interaction > testingSet , double trainingRatio , double testingRatio ) { } private static void writeInteractionsToFile ( List < Interaction > interactions , Map < String , FeatureVector > proteins , String fileName ) throws IOException { <START_BUG> BufferedWriter out = new BufferedWriter ( new FileWriter ( "out.txt" ) ) ; <END_BUG> for ( Interaction interaction : interactions ) { out . write ( interaction . toString ( proteins ) ) ; out . write ( "\n" ) ; } } }

Fix:
BufferedWriter out = new BufferedWriter ( new FileWriter ( fileName ) ) ;
Buggy code:
public final class Tuple { private int __read = 0 ; public final int __getRead ( ) { } private final Object [ ] elements ; public Tuple ( Object [ ] elements ) { } public final Object get ( int index ) { } public final int getArity ( ) { } @ Override public boolean equals ( Object that ) { } private int _hash = 0 ; @ Override public final int hashCode ( ) { if ( ( _hash ) != 0 ) return _hash ; <START_BUG> int seed = new String ( ( "Tuple" + ( getArity ( ) ) ) ) . hashCode ( ) ; <END_BUG> int h = LeonCodeGenRuntimeHashing . seqHash ( elements , seed ) ; _hash = h ; return h ; } }

Fix:
int seed = ( "Tuple" + ( getArity ( ) ) ) . hashCode ( ) ;
Buggy code:
public final class CharsRef implements CharSequence , Cloneable , Comparable < CharsRef > { public static final char [ ] EMPTY_CHARS = new char [ 0 ] ; public char [ ] chars ; public int offset ; public int length ; public CharsRef ( ) { } public CharsRef ( int capacity ) { } public CharsRef ( char [ ] chars , int offset , int length ) { } public CharsRef ( String string ) { } @ Override public CharsRef clone ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object other ) { } public boolean charsEquals ( CharsRef other ) { } @ Override public int compareTo ( CharsRef other ) { } public void copyChars ( CharsRef other ) { } public void grow ( int newLength ) { } public void copyChars ( char [ ] otherChars , int otherOffset , int otherLength ) { } public void append ( char [ ] otherChars , int otherOffset , int otherLength ) { } @ Override public String toString ( ) { } @ Override public int length ( ) { } @ Override public char charAt ( int index ) { } @ Override public CharSequence subSequence ( int start , int end ) { if ( ( ( start < 0 ) || ( end > ( length ) ) ) || ( start > end ) ) { throw new IndexOutOfBoundsException ( ) ; } <START_BUG> return new CharsRef ( chars , ( ( offset ) + start ) , ( ( offset ) + end ) ) ; <END_BUG> } @ Deprecated private static final Comparator < CharsRef > utf16SortedAsUTF8SortOrder = new CharsRef . UTF16SortedAsUTF8Comparator ( ) ; @ Deprecated public static Comparator < CharsRef > getUTF16SortedAsUTF8Comparator ( ) { } @ Deprecated private static class UTF16SortedAsUTF8Comparator implements Comparator < CharsRef > { private UTF16SortedAsUTF8Comparator ( ) { } @ Override public int compare ( CharsRef a , CharsRef b ) { } } public static CharsRef deepCopyOf ( CharsRef other ) { } }

Fix:
return new CharsRef ( chars , ( ( offset ) + start ) , ( end - start ) ) ;
Buggy code:
public class PiApproximationDemo extends Demo { private static final int DEFAULT_NUM_POINTS = 50000000 ; private int numPoints ; public static void main ( String ... args ) throws Exception { } public PiApproximationDemo ( String [ ] args ) throws Exception { } public void run ( ) throws Exception { } private static class CircleTest implements Serializable , Callable < Integer > { private static final long serialVersionUID = 3496135215525904755L ; private final int loopCount ; public CircleTest ( int loopCount ) { } @ Override public Integer call ( ) throws Exception { } private boolean insideCircle ( double x , double y ) { } } @ Override protected SimpleJSAP buildCommandLineOptions ( ) throws JSAPException { <START_BUG> return new SimpleJSAP ( "PiApproximationDemo" , "Approximate<seq2seq4repair_space>Pi<seq2seq4repair_space>using<seq2seq4repair_space>Infinispan<seq2seq4repair_space>DistributedExecutorService<seq2seq4repair_space>" , new Parameter [ ] { new FlaggedOption ( "configFile" , JSAP . STRING_PARSER , "config-samples//distributed-udp.xml" , JSAP . NOT_REQUIRED , 'c' , "configFile" , "Infinispan<seq2seq4repair_space>config<seq2seq4repair_space>file" ) , new FlaggedOption ( "nodeType" , JSAP . STRING_PARSER , "slave" , JSAP . REQUIRED , 't' , "nodeType" , "Node<seq2seq4repair_space>type<seq2seq4repair_space>as<seq2seq4repair_space>either<seq2seq4repair_space>master<seq2seq4repair_space>or<seq2seq4repair_space>slave" ) , new FlaggedOption ( "numPoints" , JSAP . INTEGER_PARSER , String . valueOf ( PiApproximationDemo . DEFAULT_NUM_POINTS ) , JSAP . REQUIRED , 'n' , "numPoints" , "Total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>darts<seq2seq4repair_space>to<seq2seq4repair_space>shoot" ) } ) ; <END_BUG> } }

Fix:
return new SimpleJSAP ( "PiApproximationDemo" , "Approximate<seq2seq4repair_space>Pi<seq2seq4repair_space>using<seq2seq4repair_space>Infinispan<seq2seq4repair_space>DistributedExecutorService<seq2seq4repair_space>" , new Parameter [ ] { new FlaggedOption ( "configFile" , JSAP . STRING_PARSER , "configs//config-samples//distributed-udp.xml" , JSAP . NOT_REQUIRED , 'c' , "configFile" , "Infinispan<seq2seq4repair_space>config<seq2seq4repair_space>file" ) , new FlaggedOption ( "nodeType" , JSAP . STRING_PARSER , "slave" , JSAP . REQUIRED , 't' , "nodeType" , "Node<seq2seq4repair_space>type<seq2seq4repair_space>as<seq2seq4repair_space>either<seq2seq4repair_space>master<seq2seq4repair_space>or<seq2seq4repair_space>slave" ) , new FlaggedOption ( "numPoints" , JSAP . INTEGER_PARSER , String . valueOf ( PiApproximationDemo . DEFAULT_NUM_POINTS ) , JSAP . REQUIRED , 'n' , "numPoints" , "Total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>darts<seq2seq4repair_space>to<seq2seq4repair_space>shoot" ) } ) ;
Buggy code:
public class Query extends org . tigris . scarab . om . BaseQuery implements Persistent { public static Query getInstance ( ) { } public String getExecuteLink ( String link ) { <START_BUG> return ( link + "//template//IssueList.vm?action=Search&eventSubmit_doSearch=Search" ) + ( getValue ( ) ) ; <END_BUG> } public String getEditLink ( String link ) { } public Vector getAllQueryTypes ( ) throws Exception { } }

Fix:
return ( ( link + "//template//IssueList.vm?action=Search&eventSubmit_doSearch=Search" ) + "&resultsperpage=25&pagenum=1" ) + ( getValue ( ) ) ;
Buggy code:
public class LinkedTrajectory extends AbstractTrajectory { private List < Trajectory > trajectories = new ArrayList < Trajectory > ( ) ; public LinkedTrajectory ( Trajectory trajectory ) { } public void append ( Trajectory trajectory ) { if ( trajectory == null ) { throw new IllegalArgumentException ( "The<seq2seq4repair_space>parameter<seq2seq4repair_space>[trajectory]<seq2seq4repair_space>is<seq2seq4repair_space>NULL." ) ; } <START_BUG> if ( ( trajectory . getFirstPoint ( ) . getTime ( ) ) < ( trajectories . get ( trajectories . size ( ) ) . getLastPoint ( ) . getTime ( ) ) ) { <END_BUG> throw new IllegalArgumentException ( "The<seq2seq4repair_space>time<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>first<seq2seq4repair_space>point<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>trajectory<seq2seq4repair_space>is<seq2seq4repair_space>lower<seq2seq4repair_space>than<seq2seq4repair_space>the<seq2seq4repair_space>time<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>last<seq2seq4repair_space>point<seq2seq4repair_space>of<seq2seq4repair_space>original<seq2seq4repair_space>trajectory." ) ; } setLength ( ( ( getLength ( ) ) + ( trajectory . getLength ( ) ) ) ) ; trajectories . add ( trajectory ) ; trajectory . getReference ( ) . setTrajectory ( this ) ; } @ Override public Point getFirstPoint ( ) { } @ Override public Point getLastPoint ( ) { } @ Override public Point getPoint ( int index ) { } @ Override public Iterator < Point > iterator ( ) { } @ Override public Iterator < Point > iterator ( int index ) { } private class LinkedTrajectoryIterator implements Iterator < Point > { private LinkedTrajectory trajectory ; private int trajectoryIndex = 0 ; private Iterator < Point > iterator ; public LinkedTrajectoryIterator ( LinkedTrajectory trajectory , int index ) { } @ Override public boolean hasNext ( ) { } @ Override public Point next ( ) { } @ Override public void remove ( ) { } } }

Fix:
if ( ( trajectory . getFirstPoint ( ) . getTime ( ) ) < ( trajectories . get ( ( ( trajectories . size ( ) ) - 1 ) ) . getLastPoint ( ) . getTime ( ) ) ) {
Buggy code:
public class MarshallingView extends AbstractView { public static final String DEFAULT_CONTENT_TYPE = "application//xml" ; private Marshaller marshaller ; private String modelKey ; public MarshallingView ( ) { } public MarshallingView ( Marshaller marshaller ) { } public void setMarshaller ( Marshaller marshaller ) { } public void setModelKey ( String modelKey ) { } @ Override protected void initApplicationContext ( ) throws BeansException { } @ Override protected void renderMergedOutputModel ( Map < String , Object > model , HttpServletRequest request , HttpServletResponse response ) throws Exception { Object toBeMarshalled = locateToBeMarshalled ( model ) ; if ( toBeMarshalled == null ) { throw new ServletException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>locate<seq2seq4repair_space>object<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>marshalled<seq2seq4repair_space>in<seq2seq4repair_space>model:<seq2seq4repair_space>" + model ) ) ; } ByteArrayOutputStream bos = new ByteArrayOutputStream ( 2048 ) ; marshaller . marshal ( toBeMarshalled , new StreamResult ( bos ) ) ; <START_BUG> response . setContentType ( getContentType ( ) ) ; <END_BUG> response . setContentLength ( bos . size ( ) ) ; FileCopyUtils . copy ( bos . toByteArray ( ) , response . getOutputStream ( ) ) ; } protected Object locateToBeMarshalled ( Map < String , Object > model ) throws ServletException { } }

Fix:
setResponseContentType ( request , response ) ;
Buggy code:
public class GameAdapter extends RecyclerView . Adapter < GameAdapter . GameViewHolder > { private List < Game > gameList ; private LayoutInflater mLayoutInflater ; public GameAdapter ( List < Game > gameList ) { } @ Override public int getItemCount ( ) { } @ Override public void onBindViewHolder ( GameAdapter . GameViewHolder holder , final int i ) { Game data = gameList . get ( i ) ; holder . datum . setText ( data . getDate ( ) ) ; holder . ort . setText ( "" ) ; holder . team1 . setText ( data . getHometeam_name ( ) ) ; holder . team2 . setText ( data . getAwayteam_name ( ) ) ; if ( data . isPlayed ( ) ) { <START_BUG> holder . gameresult . setText ( ( ( ( data . getHometeam_name ( ) ) + ":" ) + ( data . getGoalsaway ( ) ) ) ) ; <END_BUG> } else { holder . gameresult . setText ( "--:--" ) ; } } @ Override public GameAdapter . GameViewHolder onCreateViewHolder ( ViewGroup viewGroup , int i ) { } public class GameViewHolder extends RecyclerView . ViewHolder { protected TextView team1 ; protected TextView team2 ; protected TextView datum ; protected TextView ort ; protected TextView gameresult ; public GameViewHolder ( View v ) { } } No newline ; at end ; of file ; }

Fix:
holder . gameresult . setText ( ( ( ( data . getGoalshome ( ) ) + ":" ) + ( data . getGoalsaway ( ) ) ) ) ;
Buggy code:
public class OpenPtkGUI extends AbstractHandler { public OpenPtkGUI ( ) { } public Object execute ( ExecutionEvent event ) throws ExecutionException { AskProjectName pNameWindow = new AskProjectName ( ) ; Project project = new Project ( pNameWindow . open ( ) ) ; <START_BUG> GuiView view = new GuiView ( ) ; <END_BUG> GuiController controller = new GuiController ( project , view ) ; controller . initialize ( ) ; project . printState ( ) ; return null ; } }

Fix:
GuiView view = new GuiView ( project . getName ( ) ) ;
Buggy code:
public class ServerAndClientTimeFilter implements IResponseFilter { private static final Logger log = LoggerFactory . getLogger ( ServerAndClientTimeFilter . class ) ; public AppendingStringBuffer filter ( AppendingStringBuffer responseBuffer ) { int headIndex = responseBuffer . indexOf ( "<head>" ) ; int bodyIndex = responseBuffer . indexOf ( "<//body>" ) ; long timeTaken = ( System . currentTimeMillis ( ) ) - ( RequestCycle . get ( ) . getStartTime ( ) ) ; if ( ( headIndex != ( - 1 ) ) && ( bodyIndex != ( - 1 ) ) ) { Map < String , String > map = new HashMap < String , String > ( 4 ) ; map . put ( "clienttime" , "'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ) ; map . put ( "servertime" , ( ( ( ( double ) ( timeTaken ) ) // 1000 ) + "s" ) ) ; AppendingStringBuffer defaultValue = new AppendingStringBuffer ( 128 ) ; defaultValue . append ( "Server<seq2seq4repair_space>parsetime:<seq2seq4repair_space>" ) ; defaultValue . append ( ( ( ( double ) ( timeTaken ) ) // 1000 ) ) ; defaultValue . append ( "s,<seq2seq4repair_space>Client<seq2seq4repair_space>parsetime:<seq2seq4repair_space>'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ) ; <START_BUG> String txt = Application . get ( ) . getResourceSettings ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . valueOf ( map ) , defaultValue . toString ( ) ) ; <END_BUG> AppendingStringBuffer endScript = new AppendingStringBuffer ( 150 ) ; endScript . append ( "\n" ) . append ( SCRIPT_OPEN_TAG ) ; endScript . append ( "\nwindow.defaultStatus=\'" ) ; endScript . append ( txt ) ; endScript . append ( "\';\n" ) . append ( SCRIPT_CLOSE_TAG ) . append ( "\n" ) ; responseBuffer . insert ( ( bodyIndex - 1 ) , endScript ) ; responseBuffer . insert ( ( headIndex + 6 ) , ( ( ( ( "\n" + ( JavascriptUtils . SCRIPT_OPEN_TAG ) ) + "\nvar<seq2seq4repair_space>clientTimeVariable<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Date().getTime();\n" ) + ( JavascriptUtils . SCRIPT_CLOSE_TAG ) ) + "\n" ) ) ; } ServerAndClientTimeFilter . log . info ( ( ( ( ( timeTaken + "ms<seq2seq4repair_space>server<seq2seq4repair_space>time<seq2seq4repair_space>taken<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" ) + ( RequestCycle . get ( ) . getRequest ( ) . getURL ( ) ) ) + "<seq2seq4repair_space>response<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( responseBuffer . length ( ) ) ) ) ; return responseBuffer ; } }

Fix:
String txt = Application . get ( ) . getResourceSettings ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . of ( map ) , defaultValue . toString ( ) ) ;
Buggy code:
public class TransformedBag < E > extends TransformedCollection < E > implements Bag < E > { private static final long serialVersionUID = 5421170911299074185L ; public static < E > Bag < E > transformingBag ( final Bag < E > bag , final Transformer < ? super E , ? extends E > transformer ) { } public static < E > Bag < E > transformedBag ( final Bag < E > bag , final Transformer < ? super E , ? extends E > transformer ) { } protected TransformedBag ( final Bag < E > bag , final Transformer < ? super E , ? extends E > transformer ) { } protected Bag < E > getBag ( ) { <START_BUG> return ( ( Bag < E > ) ( collection ) ) ; <END_BUG> } public int getCount ( final Object object ) { } public boolean remove ( final Object object , final int nCopies ) { } public boolean add ( final E object , final int nCopies ) { } public Set < E > uniqueSet ( ) { } }

Fix:
return ( ( Bag < E > ) ( TransformedBag . decorated ( ) ) ) ;
Buggy code:
public class WebResponse extends Response { private static final Log log = LogFactory . getLog ( WebResponse . class ) ; protected boolean redirect ; private final HttpServletResponse httpServletResponse ; public WebResponse ( ) { } public WebResponse ( final HttpServletResponse httpServletResponse ) { } public void addCookie ( final Cookie cookie ) { } public void close ( ) { } public CharSequence encodeURL ( CharSequence url ) { } public final HttpServletResponse getHttpServletResponse ( ) { } public OutputStream getOutputStream ( ) { } public final boolean isRedirect ( ) { } public void redirect ( final String url ) { } public final void setContentType ( final String mimeType ) { } public void setContentLength ( long length ) { } public void setLastModifiedTime ( Time time ) { } public final void setLocale ( final Locale locale ) { } public void write ( final CharSequence string ) { } public void write ( AppendingStringBuffer asb ) { } public void setDateHeader ( String header , long date ) { } public void setHeader ( String header , String value ) { } public void setAttachmentHeader ( String filename ) { <START_BUG> setHeader ( "Content-Disposition" , ( "attachment" + ( ! ( Strings . isEmpty ( filename ) ) ? ";<seq2seq4repair_space>filename=" + filename : "" ) ) ) ; <END_BUG> } }

Fix:
setHeader ( "Content-Disposition" , ( "attachment" + ( ! ( Strings . isEmpty ( filename ) ) ? ( ";<seq2seq4repair_space>filename=\"" + filename ) + "\"" : "" ) ) ) ;
Buggy code:
public class ExpandableNodeExpandTask implements Task { private CyNetworkView networkView ; private CyNode nodeToExpand ; public ExpandableNodeExpandTask ( CyNode node , CyNetworkView networkView ) { } @ Override public void cancel ( ) { } @ Override public void run ( TaskMonitor arg0 ) throws Exception { CyNetwork underlyingNetwork = networkView . getModel ( ) ; OntologyNetwork ontologyNetwork = MyApplicationCenter . getCorrespondingOntologyNetwork ( underlyingNetwork ) ; ExpandableNode expandableNode = ontologyNetwork . getCorrespondingNode ( nodeToExpand ) ; expandableNode . expand ( ) ; <START_BUG> ViewOperationUtils . updateOntologyNetworkView ( ontologyNetwork . getAllNodes ( ) , networkView , true ) ; <END_BUG> } }

Fix:
ViewOperationUtils . showSubTree ( expandableNode , networkView ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; ImageList imageList ; static final int TabFolderProc ; static final TCHAR TabFolderClass = new TCHAR ( 0 , OS . WC_TABCONTROL , true ) ; static final char [ ] TAB = new char [ ] { 'T' , 'A' , 'B' , 0 } ; static final int ID_UPDOWN = 1 ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createItem ( TabItem item , int index ) { } void createHandle ( ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } void drawThemeBackground ( int hDC , int hwnd , RECT rect ) { } Control findThemeControl ( ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } int imageIndex ( Image image ) { } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void releaseChildren ( boolean destroy ) { if ( ( items ) != null ) { int count = OS . SendMessage ( handle , TCM_GETITEMCOUNT , 0 , 0 ) ; for ( int i = 0 ; i < count ; i ++ ) { TabItem item = items [ i ] ; if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) { <START_BUG> item . releaseChildren ( false ) ; <END_BUG> } } items = null ; } super . releaseChildren ( destroy ) ; } void releaseWidget ( ) { } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setSelection ( TabItem [ ] items ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } String toolTipText ( NMTTDISPINFO hdr ) { } boolean traversePage ( boolean next ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_NCHITTEST ( int wParam , int lParam ) { } LRESULT WM_NOTIFY ( int wParam , int lParam ) { } LRESULT WM_PARENTNOTIFY ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { } }

Fix:
item . release ( false ) ;
Buggy code:
public class StatusRenderer extends DefaultLabelRenderer { boolean bool ; ImageIcon image1 ; ImageIcon image2 ; ImageIcon image4 ; ImageIcon image3 ; ImageIcon image5 ; ImageIcon image6 ; public StatusRenderer ( ) { } public Component getTableCellRendererComponent ( JTable table , Object value , boolean isSelected , boolean hasFocus , int row , int column ) { super . getTableCellRendererComponent ( table , value , isSelected , hasFocus , row , column ) ; if ( value == null ) { setIcon ( null ) ; return this ; } if ( value instanceof String ) { System . out . println ( "statusrenderer-><seq2seq4repair_space>instanceof<seq2seq4repair_space>String<seq2seq4repair_space>not<seq2seq4repair_space>expected" ) ; return this ; } Flags flags = ( ( org . columba . mail . message . ColumbaHeader ) ( ( ( org . columba . mail . gui . table . model . MessageNode ) ( value ) ) . getHeader ( ) ) ) . getFlags ( ) ; <START_BUG> if ( flags . getDeleted ( ) ) { <END_BUG> setIcon ( image3 ) ; } else if ( flags . getAnswered ( ) ) { setIcon ( image1 ) ; } else if ( ! ( flags . getSeen ( ) ) ) { setIcon ( image6 ) ; } else if ( flags . getSeen ( ) ) { setIcon ( image5 ) ; } else { setIcon ( null ) ; } return this ; } }

Fix:
if ( flags . getExpunged ( ) ) {
Buggy code:
public class TestSpansAdvanced extends LuceneTestCase { protected Directory mDirectory ; protected IndexSearcher searcher ; private static final String FIELD_ID = "ID" ; protected static final String FIELD_TEXT = "TEXT" ; @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; super . setUp ( ) ; mDirectory = new RAMDirectory ( ) ; <START_BUG> final IndexWriter writer = new IndexWriter ( mDirectory , new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) , true , MaxFieldLength . LIMITED ) ; <END_BUG> addDocument ( writer , "1" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "2" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "3" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "4" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; writer . close ( ) ; searcher = new IndexSearcher ( mDirectory , true ) ; } @ Override protected void tearDown ( ) throws Exception { } protected void addDocument ( final IndexWriter writer , final String id , final String text ) throws IOException { } public void testBooleanQueryWithSpanQueries ( ) throws IOException { } protected void doTestBooleanQueryWithSpanQueries ( IndexSearcher s , final float expectedScore ) throws IOException { } protected static void assertHits ( Searcher s , Query query , final String description , final String [ ] expectedIds , final float [ ] expectedScores ) throws IOException { } }

Fix:
final IndexWriter writer = new IndexWriter ( mDirectory , new org . apache . lucene . analysis . standard . StandardAnalyzer ( TEST_VERSION_CURRENT ) , true , MaxFieldLength . LIMITED ) ;
Buggy code:
public class DataSourceInitializer implements InitializingBean { private DataSource dataSource ; private DatabasePopulator databasePopulator ; private boolean enabled = true ; public void setDataSource ( DataSource dataSource ) { } public void setDatabasePopulator ( DatabasePopulator databasePopulator ) { } public void setEnabled ( boolean enabled ) { } public void afterPropertiesSet ( ) throws Exception { if ( this . enabled ) { Assert . state ( ( ( this . dataSource ) != null ) , "DataSource<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided" ) ; Assert . state ( ( ( this . databasePopulator ) != null ) , "DatabasePopulator<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided" ) ; try { Connection connection = this . dataSource . getConnection ( ) ; try { this . databasePopulator . populate ( connection ) ; } finally { try { connection . close ( ) ; } catch ( SQLException ex ) { } } <START_BUG> } catch ( SQLException ex ) { <END_BUG> throw new DataAccessResourceFailureException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>populate<seq2seq4repair_space>database" , ex ) ; } } } }

Fix:
} catch ( Exception ex ) {
Buggy code:
public class URLCodecTest { static final int [ ] SWISS_GERMAN_STUFF_UNICODE = new int [ ] { 71 , 114 , 252 , 101 , 122 , 105 , 95 , 122 , 228 , 109 , 228 } ; static final int [ ] RUSSIAN_STUFF_UNICODE = new int [ ] { 1042 , 1089 , 1077 , 1084 , 95 , 1087 , 1088 , 1080 , 1074 , 1077 , 1090 } ; private void validateState ( URLCodec urlCodec ) { } private String constructString ( int [ ] unicodeChars ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> if ( unicodeChars != null ) { for ( int unicodeChar : unicodeChars ) { buffer . append ( ( ( char ) ( unicodeChar ) ) ) ; } } return buffer . toString ( ) ; } @ Test public void testUTF8RoundTrip ( ) throws Exception { } @ Test public void testBasicEncodeDecode ( ) throws Exception { } @ Test public void testSafeCharEncodeDecode ( ) throws Exception { } @ Test public void testUnsafeEncodeDecode ( ) throws Exception { } @ Test public void testEncodeDecodeNull ( ) throws Exception { } @ Test public void testDecodeInvalid ( ) throws Exception { } @ Test public void testDecodeInvalidContent ( ) throws UnsupportedEncodingException , DecoderException { } @ Test public void testEncodeNull ( ) throws Exception { } @ Test public void testEncodeUrlWithNullBitSet ( ) throws Exception { } @ Test public void testDecodeWithNullArray ( ) throws Exception { } @ Test public void testEncodeStringWithNull ( ) throws Exception { } @ Test public void testDecodeStringWithNull ( ) throws Exception { } @ Test public void testEncodeObjects ( ) throws Exception { } @ Test public void testInvalidEncoding ( ) { } @ Test public void testDecodeObjects ( ) throws Exception { } @ Test public void testDefaultEncoding ( ) throws Exception { } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class OnewayNoCheckedExceptionsRuleTest extends AbstractOnewayValidationTest { @ Override protected String getClassContents ( ) { } @ Override public String getErrorMessage ( ) { <START_BUG> return JAXWSCoreMessages . ONEWAY_NO_CHECKED_EXCEPTIONS_ERROR_MESSAGE ; <END_BUG> } @ Override public IMethod getMethodToTest ( ) { } }

Fix:
return JAXWSCoreMessages . ONEWAY_NO_CHECKED_EXCEPTIONS ;
Buggy code:
public abstract class BrokerParentConnector extends Thread implements BrokerConnector { private static final Logger logger = LoggerFactory . getLogger ( BrokerParentConnector . class ) ; protected String clientId ; protected boolean alive ; protected List < ConnectionCallback > connectionCallbacks = new ArrayList < ConnectionCallback > ( ) ; protected List < SubscriberListener > subscribeListeners = new ArrayList < SubscriberListener > ( ) ; protected String username ; protected String passwd ; private boolean anonymous = true ; protected MqttCallback mqttCallback ; public BrokerParentConnector ( String threadName , String clientId ) { } public BrokerParentConnector ( String threadName , String username , String passwd , String clientId ) { } protected MqttConnectOptions getOption ( ) { } public void setAnonymous ( boolean anonymous ) { } public boolean isAnonymous ( ) { } public boolean isAuth ( ) { <START_BUG> return ( ( username ) != null ) && ( ( passwd ) != null ) ; <END_BUG> } protected void onFailure ( Throwable e ) { } protected void onConnectionSuccess ( ) { } public void setMqttCallback ( MqttCallback callback ) { } public void addConnectionCallback ( ConnectionCallback connectionCallback ) { } public void addSubscribListener ( SubscriberListener subscriberListener ) { } protected boolean isRunning ( ) { } public String getClientId ( ) { } protected void logConnecting ( MqttClient client ) { } protected void logConnected ( MqttClient client ) { } protected void logConnectionFailed ( MqttClient client , Throwable e ) { } }

Fix:
return ! ( anonymous ) ;
Buggy code:
public class GroupHelper { private static final Logger LOG = getLogger ( GroupHelper . class ) ; private GroupHelper ( ) { } public static PHGroup getOrCreateGroup ( GroupItem groupItem , PHBridge bridge , List < DeviceItem > deviceItems ) { List < PHGroup > groups = bridge . getResourceCache ( ) . getAllGroups ( ) ; Set < String > deviceIds = deviceItems . stream ( ) . map ( DeviceItem :: getDeviceId ) . collect ( Collectors . toSet ( ) ) ; <START_BUG> Optional < PHGroup > existingGroup = groups . stream ( ) . filter ( ( g ) -> deviceIds . containsAll ( new HashSet < > ( g . getLightIdentifiers ( ) ) ) ) . findFirst ( ) ; <END_BUG> if ( existingGroup . isPresent ( ) ) { GroupHelper . LOG . debug ( "Identified<seq2seq4repair_space>an<seq2seq4repair_space>existing<seq2seq4repair_space>hue<seq2seq4repair_space>group,<seq2seq4repair_space>using<seq2seq4repair_space>this:<seq2seq4repair_space>{}" , existingGroup . get ( ) . getIdentifier ( ) ) ; return existingGroup . get ( ) ; } else { GroupHelper . BlockingGroupListener listener = new GroupHelper . BlockingGroupListener ( ) ; bridge . createGroup ( groupItem . getName ( ) , new ArrayList ( deviceIds ) , listener ) ; listener . waitForCompletion ( ) ; if ( listener . isSuccess ( ) ) { GroupHelper . LOG . debug ( "Group<seq2seq4repair_space>was<seq2seq4repair_space>succesfully<seq2seq4repair_space>created,<seq2seq4repair_space>returning" ) ; return listener . getPhGroup ( ) ; } else { throw new RuntimeHomeAutomationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Philips<seq2seq4repair_space>hue<seq2seq4repair_space>group" ) ; } } } public static class BlockingGroupListener implements PHGroupListener { private CountDownLatch latch = new CountDownLatch ( 1 ) ; private boolean success = false ; private PHGroup phGroup ; @ Override public void onCreated ( PHGroup phGroup ) { } @ Override public void onReceivingGroupDetails ( PHGroup phGroup ) { } @ Override public void onReceivingAllGroups ( List < PHBridgeResource > list ) { } @ Override public void onSuccess ( ) { } @ Override public void onError ( int i , String s ) { } @ Override public void onStateUpdate ( Map < String , String > map , List < PHHueError > list ) { } public PHGroup getPhGroup ( ) { } public void waitForCompletion ( ) { } public boolean isSuccess ( ) { } } }

Fix:
Optional < PHGroup > existingGroup = groups . stream ( ) . filter ( ( g ) -> deviceIds . equals ( new HashSet < > ( g . getLightIdentifiers ( ) ) ) ) . findFirst ( ) ;
Buggy code:
public class Home extends WicketExamplePage { public Home ( final PageParameters parameters ) { } class SelectForm extends Form { Home . SelectModel model ; Label label ; public SelectForm ( String name ) { } public void onSubmit ( ) { <START_BUG> getRequestCycle ( ) . setPage ( Home . this ) ; <END_BUG> } } class SelectModel extends AbstractModel { private Object selection ; public Object getObject ( final Component component ) { } public void setObject ( final Component component , final Object object ) { } public Object getNestedModel ( ) { } } class UserIdList extends DetachableChoiceList { public void onAttach ( ) { } protected IChoice newChoice ( final Object object , final int index ) { } } }

Fix:
getRequestCycle ( ) . setResponsePage ( Home . this ) ;
Buggy code:
public class TicTacToeGameLogic implements GameLogic { private GameState gameState ; private Player player1 ; private Player player2 ; @ Override public void runGame ( int boardWidth , int boardHeight , ArrayList < Player > players , HashSet < PrintWriter > writers ) { } @ Override public boolean invalidBoard ( GameState gs ) { } @ Override public boolean validMove ( int col , int row ) { } @ Override public boolean winnerExists ( ) { } @ Override public String makeMove ( int col , int row ) { } public boolean isGameOver ( ) { } private boolean checkColumnsForWin ( ) { for ( int i = 0 ; i < 3 ; i ++ ) { <START_BUG> if ( ( ( ( gameState . board [ 0 ] [ i ] . getValue ( ) ) == ( gameState . board [ 1 ] [ i ] . getValue ( ) ) ) && ( ( gameState . board [ 2 ] [ i ] . getValue ( ) ) == ( gameState . board [ i ] [ i ] . getValue ( ) ) ) ) && ( ( gameState . board [ 0 ] [ i ] . getValue ( ) ) != 0 ) ) { <END_BUG> return true ; } } return false ; } private boolean checkRowsForWin ( ) { } private boolean checkDiagonalsForWin ( ) { } private boolean isBoardFull ( ) { } }

Fix:
if ( ( ( ( gameState . board [ 0 ] [ i ] . getValue ( ) ) == ( gameState . board [ 1 ] [ i ] . getValue ( ) ) ) && ( ( gameState . board [ 2 ] [ i ] . getValue ( ) ) == ( gameState . board [ 1 ] [ i ] . getValue ( ) ) ) ) && ( ( gameState . board [ 0 ] [ i ] . getValue ( ) ) != 0 ) ) {
Buggy code:
public class UpdateThread implements Runnable { public static boolean updateChecking = true ; public static boolean updateDownloading = false ; public static boolean updateAvailable = false ; private static BukkitTask task ; public static void start ( ) { if ( UpdateThread . updateChecking ) { <START_BUG> UpdateThread . task = Bukkit . getScheduler ( ) . runTaskTimerAsynchronously ( Bukkit . getPluginManager ( ) . getPlugin ( "UnlimitedRecipes" ) , new UpdateThread ( ) , 0L , 864000L ) ; <END_BUG> } } public static void stop ( ) { } public static boolean checkUpdate ( ) { } @ Override public void run ( ) { } }

Fix:
UpdateThread . task = Bukkit . getScheduler ( ) . runTaskTimerAsynchronously ( instance , new UpdateThread ( ) , 0L , 864000L ) ;