nus-yam/ex-repair huggingface dataset:
Program: 96510
Project: 96510
Buggy source:
@Override public void createControl(Composite parent,FormToolkit toolkit){
  Section createSection=createSection(parent,toolkit,true);
  createSection.setText("String_Node_Str");
  setSection(toolkit,createSection);
  GridLayout gl=new GridLayout(1,false);
  gl.marginBottom=16;
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd.horizontalSpan=4;
  createSection.setLayout(gl);
  createSection.setLayoutData(gd);
  Composite composite=toolkit.createComposite(createSection);
  createSection.setClient(composite);
  composite.setLayout(new FillLayout());
  TableViewer table=new TableViewer(composite);
  table.getTable().setLinesVisible(true);
  table.getTable().setHeaderVisible(true);
  TableViewerColumn tableViewerColumn=new TableViewerColumn(table,SWT.LEFT);
  tableViewerColumn.getColumn().setText("String_Node_Str");
  tableViewerColumn.getColumn().setWidth(100);
  tableViewerColumn=new TableViewerColumn(table,SWT.LEFT);
  tableViewerColumn.getColumn().setText("String_Node_Str");
  tableViewerColumn.getColumn().setWidth(100);
  tableViewerColumn=new TableViewerColumn(table,SWT.LEFT);
  tableViewerColumn.getColumn().setText("String_Node_Str");
  tableViewerColumn.getColumn().setWidth(100);
  tableViewerColumn=new TableViewerColumn(table,SWT.LEFT);
  tableViewerColumn.getColumn().setText("String_Node_Str");
  tableViewerColumn.getColumn().setWidth(100);
  table.setContentProvider(ArrayContentProvider.getInstance());
  table.setLabelProvider(new ITableLabelProvider(){
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      TaskChangeSet cs=((TaskChangeSet)element);
switch (columnIndex) {
case 0:
        return cs.getChangeset().getId();
case 1:
      return cs.getChangeset().getMessage();
case 2:
    return cs.getChangeset().getAuthor().getEmail();
case 3:
  return cs.getChangeset().getDate().toString();
}
return element.toString() + "String_Node_Str" + columnIndex;
}
}
);
table.setInput(getInput());
MenuManager menuManager=new MenuManager();
menuManager.setRemoveAllWhenShown(true);
getTaskEditorPage().getEditorSite().registerContextMenu("String_Node_Str",menuManager,table,true);
org.eclipse.swt.widgets.Menu menu=menuManager.createContextMenu(table.getControl());
table.getTable().setMenu(menu);
}

Fixed version (ground truth):
@Override public void createControl(Composite parent,FormToolkit toolkit){
  Section createSection=createSection(parent,toolkit);
  Composite composite=createContentComposite(toolkit,createSection);
  createTable(composite);
}
Program: 96511
Project: 96511
Buggy source:
private ReviewDslScope mapScope(ReviewScope scope){
  ReviewDslScope scope2=new ReviewDslScope();
  for (  IReviewScopeItem item : scope.getItems()) {
    scope2.getItems().add(mapScopeItem(item));
  }
  return scope2;
}

Fixed version (ground truth):
private ReviewDslScope mapScope(ReviewScope scope){
  ReviewDslScope scope2=new ReviewDslScope();
  for (  IReviewScopeItem item : scope.getItems()) {
    scope2.addItem(mapScopeItem(item));
  }
  return scope2;
}
Program: 96512
Project: 96512
Buggy source:
public PatchSetDetail getPatchSetDetail(final PatchSet.Id id,IProgressMonitor monitor) throws GerritException {
  PatchSetDetail result=null;
  try {
    result=execute(monitor,new Operation<PatchSetDetail>(){
      @Override public void execute(      IProgressMonitor monitor) throws GerritException {
        getChangeDetailService().patchSetDetail(id,null,null,this);
      }
    }
);
  }
 catch (  GerritException e) {
    if (e.getMessage().contains("String_Node_Str")) {
      result=execute(monitor,new Operation<PatchSetDetail>(){
        @Override public void execute(        IProgressMonitor monitor) throws GerritException {
          getChangeDetailService().patchSetDetail(id,this);
        }
      }
);
    }
 else {
      throw e;
    }
  }
  return result;
}

Fixed version (ground truth):
public PatchSetDetail getPatchSetDetail(final PatchSet.Id id,IProgressMonitor monitor) throws GerritException {
  PatchSetDetail result=null;
  try {
    result=execute(monitor,new Operation<PatchSetDetail>(){
      @Override public void execute(      IProgressMonitor monitor) throws GerritException {
        getChangeDetailService().patchSetDetail(id,null,null,this);
      }
    }
);
  }
 catch (  GerritException e) {
    String message=e.getMessage();
    if (message != null && message.contains("String_Node_Str")) {
      result=execute(monitor,new Operation<PatchSetDetail>(){
        @Override public void execute(        IProgressMonitor monitor) throws GerritException {
          getChangeDetailService().patchSetDetail(id,this);
        }
      }
);
    }
 else {
      throw e;
    }
  }
  return result;
}
Program: 96513
Project: 96513
Buggy source:
public void setDate(Date date){
  Date old=this.date;
  this.date=date;
  changeSupport.firePropertyChange("String_Node_Str",old,date);
}

Fixed version (ground truth):
public void setDate(Date date){
  Date old=this.date;
  this.date=date != null ? new Date(date.getTime()) : null;
  changeSupport.firePropertyChange("String_Node_Str",old,date);
}
Program: 96514
Project: 96514
Buggy source:
public Date getDate(){
  return date;
}

Fixed version (ground truth):
public Date getDate(){
  return date != null ? new Date(date.getTime()) : null;
}
Program: 96515
Project: 96515
Buggy source:
public void setDate(Date date){
  this.date=date;
}

Fixed version (ground truth):
public void setDate(Date date){
  this.date=date != null ? new Date(date.getTime()) : null;
}
Program: 96516
Project: 96516
Buggy source:
public Date getDate(){
  return date;
}

Fixed version (ground truth):
public Date getDate(){
  return date != null ? new Date(date.getTime()) : null;
}
Program: 96517
Project: 96517
Buggy source:
private String convertScopeToDescription(){
  StringBuilder sb=new StringBuilder();
  Map<String,Counter> counts=new TreeMap<String,Counter>();
  for (  IReviewScopeItem item : scope.getItems()) {
    String key=item.getType(1);
    if (!counts.containsKey(key)) {
      counts.put(key,new Counter(item));
    }
    counts.get(key).counter++;
  }
  boolean isFirstElement=true;
  for (  String type : counts.keySet()) {
    if (isFirstElement) {
      isFirstElement=false;
    }
 else {
      sb.append("String_Node_Str");
    }
    int count=counts.get(type).counter;
    sb.append(count);
    sb.append("String_Node_Str");
    sb.append(counts.get(type).item.getType(count));
  }
  return sb.toString();
}

Fixed version (ground truth):
private String convertScopeToDescription(){
  StringBuilder sb=new StringBuilder();
  Map<String,Counter> counts=new TreeMap<String,Counter>();
  for (  IReviewScopeItem item : scope.getItems()) {
    String key=item.getType(1);
    if (!counts.containsKey(key)) {
      counts.put(key,new Counter(item));
    }
    counts.get(key).counter++;
  }
  boolean isFirstElement=true;
  for (  Entry<String,Counter> type : counts.entrySet()) {
    if (isFirstElement) {
      isFirstElement=false;
    }
 else {
      sb.append("String_Node_Str");
    }
    int count=counts.get(type).counter;
    sb.append(count);
    sb.append("String_Node_Str");
    sb.append(counts.get(type).item.getType(count));
  }
  return sb.toString();
}
Program: 96518
Project: 96518
Buggy source:
public String[] getTokenNames(){
  return tokenNames;
}

Fixed version (ground truth):
public String[] getTokenNames(){
  return tokenNames.clone();
}
Program: 96519
Project: 96519
Buggy source:
public ColumnLabelProvider(IColumnSpec<T>[] specs){
  this.specs=specs;
}

Fixed version (ground truth):
public ColumnLabelProvider(IColumnSpec<T>[] specs){
  this.specs=specs.clone();
}
Program: 96521
Project: 96521
Buggy source:
public org.eclipse.mylyn.reviews.tasks.core.ReviewResult mapCurrentReviewResult(ITaskProperties taskProperties){
  Assert.isNotNull(taskProperties);
  if (taskProperties.getNewCommentText() == null || taskProperties.getNewCommentText().isEmpty())   return null;
  ReviewResult result=null;
  try {
    ReviewDslResult res=parser.parseReviewResult(taskProperties.getNewCommentText());
    if (res == null)     return null;
    result=new ReviewResult();
    result.setComment(res.getComment());
    result.setRating(mapRating(res.getRating()));
  }
 catch (  ParseException ex) {
  }
  return result;
}

Fixed version (ground truth):
public org.eclipse.mylyn.reviews.tasks.core.ReviewResult mapCurrentReviewResult(ITaskProperties taskProperties){
  Assert.isNotNull(taskProperties);
  if (taskProperties.getNewCommentText() == null || "String_Node_Str".equals(taskProperties.getNewCommentText()))   return null;
  ReviewResult result=null;
  try {
    ReviewDslResult res=parser.parseReviewResult(taskProperties.getNewCommentText());
    if (res == null)     return null;
    result=new ReviewResult();
    result.setComment(res.getComment());
    result.setRating(mapRating(res.getRating()));
  }
 catch (  ParseException ex) {
  }
  return result;
}
Program: 96522
Project: 96522
Buggy source:
private boolean needsReauthentication(int code,IProgressMonitor monitor) throws IOException, GerritLoginException {
  final AuthenticationType authenticationType;
  if (code == HttpStatus.SC_UNAUTHORIZED || code == HttpStatus.SC_FORBIDDEN) {
    authenticationType=AuthenticationType.REPOSITORY;
  }
 else   if (code == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
    authenticationType=AuthenticationType.PROXY;
  }
 else {
    return false;
  }
  try {
    location.requestCredentials(authenticationType,null,monitor);
  }
 catch (  UnsupportedRequestException e) {
    throw new GerritLoginException();
  }
  hostConfiguration=WebUtil.createHostConfiguration(httpClient,location,monitor);
  return true;
}

Fixed version (ground truth):
private boolean needsReauthentication(int code,IProgressMonitor monitor) throws IOException, GerritLoginException {
  final AuthenticationType authenticationType;
  if (code == HttpStatus.SC_UNAUTHORIZED || code == HttpStatus.SC_FORBIDDEN) {
    authenticationType=AuthenticationType.REPOSITORY;
  }
 else   if (code == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
    authenticationType=AuthenticationType.PROXY;
  }
 else {
    return false;
  }
  requestCredentials(monitor,authenticationType);
  return true;
}
Program: 96523
Project: 96523
Buggy source:
private int authenticateService(AuthenticationCredentials credentials,IProgressMonitor monitor) throws IOException, GerritException {
  JSonSupport json=new JSonSupport();
  List<Object> args=new ArrayList<Object>(2);
  args.add(credentials.getUserName());
  args.add(credentials.getPassword());
  final String request=json.createRequest(getId(),null,"String_Node_Str",args);
  JsonEntity entity=new JsonEntity(){
    @Override public String getContent(){
      return request;
    }
  }
;
  PostMethod method=postJsonRequestInternal("String_Node_Str",entity,monitor);
  try {
    int code=method.getStatusCode();
    if (code == HttpURLConnection.HTTP_OK) {
      LoginResult result=json.parseResponse(method.getResponseBodyAsString(),LoginResult.class);
      if (result.success) {
        return HttpStatus.SC_TEMPORARY_REDIRECT;
      }
 else {
        return -1;
      }
    }
    return code;
  }
  finally {
    method.releaseConnection();
  }
}

Fixed version (ground truth):
private int authenticateService(AuthenticationCredentials credentials,IProgressMonitor monitor) throws IOException, GerritException {
  JSonSupport json=new JSonSupport();
  List<Object> args=new ArrayList<Object>(2);
  args.add(credentials.getUserName());
  args.add(credentials.getPassword());
  final String request=json.createRequest(getId(),null,"String_Node_Str",args);
  JsonEntity entity=new JsonEntity(){
    @Override public String getContent(){
      return request;
    }
  }
;
  PostMethod method=postJsonRequestInternal("String_Node_Str",entity,monitor);
  try {
    int code=method.getStatusCode();
    if (needsReauthentication(code,monitor)) {
      return -1;
    }
    if (code == HttpURLConnection.HTTP_OK) {
      LoginResult result=json.parseResponse(method.getResponseBodyAsString(),LoginResult.class);
      if (result.success) {
        return HttpStatus.SC_TEMPORARY_REDIRECT;
      }
 else {
        requestCredentials(monitor,AuthenticationType.REPOSITORY);
        return -1;
      }
    }
    return code;
  }
  finally {
    method.releaseConnection();
  }
}
Program: 96524
Project: 96524
Buggy source:
public GerritSystemInfo getInfo(IProgressMonitor monitor) throws GerritException {
  Account account=execute(monitor,new GerritOperation<Account>(){
    @Override public void execute(    IProgressMonitor monitor) throws GerritException {
      getAccountService().myAccount(this);
    }
  }
);
  return new GerritSystemInfo(account);
}

Fixed version (ground truth):
public GerritSystemInfo getInfo(IProgressMonitor monitor) throws GerritException {
  List<ContributorAgreement> contributorAgreements=null;
  Account account=null;
  if (!isAnonymous()) {
    account=execute(monitor,new GerritOperation<Account>(){
      @Override public void execute(      IProgressMonitor monitor) throws GerritException {
        getAccountService().myAccount(this);
      }
    }
);
  }
 else {
    executeQuery(monitor,"String_Node_Str");
  }
  return new GerritSystemInfo(contributorAgreements,account);
}
Program: 96525
Project: 96525
Buggy source:
public GerritSystemInfo(Account account){
  this.account=account;
}

Fixed version (ground truth):
public GerritSystemInfo(List<ContributorAgreement> contributorAgreements,Account account){
  this.contributorAgreements=contributorAgreements;
  this.account=account;
}
Program: 96526
Project: 96526
Buggy source:
public Object invoke(Object proxy,final Method method,Object[] args) throws Throwable {
  final JSonSupport json=new JSonSupport();
  final List<Object> parameters=new ArrayList<Object>(args.length - 1);
  for (int i=0; i < args.length - 1; i++) {
    parameters.add(args[i]);
  }
  @SuppressWarnings("String_Node_Str") AsyncCallback<Object> callback=(AsyncCallback<Object>)args[args.length - 1];
  try {
    GerritRequest request=GerritRequest.getCurrentRequest();
    IProgressMonitor monitor=(request != null) ? request.getMonitor() : null;
    String responseMessage=client.postJsonRequest(getServiceUri(),new JsonEntity(){
      @Override public String getContent(){
        return json.createRequest(client.getId(),client.getXsrfKey(),method.getName(),parameters);
      }
    }
,monitor);
    Type[] types=method.getGenericParameterTypes();
    final Type resultType=((ParameterizedType)types[types.length - 1]).getActualTypeArguments()[0];
    Object result=json.parseResponse(responseMessage,resultType);
    callback.onSuccess(result);
  }
 catch (  GerritException e) {
    callback.onFailure(e);
  }
  return null;
}

Fixed version (ground truth):
public Object invoke(Object proxy,final Method method,Object[] args){
  final JSonSupport json=new JSonSupport();
  final List<Object> parameters=new ArrayList<Object>(args.length - 1);
  for (int i=0; i < args.length - 1; i++) {
    parameters.add(args[i]);
  }
  @SuppressWarnings("String_Node_Str") AsyncCallback<Object> callback=(AsyncCallback<Object>)args[args.length - 1];
  try {
    GerritRequest request=GerritRequest.getCurrentRequest();
    IProgressMonitor monitor=(request != null) ? request.getMonitor() : null;
    String responseMessage=client.postJsonRequest(getServiceUri(),new JsonEntity(){
      @Override public String getContent(){
        return json.createRequest(client.getId(),client.getXsrfKey(),method.getName(),parameters);
      }
    }
,monitor);
    Type[] types=method.getGenericParameterTypes();
    final Type resultType=((ParameterizedType)types[types.length - 1]).getActualTypeArguments()[0];
    Object result=json.parseResponse(responseMessage,resultType);
    callback.onSuccess(result);
  }
 catch (  Throwable e) {
    callback.onFailure(e);
  }
  return null;
}
Program: 96527
Project: 96527
Buggy source:
public static List<ReviewSubTask> getReviewSubTasksFor(ITaskContainer taskContainer,ITaskDataManager taskDataManager,IRepositoryModel repositoryModel,IProgressMonitor monitor){
  List<ReviewSubTask> resultList=new ArrayList<ReviewSubTask>();
  try {
    for (    ITask subTask : taskContainer.getChildren()) {
      if (subTask.getSummary().startsWith("String_Node_Str")) {
        for (        Review review : getReviewAttachmentFromTask(taskDataManager,repositoryModel,subTask)) {
          if (review.getResult() != null)           resultList.add(new ReviewSubTask(getPatchFile(review.getScope()),getPatchCreationDate(review.getScope()),getAuthorString(review.getScope()),subTask.getOwner(),review.getResult().getRating(),review.getResult().getText(),subTask));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return resultList;
}

Fixed version (ground truth):
public static List<ReviewSubTask> getReviewSubTasksFor(ITaskContainer taskContainer,ITaskDataManager taskDataManager,IRepositoryModel repositoryModel,IProgressMonitor monitor){
  List<ReviewSubTask> resultList=new ArrayList<ReviewSubTask>();
  try {
    for (    ITask subTask : taskContainer.getChildren()) {
      if (ReviewsUtil.isMarkedAsReview(subTask)) {
        for (        Review review : getReviewAttachmentFromTask(taskDataManager,repositoryModel,subTask)) {
          if (review.getResult() != null)           resultList.add(new ReviewSubTask(getPatchFile(review.getScope()),getPatchCreationDate(review.getScope()),getAuthorString(review.getScope()),subTask.getOwner(),review.getResult().getRating(),review.getResult().getText(),subTask));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return resultList;
}
Program: 96528
Project: 96528
Buggy source:
public boolean performFinish(TaskDataModel model,ScopeItem scope){
  String reviewer=model.getTaskRepository().getUserName();
  try {
    Review review=ReviewFactory.eINSTANCE.createReview();
    review.getScope().add(scope);
    TaskRepository taskRepository=model.getTaskRepository();
    ITask newTask=TasksUiUtil.createOutgoingNewTask(taskRepository.getConnectorKind(),taskRepository.getRepositoryUrl());
    newTask.setAttribute(ReviewConstants.ATTR_REVIEW_FLAG,Boolean.TRUE.toString());
    TaskMapper initializationData=new TaskMapper(model.getTaskData());
    TaskData taskData=TasksUiInternal.createTaskData(taskRepository,initializationData,null,new NullProgressMonitor());
    AbstractRepositoryConnector connector=TasksUiPlugin.getConnector(taskRepository.getConnectorKind());
    connector.getTaskDataHandler().initializeSubTaskData(taskRepository,taskData,model.getTaskData(),new NullProgressMonitor());
    taskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue("String_Node_Str" + model.getTask().getSummary());
    taskData.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED).setValue(reviewer);
    taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue("String_Node_Str" + model.getTask().getSummary());
    ReviewsUiPlugin.getDataManager().storeOutgoingTask(newTask,review);
    TasksUiInternal.createAndOpenNewTask(newTask,taskData);
  }
 catch (  CoreException e1) {
    throw new RuntimeException(e1);
  }
  return true;
}

Fixed version (ground truth):
public boolean performFinish(TaskDataModel model,ScopeItem scope){
  String reviewer=model.getTaskRepository().getUserName();
  try {
    Review review=ReviewFactory.eINSTANCE.createReview();
    review.getScope().add(scope);
    TaskRepository taskRepository=model.getTaskRepository();
    ITask newTask=TasksUiUtil.createOutgoingNewTask(taskRepository.getConnectorKind(),taskRepository.getRepositoryUrl());
    ReviewsUtil.markAsReview(newTask);
    TaskMapper initializationData=new TaskMapper(model.getTaskData());
    TaskData taskData=TasksUiInternal.createTaskData(taskRepository,initializationData,null,new NullProgressMonitor());
    AbstractRepositoryConnector connector=TasksUiPlugin.getConnector(taskRepository.getConnectorKind());
    connector.getTaskDataHandler().initializeSubTaskData(taskRepository,taskData,model.getTaskData(),new NullProgressMonitor());
    taskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue("String_Node_Str" + model.getTask().getSummary());
    taskData.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED).setValue(reviewer);
    taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue("String_Node_Str" + model.getTask().getSummary());
    ReviewsUiPlugin.getDataManager().storeOutgoingTask(newTask,review);
    TasksUiInternal.createAndOpenNewTask(newTask,taskData);
  }
 catch (  CoreException e1) {
    throw new RuntimeException(e1);
  }
  return true;
}
Program: 96530
Project: 96530
Buggy source:
public boolean canCustomize(ITask task){
  boolean isReview=Boolean.parseBoolean(task.getAttribute(ReviewConstants.ATTR_REVIEW_FLAG));
  return isReview;
}

Fixed version (ground truth):
public boolean canCustomize(ITask task){
  boolean isReview=ReviewsUtil.isMarkedAsReview(task);
  return isReview;
}
Program: 96531
Project: 96531
Buggy source:
public void taskMigration(ITask oldTask,ITask newTask){
  ReviewDataManager dataManager=ReviewsUiPlugin.getDataManager();
  Review review=dataManager.getReviewData(oldTask).getReview();
  dataManager.storeTask(newTask,review);
}

Fixed version (ground truth):
public void taskMigration(ITask oldTask,ITask newTask){
  ReviewDataManager dataManager=ReviewsUiPlugin.getDataManager();
  Review review=dataManager.getReviewData(oldTask).getReview();
  dataManager.storeOutgoingTask(newTask,review);
  ReviewsUtil.markAsReview(newTask);
}
Program: 96532
Project: 96532
Buggy source:
public void afterSubmit(ITask task){
  try {
    Review review=ReviewsUiPlugin.getDataManager().getReviewData(task).getReview();
    TaskRepository taskRepository=TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryUrl());
    TaskData taskData=TasksUiPlugin.getTaskDataManager().getTaskData(task);
    TaskAttribute attachmentAttribute=taskData.getAttributeMapper().createTaskAttachment(taskData);
    byte[] attachmentBytes=createAttachment(review);
    ReviewCommentTaskAttachmentSource attachment=new ReviewCommentTaskAttachmentSource(attachmentBytes);
    AbstractRepositoryConnector connector=TasksUi.getRepositoryConnector(taskRepository.getConnectorKind());
    connector.getTaskAttachmentHandler().postContent(taskRepository,task,attachment,"String_Node_Str",attachmentAttribute,new NullProgressMonitor());
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void afterSubmit(ITask task){
  try {
    ReviewData reviewData=ReviewsUiPlugin.getDataManager().getReviewData(task);
    Review review=reviewData.getReview();
    if (reviewData.isOutgoing() || reviewData.isDirty()) {
      TaskRepository taskRepository=TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryUrl());
      TaskData taskData=TasksUiPlugin.getTaskDataManager().getTaskData(task);
      TaskAttribute attachmentAttribute=taskData.getAttributeMapper().createTaskAttachment(taskData);
      byte[] attachmentBytes=createAttachment(review);
      ReviewCommentTaskAttachmentSource attachment=new ReviewCommentTaskAttachmentSource(attachmentBytes);
      AbstractRepositoryConnector connector=TasksUi.getRepositoryConnector(taskRepository.getConnectorKind());
      connector.getTaskAttachmentHandler().postContent(taskRepository,task,attachment,"String_Node_Str",attachmentAttribute,new NullProgressMonitor());
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}
Program: 96533
Project: 96533
Buggy source:
/** 
 * Downloads the content of the message with the specified id and writes it  to the specified   {@link OutputStream}.
 * @param session the session.
 * @param message the {@link Message} to download the content for.
 * @param out the stream to write the message content to.
 * @throws SessionExpiredException if the session has expired and couldn't be renewed.
 * @throws DeltaSyncException on errors returned by the server.
 * @throws IOException on communication errors.
 * @throws IllegalStateException if not logged in.
 */
public void downloadMessageContent(Message message,OutputStream out) throws DeltaSyncException, IOException {
  checkLoggedIn();
  try {
    client.downloadMessageContent(session,message.getId(),out);
  }
 catch (  SessionExpiredException e) {
    session=client.renew(session);
    client.downloadMessageContent(session,message.getId(),out);
  }
}

Fixed version (ground truth):
/** 
 * Downloads the content of the specified   {@link Message} and writes it to the specified  {@link OutputStream}.
 * @param message the {@link Message} to download the content for.
 * @param out the stream to write the message content to.
 * @throws SessionExpiredException if the session has expired and couldn't be renewed.
 * @throws DeltaSyncException on errors returned by the server.
 * @throws IOException on communication errors.
 * @throws IllegalStateException if not logged in.
 */
public void downloadMessageContent(Message message,OutputStream out) throws DeltaSyncException, IOException {
  checkLoggedIn();
  try {
    client.downloadMessageContent(session,message.getId(),out);
  }
 catch (  SessionExpiredException e) {
    session=client.renew(session);
    client.downloadMessageContent(session,message.getId(),out);
  }
}
Program: 96535
Project: 96535
Buggy source:
public boolean spawnWolf(Player p,WolfAggro aggro){
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  w.setHealth(20);
  if (aggro != null && aggro == WolfAggro.FRIEND) {
    EntityTameEvent event=new EntityTameEvent(w,p);
    this.getServer().getPluginManager().callEvent(event);
    if (event.isCancelled()) {
      w.damage(200,w);
      w.remove();
      p.sendMessage(chatPrefix + "String_Node_Str");
      return false;
    }
 else {
      w.setOwner(p);
      w.setSitting(false);
      p.sendMessage(chatPrefix + "String_Node_Str");
    }
  }
 else   if (aggro != null && aggro == WolfAggro.ANGRY) {
    w.setAngry(true);
    p.sendMessage(chatPrefixError + "String_Node_Str");
  }
 else {
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
public boolean spawnWolf(Player p,WolfAggro aggro){
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  w.setHealth(8);
  if (aggro != null && aggro == WolfAggro.FRIEND) {
    EntityTameEvent event=new EntityTameEvent(w,p);
    this.getServer().getPluginManager().callEvent(event);
    if (event.isCancelled()) {
      w.damage(200,w);
      w.remove();
      p.sendMessage(chatPrefix + "String_Node_Str");
      return false;
    }
 else {
      w.setOwner(p);
      w.setSitting(false);
      p.sendMessage(chatPrefix + "String_Node_Str");
    }
  }
 else   if (aggro != null && aggro == WolfAggro.ANGRY) {
    w.setAngry(true);
    p.sendMessage(chatPrefixError + "String_Node_Str");
  }
 else {
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
  return true;
}
Program: 96536
Project: 96536
Buggy source:
public WPWorld getWolfPoundWorld(String world){
  if (this.worlds.containsKey(world)) {
    return this.worlds.get(world);
  }
  return this.globalWorld;
}

Fixed version (ground truth):
/** 
 * Returns the existing wolfPound world that exists, or creates one if the world is a loaded world, but not created, or the global world.
 * @param world The worldname to get.
 * @return A WolfPound World
 */
public WPWorld getWolfPoundWorld(String world){
  if (this.worlds.containsKey(world)) {
    return this.worlds.get(world);
  }
 else   if (this.getServer().getWorld(world) != null) {
    WPWorld w=new WPWorld(world,configWP);
    this.worlds.put(world,w);
    return this.worlds.get(world);
  }
  return this.globalWorld;
}
Program: 96537
Project: 96537
Buggy source:
@Override public void runCommand(CommandSender sender,List<String> args){
  WPWorld world=this.plugin.getGlobalWorld();
  if (args.size() == 3 && !args.get(2).equalsIgnoreCase("String_Node_Str")) {
    world=this.plugin.getWolfPoundWorld(args.get(2));
  }
  if (validateCommand(args.get(0),args.get(1),world)) {
    if (args.size() < 3 && !(sender instanceof Player)) {
      sender.sendMessage("String_Node_Str");
      return;
    }
    String worldName=args.get(2);
    if (world.equals(this.plugin.getGlobalWorld())) {
      worldName="String_Node_Str";
    }
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ args.get(0)+ "String_Node_Str"+ args.get(1)+ "String_Node_Str"+ worldName+ "String_Node_Str");
  }
 else {
    sender.sendMessage("String_Node_Str" + args.get(0) + "String_Node_Str"+ args.get(1));
  }
}

Fixed version (ground truth):
@Override public void runCommand(CommandSender sender,List<String> args){
  WPWorld world=this.plugin.getGlobalWorld();
  if (args.size() == 3 && !args.get(2).equalsIgnoreCase("String_Node_Str")) {
    world=this.plugin.getWolfPoundWorld(args.get(2));
  }
  if (validateCommand(args.get(0),args.get(1),world)) {
    if (args.size() < 3 && !(sender instanceof Player)) {
      sender.sendMessage("String_Node_Str");
      return;
    }
    String worldName=args.get(2);
    world=this.plugin.getWolfPoundWorld(worldName);
    if (world.equals(this.plugin.getGlobalWorld())) {
      worldName="String_Node_Str";
    }
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ args.get(0)+ "String_Node_Str"+ args.get(1)+ "String_Node_Str"+ worldName+ "String_Node_Str");
  }
 else {
    sender.sendMessage("String_Node_Str" + args.get(0) + "String_Node_Str"+ args.get(1));
  }
}
Program: 96539
Project: 96539
Buggy source:
public void removeWorld(String string){
  configWP.removeProperty(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY+ "String_Node_Str"+ string);
  configWP.save();
}

Fixed version (ground truth):
public void removeWorld(String string,Player p){
  if (configWP.getProperty(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY+ "String_Node_Str"+ string) != null) {
    p.sendMessage(chatPrefix + "String_Node_Str" + ChatColor.GREEN+ string+ ChatColor.WHITE+ "String_Node_Str");
    configWP.removeProperty(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY+ "String_Node_Str"+ string);
    configWP.save();
    this.adoptAggroWorlds.remove(string);
    this.adoptLimitWorlds.remove(string);
    this.adoptPriceWorlds.remove(string);
    this.adoptTypeWorlds.remove(string);
  }
}
Program: 96540
Project: 96540
Buggy source:
public void sendWolfPrice(Player p,String world){
  p.sendMessage(world);
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void sendWolfPrice(Player p,String world){
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}
Program: 96541
Project: 96541
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 1) {
    if (p != null) {
      this.plugin.changeSetting("String_Node_Str",args[0],p.getWorld().getName(),p);
      return true;
    }
  }
 else   if (args.length == 2) {
    if (p != null) {
      if (isAKeyword(args[1],LIMIT_KEYWORDS)) {
        this.plugin.changeSetting("String_Node_Str",args[0],"String_Node_Str",p);
      }
 else       if (isValidWorld(args[1])) {
        this.plugin.changeSetting("String_Node_Str",args[0],getWorldName(args[1]),p);
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}
Program: 96542
Project: 96542
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 0) {
    if (p != null) {
      plugin.sendWolfPrice(p,p.getWorld().getName());
      return true;
    }
 else {
      WolfPound.log.info("String_Node_Str");
      return true;
    }
  }
 else   if (args.length == 1) {
    if (isAKeyword(args[0],PRICE_KEYWORDS)) {
      if (p != null) {
        this.plugin.sendWolfPrice((Player)sender,"String_Node_Str");
      }
 else {
        WolfPound.log.info("String_Node_Str");
      }
    }
 else     if (isValidWorld(args[0])) {
      if (p != null) {
        this.plugin.sendWolfPrice((Player)sender,getWorldName(args[0]));
      }
 else {
        WolfPound.log.info("String_Node_Str");
      }
    }
 else     if (!(sender instanceof Player)) {
      WolfPound.log.info("String_Node_Str");
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 0) {
    if (p != null) {
      plugin.sendWolfPrice(p,p.getWorld().getName());
      return true;
    }
 else {
      WolfPound.log.info("String_Node_Str");
      return true;
    }
  }
 else   if (args.length == 1) {
    if (isAKeyword(args[0],PRICE_KEYWORDS)) {
      if (p != null) {
        this.plugin.sendWolfPrice((Player)sender,"String_Node_Str");
      }
 else {
        WolfPound.log.info("String_Node_Str");
      }
    }
 else     if (isValidWorld(args[0])) {
      if (p != null) {
        this.plugin.sendWolfPrice((Player)sender,getWorldName(args[0]));
      }
 else {
        WolfPound.log.info("String_Node_Str");
      }
    }
 else     if (p == null) {
      WolfPound.log.info("String_Node_Str");
    }
 else {
      return false;
    }
    return true;
  }
  return false;
}
Program: 96543
Project: 96543
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    Player player=(Player)sender;
    if (plugin.hasPermission(player,WolfPound.PERM_ADMIN) && args.length == 1) {
      if (isValidWorld(args[0])) {
        this.plugin.removeWorld(getWorldName(args[0]));
      }
 else       if (isAKeyword(args[0],RESET_KEYWORDS)) {
        for (        World w : this.plugin.getServer().getWorlds()) {
          this.plugin.removeWorld(w.getName());
        }
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    Player player=(Player)sender;
    if (plugin.hasPermission(player,WolfPound.PERM_ADMIN) && args.length == 1) {
      if (isValidWorld(args[0])) {
        this.plugin.removeWorld(getWorldName(args[0]),player);
      }
 else       if (isAKeyword(args[0],RESET_KEYWORDS)) {
        for (        World w : this.plugin.getServer().getWorlds()) {
          this.plugin.removeWorld(w.getName(),player);
        }
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}
Program: 96544
Project: 96544
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 1) {
    if (p != null) {
      this.plugin.changeSetting("String_Node_Str",args[0],p.getWorld().getName(),p);
      return true;
    }
  }
 else   if (args.length == 2) {
    if (p != null) {
      if (checkKeyword(args[1],AGGRO_KEYWORDS) == "String_Node_Str") {
        this.plugin.changeSetting("String_Node_Str",args[0],"String_Node_Str",p);
      }
 else       if (isValidWorld(args[1])) {
        this.plugin.changeSetting("String_Node_Str",args[0],getWorldName(args[1]),p);
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}
Program: 96545
Project: 96545
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 1) {
    if (p != null) {
      this.plugin.changeSetting("String_Node_Str",args[0],p.getWorld().getName(),p);
      return true;
    }
  }
 else   if (args.length == 2) {
    if (p != null) {
      if (isAKeyword(args[1],PRICE_KEYWORDS)) {
        this.plugin.changeSetting("String_Node_Str",args[0],"String_Node_Str",p);
      }
 else       if (isValidWorld(args[1])) {
        this.plugin.changeSetting("String_Node_Str",args[0],getWorldName(args[1]),p);
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 1) {
    if (p != null) {
      if (args[0].equalsIgnoreCase("String_Node_Str")) {
        args[0]="String_Node_Str";
      }
      this.plugin.changeSetting("String_Node_Str",args[0],p.getWorld().getName(),p);
      return true;
    }
  }
 else   if (args.length == 2) {
    if (p != null) {
      if (isAKeyword(args[1],PRICE_KEYWORDS)) {
        this.plugin.changeSetting("String_Node_Str",args[0],"String_Node_Str",p);
      }
 else       if (isValidWorld(args[1])) {
        this.plugin.changeSetting("String_Node_Str",args[0],getWorldName(args[1]),p);
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}
Program: 96546
Project: 96546
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  Player p=null;
  if (sender instanceof Player) {
    p=(Player)sender;
  }
  if (args.length == 1) {
    if (p != null) {
      this.plugin.changeSetting("String_Node_Str",args[0],p.getWorld().getName(),p);
      return true;
    }
  }
 else   if (args.length == 2) {
    if (p != null) {
      if (isAKeyword(args[1],TYPE_KEYWORDS)) {
        this.plugin.changeSetting("String_Node_Str",args[0],"String_Node_Str",p);
      }
 else       if (isValidWorld(args[1])) {
        this.plugin.changeSetting("String_Node_Str",args[0],getWorldName(args[1]),p);
      }
 else {
        return false;
      }
      return true;
    }
  }
  return false;
}
Program: 96547
Project: 96547
Buggy source:
public GenericBank loadEconPlugin(){
  loadiConomy();
  loadBOSEconomy();
  loadRealShopEconomy();
  loadEssentialsEconomoy();
  loadDefaultItemEconomy();
  return this.bank;
}

Fixed version (ground truth):
/** 
 * Load an econ plugin. Plugins are loaded in this order: iConomy, BOSEconomy, RealShop, Essentials and simple items
 * @return The GenericBank object to process payments.
 */
public GenericBank loadEconPlugin(){
  loadiConomy();
  loadBOSEconomy();
  loadRealShopEconomy();
  loadEssentialsEconomoy();
  loadDefaultItemEconomy();
  return this.bank;
}
Program: 96548
Project: 96548
Buggy source:
private void loadiConomy(){
  iConomy iConomyPlugin=(iConomy)plugin.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (iConomyPlugin != null && this.bank == null) {
    this.bank=new iConomyBank(iConomyPlugin);
    log.info(logPrefix + "String_Node_Str" + plugin.getDescription().getFullName());
  }
}

Fixed version (ground truth):
private void loadiConomy(){
  if (this.bank == null) {
    Plugin iConomyTest=plugin.getServer().getPluginManager().getPlugin("String_Node_Str");
    try {
      if (iConomyTest != null && iConomyTest instanceof com.iConomy.iConomy) {
        this.bank=new iConomyBank((iConomy)iConomyTest);
        log.info(logPrefix + "String_Node_Str" + plugin.getDescription().getFullName());
      }
    }
 catch (    NoClassDefFoundError e) {
      if (iConomyTest != null) {
        loadiConomy4X();
      }
    }
  }
}
Program: 96549
Project: 96549
Buggy source:
public GenericBank getEconPlugin(){
  return this.bank;
}

Fixed version (ground truth):
/** 
 * Returns the AllPay GenericBank object that you can issue calls to and from
 * @return The GenericBank object to process payments.
 */
public GenericBank getEconPlugin(){
  return this.bank;
}
Program: 96550
Project: 96550
Buggy source:
/** 
 * Simply prints the economy being used, this is shown to help users debug issues with other plugin interfacing.
 * @return The economy plugin used
 */
public String getEconUsed(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Simply prints the economy being used, this is shown to help users debug issues with other plugin interfacing.
 * @return The economy plugin used
 */
public abstract String getEconUsed();
Program: 96551
Project: 96551
Buggy source:
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    if (finalamount > 0) {
      p.getItemInHand().setAmount(finalamount);
    }
 else {
      p.getInventory().remove(item);
    }
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.RealShop)) {
    double totalmoney=RealEcon.getBalance(p.getName());
    return RealEcon.setBalance(p.getName(),totalmoney - cost);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean payForWolf(Player p,double cost,int type){
  if (cost <= 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    if (finalamount > 0) {
      p.getItemInHand().setAmount(finalamount);
    }
 else {
      p.getInventory().remove(item);
    }
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.RealShop)) {
    double totalmoney=RealEcon.getBalance(p.getName());
    return RealEcon.setBalance(p.getName(),totalmoney - cost);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}
Program: 96552
Project: 96552
Buggy source:
public void spawnWolf(Player p,String aggro){
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (aggro != null && aggro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.b(false);
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
 else   if (aggro != null && aggro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
    p.sendMessage(chatPrefixError + "String_Node_Str");
  }
 else {
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void spawnWolf(Player p,String aggro){
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (aggro != null && aggro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.setSitting(false);
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
 else   if (aggro != null && aggro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
    p.sendMessage(chatPrefixError + "String_Node_Str");
  }
 else {
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
}
Program: 96553
Project: 96553
Buggy source:
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || (isUsing(Bank.None) && type == -1)) {
    playerHasEnough=true;
  }
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.RealShop)) {
    playerHasEnough=RealEcon.getBalance(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}

Fixed version (ground truth):
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || (isUsing(Bank.None) && type == -1)) {
    playerHasEnough=true;
  }
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.RealShop)) {
    playerHasEnough=RealEcon.getBalance(p.getName()) >= m;
    WolfPound.log.info("String_Node_Str" + RealEcon.getBalance(p.getName()));
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}