nus-yam/ex-repair huggingface dataset:
Program: 86454
Project: 86454
Buggy source:
public PlayView(MainView owner){
  super(owner);
  panel.setLayout(null);
  panel.setPreferredSize(new Dimension(WIDTH,DHEIGHT));
  table=new Rectangle(290,DHEIGHT - CardPanel.IMAGE_HEIGHT - 35- 5- 275,222,275);
  dummyCards=new ArrayList<CardPanel>();
  currentTrickCards=new ArrayList<CardPanel>();
}

Fixed version (ground truth):
public PlayView(MainView owner){
  super(owner);
  panel.setLayout(null);
  panel.setPreferredSize(new Dimension(WIDTH,DHEIGHT));
  panel.setSize(new Dimension(WIDTH,DHEIGHT));
  table=new Rectangle(290,DHEIGHT - CardPanel.IMAGE_HEIGHT - 35- 5- 275,222,275);
  dummyCards=new ArrayList<CardPanel>();
  currentTrickCards=new ArrayList<CardPanel>();
}
Program: 86455
Project: 86455
Buggy source:
public void examinePosition(Node node){
  if (node.isPruned()) {
    return;
  }
  Game position=game.duplicate();
  position.playMoves(node.getMoves());
  Player player=position.getNextToPlay();
  node.setPlayerTurn(player.getDirection());
  if (position.oneTrickLeft()) {
    position.playMoves(finalMoves);
    handleLeafNode(node,position);
  }
 else {
    if (position.getTricksPlayed() >= maxTricks) {
      handleLeafNode(node,position);
    }
 else {
      List<Card> moves=player.getPossibleMoves(position.getCurrentTrick());
      for (      Card card : moves) {
        Node move=new Node(node);
        move.setCardPlayed(card);
        move.setPlayerCardPlayed(player);
        stack.push(move);
      }
    }
  }
}

Fixed version (ground truth):
public void examinePosition(Node node){
  if (node.isPruned()) {
    return;
  }
  Game position=game.duplicate();
  position.playMoves(node.getMoves());
  Player player=position.getNextToPlay();
  node.setPlayerTurn(player.getDirection());
  if (position.oneTrickLeft()) {
    if (node == root) {
      Node move=new Node(node);
      move.setCardPlayed(player.getPossibleMoves(position.getCurrentTrick()).get(0));
      move.setPlayerCardPlayed(player);
    }
    position.playMoves(finalMoves);
    handleLeafNode(node,position);
  }
 else {
    if (position.getTricksPlayed() >= maxTricks) {
      handleLeafNode(node,position);
    }
 else {
      List<Card> moves=player.getPossibleMoves(position.getCurrentTrick());
      for (      Card card : moves) {
        Node move=new Node(node);
        move.setCardPlayed(card);
        move.setPlayerCardPlayed(player);
        stack.push(move);
      }
    }
  }
}
Program: 86456
Project: 86456
Buggy source:
private void emit(JarOutputStream sink,ClassDefinition definition) throws IOException {
  String filename=definition.name().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  sink.putNextEntry(new JarEntry(filename));
  sink.write(definition.data());
  sink.closeEntry();
}

Fixed version (ground truth):
private void emit(JarOutputStream sink,ClassDefinition definition) throws IOException {
  sink.putNextEntry(new JarEntry(definition.name() + "String_Node_Str"));
  sink.write(definition.data());
  sink.closeEntry();
}
Program: 86458
Project: 86458
Buggy source:
/** 
 * stripOaiPrefix <p/> Remove the oai prefix and return the identifier. oai:domain:identifier => identifier
 * @param identifier the oai identifier
 * @return A local identifier
 */
public static String stripOaiPrefix(String identifier){
  final String prefix=(String)Parameters.getParam("String_Node_Str");
  final String id=identifier.substring(prefix.length());
  System.out.println("String_Node_Str" + prefix);
  System.out.println("String_Node_Str" + identifier);
  System.out.println("String_Node_Str" + id);
  return id;
}

Fixed version (ground truth):
/** 
 * stripOaiPrefix <p/> Remove the oai prefix and return the identifier. oai:domain:identifier => identifier
 * @param identifier the oai identifier
 * @return A local identifier
 */
public static String stripOaiPrefix(String identifier){
  final String prefix=(String)Parameters.getParam("String_Node_Str");
  final int length_prefix=prefix.length();
  if (identifier.length() < length_prefix)   return "String_Node_Str";
  return identifier.substring(length_prefix);
}
Program: 86459
Project: 86459
Buggy source:
public VarAccessType getVarAccessType(String varName){
  Parameter param=getParam(varName);
  if (param != null) {
    return new ParameterAccessType(param);
  }
 else {
    Field field=type.getField(varName);
    if (field != null) {
      return new FieldAccessType(field);
    }
 else {
      LocalVarContext localVarContext;
      if (!localVars.containsKey(varName)) {
        throw new RuntimeException("String_Node_Str" + varName + "String_Node_Str");
      }
 else {
        localVarContext=localVars.get(varName);
      }
      return new LocalVariableAccessType(varName,localVarContext.getIndex(),localVarContext.getType());
    }
  }
}

Fixed version (ground truth):
public VarAccessType getVarAccessType(String varName){
  Parameter param=getParam(varName);
  if (param != null) {
    return new ParameterAccessType(param);
  }
 else {
    Field field=type.getField(varName);
    if (field != null) {
      return new FieldAccessType(field);
    }
 else {
      LocalVarContext localVarContext;
      if (!localVars.containsKey(varName)) {
        throw new RuntimeException("String_Node_Str" + varName + "String_Node_Str"+ type.getName()+ "String_Node_Str"+ method.getName()+ method.getSignature());
      }
 else {
        localVarContext=localVars.get(varName);
      }
      return new LocalVariableAccessType(varName,localVarContext.getIndex(),localVarContext.getType());
    }
  }
}
Program: 86460
Project: 86460
Buggy source:
public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  try {
    return method.invoke(visitor,args);
  }
 catch (  InvocationTargetException e) {
    throw new VisitorRuntimeException(method.getDeclaringClass().getSimpleName(),args[0],e.getTargetException());
  }
}

Fixed version (ground truth):
public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  try {
    return method.invoke(visitor,args);
  }
 catch (  InvocationTargetException e) {
    throw new VisitorRuntimeException(visitor.getClass().getSimpleName(),args[0],e.getTargetException());
  }
}
Program: 86461
Project: 86461
Buggy source:
@SuppressWarnings("String_Node_Str") private static <T>T wrap(final T visitor,Class<T> interf){
  return (T)Proxy.newProxyInstance(ExceptionHandlingVisitor.class.getClassLoader(),new Class<?>[]{interf},new InvocationHandler(){
    public Object invoke(    Object proxy,    Method method,    Object[] args) throws Throwable {
      try {
        return method.invoke(visitor,args);
      }
 catch (      InvocationTargetException e) {
        throw new VisitorRuntimeException(method.getDeclaringClass().getSimpleName(),args[0],e.getTargetException());
      }
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static <T>T wrap(final T visitor,Class<T> interf){
  return (T)Proxy.newProxyInstance(ExceptionHandlingVisitor.class.getClassLoader(),new Class<?>[]{interf},new InvocationHandler(){
    public Object invoke(    Object proxy,    Method method,    Object[] args) throws Throwable {
      try {
        return method.invoke(visitor,args);
      }
 catch (      InvocationTargetException e) {
        throw new VisitorRuntimeException(visitor.getClass().getSimpleName(),args[0],e.getTargetException());
      }
    }
  }
);
}
Program: 86462
Project: 86462
Buggy source:
@Override public Field getField(String name){
  java.lang.reflect.Field field;
  try {
    field=existing.getField(name);
  }
 catch (  NoSuchFieldException e) {
    return null;
  }
catch (  SecurityException e) {
    return null;
  }
  if (field != null) {
    return new Field(MemberFlags.fromReflection(field),existing(field.getType()),field.getName());
  }
  return null;
}

Fixed version (ground truth):
@Override public Field getField(String name){
  java.lang.reflect.Field field;
  try {
    field=existing.getDeclaredField(name);
  }
 catch (  NoSuchFieldException e) {
    return null;
  }
catch (  SecurityException e) {
    return null;
  }
  if (field != null) {
    return new Field(MemberFlags.fromReflection(field),existing(field.getType()),field.getName());
  }
  return null;
}
Program: 86463
Project: 86463
Buggy source:
private String paramString(Iterable<Parameter> parameters){
  String result=null;
  for (  Parameter parameter : parameters) {
    if (result == null) {
      result="String_Node_Str";
    }
 else {
      result+="String_Node_Str";
    }
    result+=parameter.getType().getName() + "String_Node_Str" + parameter.getName();
  }
  return result == null ? "String_Node_Str" : result;
}

Fixed version (ground truth):
private String paramString(Iterable<Parameter> parameters){
  String result=null;
  for (  Parameter parameter : parameters) {
    if (result == null) {
      result="String_Node_Str";
    }
 else {
      result+="String_Node_Str";
    }
    result+=parameter.getType().getPrintableName() + "String_Node_Str" + parameter.getName();
  }
  return result == null ? "String_Node_Str" : result;
}
Program: 86464
Project: 86464
Buggy source:
private void printFields(Iterable<Field> fields){
  for (  Field f : fields) {
    println(getKeywords(f.getFlags()) + "String_Node_Str" + f.getType().getName()+ "String_Node_Str"+ f.getName()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
private void printFields(Iterable<Field> fields){
  for (  Field f : fields) {
    println(getKeywords(f.getFlags()) + "String_Node_Str" + f.getType().getPrintableName()+ "String_Node_Str"+ f.getName()+ "String_Node_Str");
  }
}
Program: 86465
Project: 86465
Buggy source:
private void printMethods(FutureType type,String typeName,Iterable<Method> methods){
  for (  Method m : methods) {
    context=new MethodContext(type,m);
    String methodName=m.getName();
    String returnType=m.getReturnType().getName();
    if (methodName.equals("String_Node_Str")) {
      println(getKeywords(m.getFlags()) + "String_Node_Str" + typeName+ "String_Node_Str"+ paramString(m.getParameters())+ "String_Node_Str");
    }
 else {
      println(getKeywords(m.getFlags()) + "String_Node_Str" + returnType+ "String_Node_Str"+ methodName+ "String_Node_Str"+ paramString(m.getParameters())+ "String_Node_Str");
    }
    incIndent();
    for (    Statement s : m.getStatements()) {
      s.accept(this);
    }
    decIndent();
    println("String_Node_Str");
    println();
  }
}

Fixed version (ground truth):
private void printMethods(FutureType type,String typeName,Iterable<Method> methods){
  for (  Method m : methods) {
    context=new MethodContext(type,m);
    String methodName=m.getName();
    String returnType=m.getReturnType().getPrintableName();
    if (methodName.equals("String_Node_Str")) {
      println(getKeywords(m.getFlags()) + "String_Node_Str" + typeName+ "String_Node_Str"+ paramString(m.getParameters())+ "String_Node_Str");
    }
 else {
      println(getKeywords(m.getFlags()) + "String_Node_Str" + returnType+ "String_Node_Str"+ methodName+ "String_Node_Str"+ paramString(m.getParameters())+ "String_Node_Str");
    }
    incIndent();
    for (    Statement s : m.getStatements()) {
      s.accept(this);
    }
    decIndent();
    println("String_Node_Str");
    println();
  }
}
Program: 86466
Project: 86466
Buggy source:
public byte[] generate(FutureType futureType){
  ClassNode classNode=new ClassNode();
  classNode.version=Opcodes.V1_6;
  classNode.access=Opcodes.ACC_PUBLIC | Opcodes.ACC_SUPER;
  classNode.sourceFile=futureType.getSourceFile();
  classNode.name=futureType.getClassIdentifier();
  classNode.superName=futureType.getExtending().getClassIdentifier();
  List<Field> fields=futureType.getFields();
  for (  Field field : fields) {
    classNode.fields.add(new FieldNode(MethodByteCodeContext.getAccess(field.getFlags()),field.getName(),field.getSignature(),null,null));
  }
  List<Method> constructors=futureType.getConstructors();
  if (constructors.isEmpty()) {
    constructors=Arrays.asList(new Method(futureType.getName(),new MemberFlags(false,PUBLIC),VOID,"String_Node_Str",new ArrayList<Parameter>(),Arrays.<Statement>asList(new CallConstructorStatement(0,new CallConstructorExpression(Arrays.<Expression>asList())))));
  }
  for (  Method method : constructors) {
    classNode.methods.add(getMethodNode(futureType,method));
  }
  for (  Method method : futureType.getMethods()) {
    classNode.methods.add(getMethodNode(futureType,method));
  }
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
  ClassVisitor cv=new CheckClassAdapter(cw,true);
  classNode.accept(cv);
  return cw.toByteArray();
}

Fixed version (ground truth):
public byte[] generate(FutureType futureType){
  ClassNode classNode=new ClassNode();
  classNode.version=Opcodes.V1_6;
  classNode.access=Opcodes.ACC_PUBLIC | Opcodes.ACC_SUPER;
  classNode.sourceFile=futureType.getSourceFile();
  classNode.name=futureType.getClassIdentifier();
  classNode.superName=futureType.getExtending().getClassIdentifier();
  List<Field> fields=futureType.getFields();
  for (  Field field : fields) {
    classNode.fields.add(new FieldNode(MethodByteCodeContext.getAccess(field.getFlags()),field.getName(),field.getSignature(),null,null));
  }
  List<Method> constructors=futureType.getConstructors();
  if (constructors.isEmpty()) {
    constructors=Arrays.asList(new Method(futureType.getName(),new MemberFlags(false,PUBLIC),VOID,"String_Node_Str",new ArrayList<Parameter>(),Arrays.<Statement>asList(new CallConstructorStatement(0,new CallConstructorExpression(Arrays.<Expression>asList()))),false));
  }
  for (  Method method : constructors) {
    classNode.methods.add(getMethodNode(futureType,method));
  }
  for (  Method method : futureType.getMethods()) {
    classNode.methods.add(getMethodNode(futureType,method));
  }
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
  ClassVisitor cv=new CheckClassAdapter(cw,true);
  classNode.accept(cv);
  return cw.toByteArray();
}
Program: 86467
Project: 86467
Buggy source:
abstract public void exec();

Fixed version (ground truth):
abstract public void exec(Iterator<Integer> it);
Program: 86468
Project: 86468
Buggy source:
private void validate(final MethodContext context,Statement statement){
  StatementVisitor statementVisitor=new StatementVisitor(){
    @Override public void visit(    SetStatement setStatement){
      VarAccessType varTypeToSet=context.getVarAccessType(setStatement.getTo());
      varTypeToSet.accept(new VarAccessTypeVisitor(){
        public void visit(        ParameterAccessType parameterAccessType){
        }
        public void visit(        FieldAccessType fieldAccessType){
        }
      }
);
    }
    public void visit(    ThrowStatement throwStatement){
    }
    public void visit(    CaseStatement caseStatement){
    }
    public void visit(    SwitchStatement switchStatement){
    }
    public void visit(    ExpressionStatement methodCallStatement){
    }
    public void visit(    ReturnStatement returnStatement){
    }
    public void visit(    IfStatement ifStatement){
    }
    @Override public void visit(    LabelStatement labelStatement){
    }
    @Override public void visit(    GotoStatement gotoStatement){
    }
    @Override public void visit(    CallConstructorStatement callConstructorStatement){
    }
  }
;
  statement.accept(statementVisitor);
}

Fixed version (ground truth):
private void validate(final MethodContext context,Statement statement){
  try {
    StatementVisitor statementVisitor=new StatementVisitor(){
      @Override public void visit(      SetStatement setStatement){
        VarAccessType varTypeToSet=context.getVarAccessType(setStatement.getTo());
        varTypeToSet.accept(new VarAccessTypeVisitor(){
          public void visit(          ParameterAccessType parameterAccessType){
          }
          public void visit(          FieldAccessType fieldAccessType){
          }
        }
);
      }
      public void visit(      ThrowStatement throwStatement){
      }
      public void visit(      CaseStatement caseStatement){
      }
      public void visit(      SwitchStatement switchStatement){
      }
      public void visit(      ExpressionStatement methodCallStatement){
      }
      public void visit(      ReturnStatement returnStatement){
      }
      public void visit(      IfStatement ifStatement){
      }
      @Override public void visit(      LabelStatement labelStatement){
      }
      @Override public void visit(      GotoStatement gotoStatement){
      }
      @Override public void visit(      CallConstructorStatement callConstructorStatement){
      }
    }
;
    statement.accept(statementVisitor);
  }
 catch (  RuntimeException e) {
    throw new RuntimeException("String_Node_Str" + statement.getLine() + "String_Node_Str"+ context.getClassIdentifier()+ "String_Node_Str"+ context.getMethod().getName()+ context.getMethod().getSignature(),e);
  }
}
Program: 86469
Project: 86469
Buggy source:
public ClassBuilder endConstructor(){
  return methodHandler.handleMethod(new Method(classIdentifier,new MemberFlags(false,protection),VOID,"String_Node_Str",parameters,statements));
}

Fixed version (ground truth):
public ClassBuilder endConstructor(){
  return methodHandler.handleMethod(new Method(classIdentifier,new MemberFlags(false,protection),VOID,"String_Node_Str",parameters,statements,false));
}
Program: 86470
Project: 86470
Buggy source:
public ClassBuilder endMethod(){
  return methodHandler.handleMethod(new Method(classIdentifier,memberFlags,returnType,name,parameters,statements));
}

Fixed version (ground truth):
public ClassBuilder endMethod(){
  return methodHandler.handleMethod(new Method(classIdentifier,memberFlags,returnType,name,parameters,statements,false));
}
Program: 86471
Project: 86471
Buggy source:
@Override public Method getMethod(String methodName,int parameterCount){
  java.lang.reflect.Method[] declaredMethods=existing.getDeclaredMethods();
  for (  java.lang.reflect.Method method : declaredMethods) {
    Class<?>[] parameterTypes=method.getParameterTypes();
    if (method.getName().equals(methodName) && parameterTypes.length == parameterCount) {
      ArrayList<Parameter> parameters=convertParameters(parameterTypes);
      return new Method(this.getClassIdentifier(),MemberFlags.fromReflection(method),existing(method.getReturnType()),methodName,parameters,new ArrayList<Statement>());
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Method getMethod(String methodName,int parameterCount){
  java.lang.reflect.Method[] declaredMethods=existing.getDeclaredMethods();
  for (  java.lang.reflect.Method method : declaredMethods) {
    Class<?>[] parameterTypes=method.getParameterTypes();
    if (method.getName().equals(methodName) && parameterTypes.length == parameterCount) {
      ArrayList<Parameter> parameters=convertParameters(parameterTypes);
      return new Method(this.getClassIdentifier(),MemberFlags.fromReflection(method),existing(method.getReturnType()),methodName,parameters,new ArrayList<Statement>(),existing.isInterface());
    }
  }
  if (existing.getSuperclass() != null) {
    return existing(existing.getSuperclass()).getMethod(methodName,parameterCount);
  }
  return null;
}
Program: 86472
Project: 86472
Buggy source:
@Override public Method getConstructor(int parameterCount){
  for (  java.lang.reflect.Constructor<?> constructor : existing.getConstructors()) {
    Class<?>[] parameterTypes=constructor.getParameterTypes();
    if (parameterTypes.length == parameterCount) {
      ArrayList<Parameter> parameters=convertParameters(parameterTypes);
      return new Method(this.getClassIdentifier(),MemberFlags.fromReflection(constructor),VOID,"String_Node_Str",parameters,new ArrayList<Statement>());
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Method getConstructor(int parameterCount){
  for (  java.lang.reflect.Constructor<?> constructor : existing.getConstructors()) {
    Class<?>[] parameterTypes=constructor.getParameterTypes();
    if (parameterTypes.length == parameterCount) {
      ArrayList<Parameter> parameters=convertParameters(parameterTypes);
      return new Method(this.getClassIdentifier(),MemberFlags.fromReflection(constructor),VOID,"String_Node_Str",parameters,new ArrayList<Statement>(),false);
    }
  }
  return null;
}
Program: 86473
Project: 86473
Buggy source:
public Method(String typeName,MemberFlags memberFlags,Type returnType,String name,List<Parameter> parameters,List<Statement> statements){
  this.typeName=typeName;
  this.memberFlags=memberFlags;
  this.returnType=returnType;
  this.name=name;
  this.parameters=parameters;
  this.statements=statements;
}

Fixed version (ground truth):
public Method(String typeName,MemberFlags memberFlags,Type returnType,String name,List<Parameter> parameters,List<Statement> statements,boolean interfaceMethod){
  this.typeName=typeName;
  this.memberFlags=memberFlags;
  this.returnType=returnType;
  this.name=name;
  this.parameters=parameters;
  this.statements=statements;
  this.interfaceMethod=interfaceMethod;
}
Program: 86474
Project: 86474
Buggy source:
@Override public void visit(CastExpression castExpression){
  castExpression.getExpression().accept(this);
  methodByteCodeContext.addInstruction(new TypeInsnNode(CHECKCAST,castExpression.getType().getClassIdentifier()));
  lastExpressionType=castExpression.getType();
}

Fixed version (ground truth):
@Override public void visit(CastExpression castExpression){
  castExpression.getExpression().accept(this);
  methodByteCodeContext.addInstruction(new TypeInsnNode(CHECKCAST,castExpression.getType().getClassIdentifier()),"String_Node_Str",castExpression.getType());
  lastExpressionType=castExpression.getType();
}
Program: 86475
Project: 86475
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + getClass().getSimpleName() + "String_Node_Str"+ getCallee()+ "String_Node_Str"+ methodName+ "String_Node_Str"+ parameters+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + getClass().getSimpleName() + "String_Node_Str"+ (callee == null ? "String_Node_Str" : callee)+ "String_Node_Str"+ methodName+ "String_Node_Str"+ parameters+ "String_Node_Str";
}
Program: 86476
Project: 86476
Buggy source:
@Override public void removeCommand(FactionsCommand cmd){
  try {
    P.p.cmdBase.getClass().getField("String_Node_Str").getClass().getMethod("String_Node_Str",MCommand.class).invoke(this,wrappers.get(cmd));
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
  }
  wrappers.remove(cmd);
  helpLine.remove(cmd);
  rebuldPages();
}

Fixed version (ground truth):
@Override public void removeCommand(FactionsCommand cmd){
  try {
    P.p.cmdBase.getClass().getField("String_Node_Str").getClass().getMethod("String_Node_Str",MCommand.class).invoke(P.p.cmdBase,wrappers.get(cmd));
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
  }
  wrappers.remove(cmd);
  helpLine.remove(cmd);
  rebuldPages();
}
Program: 86477
Project: 86477
Buggy source:
@SuppressWarnings("String_Node_Str") public List<com.massivecraft.factions.Faction> getAllFactions(){
  try {
    return (List<com.massivecraft.factions.Faction>)this.getInstance().getClass().getMethod("String_Node_Str").invoke(this);
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public List<com.massivecraft.factions.Faction> getAllFactions(){
  try {
    return (List<com.massivecraft.factions.Faction>)this.getInstance().getClass().getMethod("String_Node_Str").invoke(this.getInstance());
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}
Program: 86478
Project: 86478
Buggy source:
public com.massivecraft.factions.Faction getFactionById(String id){
  try {
    return (com.massivecraft.factions.Faction)this.getInstance().getClass().getMethod("String_Node_Str",String.class).invoke(this,id);
  }
 catch (  IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}

Fixed version (ground truth):
public com.massivecraft.factions.Faction getFactionById(String id){
  try {
    return (com.massivecraft.factions.Faction)this.getInstance().getClass().getMethod("String_Node_Str",String.class).invoke(this.getInstance(),id);
  }
 catch (  IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}
Program: 86479
Project: 86479
Buggy source:
@SuppressWarnings("String_Node_Str") private List<com.massivecraft.factions.Faction> getAllOriginalFactions(){
  try {
    return (List<com.massivecraft.factions.Faction>)this.getInstance().getClass().getMethod("String_Node_Str").invoke(this);
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private ArrayList<com.massivecraft.factions.Faction> getAllOriginalFactions(){
  try {
    return (ArrayList<com.massivecraft.factions.Faction>)this.getInstance().getClass().getMethod("String_Node_Str").invoke(this.getInstance());
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
    return null;
  }
}
Program: 86480
Project: 86480
Buggy source:
private com.massivecraft.factions.Factions getInstance(){
  try {
    return (com.massivecraft.factions.Factions)Factions.class.getMethod("String_Node_Str").invoke(this);
  }
 catch (  Exception e) {
    FactionsPlus.get().logError(e);
    return null;
  }
}

Fixed version (ground truth):
private com.massivecraft.factions.Factions getInstance(){
  if (this.factionsInstance != null)   return factionsInstance;
  try {
    factionsInstance=(com.massivecraft.factions.Factions)com.massivecraft.factions.Factions.class.getMethod("String_Node_Str").invoke(this);
  }
 catch (  Exception e) {
    FactionsPlus.get().logError(e);
    return null;
  }
  return factionsInstance;
}
Program: 86481
Project: 86481
Buggy source:
public void removeCommand(FCommand fcommand){
  try {
    P.p.cmdBase.getClass().getField("String_Node_Str").getClass().getMethod("String_Node_Str",MassiveCommand.class).invoke(this,fcommand);
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
  }
}

Fixed version (ground truth):
public void removeCommand(FCommand fcommand){
  this.getSubcommands().remove(fcommand);
}
Program: 86482
Project: 86482
Buggy source:
public boolean containsCommand(FCommand fcommand){
  try {
    Boolean result=(Boolean)P.p.cmdBase.getClass().getField("String_Node_Str").getClass().getMethod("String_Node_Str",MassiveCommand.class).invoke(this,fcommand);
    return result;
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
    return false;
  }
}

Fixed version (ground truth):
public boolean containsCommand(FCommand fcommand){
  return this.getSubcommands().add(fcommand);
}
Program: 86483
Project: 86483
Buggy source:
public void addCommand(FCommand fcommand){
  try {
    P.p.cmdBase.getClass().getField("String_Node_Str").getClass().getMethod("String_Node_Str",MassiveCommand.class).invoke(this,fcommand);
  }
 catch (  Exception e) {
    FactionsFramework.get().logError(e);
  }
}

Fixed version (ground truth):
public void addCommand(FCommand fcommand){
  this.getSubcommands().add(fcommand);
}
Program: 86485
Project: 86485
Buggy source:
@Override public void performfp(){
  if (!FPUConf.get(usender.getUniverse()).whoCanAnnounce.get(usender.getRole())) {
    msg(Txt.parse(LConf.get().announcementNotHighEnoughRankingToSet));
    return;
  }
  if (FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str") > 0.0) {
    if (!Utilities.doCharge(FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str"),usender)) {
      msg(Txt.parse(LConf.get().announcementCanNotAfford,FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str")));
      return;
    }
  }
  String message=Txt.implode(args,"String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  FactionData fData=FactionDataColls.get().getForUniverse(usender.getUniverse()).get(usenderFaction.getId());
  fData.announcement=message;
  if (FPUConf.get(usender.getUniverse()).allowColoursInAnnouncements) {
    message=Txt.parse(message);
  }
  usenderFaction.msg(Txt.parse(LConf.get().announcementNotify,sender.getName(),message));
}

Fixed version (ground truth):
@Override public void performfp(){
  if (!FPUConf.get(usender.getUniverse()).whoCanAnnounce.get(usender.getRole())) {
    msg(Txt.parse(LConf.get().announcementNotHighEnoughRankingToSet));
    return;
  }
  if (FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str") > 0.0) {
    if (!Utilities.doCharge(FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str"),usender)) {
      msg(Txt.parse(LConf.get().announcementCanNotAfford,FPUConf.get(usender.getUniverse()).economyCost.get("String_Node_Str")));
      return;
    }
  }
  String message=Txt.implode(args,"String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  FactionData fData=FactionDataColls.get().getForUniverse(usender.getUniverse()).get(usenderFaction.getId());
  fData.announcement=message;
  fData.announcer=me.getName();
  if (FPUConf.get(usender.getUniverse()).allowColoursInAnnouncements) {
    message=Txt.parse(message);
  }
  usenderFaction.msg(Txt.parse(LConf.get().announcementNotify,sender.getName(),message));
}
Program: 86486
Project: 86486
Buggy source:
/** 
 * Validate the password of a warp, returns true if it is valid. 
 * @param name
 * @param pass
 * @return
 */
public boolean warpValidatePassword(String name,String pass){
  if (!warpHasPassword(name.toLowerCase())) {
    return true;
  }
  if (warpPasswords.get(name.toLowerCase()) == pass) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Validate the password of a warp, returns true if it is valid. 
 * @param name
 * @param pass
 * @return
 */
public boolean warpValidatePassword(String name,String pass){
  if (!warpHasPassword(name.toLowerCase())) {
    return true;
  }
  if (warpPasswords.get(name.toLowerCase()).equals(pass)) {
    return true;
  }
  return false;
}
Program: 86488
Project: 86488
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onFactionDisband(FactionsEventDisband e){
  if (Config._extras._scoreboards.showScoreboardOfFactions._) {
    if (FactionsPlusScoreboard.scoreBoard.getObjective(FactionsPlusScoreboard.objective_name) == null) {
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onFactionDisband(FactionsEventDisband e){
  if (Config._extras._scoreboards.showScoreboardOfFactions._) {
    if (FactionsPlusScoreboard.scoreBoard.getObjective(FactionsPlusScoreboard.objective_name) == null) {
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
    }
  }
}
Program: 86489
Project: 86489
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onFactionNameChange(FactionsEventNameChange e){
  if (Config._extras._scoreboards.showScoreboardOfFactions._) {
    if (FactionsPlusScoreboard.scoreBoard.getObjective(FactionsPlusScoreboard.objective_name) == null) {
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onFactionNameChange(FactionsEventNameChange e){
  if (Config._extras._scoreboards.showScoreboardOfFactions._) {
    if (FactionsPlusScoreboard.scoreBoard.getObjective(FactionsPlusScoreboard.objective_name) == null) {
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
      try {
        FactionsPlusScoreboard.sFactions.remove("String_Node_Str" + "String_Node_Str" + e.getFaction().getName());
      }
 catch (      Exception exc) {
      }
    }
  }
}
Program: 86490
Project: 86490
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerMilkEvent(PlayerInteractEntityEvent event){
  Player player=event.getPlayer();
  if (((event.getRightClicked() instanceof Cow && player.getItemInHand().getType().equals(Material.BUCKET) || (event.getRightClicked() instanceof MushroomCow && player.getItemInHand().getType().equals(Material.BOWL)))) && Config._extras._protection.stricterFarmingProtection._) {
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtCow=BoardColls.get().getFactionAt(PS.valueOf(event.getRightClicked().getLocation()));
    if (factionAtCow != uPlayer.getFaction() && !factionAtCow.isNone() && FType.valueOf(factionAtCow) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerMilkEvent(PlayerInteractEntityEvent event){
  Player player=event.getPlayer();
  if (((event.getRightClicked() instanceof Cow && player.getItemInHand().getType().equals(Material.BUCKET) || (event.getRightClicked() instanceof MushroomCow && player.getItemInHand().getType().equals(Material.BOWL)))) && Config._extras._protection.stricterFarmingProtection._) {
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtCow=BoardColls.get().getFactionAt(PS.valueOf(event.getRightClicked().getLocation()));
    if (factionAtCow != uPlayer.getFaction() && !factionAtCow.isNone() && FType.valueOf(factionAtCow) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
  }
}
Program: 86491
Project: 86491
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerThrowPotion(ProjectileLaunchEvent event){
  if (!(event.getEntity() instanceof Player)) {
    return;
  }
  if ((event.getEntityType() == EntityType.SPLASH_POTION) && (((Player)event.getEntity().getShooter()).isFlying()) && !Config._extras._Flight.allowSplashPotionsWhileFlying._) {
    ((Player)event.getEntity().getShooter()).sendMessage(ChatColor.RED + "String_Node_Str");
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerThrowPotion(ProjectileLaunchEvent event){
  if (!(event.getEntity() instanceof Player)) {
    return;
  }
  if ((event.getEntityType() == EntityType.SPLASH_POTION) && (((Player)event.getEntity().getShooter()).isFlying()) && !Config._extras._Flight.allowSplashPotionsWhileFlying._) {
    ((Player)event.getEntity().getShooter()).sendMessage(ChatColor.RED + "String_Node_Str");
    event.setCancelled(true);
  }
}
Program: 86492
Project: 86492
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  Player player=event.getPlayer();
  Entity currentEntity=event.getRightClicked();
  if ((event.getRightClicked() instanceof Horse && player.getItemInHand().getType().equals(Material.LEASH)) || event.getRightClicked() instanceof Pig || event.getRightClicked() instanceof Horse) {
    Faction entityAt=BoardColls.get().getFactionAt(PS.valueOf(currentEntity.getLocation()));
    if (entityAt.getId() != UPlayer.get(player).getFaction().getId() && FType.valueOf(entityAt) == FType.FACTION) {
      player.sendMessage("String_Node_Str");
      player.updateInventory();
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  Player player=event.getPlayer();
  Entity currentEntity=event.getRightClicked();
  if ((event.getRightClicked() instanceof Horse && player.getItemInHand().getType().equals(Material.LEASH)) || event.getRightClicked() instanceof Pig || event.getRightClicked() instanceof Horse) {
    Faction entityAt=BoardColls.get().getFactionAt(PS.valueOf(currentEntity.getLocation()));
    if (entityAt.getId() != UPlayer.get(player).getFaction().getId() && FType.valueOf(entityAt) == FType.FACTION) {
      player.sendMessage("String_Node_Str");
      player.updateInventory();
    }
  }
}
Program: 86493
Project: 86493
Buggy source:
@EventHandler(ignoreCancelled=true) public void onEntityDamage(EntityDamageEvent event){
  if (event.getEntity() instanceof Player) {
    Player p=(Player)event.getEntity();
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(p.getLocation()));
    if (FType.valueOf(factionAt) == FType.SAFEZONE && Config._extras._protection.safeZonesExtraSafe._) {
      event.setCancelled(true);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDamage(EntityDamageEvent event){
  if (event.getEntity() instanceof Player) {
    Player p=(Player)event.getEntity();
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(p.getLocation()));
    if (FType.valueOf(factionAt) == FType.SAFEZONE && Config._extras._protection.safeZonesExtraSafe._) {
      event.setCancelled(true);
    }
  }
}
Program: 86494
Project: 86494
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerMove(PlayerMoveEvent event){
  if (FP.permission.has(event.getPlayer(),"String_Node_Str")) {
    if (BoardColls.get().getFactionAt(PS.valueOf(event.getPlayer().getLocation())).getId() == UPlayer.get(event.getPlayer()).getFactionId()) {
      event.getPlayer().setAllowFlight(true);
    }
 else {
      event.getPlayer().setAllowFlight(false);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerMove(PlayerMoveEvent event){
  if (FP.permission.has(event.getPlayer(),"String_Node_Str")) {
    if (BoardColls.get().getFactionAt(PS.valueOf(event.getPlayer().getLocation())).getId() == UPlayer.get(event.getPlayer()).getFactionId()) {
      event.getPlayer().setAllowFlight(true);
    }
 else {
      event.getPlayer().setAllowFlight(false);
    }
  }
}
Program: 86495
Project: 86495
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerBowShoot(EntityShootBowEvent event){
  if (!Config._extras._Flight.allowAttackingWhileFlying._) {
    if ((event.getEntity() instanceof Player)) {
      Player player=(Player)event.getEntity();
      if (player.isFlying()) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerBowShoot(EntityShootBowEvent event){
  if (!Config._extras._Flight.allowAttackingWhileFlying._) {
    if ((event.getEntity() instanceof Player)) {
      Player player=(Player)event.getEntity();
      if (player.isFlying()) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        event.setCancelled(true);
      }
    }
  }
}
Program: 86496
Project: 86496
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerCreateFaction(FactionsEventCreate event){
  if (Config._factions.factionNameFirstLetterForceUpperCase._) {
    String upperFactionName=Character.toUpperCase(event.getFactionName().charAt(0)) + event.getFactionName().substring(1);
    Faction wFaction=Faction.get(event.getFactionId());
    wFaction.setName(upperFactionName);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerCreateFaction(FactionsEventCreate event){
  if (Config._factions.factionNameFirstLetterForceUpperCase._) {
    String upperFactionName=Character.toUpperCase(event.getFactionName().charAt(0)) + event.getFactionName().substring(1);
    Faction wFaction=Faction.get(event.getFactionId());
    wFaction.setName(upperFactionName);
  }
}
Program: 86497
Project: 86497
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerFish(PlayerFishEvent event){
  if (Config._extras._protection.stricterFarmingProtection._) {
    Player player=event.getPlayer();
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtHook=BoardColls.get().getFactionAt(PS.valueOf(event.getHook().getLocation()));
    if (factionAtHook != uPlayer.getFaction() && !factionAtHook.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerFish(PlayerFishEvent event){
  if (Config._extras._protection.stricterFarmingProtection._) {
    Player player=event.getPlayer();
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtHook=BoardColls.get().getFactionAt(PS.valueOf(event.getHook().getLocation()));
    if (factionAtHook != uPlayer.getFaction() && !factionAtHook.isNone() && FType.valueOf(factionAt) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}
Program: 86498
Project: 86498
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerShearEntityEvent(PlayerShearEntityEvent event){
  if (event.getEntity() instanceof Sheep && Config._extras._protection.stricterFarmingProtection._) {
    Player player=event.getPlayer();
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone()) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtSheep=BoardColls.get().getFactionAt(PS.valueOf(event.getEntity().getLocation()));
    if (factionAtSheep != uPlayer.getFaction() && !factionAtSheep.isNone() && FType.valueOf(factionAtSheep) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerShearEntityEvent(PlayerShearEntityEvent event){
  if (event.getEntity() instanceof Sheep && Config._extras._protection.stricterFarmingProtection._) {
    Player player=event.getPlayer();
    UPlayer uPlayer=UPlayer.get(player);
    Faction factionAt=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
    if (factionAt != uPlayer.getFaction() && !factionAt.isNone()) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    Faction factionAtSheep=BoardColls.get().getFactionAt(PS.valueOf(event.getEntity().getLocation()));
    if (factionAtSheep != uPlayer.getFaction() && !factionAtSheep.isNone() && FType.valueOf(factionAtSheep) != FType.SAFEZONE) {
      event.setCancelled(true);
      player.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}
Program: 86499
Project: 86499
Buggy source:
@EventHandler(ignoreCancelled=true) public void onLandClaim(FactionsEventChunkChange event){
  if (Config._extras._protection.worldguardCanBuildCheck._) {
    if (!event.getUSender().getFaction().isNone() && !event.getUSender().isUsingAdminMode() && !event.getUSender().getPlayer().isOp()&& !FP.permission.has(event.getUSender().getPlayer(),"String_Node_Str")) {
      if (Bukkit.getServer().getPluginManager().isPluginEnabled("String_Node_Str")) {
        if (FP.worldGuardPlugin != null) {
          if (Utilities.checkForRegionsInChunk(event.getUSender().getPlayer().getLocation())) {
            event.setCancelled(true);
            event.getUSender().msg(ChatColor.RED + "String_Node_Str");
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onLandClaim(FactionsEventChunkChange event){
  if (Config._extras._protection.worldguardCanBuildCheck._) {
    if (event.getUSender() == null)     return;
    if (!event.getUSender().getFaction().isNone() && !event.getUSender().isUsingAdminMode() && !event.getUSender().getPlayer().isOp()&& FactionsPlus.permission.has(event.getUSender().getPlayer(),"String_Node_Str")) {
      if (Bukkit.getServer().getPluginManager().isPluginEnabled("String_Node_Str")) {
        if (FP.worldGuardPlugin != null) {
          if (Utilities.checkForRegionsInChunk(event.getUSender().getPlayer().getLocation())) {
            event.setCancelled(true);
            event.getUSender().msg(ChatColor.RED + "String_Node_Str");
          }
        }
      }
    }
  }
}