nus-yam/ex-repair huggingface dataset:
Program: 154345
Project: 154345
Buggy source:
/** 
 * Receive an incoming TLSRecord
 * @param record	TLSRecord
 * @returns	Nothing
 */
public void receive(TLSRecord record) throws AlertException {
  Log.get().add(new LogEvent("String_Node_Str" + record.getContentTypeName(),Tools.byteArrayToString(record.getPlaintext())));
  if (record.getContentType() == ALERT) {
    Tools.printerr("String_Node_Str" + Tools.byteArrayToString(record.getPlaintext()));
  }
 else   if (record.getContentType() == APPLICATION) {
    if (!state.getChangeCipherSpec(state.getEntityType(true)))     throw new AlertException(AlertException.alert_fatal,AlertException.insufficient_security,"String_Node_Str");
    if (!handshake.isFinished())     throw new AlertException(AlertException.alert_fatal,AlertException.insufficient_security,"String_Node_Str");
    app.getMessage(record.getPlaintext());
  }
 else   if (record.getContentType() == HANDSHAKE) {
    handshake.receive(record.getPlaintext());
    while (handshake.hasMoreMessages()) {
      send(new TLSRecord(state,handshake.getNextMessage()));
    }
  }
 else {
    throw new AlertException(AlertException.alert_fatal,AlertException.illegal_parameter,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Receive an incoming TLSRecord
 * @param record	TLSRecord
 * @returns	Nothing
 */
public void receive(TLSRecord record) throws AlertException {
  if (record.getContentType() == ALERT) {
    Tools.printerr("String_Node_Str" + Tools.byteArrayToString(record.getPlaintext()));
    Log.get().add(new LogEvent("String_Node_Str",Tools.byteArrayToString(record.getPlaintext())));
  }
 else   if (record.getContentType() == APPLICATION) {
    Log.get().add(new LogEvent("String_Node_Str",Tools.byteArrayToString(record.getPlaintext())));
    if (!state.getChangeCipherSpec(state.getEntityType(true)))     throw new AlertException(AlertException.alert_fatal,AlertException.insufficient_security,"String_Node_Str");
    if (!handshake.isFinished())     throw new AlertException(AlertException.alert_fatal,AlertException.insufficient_security,"String_Node_Str");
    app.getMessage(record.getPlaintext());
  }
 else   if (record.getContentType() == HANDSHAKE) {
    handshake.receive(record.getPlaintext());
    while (handshake.hasMoreMessages()) {
      send(new TLSRecord(state,handshake.getNextMessage()));
    }
  }
 else {
    throw new AlertException(AlertException.alert_fatal,AlertException.illegal_parameter,"String_Node_Str");
  }
}
Program: 154347
Project: 154347
Buggy source:
private Log(){
}

Fixed version (ground truth):
private Log(){
  events=new ArrayList<LogEvent>();
}
Program: 154348
Project: 154348
Buggy source:
public static Log get(){
  if (INSTANCE == null)   INSTANCE=new Log();
  return INSTANCE;
}

Fixed version (ground truth):
public LogEvent get(int index){
  if (index < 0 || index > events.size())   return null;
  return events.get(index);
}
Program: 154350
Project: 154350
Buggy source:
public void resumeSession(State state){
  this.cipherSuite=state.getCipherSuite();
  preMasterSecret=state.getPreMasterSecret();
  isResumeSession=true;
  generateKeys();
}

Fixed version (ground truth):
public void resumeSession(State state){
  this.cipherSuite=state.getCipherSuite();
  preMasterSecret=state.getPreMasterSecret();
  isResumableSession=true;
  generateKeys();
}
Program: 154351
Project: 154351
Buggy source:
public boolean isResumeSession(){
  return isResumeSession;
}

Fixed version (ground truth):
public boolean isResumeSession(){
  return isResumableSession;
}
Program: 154352
Project: 154352
Buggy source:
public State(IPeerCommunicator peer){
  this.peer=peer;
  cipherSuite=new CipherSuite("String_Node_Str",(byte)0x0,new crypto.hash.None(),new crypto.cipher.None(),new crypto.keyexchange.None());
  compressionMethod=new crypto.compression.None();
  changeCipherSpecClient=false;
  changeCipherSpecServer=false;
  isResumeSession=false;
  handshakeLog=new LogEvent("String_Node_Str","String_Node_Str" + peer.getPeerId());
  setSessionId(new byte[TLSHandshake.SESSION_SIZE]);
}

Fixed version (ground truth):
public State(IPeerCommunicator peer){
  this.peer=peer;
  cipherSuite=new CipherSuite("String_Node_Str",(byte)0x0,new crypto.hash.None(),new crypto.cipher.None(),new crypto.keyexchange.None());
  compressionMethod=new crypto.compression.None();
  changeCipherSpecClient=false;
  changeCipherSpecServer=false;
  isResumableSession=false;
  handshakeLog=new LogEvent("String_Node_Str","String_Node_Str" + peer.getPeerId());
  setSessionId(new byte[TLSHandshake.SESSION_SIZE]);
}
Program: 154353
Project: 154353
Buggy source:
/** 
 * Verify the received finished message 
 * @param state The current connection state
 * @param messages All handshake messages
 */
public Finished(State state,ArrayList<IHandshakeMessage> messages,byte[] value){
  Tools.print(messages.size() + "String_Node_Str");
  this.state=state;
  this.messages=messages;
  try {
    calculatePRF(state.getEntityType(true).toString() + "String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (Tools.compareByteArray(prfvalue,value))   System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Verify the received finished message 
 * @param state The current connection state
 * @param messages All handshake messages
 */
public Finished(State state,ArrayList<IHandshakeMessage> messages,byte[] value){
  Tools.print(messages.size() + "String_Node_Str");
  this.state=state;
  this.messages=messages;
  try {
    calculatePRF(state.getEntityType(true).toString() + "String_Node_Str");
  }
 catch (  IOException e) {
    state.addHandshakeLog("String_Node_Str");
  }
  if (!Tools.compareByteArray(prfvalue,value))   state.addHandshakeLog("String_Node_Str");
}
Program: 154354
Project: 154354
Buggy source:
private void calculatePRF(String label) throws IOException {
  Tools.print(messages.size() + "String_Node_Str");
  ByteArrayOutputStream buf=new ByteArrayOutputStream();
  handshakeMessages=new ArrayList<String>();
  for (  IHandshakeMessage m : messages) {
    buf.write(m.getByte());
    handshakeMessages.add(m.toString());
  }
  byte[] value=new byte[buf.size()];
  value=buf.toByteArray();
  prfvalue=new byte[state.getVerifyDataLength()];
  crypto.PRF.generate(state.getMasterSecret(),label,value,prfvalue);
}

Fixed version (ground truth):
/** 
 * Calculates the PRF value of all handshake messages, the label,  and the master secret for the current connection state 
 * @param label The label to the PRF method
 */
private void calculatePRF(String label) throws IOException {
  Tools.print(messages.size() + "String_Node_Str");
  ByteArrayOutputStream buf=new ByteArrayOutputStream();
  handshakeMsgString=new ArrayList<String>();
  for (  IHandshakeMessage m : messages) {
    buf.write(m.getByte());
    handshakeMsgString.add(m.toString());
  }
  byte[] value=new byte[buf.size()];
  value=buf.toByteArray();
  prfvalue=new byte[state.getVerifyDataLength()];
  crypto.PRF.generate(state.getMasterSecret(),label,value,prfvalue);
}
Program: 154355
Project: 154355
Buggy source:
public String getStringValue(){
  StringBuilder sb=new StringBuilder();
  if (state.getEntityType() == ConnectionEnd.Client)   sb.append("String_Node_Str");
 else   sb.append("String_Node_Str");
  sb.append(LogEvent.NEWLINE + LogEvent.NEWLINE);
  sb.append("String_Node_Str" + Tools.byteArrayToString(state.getMasterSecret()));
  sb.append(LogEvent.NEWLINE + "String_Node_Str" + LogEvent.NEWLINE);
  for (  String s : handshakeMessages)   sb.append(LogEvent.INDENT + s + LogEvent.NEWLINE);
  return sb.toString();
}

Fixed version (ground truth):
public String getStringValue(){
  StringBuilder sb=new StringBuilder();
  if (state.getEntityType() == ConnectionEnd.Client)   sb.append("String_Node_Str");
 else   sb.append("String_Node_Str");
  sb.append(LogEvent.NEWLINE + LogEvent.NEWLINE);
  sb.append("String_Node_Str" + Tools.byteArrayToString(state.getMasterSecret()));
  sb.append(LogEvent.NEWLINE + "String_Node_Str" + LogEvent.NEWLINE);
  for (  String s : handshakeMsgString)   sb.append(LogEvent.INDENT + s + LogEvent.NEWLINE);
  return sb.toString();
}
Program: 154358
Project: 154358
Buggy source:
/** 
 * Given an class extending Jointed get the @Joint annotation on it.
 * @param < T > a type extending Jointed
 * @param type a class extending Jointed
 * @return the @Joint annotation on type
 */
public static synchronized <T>Joint getJoint(final Class<T> type){
  return type.getAnnotation(Joint.class);
}

Fixed version (ground truth):
/** 
 * Given an class extending get the @Joint annotation on it.
 * @param < T > a type
 * @param type a class
 * @return the @Joint annotation on type
 */
public static synchronized <T>Joint getJoint(final Class<T> type){
  return type.getAnnotation(Joint.class);
}
Program: 154359
Project: 154359
Buggy source:
/** 
 * Lookup all implementations of a class which extends T
 * @param < T > must extend Jointed
 * @param type must extend T
 * @return all implementations of type
 */
@SuppressWarnings("String_Node_Str") public static synchronized <T>Set<Class<T>> lookupJoints(final Class<T> type){
  Lookup.Template<T> template=new Lookup.Template<T>(type);
  Lookup.Result<T> result=Lookup.getDefault().lookup(template);
  Collection<? extends Item<T>> items=result.allItems();
  Set<Class<T>> joints=new HashSet<Class<T>>(items.size());
  for (  Item<T> item : items) {
    joints.add((Class<T>)item.getType());
  }
  return joints;
}

Fixed version (ground truth):
/** 
 * Lookup all implementations of a class which extends T
 * @param < T >
 * @param type must extend T
 * @return all implementations of type
 */
@SuppressWarnings("String_Node_Str") public static synchronized <T>Set<Class<T>> lookupJoints(final Class<T> type){
  Lookup.Template<T> template=new Lookup.Template<T>(type);
  Lookup.Result<T> result=Lookup.getDefault().lookup(template);
  Collection<? extends Item<T>> items=result.allItems();
  Set<Class<T>> joints=new HashSet<Class<T>>(items.size());
  for (  Item<T> item : items) {
    joints.add((Class<T>)item.getType());
  }
  return joints;
}
Program: 154360
Project: 154360
Buggy source:
/** 
 * Get the Joint id of the given extension of Jointed
 * @param < T > extends Jointed
 * @param type Class extending Jointed
 * @return @Joint.id of type
 */
public static <T>String getJointId(final Class<T> type){
  Object owner=new Object();
  Joint joint=null;
synchronized (owner) {
    joint=getJoint(type);
  }
  String id=null;
  if (joint != null) {
    id=joint.id();
  }
  return id;
}

Fixed version (ground truth):
/** 
 * Get the Joint id
 * @param < T >
 * @param type Class
 * @return @Joint.id of type
 */
public static <T>String getJointId(final Class<T> type){
  Object owner=new Object();
  Joint joint=null;
synchronized (owner) {
    joint=getJoint(type);
  }
  String id=null;
  if (joint != null) {
    id=joint.id();
  }
  return id;
}
Program: 154361
Project: 154361
Buggy source:
/** 
 * If you know a Joint's id you can look up that class.
 * @param < T > extends Jointed
 * @param type class extending Jointed
 * @param id Joint.id of the Jointed class instance you are looking for.
 * @return first class extending T with a matching @throws JointNotFoundException
 * @throws JointNotFoundException
 * @Joint.id
 */
@SuppressWarnings("String_Node_Str") public static <T>Class<T> findByJointId(final Class<T> type,final String id) throws JointNotFoundException {
  Set<Class<T>> joints=null;
  Object owner=new Object();
synchronized (owner) {
    joints=lookupJoints(type);
  }
  Class<T> result=null;
  for (  Class<T> joint : joints) {
    if (id.equals(getJointId(joint))) {
      result=joint;
      break;
    }
  }
  if (result == null) {
    throw new JointNotFoundException("String_Node_Str" + id + "String_Node_Str"+ type.getName());
  }
  return (Class<T>)result;
}

Fixed version (ground truth):
/** 
 * If you know a Joint's id you can look up that class.
 * @param < T >
 * @param type class
 * @param id Joint.id of the class instance you are looking for.
 * @return first class extending T with a matching @throws JointNotFoundException
 * @throws JointNotFoundException
 * @Joint.id
 */
@SuppressWarnings("String_Node_Str") public static <T>Class<T> findByJointId(final Class<T> type,final String id) throws JointNotFoundException {
  Set<Class<T>> joints=null;
  Object owner=new Object();
synchronized (owner) {
    joints=lookupJoints(type);
  }
  Class<T> result=null;
  for (  Class<T> joint : joints) {
    if (id.equals(getJointId(joint))) {
      result=joint;
      break;
    }
  }
  if (result == null) {
    throw new JointNotFoundException("String_Node_Str" + id + "String_Node_Str"+ type.getName());
  }
  return (Class<T>)result;
}
Program: 154362
Project: 154362
Buggy source:
private int read() throws IOException {
  int c=(short)_reader.read();
  if (c == '\n') {
    _line++;
    _column=1;
  }
 else   if (c == '\t') {
    _column+=4 - ((_column - 1) % TABSIZE);
  }
 else {
    _column++;
  }
  return c;
}

Fixed version (ground truth):
private int read() throws IOException {
  int c=(short)_reader.read();
  if (c == '\n') {
    _line++;
    _column=1;
  }
 else   if (c == '\t') {
    _lastTab=4 - ((_column - 1) % TABSIZE);
    _column+=_lastTab;
  }
 else {
    _column++;
  }
  return c;
}
Program: 154363
Project: 154363
Buggy source:
private void unread(int c) throws IOException {
  if (c == '\t') {
    _column-=TABSIZE;
  }
 else   if (c == '\n') {
  }
 else   _column--;
  _reader.unread(c);
}

Fixed version (ground truth):
private void unread(int c) throws IOException {
  if (c == '\t') {
    _column-=_lastTab;
  }
 else   if (c == '\n') {
  }
 else   _column--;
  _reader.unread(c);
}
Program: 154365
Project: 154365
Buggy source:
private int read() throws IOException {
  return (short)_reader.read();
}

Fixed version (ground truth):
private int read() throws IOException {
  _column++;
  return (short)_reader.read();
}
Program: 154366
Project: 154366
Buggy source:
private void unread(int c) throws IOException {
  _reader.unread(c);
}

Fixed version (ground truth):
private void unread(int c) throws IOException {
  _column--;
  _reader.unread(c);
}
Program: 154367
Project: 154367
Buggy source:
private static void runSyntaxCheck(File file) throws IOException {
  Lexer lexer=new Lexer(new FileReader(file));
  Parser parser=new Parser(lexer);
  try {
    parser.parseProgram();
  }
 catch (  Parser.UnexpectedTokenException e) {
    System.out.println("String_Node_Str" + e.getToken());
    return;
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
private static void runSyntaxCheck(File file) throws IOException {
  Lexer lexer=new Lexer(new FileReader(file));
  Parser parser=new Parser(lexer);
  try {
    parser.parseProgram();
  }
 catch (  Parser.UnexpectedTokenException e) {
    System.out.println("String_Node_Str" + e);
    return;
  }
  System.out.println("String_Node_Str");
}
Program: 154368
Project: 154368
Buggy source:
private Token getCurrentToken(){
  return _lexer.peek(0);
}

Fixed version (ground truth):
private Token getCurrentToken(){
  _currentLookAhead=1;
  return _lexer.peek(0);
}
Program: 154369
Project: 154369
Buggy source:
private IntegerLiteral expectIntegerLiteral() throws UnexpectedTokenException {
  if (!(getCurrentToken() instanceof IntegerLiteral))   throw new UnexpectedTokenException(this);
  return (IntegerLiteral)consumeToken();
}

Fixed version (ground truth):
private IntegerLiteral expectIntegerLiteral() throws UnexpectedTokenException {
  if (!(getCurrentToken() instanceof IntegerLiteral))   throw new UnexpectedTokenException(this,"String_Node_Str");
  return (IntegerLiteral)consumeToken();
}
Program: 154370
Project: 154370
Buggy source:
private Token consumeToken(){
  try {
    return _lexer.next();
  }
 catch (  IOException e) {
    return null;
  }
}

Fixed version (ground truth):
private Token consumeToken(){
  try {
    _currentLookAhead=0;
    return _lexer.next();
  }
 catch (  IOException e) {
    return null;
  }
}
Program: 154371
Project: 154371
Buggy source:
private Token expectToken(String s) throws UnexpectedTokenException {
  if (!acceptToken(s))   throw new UnexpectedTokenException(this);
  return consumeToken();
}

Fixed version (ground truth):
private Token expectToken(String s) throws UnexpectedTokenException {
  if (!acceptToken(s))   throw new UnexpectedTokenException(this,s);
  return consumeToken();
}
Program: 154372
Project: 154372
Buggy source:
private Token expectEOF(){
  if (!getCurrentToken().isEof())   throw new UnexpectedTokenException(this);
  return consumeToken();
}

Fixed version (ground truth):
private Token expectEOF(){
  if (!getCurrentToken().isEof())   throw new UnexpectedTokenException(this,"String_Node_Str");
  return consumeToken();
}
Program: 154373
Project: 154373
Buggy source:
private Identifier expectIdentifier() throws UnexpectedTokenException {
  if (!(getCurrentToken() instanceof Identifier))   throw new UnexpectedTokenException(this);
  return (Identifier)consumeToken();
}

Fixed version (ground truth):
private Identifier expectIdentifier() throws UnexpectedTokenException {
  if (!(getCurrentToken() instanceof Identifier))   throw new UnexpectedTokenException(this,"String_Node_Str");
  return (Identifier)consumeToken();
}
Program: 154374
Project: 154374
Buggy source:
public UnexpectedTokenException(Parser parser){
  _token=parser.getCurrentToken();
  _line=parser.getCurrentLine();
  _column=parser.getCurrentColumn();
}

Fixed version (ground truth):
public UnexpectedTokenException(Parser parser,String expectedToken){
  init(parser);
  _expectedToken=expectedToken;
  if (expectedToken.equals("String_Node_Str")) {
    _column--;
  }
}
Program: 154375
Project: 154375
Buggy source:
@Override public String toString(){
  return _line + "String_Node_Str" + _column+ "String_Node_Str"+ _token+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  String out=_line + "String_Node_Str" + _column;
  if (null != _expectedToken) {
    out+="String_Node_Str" + _expectedToken + "String_Node_Str";
  }
  out+="String_Node_Str" + _token + "String_Node_Str";
  return out;
}
Program: 154376
Project: 154376
Buggy source:
private BasicType parseBasicType(){
  if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptIdentifier())   return new BasicType(expectIdentifier());
  throw new UnexpectedTokenException(this);
}

Fixed version (ground truth):
private BasicType parseBasicType(){
  if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptToken("String_Node_Str"))   return new BasicType(expectToken("String_Node_Str"));
 else   if (acceptIdentifier())   return new BasicType(expectIdentifier());
  throw new UnexpectedTokenException(this,"String_Node_Str");
}
Program: 154377
Project: 154377
Buggy source:
public Token next() throws IOException {
  Token result=_lookAhead[_pos % _size];
  _lookAhead[_pos % _size]=_lexer.next();
  _pos+=1;
  if (_pos >= _size)   _pos=0;
  return result;
}

Fixed version (ground truth):
public Token next() throws IOException {
  int i=_pos % _size;
  Token result=_lookAhead[i];
  _currentPos=_lookAheadPos[i];
  _currentToken=_lookAhead[i];
  _lookAhead[_pos % _size]=_lexer.next();
  _lookAheadPos[_pos % _size]=new Position(_lexer.getLine(),_lexer.getColumn());
  _pos+=1;
  if (_pos >= _size) {
    _pos=0;
  }
  return result;
}
Program: 154378
Project: 154378
Buggy source:
public PeekingLexer(Lexer lexer,int size) throws IOException {
  _lexer=lexer;
  _size=size;
  _pos=0;
  _lookAhead=new Token[size];
  for (int i=0; i < size; i++) {
    _lookAhead[i]=_lexer.next();
  }
}

Fixed version (ground truth):
public PeekingLexer(Lexer lexer,int size) throws IOException {
  _lexer=lexer;
  _size=size;
  _pos=0;
  _lookAheadPos=new Position[size];
  _lookAhead=new Token[size];
  for (int i=0; i < size; i++) {
    _lookAhead[i]=_lexer.next();
    _lookAheadPos[i]=new Position(_lexer.getLine(),_lexer.getColumn());
  }
  _currentPos=_lookAheadPos[0];
  _currentToken=_lookAhead[0];
}
Program: 154379
Project: 154379
Buggy source:
private BlockStatement parseBlockStatement(){
  if (acceptToken("String_Node_Str") || acceptToken("String_Node_Str") || acceptToken("String_Node_Str")|| acceptToken("String_Node_Str")|| acceptToken("String_Node_Str")|| acceptToken("String_Node_Str",2)|| (acceptToken("String_Node_Str",1) && !acceptToken("String_Node_Str",2))) {
    return parseStatement();
  }
 else {
    return parseLocalVariableDeclarationStatement();
  }
}

Fixed version (ground truth):
private BlockStatement parseBlockStatement(){
  if (acceptToken("String_Node_Str") || acceptToken("String_Node_Str") || acceptToken("String_Node_Str")|| acceptToken("String_Node_Str")|| acceptToken("String_Node_Str")|| acceptPrimaryExpression())   return parseStatement();
 else   return parseLocalVariableDeclarationStatement();
}
Program: 154381
Project: 154381
Buggy source:
private Token lexInteger(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  if (c == '0') {
    return integerLiteral(name.toString());
  }
 else {
    while (true) {
      c=read();
      if (isDigit(c)) {
        name.append((char)c);
      }
 else       if (isLetter(c)) {
        return error();
      }
 else {
        unread(c);
        return integerLiteral(name.toString());
      }
    }
  }
}

Fixed version (ground truth):
private Token lexInteger(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  if (c == '0') {
    return integerLiteral(name.toString());
  }
 else {
    while (true) {
      c=read();
      if (isDigit(c)) {
        name.append((char)c);
      }
 else {
        unread(c);
        return integerLiteral(name.toString());
      }
    }
  }
}
Program: 154382
Project: 154382
Buggy source:
private Token lexInteger(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  if (c == '0') {
    return integerLiteral(name.toString());
  }
 else {
    while (true) {
      c=read();
      if (isDigit(c)) {
        name.append((char)c);
      }
 else {
        unread(c);
        return integerLiteral(name.toString());
      }
    }
  }
}

Fixed version (ground truth):
private Token lexInteger(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  if (c == '0') {
    return integerLiteral(name.toString());
  }
 else {
    while (true) {
      c=read();
      if (isDigit(c)) {
        name.append((char)c);
      }
 else       if (isLetter(c)) {
        return error();
      }
 else {
        unread(c);
        return integerLiteral(name.toString());
      }
    }
  }
}
Program: 154383
Project: 154383
Buggy source:
private Token lexIdentifier(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  while (true) {
    c=read();
    if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || (c >= '0' && c <= '9')) {
      name.append((char)c);
    }
 else {
      unread(c);
      return identifier(name.toString());
    }
  }
}

Fixed version (ground truth):
private Token lexIdentifier(int c) throws IOException {
  StringBuffer name=new StringBuffer();
  name.append((char)c);
  while (true) {
    c=read();
    if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || (c >= '0' && c <= '9')) {
      name.append((char)c);
    }
 else {
      unread(c);
      if (Keyword._KEYWORDS.containsKey(name.toString())) {
        return keyword(name.toString());
      }
      return identifier(name.toString());
    }
  }
}
Program: 154384
Project: 154384
Buggy source:
public String toString(){
  return _value;
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + _value;
}
Program: 154386
Project: 154386
Buggy source:
public boolean undo(){
  if (moves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
    }
 else {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
    }
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
public boolean undo(){
  if (moves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
    }
 else {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
    }
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}
Program: 154387
Project: 154387
Buggy source:
/** 
 * checks if there is a wall on the opposite side of a player's opponent
 * @param m the move to be made by a player
 * @param p the player making the move
 * @return true or false
 */
public boolean oppositeBlocked(Move m,Player p){
  Player other=players.other(p);
  if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() - 1 && !isNotBlocked(new Move(other.pawn().x(),other.pawn().y() + 1,MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() + 1 && !isNotBlocked(new Move(other.pawn().x(),other.pawn().y() - 1,MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() - 1 && p.pawn().y() == other.pawn().y() && !isNotBlocked(new Move(other.pawn().x() + 1,other.pawn().y(),MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() + 1 && p.pawn().y() == other.pawn().y() && !isNotBlocked(new Move(other.pawn().x() - 1,other.pawn().y(),MoveType.PAWN),other))   return true;
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * checks if there is a wall on the opposite side of a player's opponent
 * @param m the move to be made by a player
 * @param p the player making the move
 * @return true or false
 */
public boolean oppositeBlocked(Move m,Player p){
  Player other=players.other(p);
  if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() - 1 && (!isNotBlocked(new Move(other.pawn().x(),other.pawn().y() + 1,MoveType.PAWN),other) || other.pawn().y() == 9))   return true;
 else   if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() + 1 && (!isNotBlocked(new Move(other.pawn().x(),other.pawn().y() - 1,MoveType.PAWN),other) || other.pawn().y() == 1))   return true;
 else   if (p.pawn().x() == other.pawn().x() - 1 && p.pawn().y() == other.pawn().y() && (!isNotBlocked(new Move(other.pawn().x() + 1,other.pawn().y(),MoveType.PAWN),other) || other.pawn().x() == 8))   return true;
 else   if (p.pawn().x() == other.pawn().x() + 1 && p.pawn().y() == other.pawn().y() && (!isNotBlocked(new Move(other.pawn().x() - 1,other.pawn().y(),MoveType.PAWN),other) || other.pawn().y() == 0))   return true;
 else {
    return false;
  }
}
Program: 154388
Project: 154388
Buggy source:
/** 
 * Simply scan the stdin to get a line the user typed.
 * @return The String the user input in the command line.
 */
public static void run(){
  Scanner input=new Scanner(System.in);
  Two<Player> players=null;
  System.out.println("String_Node_Str");
  String line=input.nextLine().toLowerCase();
  Command command=new Command(line);
  while (command.type().equals(CommandType.INVALID) || command.type().equals(CommandType.MOVE) || command.type().equals(CommandType.SAVE_GAME)|| command.type().equals(CommandType.UNDO)|| command.type().equals(CommandType.REDO)) {
    if (command.type().equals(CommandType.MOVE)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.SAVE_GAME)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.UNDO)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.REDO)) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
    line=input.nextLine().toLowerCase();
    command=new Command(line);
  }
  players=getPlayers();
  if (command.type().equals(CommandType.NEW_GAME)) {
    newGame(players);
  }
 else   if (command.type().equals(CommandType.LOAD_GAME)) {
    loadGame(command.fileName(),players);
  }
 else   if (command.type().equals(CommandType.NEW_WITH_MOVES)) {
    newGameWithMoves(command.moves(),players);
  }
}

Fixed version (ground truth):
/** 
 * Simply scan the stdin to get a line the user typed.
 * @return The String the user input in the command line.
 */
public static void run(){
  Scanner input=new Scanner(System.in);
  Two<Player> players=null;
  System.out.println("String_Node_Str");
  String line=input.nextLine().toLowerCase();
  Command command=new Command(line);
  while (command.type().equals(CommandType.INVALID) || command.type().equals(CommandType.MOVE) || command.type().equals(CommandType.SAVE_GAME)|| command.type().equals(CommandType.UNDO)|| command.type().equals(CommandType.REDO)|| command.type().equals(CommandType.HELP)) {
    if (command.type().equals(CommandType.MOVE)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.SAVE_GAME)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.UNDO)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.REDO)) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
    line=input.nextLine().toLowerCase();
    command=new Command(line);
  }
  players=getPlayers();
  if (command.type().equals(CommandType.NEW_GAME)) {
    newGame(players);
  }
 else   if (command.type().equals(CommandType.LOAD_GAME)) {
    loadGame(command.fileName(),players);
  }
 else   if (command.type().equals(CommandType.NEW_WITH_MOVES)) {
    newGameWithMoves(command.moves(),players);
  }
}
Program: 154390
Project: 154390
Buggy source:
/** 
 * Checks if the state of the moves is a winning game state
 * @param moves the list of all moves made so far
 * @return boolean true if it is a winning state, false if not
 */
private boolean isGoalState(LinkedList<Move> moves){
  for (int i=0; i < 9; i++) {
    if ((moves.getLast().coord().x() == i && moves.getLast().coord().y() == 1) || (moves.getLast().coord().x() == i && moves.getLast().coord().y() == 9)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks if the state of the moves is a winning game state
 * @param moves the list of all moves made so far
 * @return boolean true if it is a winning state, false if not
 */
private boolean isGoalState(LinkedList<Move> moves){
  if (!moves.isEmpty()) {
    for (int i=0; i < 9; i++) {
      if ((moves.getLast().coord().x() == i && moves.getLast().coord().y() == 1) || (moves.getLast().coord().x() == i && moves.getLast().coord().y() == 9)) {
        return true;
      }
    }
  }
  return false;
}
Program: 154391
Project: 154391
Buggy source:
public boolean redo(){
  if (redoMoves.size() > 0) {
    move(redoMoves.removeLast(),myTurn());
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
public boolean redo(){
  if (redoMoves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      move(redoMoves.removeLast(),myTurn());
      move(redoMoves.removeLast(),myTurn());
      display();
      System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
      return true;
    }
 else {
      move(redoMoves.removeLast(),myTurn());
      display();
      System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
      return true;
    }
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}
Program: 154392
Project: 154392
Buggy source:
private int minValue(LinkedList<Move> moves,int currentSearchDepth,int alphaMax,int betaMin){
  Pair<Integer,Move> value=null;
  if (currentSearchDepth == desiredDepth || isGoalState(moves)) {
    Random random=new Random();
    return random.nextInt(1000);
  }
  Game tempGame=createTempGame(moves);
  ArrayList<Move> moveList=findPossibleMoves(tempGame);
  for (int i=0; i < moveList.size(); i++) {
    Game tempGameTwo=createTempGame(moves);
    tempGameTwo.move(moveList.get(i),tempGame.myTurn());
    value=maxValue(tempGameTwo.moves,desiredDepth + 1,alphaMax,betaMin);
    betaMin=Math.min(value._1,betaMin);
    if (alphaMax >= betaMin) {
      return betaMin;
    }
  }
  return betaMin;
}

Fixed version (ground truth):
private int minValue(LinkedList<Move> moves,int currentSearchDepth,int alphaMax,int betaMin){
  Pair<Integer,Move> value=null;
  if (currentSearchDepth == desiredDepth || isGoalState(moves)) {
    Random random=new Random();
    return random.nextInt(1000);
  }
  Game tempGame=createTempGame(moves);
  ArrayList<Move> moveList=findPossibleMoves(tempGame);
  for (int i=0; i < moveList.size(); i++) {
    Game tempGameTwo=createTempGame(moves);
    tempGameTwo.move(moveList.get(i),tempGame.myTurn());
    value=maxValue(tempGameTwo.moves,currentSearchDepth + 1,alphaMax,betaMin);
    betaMin=Math.min(value._1,betaMin);
    if (alphaMax >= betaMin) {
      return betaMin;
    }
  }
  return betaMin;
}
Program: 154393
Project: 154393
Buggy source:
private Pair<Integer,Move> maxValue(LinkedList<Move> moves,int currentSearchDepth,int alphaMax,int betaMin){
  Move bestMove=null;
  int value;
  if (currentSearchDepth == desiredDepth || isGoalState(moves)) {
    Random random=new Random();
    ArrayList<Move> m=findPossibleMoves(game);
    return Pair.pair(random.nextInt(1000),m.get(random.nextInt(m.size())));
  }
  Game tempGame=createTempGame(moves);
  ArrayList<Move> moveList=findPossibleMoves(tempGame);
  bestMove=moveList.get(0);
  for (int i=0; i < moveList.size(); i++) {
    Game tempGameTwo=createTempGame(moves);
    tempGameTwo.move(moveList.get(i),tempGame.myTurn());
    value=minValue(tempGameTwo.moves,desiredDepth + 1,alphaMax,betaMin);
    if (value > alphaMax) {
      alphaMax=value;
      bestMove=moveList.get(i);
    }
    if (alphaMax >= betaMin) {
      return Pair.pair(alphaMax,bestMove);
    }
  }
  return Pair.pair(alphaMax,bestMove);
}

Fixed version (ground truth):
private Pair<Integer,Move> maxValue(LinkedList<Move> moves,int currentSearchDepth,int alphaMax,int betaMin){
  Move bestMove=null;
  int value;
  if (currentSearchDepth == desiredDepth || isGoalState(moves)) {
    Random random=new Random();
    ArrayList<Move> m=findPossibleMoves(game);
    return Pair.pair(random.nextInt(1000),m.get(random.nextInt(m.size())));
  }
  Game tempGame=createTempGame(moves);
  ArrayList<Move> moveList=findPossibleMoves(tempGame);
  bestMove=moveList.get(0);
  for (int i=0; i < moveList.size(); i++) {
    Game tempGameTwo=createTempGame(moves);
    tempGameTwo.move(moveList.get(i),tempGame.myTurn());
    value=minValue(tempGameTwo.moves,currentSearchDepth + 1,alphaMax,betaMin);
    if (value > alphaMax) {
      alphaMax=value;
      bestMove=moveList.get(i);
    }
    if (alphaMax >= betaMin) {
      return Pair.pair(alphaMax,bestMove);
    }
  }
  return Pair.pair(alphaMax,bestMove);
}
Program: 154395
Project: 154395
Buggy source:
public boolean undo(){
  if (moves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
    }
 else {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        redoMoves.add(moves.removeLast());
      }
    }
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
public boolean undo(){
  if (moves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
    }
 else {
      changeTurn();
      if (moves.getLast().direction().equals(MoveType.PAWN)) {
        myTurn().positions.removeLast();
        myTurn().pawn=myTurn().positions.getLast();
        redoMoves.add(moves.removeLast());
      }
 else {
        walls.removeLast();
        myTurn().wall++;
        redoMoves.add(moves.removeLast());
      }
    }
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}
Program: 154396
Project: 154396
Buggy source:
/** 
 * checks if there is a wall on the opposite side of a player's opponent
 * @param m the move to be made by a player
 * @param p the player making the move
 * @return true or false
 */
public boolean oppositeBlocked(Move m,Player p){
  Player other=players.other(p);
  if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() - 1 && !isNotBlocked(new Move(other.pawn().x(),other.pawn().y() + 1,MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() + 1 && !isNotBlocked(new Move(other.pawn().x(),other.pawn().y() - 1,MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() - 1 && p.pawn().y() == other.pawn().y() && !isNotBlocked(new Move(other.pawn().x() + 1,other.pawn().y(),MoveType.PAWN),other))   return true;
 else   if (p.pawn().x() == other.pawn().x() + 1 && p.pawn().y() == other.pawn().y() && !isNotBlocked(new Move(other.pawn().x() - 1,other.pawn().y(),MoveType.PAWN),other))   return true;
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * checks if there is a wall on the opposite side of a player's opponent
 * @param m the move to be made by a player
 * @param p the player making the move
 * @return true or false
 */
public boolean oppositeBlocked(Move m,Player p){
  Player other=players.other(p);
  if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() - 1 && (!isNotBlocked(new Move(other.pawn().x(),other.pawn().y() + 1,MoveType.PAWN),other) || other.pawn().y() == 9))   return true;
 else   if (p.pawn().x() == other.pawn().x() && p.pawn().y() == other.pawn().y() + 1 && (!isNotBlocked(new Move(other.pawn().x(),other.pawn().y() - 1,MoveType.PAWN),other) || other.pawn().y() == 1))   return true;
 else   if (p.pawn().x() == other.pawn().x() - 1 && p.pawn().y() == other.pawn().y() && (!isNotBlocked(new Move(other.pawn().x() + 1,other.pawn().y(),MoveType.PAWN),other) || other.pawn().x() == 8))   return true;
 else   if (p.pawn().x() == other.pawn().x() + 1 && p.pawn().y() == other.pawn().y() && (!isNotBlocked(new Move(other.pawn().x() - 1,other.pawn().y(),MoveType.PAWN),other) || other.pawn().y() == 0))   return true;
 else {
    return false;
  }
}
Program: 154397
Project: 154397
Buggy source:
/** 
 * Simply scan the stdin to get a line the user typed.
 * @return The String the user input in the command line.
 */
public static void run(){
  Scanner input=new Scanner(System.in);
  Two<Player> players=null;
  System.out.println("String_Node_Str");
  String line=input.nextLine().toLowerCase();
  Command command=new Command(line);
  while (command.type().equals(CommandType.INVALID) || command.type().equals(CommandType.MOVE) || command.type().equals(CommandType.SAVE_GAME)|| command.type().equals(CommandType.UNDO)|| command.type().equals(CommandType.REDO)) {
    if (command.type().equals(CommandType.MOVE)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.SAVE_GAME)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.UNDO)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.REDO)) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
    line=input.nextLine().toLowerCase();
    command=new Command(line);
  }
  players=getPlayers();
  if (command.type().equals(CommandType.NEW_GAME)) {
    newGame(players);
  }
 else   if (command.type().equals(CommandType.LOAD_GAME)) {
    loadGame(command.fileName(),players);
  }
 else   if (command.type().equals(CommandType.NEW_WITH_MOVES)) {
    newGameWithMoves(command.moves(),players);
  }
}

Fixed version (ground truth):
/** 
 * Simply scan the stdin to get a line the user typed.
 * @return The String the user input in the command line.
 */
public static void run(){
  Scanner input=new Scanner(System.in);
  Two<Player> players=null;
  System.out.println("String_Node_Str");
  String line=input.nextLine().toLowerCase();
  Command command=new Command(line);
  while (command.type().equals(CommandType.INVALID) || command.type().equals(CommandType.MOVE) || command.type().equals(CommandType.SAVE_GAME)|| command.type().equals(CommandType.UNDO)|| command.type().equals(CommandType.REDO)|| command.type().equals(CommandType.HELP)) {
    if (command.type().equals(CommandType.MOVE)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.SAVE_GAME)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.UNDO)) {
      System.out.println("String_Node_Str");
    }
 else     if (command.type().equals(CommandType.REDO)) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
    line=input.nextLine().toLowerCase();
    command=new Command(line);
  }
  players=getPlayers();
  if (command.type().equals(CommandType.NEW_GAME)) {
    newGame(players);
  }
 else   if (command.type().equals(CommandType.LOAD_GAME)) {
    loadGame(command.fileName(),players);
  }
 else   if (command.type().equals(CommandType.NEW_WITH_MOVES)) {
    newGameWithMoves(command.moves(),players);
  }
}
Program: 154399
Project: 154399
Buggy source:
/** 
 * Checks if the state of the moves is a winning game state
 * @param moves the list of all moves made so far
 * @return boolean true if it is a winning state, false if not
 */
private boolean isGoalState(LinkedList<Move> moves){
  for (int i=0; i < 9; i++) {
    if ((moves.getLast().coord().x() == i && moves.getLast().coord().y() == 1) || (moves.getLast().coord().x() == i && moves.getLast().coord().y() == 9)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks if the state of the moves is a winning game state
 * @param moves the list of all moves made so far
 * @return boolean true if it is a winning state, false if not
 */
private boolean isGoalState(LinkedList<Move> moves){
  if (!moves.isEmpty()) {
    for (int i=0; i < 9; i++) {
      if ((moves.getLast().coord().x() == i && moves.getLast().coord().y() == 1) || (moves.getLast().coord().x() == i && moves.getLast().coord().y() == 9)) {
        return true;
      }
    }
  }
  return false;
}
Program: 154400
Project: 154400
Buggy source:
public boolean redo(){
  if (redoMoves.size() > 0) {
    move(redoMoves.removeLast(),myTurn());
    display();
    System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
    return true;
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
public boolean redo(){
  if (redoMoves.size() > 0) {
    if (players.other(myTurn()).type().equals("String_Node_Str")) {
      move(redoMoves.removeLast(),myTurn());
      move(redoMoves.removeLast(),myTurn());
      display();
      System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
      return true;
    }
 else {
      move(redoMoves.removeLast(),myTurn());
      display();
      System.out.println("String_Node_Str" + myTurn().name + "String_Node_Str");
      return true;
    }
  }
 else {
    System.out.println("String_Node_Str");
    return false;
  }
}