nus-yam/ex-repair huggingface dataset:
Program: 5368
Project: 5368
Buggy source:
/** 
 * Determina se a altura da região é uma porcentagem.
 * @param relativeHeight booleano indicando se a altura da região é uma porcentagem.
 */
private void setRelativeHeight(boolean relativeHeight){
  this.relativeHeight=relativeHeight;
}

Fixed version (ground truth):
/** 
 * Determina se a altura da região é uma porcentagem.
 * @param relativeHeight booleano indicando se a altura da região é uma porcentagem.
 */
public void setRelativeHeight(boolean relativeHeight){
  this.relativeHeight=relativeHeight;
}
Program: 5369
Project: 5369
Buggy source:
/** 
 * Retorna se a posição a direita da região é uma porcentagem.
 * @return booleano indicando se a posição a direita da região é uma porcentagem.
 */
private boolean isRelativeRight(){
  return relativeRight;
}

Fixed version (ground truth):
/** 
 * Retorna se a posição a direita da região é uma porcentagem.
 * @return booleano indicando se a posição a direita da região é uma porcentagem.
 */
public boolean isRelativeRight(){
  return relativeRight;
}
Program: 5370
Project: 5370
Buggy source:
/** 
 * Determina se a posição a esquerda da região é uma porcentagem.
 * @param relativeLeft booleano indicando se a posição a esquerda da região é uma porcentagem.
 */
private void setRelativeLeft(boolean relativeLeft){
  this.relativeLeft=relativeLeft;
}

Fixed version (ground truth):
/** 
 * Determina se a posição a esquerda da região é uma porcentagem.
 * @param relativeLeft booleano indicando se a posição a esquerda da região é uma porcentagem.
 */
public void setRelativeLeft(boolean relativeLeft){
  this.relativeLeft=relativeLeft;
}
Program: 5371
Project: 5371
Buggy source:
/** 
 * Retorna se a posição de topo da região é uma porcentagem.
 * @return booleano indicando se a posição de topo da região é uma porcentagem.
 */
private boolean isRelativeTop(){
  return relativeTop;
}

Fixed version (ground truth):
/** 
 * Retorna se a posição de topo da região é uma porcentagem.
 * @return booleano indicando se a posição de topo da região é uma porcentagem.
 */
public boolean isRelativeTop(){
  return relativeTop;
}
Program: 5372
Project: 5372
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getOperator() != null)   content+="String_Node_Str" + getOperator().toString() + "String_Node_Str";
  if (getDelay() != null)   content+="String_Node_Str" + getDelay() + "String_Node_Str";
  if (getParamDelay() != null)   content+="String_Node_Str" + getParamDelay() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasCondition()) {
    for (    C condition : conditions)     content+=condition.parse(ident + 1);
  }
  if (hasStatement()) {
    for (    S statement : statements)     content+=statement.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getOperator() != null)   content+="String_Node_Str" + getOperator().toString() + "String_Node_Str";
  if (getDelay() != null)   content+="String_Node_Str" + getDelay() + "String_Node_Str";
  if (getParamDelay() != null)   content+="String_Node_Str" + getParamDelay().getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasCondition()) {
    for (    C condition : conditions)     content+=condition.parse(ident + 1);
  }
  if (hasStatement()) {
    for (    S statement : statements)     content+=statement.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}
Program: 5373
Project: 5373
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getRole() != null)   content+="String_Node_Str" + getRole().getName() + "String_Node_Str";
  if (getKey() != null)   content+="String_Node_Str" + getKey().toString() + "String_Node_Str";
  if (getParamKey() != null)   content+="String_Node_Str" + getParamKey().getId() + "String_Node_Str";
  if (getDelay() != null)   content+="String_Node_Str" + getDelay() + "String_Node_Str";
  if (getParamDelay() != null)   content+="String_Node_Str" + getParamDelay() + "String_Node_Str";
  if (getMin() != null)   content+="String_Node_Str" + getMin() + "String_Node_Str";
  if (getMax() != null) {
    if (getMax() < 0)     content+="String_Node_Str";
 else     content+="String_Node_Str" + getMax() + "String_Node_Str";
  }
  if (getQualifier() != null)   content+="String_Node_Str" + getQualifier().toString() + "String_Node_Str";
  if (getEventType() != null)   content+="String_Node_Str" + getEventType().toString() + "String_Node_Str";
  if (getTransition() != null)   content+="String_Node_Str" + getTransition().toString() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getRole() != null)   content+="String_Node_Str" + getRole().getName() + "String_Node_Str";
  if (getKey() != null)   content+="String_Node_Str" + getKey().toString() + "String_Node_Str";
  if (getParamKey() != null)   content+="String_Node_Str" + getParamKey().getId() + "String_Node_Str";
  if (getDelay() != null)   content+="String_Node_Str" + getDelay() + "String_Node_Str";
  if (getParamDelay() != null)   content+="String_Node_Str" + getParamDelay().getId() + "String_Node_Str";
  if (getMin() != null)   content+="String_Node_Str" + getMin() + "String_Node_Str";
  if (getMax() != null) {
    if (getMax() < 0)     content+="String_Node_Str";
 else     content+="String_Node_Str" + getMax() + "String_Node_Str";
  }
  if (getQualifier() != null)   content+="String_Node_Str" + getQualifier().toString() + "String_Node_Str";
  if (getEventType() != null)   content+="String_Node_Str" + getEventType().toString() + "String_Node_Str";
  if (getTransition() != null)   content+="String_Node_Str" + getTransition().toString() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}
Program: 5374
Project: 5374
Buggy source:
/** 
 * Cria o código XML do elemento da <i>Nested Context Language</i> (NCL).<br>
 * @param ident Inteiro indicando o nível de indentação do elemento, ou seja, o número de tabulações usadas na indentação do elemento.
 * @return String contendo o código XML do elemento.
 */
public String parse(int ident);

Fixed version (ground truth):
/** 
 * Cria o código XML do elemento da <i>Nested Context Language</i> (NCL).<br>
 * @param ident Inteiro indicando o nível de indentação do elemento, ou seja, o número de tabulações usadas na indentação do elemento.
 * @return String contendo o código XML do elemento.
 */
public abstract String parse(int ident);
Program: 5375
Project: 5375
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+=space + "String_Node_Str";
  content+=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (getTitle() != null)   content+="String_Node_Str" + getTitle() + "String_Node_Str";
  content+="String_Node_Str" + getXmlns() + "String_Node_Str";
  content+="String_Node_Str";
  if (getHead() != null)   content+=getHead().parse(ident + 1);
  if (getBody() != null)   content+=getBody().parse(ident + 1);
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+=space + "String_Node_Str";
  content+=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (getTitle() != null)   content+="String_Node_Str" + getTitle() + "String_Node_Str";
  if (getXmlns() != null)   content+="String_Node_Str" + getXmlns() + "String_Node_Str";
  content+="String_Node_Str";
  if (getHead() != null)   content+=getHead().parse(ident + 1);
  if (getBody() != null)   content+=getBody().parse(ident + 1);
  content+=space + "String_Node_Str";
  return content;
}
Program: 5376
Project: 5376
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getComparator().toString() + "String_Node_Str";
  content+="String_Node_Str";
  for (  A attribute : attributeAssessments)   content+=attribute.parse(ident + 1);
  if (valueAssessment != null)   content+=valueAssessment.parse(ident + 1);
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getComparator() != null)   content+="String_Node_Str" + getComparator().toString() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasAttributeAssessment()) {
    for (    A attribute : attributeAssessments)     content+=attribute.parse(ident + 1);
  }
  if (getValueAssessment() != null)   content+=getValueAssessment().parse(ident + 1);
  content+=space + "String_Node_Str";
  return content;
}
Program: 5377
Project: 5377
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getRole().getName() + "String_Node_Str";
  if (getEventType() != null)   content+="String_Node_Str" + getEventType().toString() + "String_Node_Str";
  if (getKey() != null)   content+="String_Node_Str" + getKey().toString() + "String_Node_Str";
  if (getParamKey() != null)   content+="String_Node_Str" + getParamKey().getId() + "String_Node_Str";
  if (getAttributeType() != null)   content+="String_Node_Str" + getAttributeType().toString() + "String_Node_Str";
  if (getOffset() != null)   content+="String_Node_Str" + getOffset() + "String_Node_Str";
  if (getParamOffset() != null)   content+="String_Node_Str" + getParamOffset().getId() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getRole() != null)   content+="String_Node_Str" + getRole().getName() + "String_Node_Str";
  if (getEventType() != null)   content+="String_Node_Str" + getEventType().toString() + "String_Node_Str";
  if (getKey() != null)   content+="String_Node_Str" + getKey().toString() + "String_Node_Str";
  if (getParamKey() != null)   content+="String_Node_Str" + getParamKey().getId() + "String_Node_Str";
  if (getAttributeType() != null)   content+="String_Node_Str" + getAttributeType().toString() + "String_Node_Str";
  if (getOffset() != null)   content+="String_Node_Str" + getOffset() + "String_Node_Str";
  if (getParamOffset() != null)   content+="String_Node_Str" + getParamOffset().getId() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}
Program: 5378
Project: 5378
Buggy source:
/** 
 * Adiciona mensagens de erro relacionado ao elemento NCL em questão. Uma mensagem será adicionada durante a recuperação do arquivo XML ou da validação feita pela api.
 * @param errors Lista contendo mensagens de erro.
 */
public void addError(Iterable<String> errors){
  this.errors.addAll((Collection<? extends String>)errors);
}

Fixed version (ground truth):
/** 
 * Adiciona mensagens de erro relacionado ao elemento NCL em questão. Uma mensagem será adicionada durante a recuperação do arquivo XML ou da validação feita pela api.
 * @param errors Lista contendo mensagens de erro.
 */
public void addError(Iterable<String> errors){
  for (  String error : errors)   addError(error);
}
Program: 5379
Project: 5379
Buggy source:
/** 
 * Adiciona mensagens de aviso relacionado ao elemento NCL em questão. Uma mensagem será adicionada durante a recuperação do arquivo XML ou da validação feita pela api.
 * @param warnings Lista contendo mensagens de aviso.
 */
public void addWarning(Iterable<String> warnings){
  this.warnings.addAll((Collection<? extends String>)warnings);
}

Fixed version (ground truth):
/** 
 * Adiciona mensagens de aviso relacionado ao elemento NCL em questão. Uma mensagem será adicionada durante a recuperação do arquivo XML ou da validação feita pela api.
 * @param warnings Lista contendo mensagens de aviso.
 */
public void addWarning(Iterable<String> warnings){
  for (  String warning : warnings)   addWarning(warning);
}
Program: 5380
Project: 5380
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getComparator() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!(attributeAssessments.size() == 2 || (attributeAssessments.size() == 1 && getValueAssessment() != null))) {
    addError("String_Node_Str");
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getComparator() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!(attributeAssessments.size() == 2 || (attributeAssessments.size() == 1 && getValueAssessment() != null))) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getValueAssessment() != null) {
    valid&=getValueAssessment().validate();
    addWarning(getValueAssessment().getWarnings());
    addError(getValueAssessment().getErrors());
  }
  if (hasAttributeAssessment()) {
    for (    NCLAttributeAssessment attribute : attributeAssessments) {
      valid&=attribute.validate();
      addWarning(attribute.getWarnings());
      addError(attribute.getErrors());
    }
  }
  return valid;
}
Program: 5382
Project: 5382
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getRole() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRole() != null && getRole().getConditionName() != null) {
    if (getRole().getConditionName().equals(NCLDefaultConditionRole.ONSELECTION)) {
      if (getKey() == null && getParamKey() == null) {
        addError("String_Node_Str");
        valid=false;
      }
    }
 else {
      if (getKey() != null || getParamKey() != null) {
        addWarning("String_Node_Str");
        valid=false;
      }
    }
  }
 else {
    if (getEventType() == null || getTransition() == null) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (getEventType().equals(NCLEventType.SELECTION)) {
      if (getKey() == null && getParamKey() == null) {
        addError("String_Node_Str");
        valid=false;
      }
    }
 else {
      if (getKey() != null || getParamKey() != null) {
        addWarning("String_Node_Str");
        valid=false;
      }
    }
  }
  if (getMax() == 1 && getQualifier() != null) {
    addWarning("String_Node_Str");
    valid=false;
  }
 else   if (getMax() != 1 && getQualifier() == null) {
    addWarning("String_Node_Str");
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getRole() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRole() != null && getRole().getConditionName() != null) {
    if (getRole().getConditionName().equals(NCLDefaultConditionRole.ONSELECTION)) {
      if (getKey() == null && getParamKey() == null) {
        addError("String_Node_Str");
        valid=false;
      }
    }
 else {
      if (getKey() != null || getParamKey() != null) {
        addWarning("String_Node_Str");
        valid=false;
      }
    }
  }
 else {
    if (getEventType() == null || getTransition() == null) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (getEventType().equals(NCLEventType.SELECTION)) {
      if (getKey() == null && getParamKey() == null) {
        addError("String_Node_Str");
        valid=false;
      }
    }
 else {
      if (getKey() != null || getParamKey() != null) {
        addWarning("String_Node_Str");
        valid=false;
      }
    }
  }
  if (getMax() != null && getMax() == 1 && getQualifier() != null) {
    addWarning("String_Node_Str");
    valid=false;
  }
 else   if (getMax() != null && getMax() != 1 && getQualifier() == null) {
    addWarning("String_Node_Str");
    valid=false;
  }
  return valid;
}
Program: 5383
Project: 5383
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!hasDescriptor() && !hasBind()) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasBind()) {
    for (    B bind : binds) {
      valid&=bind.validate();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasDescriptor()) {
    for (    D desc : descriptors) {
      valid&=desc.validate();
      addWarning(desc.getWarnings());
      addError(desc.getErrors());
    }
  }
  if (getDefaultDescriptor() != null) {
    if (!(getDefaultDescriptor().getParent() instanceof NCLDescriptorSwitch)) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (((NCLDescriptorSwitch)getDefaultDescriptor().getParent()).compareTo(this) != 0) {
      addError("String_Node_Str");
      valid=false;
    }
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!hasDescriptor() || !hasBind()) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasBind()) {
    for (    B bind : binds) {
      valid&=bind.validate();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasDescriptor()) {
    for (    D desc : descriptors) {
      valid&=desc.validate();
      addWarning(desc.getWarnings());
      addError(desc.getErrors());
    }
  }
  if (getDefaultDescriptor() != null) {
    if (!(getDefaultDescriptor().getParent() instanceof NCLDescriptorSwitch)) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (((NCLDescriptorSwitch)getDefaultDescriptor().getParent()).compareTo(this) != 0) {
      addError("String_Node_Str");
      valid=false;
    }
  }
  return valid;
}
Program: 5387
Project: 5387
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getName() != null) {
    addError("String_Node_Str");
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getName() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  return valid;
}
Program: 5389
Project: 5389
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRefer() != null && getRefer().compareTo(this) == 0) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasMeta()) {
    for (    M meta : metas) {
      valid&=meta.validate();
      addWarning(meta.getWarnings());
      addError(meta.getErrors());
    }
  }
  if (hasMetadata()) {
    for (    MT metadata : metadatas) {
      valid&=metadata.validate();
      addWarning(metadata.getWarnings());
      addError(metadata.getErrors());
    }
  }
  if (hasPort()) {
    for (    Pt port : ports) {
      valid&=port.validate();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasProperty()) {
    for (    Pp property : properties) {
      valid&=property.validate();
      addWarning(property.getWarnings());
      addError(property.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      valid&=node.validate();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
  if (hasLink()) {
    for (    L link : links) {
      valid&=link.validate();
      addWarning(link.getWarnings());
      addError(link.getErrors());
    }
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRefer() != null && (getRefer().compareTo(this) == 0 || findContext(nodes) != null)) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasMeta()) {
    for (    M meta : metas) {
      valid&=meta.validate();
      addWarning(meta.getWarnings());
      addError(meta.getErrors());
    }
  }
  if (hasMetadata()) {
    for (    MT metadata : metadatas) {
      valid&=metadata.validate();
      addWarning(metadata.getWarnings());
      addError(metadata.getErrors());
    }
  }
  if (hasPort()) {
    for (    Pt port : ports) {
      valid&=port.validate();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasProperty()) {
    for (    Pp property : properties) {
      valid&=property.validate();
      addWarning(property.getWarnings());
      addError(property.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      valid&=node.validate();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
  if (hasLink()) {
    for (    L link : links) {
      valid&=link.validate();
      addWarning(link.getWarnings());
      addError(link.getErrors());
    }
  }
  return valid;
}
Program: 5390
Project: 5390
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRefer() != null && getRefer().compareTo(this) == 0) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!hasNode() && !hasBind()) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasPort()) {
    for (    P port : ports) {
      valid&=port.validate();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasBind()) {
    for (    B bind : binds) {
      valid&=bind.validate();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      valid&=node.validate();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
  if (getDefaultComponent() != null) {
    if (!(getDefaultComponent().getParent() instanceof NCLSwitch)) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (((NCLSwitch)getDefaultComponent().getParent()).compareTo(this) != 0) {
      addError("String_Node_Str");
      valid=false;
    }
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getRefer() != null && (getRefer().compareTo(this) == 0 || findSwitch(nodes) != null)) {
    addError("String_Node_Str");
    valid=false;
  }
  if (!hasNode() || !hasBind()) {
    addError("String_Node_Str");
    valid=false;
  }
  if (hasPort()) {
    for (    P port : ports) {
      valid&=port.validate();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasBind()) {
    for (    B bind : binds) {
      valid&=bind.validate();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      valid&=node.validate();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
  if (getDefaultComponent() != null) {
    if (!(getDefaultComponent().getParent() instanceof NCLSwitch)) {
      addError("String_Node_Str");
      valid=false;
    }
 else     if (((NCLSwitch)getDefaultComponent().getParent()).compareTo(this) != 0) {
      addError("String_Node_Str");
      valid=false;
    }
  }
  return valid;
}
Program: 5391
Project: 5391
Buggy source:
@Override public void endDocument(){
  if (getParent() != null) {
    if (getDefaultComponent() != null)     defaultComponentReference();
    if (getRefer() != null)     switchReference();
  }
  if (hasBind()) {
    for (    B bind : binds) {
      bind.endDocument();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasPort()) {
    for (    P port : ports) {
      port.endDocument();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      node.endDocument();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
}

Fixed version (ground truth):
@Override public void endDocument(){
  if (getDefaultComponent() != null)   defaultComponentReference();
  if (getParent() != null && getRefer() != null)   switchReference();
  if (hasBind()) {
    for (    B bind : binds) {
      bind.endDocument();
      addWarning(bind.getWarnings());
      addError(bind.getErrors());
    }
  }
  if (hasPort()) {
    for (    P port : ports) {
      port.endDocument();
      addWarning(port.getWarnings());
      addError(port.getErrors());
    }
  }
  if (hasNode()) {
    for (    N node : nodes) {
      node.endDocument();
      addWarning(node.getWarnings());
      addError(node.getErrors());
    }
  }
}
Program: 5392
Project: 5392
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getAlias() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getDocumentURI() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getAlias() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getDocumentURI() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getParent() != null) {
switch (type) {
case BASE:
      if (getParent() instanceof NCLImportedDocumentBase) {
        addError("String_Node_Str");
        valid=false;
      }
    break;
case NCL:
  if (!(getParent() instanceof NCLImportedDocumentBase)) {
    addError("String_Node_Str");
    valid=false;
  }
break;
}
}
return valid;
}
Program: 5393
Project: 5393
Buggy source:
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getVar() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getComparator() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getValue() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getVar().getParent() != null && getVar().getParent() instanceof NCLMedia) {
    if (((NCLMedia)getVar().getParent()).getType() != NCLMimeType.APPLICATION_X_GINGA_SETTINGS) {
      addWarning("String_Node_Str");
      valid=false;
    }
  }
 else {
    addWarning("String_Node_Str");
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
public boolean validate(){
  cleanWarnings();
  cleanErrors();
  boolean valid=true;
  if (getId() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getVar() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getComparator() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getValue() == null) {
    addError("String_Node_Str");
    valid=false;
  }
  if (getVar() != null) {
    if (getVar().getParent() != null && getVar().getParent() instanceof NCLMedia) {
      if (((NCLMedia)getVar().getParent()).getType() != NCLMimeType.APPLICATION_X_GINGA_SETTINGS) {
        addWarning("String_Node_Str");
        valid=false;
      }
    }
 else {
      addWarning("String_Node_Str");
      valid=false;
    }
  }
  return valid;
}
Program: 5394
Project: 5394
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasImportBase()) {
    for (    I imp : imports)     content+=imp.parse(ident + 1);
  }
  if (hasDescriptor()) {
    for (    D descriptor : descriptors)     content+=descriptor.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (hasDescriptor() || hasImportBase()) {
    content+="String_Node_Str";
    if (hasImportBase()) {
      for (      I imp : imports)       content+=imp.parse(ident + 1);
    }
    if (hasDescriptor()) {
      for (      D descriptor : descriptors)       content+=descriptor.parse(ident + 1);
    }
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}
Program: 5395
Project: 5395
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasBind()) {
    for (    B bind : binds)     content+=bind.parse(ident + 1);
  }
  if (getDefaultDescriptor() != null)   content+="String_Node_Str" + getDefaultDescriptor().getId() + "String_Node_Str";
  if (hasDescriptor()) {
    for (    D descriptor : descriptors)     content+=descriptor.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasBind()) {
    for (    B bind : binds)     content+=bind.parse(ident + 1);
  }
  if (getDefaultDescriptor() != null)   content+=space + "String_Node_Str" + "String_Node_Str"+ getDefaultDescriptor().getId()+ "String_Node_Str";
  if (hasDescriptor()) {
    for (    D descriptor : descriptors)     content+=descriptor.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}
Program: 5396
Project: 5396
Buggy source:
/** 
 * Adiciona uma região filha à região. A região filha é considerada uma região interna tendo seus parâmetros relativos a esta região.
 * @param child elemento representando a região a ser adicionada.
 * @return verdadeiro se a região foi adicionada.
 * @see TreeSet#add
 */
public boolean addRegion(R child) throws Exception {
  return regions.add(child);
}

Fixed version (ground truth):
/** 
 * Adiciona uma região filha à região. A região filha é considerada uma região interna tendo seus parâmetros relativos a esta região.
 * @param child elemento representando a região a ser adicionada.
 * @return verdadeiro se a região foi adicionada.
 * @see TreeSet#add
 */
public boolean addRegion(R child){
  return regions.add(child);
}
Program: 5397
Project: 5397
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (getDevice() != null)   content+="String_Node_Str" + getDevice() + "String_Node_Str";
  if (getParentRegion() != null)   content+="String_Node_Str" + getParentRegion().getId() + "String_Node_Str";
  if (hasRegion()) {
    content+="String_Node_Str";
    if (hasImportBase()) {
      for (      I imp : imports)       content+=imp.parse(ident + 1);
    }
    for (    R region : regions)     content+=region.parse(ident + 1);
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (getDevice() != null)   content+="String_Node_Str" + getDevice() + "String_Node_Str";
  if (getParentRegion() != null)   content+="String_Node_Str" + getParentRegion().getId() + "String_Node_Str";
  if (hasRegion() || hasImportBase()) {
    content+="String_Node_Str";
    if (hasImportBase()) {
      for (      I imp : imports)       content+=imp.parse(ident + 1);
    }
    for (    R region : regions)     content+=region.parse(ident + 1);
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}
Program: 5398
Project: 5398
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasImportNCL()) {
    for (    I imp : imports)     content+=imp.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (hasImportNCL()) {
    content+="String_Node_Str";
    for (    I imp : imports)     content+=imp.parse(ident + 1);
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}
Program: 5399
Project: 5399
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str" + getVar() + "String_Node_Str";
  content+="String_Node_Str" + getComparator() + "String_Node_Str";
  content+="String_Node_Str" + getValue() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str" + getVar().getName() + "String_Node_Str";
  content+="String_Node_Str" + getComparator().toString() + "String_Node_Str";
  content+="String_Node_Str" + getValue() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}
Program: 5400
Project: 5400
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasImportBase()) {
    for (    I imp : imports)     content+=imp.parse(ident + 1);
  }
  if (hasRule()) {
    for (    T rule : rules)     content+=rule.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (hasImportBase() || hasRule()) {
    content+="String_Node_Str";
    if (hasImportBase()) {
      for (      I imp : imports)       content+=imp.parse(ident + 1);
    }
    if (hasRule()) {
      for (      T rule : rules)       content+=rule.parse(ident + 1);
    }
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}
Program: 5401
Project: 5401
Buggy source:
/** 
 * Atribui um delay de progresso final a transição.
 * @param startProgress inteiro representando o delay final.
 */
public void setEndProgress(Integer endProgress){
  this.endProgress=endProgress;
}

Fixed version (ground truth):
/** 
 * Atribui um delay de progresso final a transição.
 * @param startProgress fracionário representando o delay final.
 */
public void setEndProgress(Double endProgress){
  this.endProgress=endProgress;
}
Program: 5402
Project: 5402
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str" + getType() + "String_Node_Str";
  if (getSubtype() != null)   content+="String_Node_Str" + getSubtype() + "String_Node_Str";
  if (getDur() != null)   content+="String_Node_Str" + getDur() + "String_Node_Str";
  if (getStartProgress() != null)   content+="String_Node_Str" + getStartProgress() + "String_Node_Str";
  if (getEndProgress() != null)   content+="String_Node_Str" + getEndProgress() + "String_Node_Str";
  if (getDirection() != null)   content+="String_Node_Str" + getDirection() + "String_Node_Str";
  if (getFadeColor() != null)   content+="String_Node_Str" + getFadeColor() + "String_Node_Str";
  if (getHorRepeat() != null)   content+="String_Node_Str" + getHorRepeat() + "String_Node_Str";
  if (getVertRepeat() != null)   content+="String_Node_Str" + getVertRepeat() + "String_Node_Str";
  if (getBorderWidth() != null)   content+="String_Node_Str" + getBorderWidth() + "String_Node_Str";
  if (getBorderColor() != null)   content+="String_Node_Str" + getBorderColor() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str" + getType() + "String_Node_Str";
  if (getSubtype() != null)   content+="String_Node_Str" + getSubtype() + "String_Node_Str";
  if (getDur() != null)   content+="String_Node_Str" + getDur() + "String_Node_Str";
  if (getStartProgress() != null)   content+="String_Node_Str" + getStartProgress() + "String_Node_Str";
  if (getEndProgress() != null)   content+="String_Node_Str" + getEndProgress() + "String_Node_Str";
  if (getDirection() != null)   content+="String_Node_Str" + getDirection().toString() + "String_Node_Str";
  if (getFadeColor() != null)   content+="String_Node_Str" + getFadeColor().toString() + "String_Node_Str";
  if (getHorRepeat() != null)   content+="String_Node_Str" + getHorRepeat() + "String_Node_Str";
  if (getVertRepeat() != null)   content+="String_Node_Str" + getVertRepeat() + "String_Node_Str";
  if (getBorderWidth() != null)   content+="String_Node_Str" + getBorderWidth() + "String_Node_Str";
  if (getBorderColor() != null)   content+="String_Node_Str" + getBorderColor().toString() + "String_Node_Str";
  content+="String_Node_Str";
  return content;
}
Program: 5403
Project: 5403
Buggy source:
/** 
 * Retorna o delay de progresso inicial da transição.
 * @return inteiro representando o delay inicial.
 */
public Integer getStartProgress(){
  return startProgress;
}

Fixed version (ground truth):
/** 
 * Retorna o delay de progresso inicial da transição.
 * @return fracionário representando o delay inicial.
 */
public Double getStartProgress(){
  return startProgress;
}
Program: 5404
Project: 5404
Buggy source:
/** 
 * Atribui um delay de progresso inicial a transição.
 * @param startProgress inteiro representando o delay inicial.
 */
public void setStartProgress(Integer startProgress){
  this.startProgress=startProgress;
}

Fixed version (ground truth):
/** 
 * Atribui um delay de progresso inicial a transição.
 * @param startProgress fracionário representando o delay inicial.
 */
public void setStartProgress(Double startProgress){
  this.startProgress=startProgress;
}
Program: 5405
Project: 5405
Buggy source:
/** 
 * Retorna o delay de progresso final da transição.
 * @return inteiro representando o delay final.
 */
public Integer getEndProgress(){
  return endProgress;
}

Fixed version (ground truth):
/** 
 * Retorna o delay de progresso final da transição.
 * @return fracionário representando o delay final.
 */
public Double getEndProgress(){
  return endProgress;
}
Program: 5406
Project: 5406
Buggy source:
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  content+="String_Node_Str";
  if (hasImportBase()) {
    for (    I imp : imports)     content+=imp.parse(ident + 1);
  }
  if (hasTransition()) {
    for (    T transition : transitions)     content+=transition.parse(ident + 1);
  }
  content+=space + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String parse(int ident){
  String space, content;
  if (ident < 0)   ident=0;
  space="String_Node_Str";
  for (int i=0; i < ident; i++)   space+="String_Node_Str";
  content=space + "String_Node_Str";
  if (getId() != null)   content+="String_Node_Str" + getId() + "String_Node_Str";
  if (hasImportBase() || hasTransition()) {
    content+="String_Node_Str";
    if (hasImportBase()) {
      for (      I imp : imports)       content+=imp.parse(ident + 1);
    }
    if (hasTransition()) {
      for (      T transition : transitions)       content+=transition.parse(ident + 1);
    }
    content+=space + "String_Node_Str";
  }
 else   content+="String_Node_Str";
  return content;
}
Program: 5407
Project: 5407
Buggy source:
@Override public void startElement(String uri,String localName,String qName,Attributes attributes){
  try {
    if (localName.equals("String_Node_Str")) {
      for (int i=0; i < attributes.getLength(); i++) {
        if (attributes.getLocalName(i).equals("String_Node_Str"))         setId(attributes.getValue(i));
 else         if (attributes.getLocalName(i).equals("String_Node_Str"))         setTitle(attributes.getValue(i));
 else         if (attributes.getLocalName(i).equals("String_Node_Str")) {
          for (          NCLNamespace ns : NCLNamespace.values()) {
            if (ns.toString().equals(attributes.getValue(i)))             setXmlns(ns);
          }
        }
      }
    }
 else     if (localName.equals("String_Node_Str")) {
      setHead((H)new NCLHead(getReader(),this));
      getHead().startElement(uri,localName,qName,attributes);
    }
 else     if (localName.equals("String_Node_Str")) {
      setBody((B)new NCLBody(getReader(),this));
      getBody().startElement(uri,localName,qName,attributes);
    }
  }
 catch (  NCLInvalidIdentifierException ex) {
  }
}

Fixed version (ground truth):
@Override public void startElement(String uri,String localName,String qName,Attributes attributes){
  try {
    if (localName.equals("String_Node_Str")) {
      for (int i=0; i < attributes.getLength(); i++) {
        if (attributes.getLocalName(i).equals("String_Node_Str"))         setId(attributes.getValue(i));
 else         if (attributes.getLocalName(i).equals("String_Node_Str"))         setTitle(attributes.getValue(i));
      }
      if (!uri.equals("String_Node_Str")) {
        for (        NCLNamespace ns : NCLNamespace.values()) {
          if (ns.toString().equals(uri))           setXmlns(ns);
        }
      }
    }
 else     if (localName.equals("String_Node_Str")) {
      setHead((H)new NCLHead(getReader(),this));
      getHead().startElement(uri,localName,qName,attributes);
    }
 else     if (localName.equals("String_Node_Str")) {
      setBody((B)new NCLBody(getReader(),this));
      getBody().startElement(uri,localName,qName,attributes);
    }
  }
 catch (  NCLInvalidIdentifierException ex) {
  }
}
Program: 5410
Project: 5410
Buggy source:
@Override public String toString(){
  if (getSecond() != null) {
    if (getFraction() != null) {
      if (getHour() != null && getMinute() != null) {
        if (getYear() != null && getMonth() != null && getDay() != null) {
          return year + "String_Node_Str" + month+ "String_Node_Str"+ day+ "String_Node_Str"+ hour+ "String_Node_Str"+ minute+ "String_Node_Str"+ second+ "String_Node_Str"+ fraction;
        }
 else         return hour + "String_Node_Str" + minute+ "String_Node_Str"+ second+ "String_Node_Str"+ fraction;
      }
 else       return second + "String_Node_Str" + fraction+ "String_Node_Str";
    }
 else     return second + "String_Node_Str";
  }
  return null;
}

Fixed version (ground truth):
@Override public String toString(){
  if (getSecond() == null)   return null;
  String result="String_Node_Str";
  if (getYear() != null && getMonth() != null && getDay() != null)   result+=getYear() + "String_Node_Str" + getMonth()+ "String_Node_Str"+ getDay()+ "String_Node_Str";
  if (getHour() != null && getMinute() != null)   result+=getHour() + "String_Node_Str" + getMinute()+ "String_Node_Str";
  if (getFraction() != null)   result+=getSecond() + "String_Node_Str" + getFraction();
 else   result+=getSecond();
  if (absoluteSecond())   result+="String_Node_Str";
  return result;
}
Program: 5412
Project: 5412
Buggy source:
public String[] getGroups(Player player){
  ArrayList<String> playerGroups=new ArrayList<String>();
  if (player.isOp()) {
    playerGroups.add("String_Node_Str");
  }
  if (permissions != null) {
    ArrayList<String> keepGroups=new ArrayList<String>();
    for (    String group : permissions.getGroups(player.getWorld().getName(),player.getName())) {
      if (permissions.inSingleGroup(player.getWorld().getName(),player.getName(),group)) {
        keepGroups.add(toTitleCase(group));
      }
    }
    for (    String ignore : ignoreGroups) {
      String tcIgnore=toTitleCase(ignore);
      if (keepGroups.contains(tcIgnore)) {
        keepGroups.remove(tcIgnore);
      }
    }
    playerGroups.addAll(keepGroups);
  }
  return playerGroups.toArray(new String[]{});
}

Fixed version (ground truth):
public String[] getGroups(Player player){
  ArrayList<String> playerGroups=new ArrayList<String>();
  if (player.isOp()) {
    playerGroups.add("String_Node_Str");
  }
  if (permissions != null) {
    ArrayList<String> keepGroups=new ArrayList<String>();
    try {
      for (      String group : permissions.getGroups(player.getWorld().getName(),player.getName())) {
        if (permissions.inSingleGroup(player.getWorld().getName(),player.getName(),group)) {
          keepGroups.add(toTitleCase(group));
        }
      }
    }
 catch (    NoSuchMethodError e) {
    }
    for (    String ignore : ignoreGroups) {
      String tcIgnore=toTitleCase(ignore);
      if (keepGroups.contains(tcIgnore)) {
        keepGroups.remove(tcIgnore);
      }
    }
    playerGroups.addAll(keepGroups);
  }
  return playerGroups.toArray(new String[]{});
}