nus-yam/ex-repair huggingface dataset:
Program: 25845
Project: 25845
Buggy source:
@Override public HealthDataEntry getHealthDataEntry(HealthDataKey key,String recordId) throws BridgeServiceException {
  if (recordId == null) {
    throw new BridgeServiceException("String_Node_Str");
  }
  try {
    DynamoDBMapper mapper=getCreateMapper();
    DynamoRecord record=new DynamoRecord(healthDataKeyToAnonimizedKeyString(key));
    Condition rangeKeyCondition=new Condition().withComparisonOperator(ComparisonOperator.EQ).withAttributeValueList(new AttributeValue().withS(recordId));
    DynamoDBQueryExpression<DynamoRecord> queryExpression=new DynamoDBQueryExpression<DynamoRecord>().withHashKeyValues(record).withRangeKeyCondition("String_Node_Str",rangeKeyCondition);
    List<DynamoRecord> results=mapper.query(DynamoRecord.class,queryExpression);
    if (results.size() > 1) {
      throw new BridgeServiceException("String_Node_Str" + recordId + "String_Node_Str");
    }
    return (results.isEmpty()) ? null : results.get(0).toEntry();
  }
 catch (  BridgeServiceException e) {
    throw new BridgeServiceException(e);
  }
}

Fixed version (ground truth):
@Override public HealthDataEntry getHealthDataEntry(HealthDataKey key,String recordId) throws BridgeServiceException {
  if (recordId == null) {
    throw new BridgeServiceException("String_Node_Str");
  }
  try {
    DynamoDBMapper mapper=getCreateMapper();
    DynamoRecord record=new DynamoRecord(healthDataKeyToAnonimizedKeyString(key));
    Condition rangeKeyCondition=new Condition().withComparisonOperator(ComparisonOperator.EQ).withAttributeValueList(new AttributeValue().withS(recordId));
    DynamoDBQueryExpression<DynamoRecord> queryExpression=new DynamoDBQueryExpression<DynamoRecord>().withHashKeyValues(record).withRangeKeyCondition("String_Node_Str",rangeKeyCondition);
    List<DynamoRecord> results=mapper.query(DynamoRecord.class,queryExpression);
    if (results.size() > 1) {
      throw new BridgeServiceException("String_Node_Str" + recordId + "String_Node_Str");
    }
    return (results.isEmpty()) ? null : results.get(0).toEntry();
  }
 catch (  Exception e) {
    throw new BridgeServiceException(e);
  }
}
Program: 25846
Project: 25846
Buggy source:
/** 
 * Handler for when an image failed to load.
 * @param cacheKey The cache key that is associated with the image request.
 */
private void onGetImageError(String cacheKey,VolleyError error){
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    batchResponse(cacheKey,request,error);
  }
}

Fixed version (ground truth):
/** 
 * Handler for when an image failed to load.
 * @param cacheKey The cache key that is associated with the image request.
 */
private void onGetImageError(String cacheKey,VolleyError error){
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  request.setError(error);
  if (request != null) {
    batchResponse(cacheKey,request);
  }
}
Program: 25847
Project: 25847
Buggy source:
/** 
 * Starts the runnable for batched delivery of responses if it is not already started.
 * @param cacheKey The cacheKey of the response being delivered.
 * @param request The BatchedImageRequest to be delivered.
 * @param error The volley error associated with the request (if applicable).
 */
private void batchResponse(String cacheKey,BatchedImageRequest request,final VolleyError error){
  mBatchedResponses.put(cacheKey,request);
  if (mRunnable == null) {
    mRunnable=new Runnable(){
      @Override public void run(){
        for (        BatchedImageRequest bir : mBatchedResponses.values()) {
          for (          ImageContainer container : bir.mContainers) {
            if (container.mListener == null) {
              continue;
            }
            if (error == null) {
              container.mBitmap=bir.mResponseBitmap;
              container.mListener.onResponse(container,false);
            }
 else {
              container.mListener.onErrorResponse(error);
            }
          }
        }
        mBatchedResponses.clear();
        mRunnable=null;
      }
    }
;
    mHandler.postDelayed(mRunnable,mBatchResponseDelayMs);
  }
}

Fixed version (ground truth):
/** 
 * Starts the runnable for batched delivery of responses if it is not already started.
 * @param cacheKey The cacheKey of the response being delivered.
 * @param request The BatchedImageRequest to be delivered.
 * @param error The volley error associated with the request (if applicable).
 */
private void batchResponse(String cacheKey,BatchedImageRequest request){
  mBatchedResponses.put(cacheKey,request);
  if (mRunnable == null) {
    mRunnable=new Runnable(){
      @Override public void run(){
        for (        BatchedImageRequest bir : mBatchedResponses.values()) {
          for (          ImageContainer container : bir.mContainers) {
            if (container.mListener == null) {
              continue;
            }
            if (bir.getError() == null) {
              container.mBitmap=bir.mResponseBitmap;
              container.mListener.onResponse(container,false);
            }
 else {
              container.mListener.onErrorResponse(bir.getError());
            }
          }
        }
        mBatchedResponses.clear();
        mRunnable=null;
      }
    }
;
    mHandler.postDelayed(mRunnable,mBatchResponseDelayMs);
  }
}
Program: 25848
Project: 25848
Buggy source:
/** 
 * Handler for when an image was successfully loaded.
 * @param cacheKey The cache key that is associated with the image request.
 * @param response The bitmap that was returned from the network.
 */
private void onGetImageSuccess(String cacheKey,Bitmap response){
  mCache.putBitmap(cacheKey,response);
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    request.mResponseBitmap=response;
    batchResponse(cacheKey,request,null);
  }
}

Fixed version (ground truth):
/** 
 * Handler for when an image was successfully loaded.
 * @param cacheKey The cache key that is associated with the image request.
 * @param response The bitmap that was returned from the network.
 */
private void onGetImageSuccess(String cacheKey,Bitmap response){
  mCache.putBitmap(cacheKey,response);
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    request.mResponseBitmap=response;
    batchResponse(cacheKey,request);
  }
}
Program: 25849
Project: 25849
Buggy source:
@Override public void run(){
  for (  BatchedImageRequest bir : mBatchedResponses.values()) {
    for (    ImageContainer container : bir.mContainers) {
      if (container.mListener == null) {
        continue;
      }
      if (error == null) {
        container.mBitmap=bir.mResponseBitmap;
        container.mListener.onResponse(container,false);
      }
 else {
        container.mListener.onErrorResponse(error);
      }
    }
  }
  mBatchedResponses.clear();
  mRunnable=null;
}

Fixed version (ground truth):
@Override public void run(){
  for (  BatchedImageRequest bir : mBatchedResponses.values()) {
    for (    ImageContainer container : bir.mContainers) {
      if (container.mListener == null) {
        continue;
      }
      if (bir.getError() == null) {
        container.mBitmap=bir.mResponseBitmap;
        container.mListener.onResponse(container,false);
      }
 else {
        container.mListener.onErrorResponse(bir.getError());
      }
    }
  }
  mBatchedResponses.clear();
  mRunnable=null;
}
Program: 25850
Project: 25850
Buggy source:
/** 
 * Handler for when an image failed to load.
 * @param cacheKey The cache key that is associated with the image request.
 */
private void onGetImageError(String cacheKey,VolleyError error){
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    batchResponse(cacheKey,request,error);
  }
}

Fixed version (ground truth):
/** 
 * Handler for when an image failed to load.
 * @param cacheKey The cache key that is associated with the image request.
 */
private void onGetImageError(String cacheKey,VolleyError error){
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  request.setError(error);
  if (request != null) {
    batchResponse(cacheKey,request);
  }
}
Program: 25851
Project: 25851
Buggy source:
/** 
 * Starts the runnable for batched delivery of responses if it is not already started.
 * @param cacheKey The cacheKey of the response being delivered.
 * @param request The BatchedImageRequest to be delivered.
 * @param error The volley error associated with the request (if applicable).
 */
private void batchResponse(String cacheKey,BatchedImageRequest request,final VolleyError error){
  mBatchedResponses.put(cacheKey,request);
  if (mRunnable == null) {
    mRunnable=new Runnable(){
      @Override public void run(){
        for (        BatchedImageRequest bir : mBatchedResponses.values()) {
          for (          ImageContainer container : bir.mContainers) {
            if (container.mListener == null) {
              continue;
            }
            if (error == null) {
              container.mBitmap=bir.mResponseBitmap;
              container.mListener.onResponse(container,false);
            }
 else {
              container.mListener.onErrorResponse(error);
            }
          }
        }
        mBatchedResponses.clear();
        mRunnable=null;
      }
    }
;
    mHandler.postDelayed(mRunnable,mBatchResponseDelayMs);
  }
}

Fixed version (ground truth):
/** 
 * Starts the runnable for batched delivery of responses if it is not already started.
 * @param cacheKey The cacheKey of the response being delivered.
 * @param request The BatchedImageRequest to be delivered.
 * @param error The volley error associated with the request (if applicable).
 */
private void batchResponse(String cacheKey,BatchedImageRequest request){
  mBatchedResponses.put(cacheKey,request);
  if (mRunnable == null) {
    mRunnable=new Runnable(){
      @Override public void run(){
        for (        BatchedImageRequest bir : mBatchedResponses.values()) {
          for (          ImageContainer container : bir.mContainers) {
            if (container.mListener == null) {
              continue;
            }
            if (bir.getError() == null) {
              container.mBitmap=bir.mResponseBitmap;
              container.mListener.onResponse(container,false);
            }
 else {
              container.mListener.onErrorResponse(bir.getError());
            }
          }
        }
        mBatchedResponses.clear();
        mRunnable=null;
      }
    }
;
    mHandler.postDelayed(mRunnable,mBatchResponseDelayMs);
  }
}
Program: 25852
Project: 25852
Buggy source:
/** 
 * Handler for when an image was successfully loaded.
 * @param cacheKey The cache key that is associated with the image request.
 * @param response The bitmap that was returned from the network.
 */
private void onGetImageSuccess(String cacheKey,Bitmap response){
  mCache.putBitmap(cacheKey,response);
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    request.mResponseBitmap=response;
    batchResponse(cacheKey,request,null);
  }
}

Fixed version (ground truth):
/** 
 * Handler for when an image was successfully loaded.
 * @param cacheKey The cache key that is associated with the image request.
 * @param response The bitmap that was returned from the network.
 */
private void onGetImageSuccess(String cacheKey,Bitmap response){
  mCache.putBitmap(cacheKey,response);
  BatchedImageRequest request=mInFlightRequests.remove(cacheKey);
  if (request != null) {
    request.mResponseBitmap=response;
    batchResponse(cacheKey,request);
  }
}
Program: 25853
Project: 25853
Buggy source:
@Override public void run(){
  for (  BatchedImageRequest bir : mBatchedResponses.values()) {
    for (    ImageContainer container : bir.mContainers) {
      if (container.mListener == null) {
        continue;
      }
      if (error == null) {
        container.mBitmap=bir.mResponseBitmap;
        container.mListener.onResponse(container,false);
      }
 else {
        container.mListener.onErrorResponse(error);
      }
    }
  }
  mBatchedResponses.clear();
  mRunnable=null;
}

Fixed version (ground truth):
@Override public void run(){
  for (  BatchedImageRequest bir : mBatchedResponses.values()) {
    for (    ImageContainer container : bir.mContainers) {
      if (container.mListener == null) {
        continue;
      }
      if (bir.getError() == null) {
        container.mBitmap=bir.mResponseBitmap;
        container.mListener.onResponse(container,false);
      }
 else {
        container.mListener.onErrorResponse(bir.getError());
      }
    }
  }
  mBatchedResponses.clear();
  mRunnable=null;
}
Program: 25854
Project: 25854
Buggy source:
@SuppressWarnings("String_Node_Str") static void setConnectionParametersForRequest(HttpURLConnection connection,Request<?> request) throws IOException, AuthFailureError {
switch (request.getMethod()) {
case Method.DEPRECATED_GET_OR_POST:
    byte[] postBody=request.getPostBody();
  if (postBody != null) {
    connection.setDoOutput(true);
    connection.setRequestMethod("String_Node_Str");
    connection.addRequestProperty(HEADER_CONTENT_TYPE,request.getPostBodyContentType());
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(postBody);
    out.close();
  }
break;
case Method.GET:
connection.setRequestMethod("String_Node_Str");
break;
case Method.DELETE:
connection.setRequestMethod("String_Node_Str");
break;
case Method.POST:
addBodyIfExists(connection,request);
connection.setRequestMethod("String_Node_Str");
break;
case Method.PUT:
addBodyIfExists(connection,request);
connection.setRequestMethod("String_Node_Str");
break;
default :
throw new IllegalStateException("String_Node_Str");
}
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") static void setConnectionParametersForRequest(HttpURLConnection connection,Request<?> request) throws IOException, AuthFailureError {
switch (request.getMethod()) {
case Method.DEPRECATED_GET_OR_POST:
    byte[] postBody=request.getPostBody();
  if (postBody != null) {
    connection.setDoOutput(true);
    connection.setRequestMethod("String_Node_Str");
    connection.addRequestProperty(HEADER_CONTENT_TYPE,request.getPostBodyContentType());
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(postBody);
    out.close();
  }
break;
case Method.GET:
connection.setRequestMethod("String_Node_Str");
break;
case Method.DELETE:
connection.setRequestMethod("String_Node_Str");
break;
case Method.POST:
connection.setRequestMethod("String_Node_Str");
addBodyIfExists(connection,request);
break;
case Method.PUT:
connection.setRequestMethod("String_Node_Str");
addBodyIfExists(connection,request);
break;
default :
throw new IllegalStateException("String_Node_Str");
}
}
Program: 25855
Project: 25855
Buggy source:
/** 
 * @param urlRewriter Rewriter to use for request URLs
 */
public HurlStack(UrlRewriter urlRewriter){
  mUrlRewriter=urlRewriter;
}

Fixed version (ground truth):
/** 
 * @param urlRewriter Rewriter to use for request URLs
 * @param sslSocketFactory SSL factory to use for HTTPS connections
 */
public HurlStack(UrlRewriter urlRewriter,SSLSocketFactory sslSocketFactory){
  mUrlRewriter=urlRewriter;
  mSslSocketFactory=sslSocketFactory;
}
Program: 25856
Project: 25856
Buggy source:
/** 
 * Opens an   {@link HttpURLConnection} with parameters.
 * @param url
 * @return an open connection
 * @throws IOException
 */
private HttpURLConnection openConnection(URL url,Request<?> request) throws IOException {
  HttpURLConnection connection=(HttpURLConnection)url.openConnection();
  int timeoutMs=request.getTimeoutMs();
  connection.setConnectTimeout(timeoutMs);
  connection.setReadTimeout(timeoutMs);
  connection.setUseCaches(false);
  connection.setDoInput(true);
  return connection;
}

Fixed version (ground truth):
/** 
 * Opens an   {@link HttpURLConnection} with parameters.
 * @param url
 * @return an open connection
 * @throws IOException
 */
private HttpURLConnection openConnection(URL url,Request<?> request) throws IOException {
  HttpURLConnection connection=(HttpURLConnection)url.openConnection();
  int timeoutMs=request.getTimeoutMs();
  connection.setConnectTimeout(timeoutMs);
  connection.setReadTimeout(timeoutMs);
  connection.setUseCaches(false);
  connection.setDoInput(true);
  if ("String_Node_Str".equals(url.getProtocol()) && mSslSocketFactory != null) {
    ((HttpsURLConnection)connection).setSSLSocketFactory(mSslSocketFactory);
  }
  return connection;
}
Program: 25857
Project: 25857
Buggy source:
@SuppressWarnings("String_Node_Str") static void setConnectionParametersForRequest(HttpURLConnection connection,Request<?> request) throws IOException, AuthFailureError {
switch (request.getMethod()) {
case Method.DEPRECATED_GET_OR_POST:
    byte[] postBody=request.getPostBody();
  if (postBody != null) {
    connection.setDoOutput(true);
    connection.setRequestMethod("String_Node_Str");
    connection.addRequestProperty(HEADER_CONTENT_TYPE,request.getPostBodyContentType());
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(postBody);
    out.close();
  }
break;
case Method.GET:
connection.setRequestMethod("String_Node_Str");
break;
case Method.DELETE:
connection.setRequestMethod("String_Node_Str");
break;
case Method.POST:
addBodyIfExists(connection,request);
connection.setRequestMethod("String_Node_Str");
break;
case Method.PUT:
addBodyIfExists(connection,request);
connection.setRequestMethod("String_Node_Str");
break;
default :
throw new IllegalStateException("String_Node_Str");
}
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") static void setConnectionParametersForRequest(HttpURLConnection connection,Request<?> request) throws IOException, AuthFailureError {
switch (request.getMethod()) {
case Method.DEPRECATED_GET_OR_POST:
    byte[] postBody=request.getPostBody();
  if (postBody != null) {
    connection.setDoOutput(true);
    connection.setRequestMethod("String_Node_Str");
    connection.addRequestProperty(HEADER_CONTENT_TYPE,request.getPostBodyContentType());
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(postBody);
    out.close();
  }
break;
case Method.GET:
connection.setRequestMethod("String_Node_Str");
break;
case Method.DELETE:
connection.setRequestMethod("String_Node_Str");
break;
case Method.POST:
connection.setRequestMethod("String_Node_Str");
addBodyIfExists(connection,request);
break;
case Method.PUT:
connection.setRequestMethod("String_Node_Str");
addBodyIfExists(connection,request);
break;
default :
throw new IllegalStateException("String_Node_Str");
}
}
Program: 25858
Project: 25858
Buggy source:
/** 
 * @param urlRewriter Rewriter to use for request URLs
 */
public HurlStack(UrlRewriter urlRewriter){
  mUrlRewriter=urlRewriter;
}

Fixed version (ground truth):
/** 
 * @param urlRewriter Rewriter to use for request URLs
 * @param sslSocketFactory SSL factory to use for HTTPS connections
 */
public HurlStack(UrlRewriter urlRewriter,SSLSocketFactory sslSocketFactory){
  mUrlRewriter=urlRewriter;
  mSslSocketFactory=sslSocketFactory;
}
Program: 25859
Project: 25859
Buggy source:
/** 
 * Opens an   {@link HttpURLConnection} with parameters.
 * @param url
 * @return an open connection
 * @throws IOException
 */
private HttpURLConnection openConnection(URL url,Request<?> request) throws IOException {
  HttpURLConnection connection=(HttpURLConnection)url.openConnection();
  int timeoutMs=request.getTimeoutMs();
  connection.setConnectTimeout(timeoutMs);
  connection.setReadTimeout(timeoutMs);
  connection.setUseCaches(false);
  connection.setDoInput(true);
  return connection;
}

Fixed version (ground truth):
/** 
 * Opens an   {@link HttpURLConnection} with parameters.
 * @param url
 * @return an open connection
 * @throws IOException
 */
private HttpURLConnection openConnection(URL url,Request<?> request) throws IOException {
  HttpURLConnection connection=(HttpURLConnection)url.openConnection();
  int timeoutMs=request.getTimeoutMs();
  connection.setConnectTimeout(timeoutMs);
  connection.setReadTimeout(timeoutMs);
  connection.setUseCaches(false);
  connection.setDoInput(true);
  if ("String_Node_Str".equals(url.getProtocol()) && mSslSocketFactory != null) {
    ((HttpsURLConnection)connection).setSSLSocketFactory(mSslSocketFactory);
  }
  return connection;
}
Program: 25860
Project: 25860
Buggy source:
@Override public boolean onQueryTextChange(String text){
  if (text.isEmpty() || disableAutoComplete) {
    disableAutoComplete=false;
    return false;
  }
 else   if (text.length() < 3) {
    setAutoCompleteAdapterIcon(recentSearchIconResourceId);
    loadSavedSearches();
  }
 else {
    setAutoCompleteAdapterIcon(autoCompleteIconResourceId);
    fetchAutoCompleteSuggestions(text);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onQueryTextChange(String text){
  if (text.isEmpty() || disableAutoComplete) {
    setAutoCompleteAdapterIcon(autoCompleteIconResourceId);
    disableAutoComplete=false;
    return false;
  }
 else   if (text.length() < 3) {
    setAutoCompleteAdapterIcon(recentSearchIconResourceId);
    loadSavedSearches();
  }
 else {
    setAutoCompleteAdapterIcon(autoCompleteIconResourceId);
    fetchAutoCompleteSuggestions(text);
  }
  return false;
}
Program: 25861
Project: 25861
Buggy source:
public void loadData(String fileName){
  try {
    IndexTask indexTask=this.client.createIndex(this.policy,this.namespace,FLIGHTS,FL_DATE_INDEX,FL_DATE_BIN,IndexType.NUMERIC);
    indexTask.waitTillComplete();
    log.info("String_Node_Str");
    File file=new File(fileName);
    if (file.exists()) {
      if (file.isDirectory()) {
        File[] csvFiles=file.listFiles();
        for (        final File aFile : csvFiles) {
          loadFile(aFile);
        }
      }
 else {
        loadFile(file);
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + fileName,e);
  }
}

Fixed version (ground truth):
public void loadData(String fileName){
  try {
    IndexTask indexTask=this.client.createIndex(this.policy,this.namespace,FLIGHTS,FL_DATE_INDEX,FL_DATE_BIN,IndexType.NUMERIC);
    indexTask.waitTillComplete();
    log.info("String_Node_Str");
    File file=new File(fileName);
    if (file.exists()) {
      if (file.isDirectory()) {
        File[] csvFiles=file.listFiles();
        for (        final File aFile : csvFiles) {
          if (aFile.getName().startsWith("String_Node_Str"))           continue;
          loadFile(aFile);
        }
      }
 else {
        loadFile(file);
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + fileName,e);
  }
}
Program: 25862
Project: 25862
Buggy source:
public void performMove(int x,int y){
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    this.board.set(this.turn,x,y);
  }
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    this.switchTurns();
  }
}

Fixed version (ground truth):
public void performMove(int x,int y){
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    boolean res=this.board.set(this.turn,x,y);
    if (res && (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O)) {
      this.switchTurns();
    }
  }
}
Program: 25863
Project: 25863
Buggy source:
public void performMove(int x,int y){
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    this.board.set(this.turn,x,y);
  }
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    this.switchTurns();
  }
}

Fixed version (ground truth):
public void performMove(int x,int y){
  if (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O) {
    boolean res=this.board.set(this.turn,x,y);
    if (res && (this.gameState == GameState.TURN_X || this.gameState == GameState.TURN_O)) {
      this.switchTurns();
    }
  }
}
Program: 25864
Project: 25864
Buggy source:
@Override public void prefChanged(String key){
switch (key) {
case Prefs.FILT_LANG:
case Prefs.SORT_CARD:
    adapter.rebuild();
  break;
}
}

Fixed version (ground truth):
@Override public void prefChanged(String key){
switch (key) {
case Prefs.FILT_LANG:
case Prefs.SORT_CARD:
    if (adapter != null)     adapter.rebuild();
  break;
}
}
Program: 25866
Project: 25866
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  shuffler=null;
  int res=intent.getIntExtra(SupplyShuffler.MSG_RES,-100);
  String msg;
switch (res) {
case SupplyShuffler.RES_OK:
    Intent showSupply=new Intent(getActivity(),ActivitySupply.class);
  showSupply.putExtra(ActivitySupply.PARAM_HISTORY_ID,intent.getLongExtra(SupplyShuffler.MSG_SUPPLY_ID,-1));
startActivity(showSupply);
return;
case SupplyShuffler.RES_MORE:
msg=String.format(getString(R.string.more),intent.getStringExtra(SupplyShuffler.MSG_SHORT));
Toast.makeText(getActivity(),msg,Toast.LENGTH_LONG).show();
return;
case SupplyShuffler.RES_MORE_K:
msg=String.format(getString(R.string.more_k),intent.getStringExtra(SupplyShuffler.MSG_SHORT));
Toast.makeText(getActivity(),msg,Toast.LENGTH_LONG).show();
return;
case SupplyShuffler.RES_NO_YW:
Toast.makeText(getActivity(),R.string.yw_no_bane,Toast.LENGTH_LONG).show();
return;
default :
}
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  shuffler=null;
  int res=intent.getIntExtra(SupplyShuffler.MSG_RES,-100);
  String msg;
switch (res) {
case SupplyShuffler.RES_OK:
    Intent showSupply=new Intent(getActivity(),ActivitySupply.class);
  showSupply.putExtra(ActivitySupply.PARAM_HISTORY_ID,intent.getLongExtra(SupplyShuffler.MSG_SUPPLY_ID,-1));
startActivity(showSupply);
return;
case SupplyShuffler.RES_MORE:
msg=String.format(getString(R.string.more_k),intent.getStringExtra(SupplyShuffler.MSG_SHORT));
Toast.makeText(getActivity(),msg,Toast.LENGTH_LONG).show();
return;
case SupplyShuffler.RES_NO_YW:
Toast.makeText(getActivity(),R.string.yw_no_bane,Toast.LENGTH_LONG).show();
return;
default :
}
}
Program: 25867
Project: 25867
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (navToggle.onOptionsItemSelected(item))   return true;
switch (item.getItemId()) {
case R.id.action_toggle_all:
    ((FragmentPicker)active).toggleAll();
  return true;
case R.id.action_submit:
return true;
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (navToggle.onOptionsItemSelected(item))   return true;
switch (item.getItemId()) {
case R.id.action_toggle_all:
    ((FragmentPicker)active).toggleAll();
  return true;
case R.id.action_submit:
shuffler.startShuffle();
return true;
}
return super.onOptionsItemSelected(item);
}
Program: 25868
Project: 25868
Buggy source:
/** 
 * Start a shuffle and register this receiver. Also cancels any shuffles in progress. 
 */
public void startShuffle(Long... cards){
  if (cards == null)   cards=new Long[0];
  cancelShuffle();
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(getActivity());
  shuffler=new SupplyShuffler(pref.getInt(Prefs.LIMIT_SUPPLY,10),pref.getInt(Prefs.LIMIT_EVENTS,2));
  shuffler.execute(cards);
}

Fixed version (ground truth):
/** 
 * Start a shuffle and register this receiver. Also cancels any shuffles in progress. 
 */
public void startShuffle(){
  cancelShuffle();
  shuffler=new SupplyShuffler();
  shuffler.execute();
}
Program: 25869
Project: 25869
Buggy source:
@Override public void onLoadFinished(Loader<Cursor> loader,Cursor data){
  if (data == null) {
    list.setAdapter(adapter);
    return;
  }
  final int col_set_id=data.getColumnIndex(CardDb._SET_ID);
  final int col_lang=data.getColumnIndex(CardDb._LANG);
  int set_id;
  String[] options;
  ArrayList<String> available=new ArrayList<>(languages.size());
  data.moveToFirst();
  set_id=data.getInt(col_set_id);
  available.add("String_Node_Str");
  available.add(data.getString(col_lang));
  while (data.moveToNext()) {
    if (set_id != data.getInt(col_set_id)) {
      options=new String[available.size()];
      available.toArray(options);
      setMap.get(set_id).opt=options;
      set_id=data.getInt(col_set_id);
      available.clear();
      available.add("String_Node_Str");
    }
    available.add(data.getString(col_lang));
  }
  options=new String[available.size()];
  available.toArray(options);
  setMap.get(set_id).opt=options;
  list.setAdapter(adapter);
  data.close();
}

Fixed version (ground truth):
@Override public void onLoadFinished(Loader<Cursor> loader,Cursor data){
  if (data == null) {
    list.setAdapter(adapter);
    return;
  }
  final int col_set_id=data.getColumnIndex(CardDb._SET_ID);
  final int col_lang=data.getColumnIndex(CardDb._LANG);
  int set_id;
  String[] options;
  ArrayList<String> available=new ArrayList<>(languages.size());
  data.moveToFirst();
  set_id=data.getInt(col_set_id);
  available.add("String_Node_Str");
  available.add(data.getString(col_lang));
  while (data.moveToNext()) {
    if (set_id != data.getInt(col_set_id)) {
      options=new String[available.size()];
      available.toArray(options);
      setMap.get(set_id).opt=options;
      set_id=data.getInt(col_set_id);
      available.clear();
      available.add("String_Node_Str");
    }
    available.add(data.getString(col_lang));
  }
  options=new String[available.size()];
  available.toArray(options);
  setMap.get(set_id).opt=options;
  list.setAdapter(adapter);
}
Program: 25871
Project: 25871
Buggy source:
@Override public Fragment getItem(int position){
  activeTab=position;
  FragmentHistoryPanel res=new FragmentHistoryPanel();
switch (position) {
case 0:
    res.loaderId=LoaderId.SAMPLE_SUPPLY;
  res.handler=new HandlerSamples(getActivity());
return res;
case 1:
res.loaderId=LoaderId.FAVORITES;
res.handler=new HandlerHistory(getActivity(),true);
return res;
case 2:
res.loaderId=LoaderId.HISTORY;
res.handler=new HandlerHistory(getActivity(),false);
return res;
default :
return null;
}
}

Fixed version (ground truth):
@Override public Fragment getItem(int position){
  activeTab=position;
  FragmentHistoryPanel res=new FragmentHistoryPanel();
  Bundle args=new Bundle();
  args.putInt(FragmentHistoryPanel.PARAM_TYPE,position);
  res.setArguments(args);
  return res;
}
Program: 25872
Project: 25872
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (handler == null)   throw new IllegalArgumentException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Bundle args=getArguments();
  int type=-1;
  if (args != null)   type=args.getInt(PARAM_TYPE,-1);
switch (type) {
case 0:
    loaderId=LoaderId.SAMPLE_SUPPLY;
  handler=new HandlerSamples(getActivity());
break;
case 1:
loaderId=LoaderId.FAVORITES;
handler=new HandlerHistory(getActivity(),true);
break;
case 2:
loaderId=LoaderId.HISTORY;
handler=new HandlerHistory(getActivity(),false);
break;
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
Program: 25873
Project: 25873
Buggy source:
@Override public void onStart(){
  super.onStart();
  LoaderManager lm=getActivity().getSupportLoaderManager();
  lm.initLoader(loaderId,null,this);
}

Fixed version (ground truth):
@Override public void onStart(){
  super.onStart();
  App.updateInfo(getActivity());
  LoaderManager lm=getActivity().getSupportLoaderManager();
  if (!App.transId.equals(trnasId)) {
    trnasId=App.transId;
    lm.restartLoader(loaderId,null,this);
  }
 else   lm.initLoader(loaderId,null,this);
}
Program: 25874
Project: 25874
Buggy source:
private File createLocalFile(CrawlFile file,String extension){
  return new File(getCrawlerDownloadDir().getAbsolutePath() + SystemUtils.FILE_SEPARATOR + PathUtils.urlToPath(file.getURL().toString())+ extension);
}

Fixed version (ground truth):
private File createLocalFile(CrawlFile file,String extension){
  return new File(getCrawlerDownloadDir().getAbsolutePath() + SystemUtils.FILE_SEPARATOR + file.getName().getPath()+ extension);
}
Program: 25876
Project: 25876
Buggy source:
public CrawlFile(FileObject fileObject){
  if (fileObject == null) {
    throw new FilesystemCollectorException("String_Node_Str");
  }
  this.fileObject=fileObject;
  this.reference=getURL().toString();
}

Fixed version (ground truth):
public CrawlFile(FileObject fileObject){
  if (fileObject == null) {
    throw new FilesystemCollectorException("String_Node_Str");
  }
  this.fileObject=fileObject;
  this.reference=fileObject.toString();
}
Program: 25877
Project: 25877
Buggy source:
private File createLocalFile(CrawlFile file,String extension){
  return new File(getCrawlerDownloadDir().getAbsolutePath() + SystemUtils.FILE_SEPARATOR + PathUtils.urlToPath(file.getURL().toString())+ extension);
}

Fixed version (ground truth):
private File createLocalFile(CrawlFile file,String extension){
  return new File(getCrawlerDownloadDir().getAbsolutePath() + SystemUtils.FILE_SEPARATOR + PathUtils.urlToPath(file.getReference())+ extension);
}
Program: 25878
Project: 25878
Buggy source:
public boolean onShoot(Player p,float force){
  int ticks=(int)((((System.currentTimeMillis() - startBow.get(p.getName())) * 20) / 1000) + 3);
  startBow.remove(p.getName());
  float f=(float)ticks / 20.0F;
  f=(f * f + f * 2.0F) / 3.0F;
  f=f > 1.0F ? 1.0F : f;
  if (Math.abs(force - f) > 0.25) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean onShoot(Player p,float force){
  int ticks=(int)((((System.currentTimeMillis() - startBow.get(p.getName())) * 20) / 1000) + 3);
  startBow.remove(p.getName());
  float f=(float)ticks / 20.0F;
  f=(f * f + f * 2.0F) / 3.0F;
  f=f > 1.0F ? 1.0F : f;
  if (Math.abs(force - f) > 0.20) {
    return true;
  }
 else {
    return false;
  }
}
Program: 25879
Project: 25879
Buggy source:
public boolean onShoot(Player p,float force){
  int ticks=(int)((((System.currentTimeMillis() - startBow.get(p.getName())) * 20) / 1000) + 3);
  startBow.remove(p.getName());
  float f=(float)ticks / 20.0F;
  f=(f * f + f * 2.0F) / 3.0F;
  f=f > 1.0F ? 1.0F : f;
  if (Math.abs(force - f) > 0.25) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean onShoot(Player p,float force){
  int ticks=(int)((((System.currentTimeMillis() - startBow.get(p.getName())) * 20) / 1000) + 3);
  startBow.remove(p.getName());
  float f=(float)ticks / 20.0F;
  f=(f * f + f * 2.0F) / 3.0F;
  f=f > 1.0F ? 1.0F : f;
  if (Math.abs(force - f) > 0.20) {
    return true;
  }
 else {
    return false;
  }
}
Program: 25882
Project: 25882
Buggy source:
@EventHandler(ignoreCancelled=true) public void onViolationTriggeredEvent(ViolationTriggeredEvent event){
  if (Setting.ignorenpc) {
    if (event.getPlayer().hasMetadata("String_Node_Str")) {
      event.setCancelled(true);
      return;
    }
  }
  if (event.getPlayer().hasPermission("String_Node_Str" + event.getCheckType().toString().toLowerCase())) {
  }
  if (event.getCheckType() == CheckType.FAST_INTERACT) {
    long diff=0;
    if (this.lastViolation.containsKey(event.getPlayer().getName())) {
      diff=System.currentTimeMillis() - this.lastViolation.get(event.getPlayer().getName());
    }
    if (diff <= 2000 && event.getNewLevel() > 35) {
      event.getPlayer().kickPlayer(ChatColor.RED + "String_Node_Str");
      this.nh.vars.setDeniedLogin(event.getPlayer(),(System.currentTimeMillis() + 10000),"String_Node_Str");
      event.setNewLevel(0);
    }
    this.lastViolation.put(event.getPlayer().getName(),System.currentTimeMillis());
  }
  if (event.getCheckType() == CheckType.AUTOSOUP) {
    if (Setting.autoban) {
      this.nh.vars.setDeniedLogin(event.getPlayer(),(System.currentTimeMillis() + (Setting.autobantime * 1000)),"String_Node_Str");
      event.getPlayer().kickPlayer(ChatColor.RED + "String_Node_Str" + Setting.autobantime+ "String_Node_Str");
      Utils.messageAdmins(event.getPlayer().getName() + "String_Node_Str" + Setting.autobantime+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@EventHandler(ignoreCancelled=true) public void onViolationTriggeredEvent(ViolationTriggeredEvent event){
  if (Setting.ignorenpc) {
    if (event.getPlayer().hasMetadata("String_Node_Str")) {
      event.setCancelled(true);
      return;
    }
  }
  if (event.getPlayer().hasPermission("String_Node_Str" + event.getCheckType().toString().toLowerCase())) {
  }
  if (event.getCheckType() == CheckType.FAST_INTERACT || event.getCheckType() == CheckType.SPEED_BREAK) {
    long diff=0;
    if (this.lastViolation.containsKey(event.getPlayer().getName())) {
      diff=System.currentTimeMillis() - this.lastViolation.get(event.getPlayer().getName());
    }
    if (diff <= 2000 && event.getNewLevel() > 35) {
      event.getPlayer().kickPlayer(ChatColor.RED + "String_Node_Str");
      this.nh.vars.setDeniedLogin(event.getPlayer(),(System.currentTimeMillis() + 10000),"String_Node_Str");
      event.setNewLevel(0);
    }
    this.lastViolation.put(event.getPlayer().getName(),System.currentTimeMillis());
  }
  if (event.getCheckType() == CheckType.AUTOSOUP) {
    if (Setting.autoban) {
      this.nh.vars.setDeniedLogin(event.getPlayer(),(System.currentTimeMillis() + (Setting.autobantime * 1000)),"String_Node_Str");
      event.getPlayer().kickPlayer(ChatColor.RED + "String_Node_Str" + Setting.autobantime+ "String_Node_Str");
      Utils.messageAdmins(event.getPlayer().getName() + "String_Node_Str" + Setting.autobantime+ "String_Node_Str");
    }
  }
}
Program: 25884
Project: 25884
Buggy source:
private double getMaxHorizontal(boolean onground,boolean inwater,Player p,MoveData md){
  double d=0;
  boolean csneak=p.isSneaking();
  if (!csneak) {
    if ((System.currentTimeMillis() - md.sneaktime) <= 1000) {
      csneak=true;
    }
  }
  boolean csprint=p.isSprinting();
  if (!csprint) {
    if ((System.currentTimeMillis() - md.sprinttime) <= 1000) {
      csprint=true;
    }
  }
  if (p.isFlying()) {
    d=0.305;
  }
 else {
    if (csprint) {
      d=0.788;
    }
 else     if (csneak) {
      if (p.getAllowFlight()) {
        d=0.305;
      }
 else {
        if (onground && p.isSneaking()) {
          d=0.025;
        }
 else         if (onground) {
          d=0.467;
        }
 else         if (!onground && p.isSneaking()) {
          d=0.467;
        }
      }
    }
 else     if (p.isBlocking()) {
      d=0.0205;
    }
 else {
      d=0.467;
    }
  }
  if (inwater) {
    d=0.0774;
  }
  d=d + Math.abs((p.getVelocity().getX() + p.getVelocity().getZ()) * 7.5);
  return d;
}

Fixed version (ground truth):
private double getMaxHorizontal(boolean onground,boolean inwater,Player p,MoveData md){
  double d=0;
  boolean csneak=p.isSneaking();
  if (!csneak) {
    if ((System.currentTimeMillis() - md.sneaktime) <= 1000) {
      csneak=true;
    }
  }
  boolean csprint=p.isSprinting();
  if (!csprint) {
    if ((System.currentTimeMillis() - md.sprinttime) <= 1000) {
      csprint=true;
    }
  }
  if (p.isFlying()) {
    d=0.305;
  }
 else {
    if (csprint) {
      d=0.788;
    }
 else     if (csneak) {
      if (p.getAllowFlight()) {
        d=0.305;
      }
 else {
        if (onground && p.isSneaking()) {
          d=0.025;
        }
 else         if (onground) {
          d=0.467;
        }
 else         if (!onground && p.isSneaking()) {
          d=0.467;
        }
      }
    }
 else     if (p.isBlocking()) {
      d=0.0205;
    }
 else {
      d=0.467;
    }
  }
  if (inwater && !p.getAllowFlight()) {
    d=0.0774;
  }
  d=d + Math.abs((p.getVelocity().getX() + p.getVelocity().getZ()) * 7.5);
  return d;
}
Program: 25885
Project: 25885
Buggy source:
private double getMaxVertical(Player p,boolean inwater,boolean up){
  double d=0.5;
  if (p.hasPotionEffect(PotionEffectType.JUMP)) {
    d=d + ((this.getPotionEffectLevel(p,PotionEffectType.JUMP)) * 0.11);
  }
  if (inwater) {
    if (up) {
      d=0.3401;
    }
 else {
      d=Math.abs(p.getVelocity().getY());
    }
  }
  if (p.getVelocity().getY() > 0) {
    d=d + (p.getVelocity().getY());
  }
  return d;
}

Fixed version (ground truth):
private double getMaxVertical(Player p,boolean inwater,boolean up){
  double d=0.5;
  if (p.hasPotionEffect(PotionEffectType.JUMP)) {
    d=d + ((this.getPotionEffectLevel(p,PotionEffectType.JUMP)) * 0.11);
  }
  if (inwater && !p.getAllowFlight()) {
    if (up) {
      d=0.3401;
    }
 else {
      d=Math.abs(p.getVelocity().getY());
    }
  }
  if (p.getVelocity().getY() > 0) {
    d=d + (p.getVelocity().getY());
  }
  return d;
}
Program: 25886
Project: 25886
Buggy source:
@EventHandler(ignoreCancelled=true) public void onClick(InventoryClickEvent event){
  if (event.getWhoClicked().getType() == EntityType.PLAYER) {
    Player p=(Player)event.getWhoClicked();
    for (    Check c : nh.getChecks()) {
      if (c.getDetectType() == DetectionType.INVENTORY) {
        if (c.runInventoryCheck(p) != 0) {
          event.setCancelled(true);
          break;
        }
      }
    }
    p=null;
  }
}

Fixed version (ground truth):
@EventHandler(ignoreCancelled=true) public void onClick(InventoryClickEvent event){
  if (event.getWhoClicked().getType() == EntityType.PLAYER) {
    Player p=(Player)event.getWhoClicked();
    for (    Check c : nh.getChecks()) {
      if (c.getDetectType() == DetectionType.INVENTORY) {
        if (c.runInventoryCheck(p,event.getInventory(),event.getAction()) != 0) {
          event.setCancelled(true);
          break;
        }
      }
    }
    p=null;
  }
}
Program: 25887
Project: 25887
Buggy source:
public int runInventoryCheck(Player p){
  return 0;
}

Fixed version (ground truth):
public int runInventoryCheck(Player p,Inventory inv,InventoryAction ia){
  return 0;
}
Program: 25888
Project: 25888
Buggy source:
@Override public int runBlockCheck(Player p,Block b,BlockFace bf,long ls,int aid){
  if (p == null || b == null || aid != 0) {
    return 0;
  }
  if (Utils.instantBreak(b.getType())) {
  }
 else {
    if (!Utils.canSeeBlock(p,b)) {
      int id=this.vars.raiseViolationLevel(CheckType.VISIBLE,p);
      ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.VISIBLE,p);
      Bukkit.getServer().getPluginManager().callEvent(vte);
      if (!vte.isCancelled()) {
        if (id != 0) {
          String message=Setting.blockvisiblebreak;
          message=message.replaceAll("String_Node_Str",ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN);
          message=message.replaceAll("String_Node_Str",id + "String_Node_Str");
          Utils.messageAdmins(message);
        }
        return 4;
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
@Override public int runBlockCheck(Player p,Block b,BlockFace bf,long ls,int aid){
  if (p == null || b == null || aid != 0) {
    return 0;
  }
  if (Utils.instantBreak(b.getType()) || p.getGameMode() == GameMode.CREATIVE) {
  }
 else {
    if (!Utils.canSeeBlock(p,b)) {
      int id=this.vars.raiseViolationLevel(CheckType.VISIBLE,p);
      ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.VISIBLE,p);
      Bukkit.getServer().getPluginManager().callEvent(vte);
      if (!vte.isCancelled()) {
        if (id != 0) {
          String message=Setting.blockvisiblebreak;
          message=message.replaceAll("String_Node_Str",ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN);
          message=message.replaceAll("String_Node_Str",id + "String_Node_Str");
          Utils.messageAdmins(message);
        }
        return 4;
      }
    }
  }
  return 0;
}
Program: 25889
Project: 25889
Buggy source:
@Override public int runInventoryCheck(Player p){
  if (p.isBlocking() || p.isSneaking() || p.isSprinting()|| p.isSleeping()) {
    int id=this.vars.raiseViolationLevel(CheckType.IMPOSSIBLE,p);
    ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.IMPOSSIBLE,p);
    Bukkit.getServer().getPluginManager().callEvent(vte);
    if (!vte.isCancelled()) {
      if (id != 0) {
        String message=Setting.impossibleclick;
        message=message.replaceAll("String_Node_Str",ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN);
        message=message.replaceAll("String_Node_Str",id + "String_Node_Str");
        Utils.messageAdmins(message);
      }
      return 1;
    }
  }
  long diff=(System.currentTimeMillis() - this.getLastClicked(p.getName()));
  if (diff <= Setting.fcs) {
    int id=this.vars.raiseViolationLevel(CheckType.FASTCLICK,p);
    ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.FASTCLICK,p);
    Bukkit.getServer().getPluginManager().callEvent(vte);
    this.lastclick.put(p.getName(),System.currentTimeMillis());
    if (!vte.isCancelled()) {
      if (id != 0) {
        Utils.messageAdmins(ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str"+ id);
      }
      return 1;
    }
  }
  this.lastclick.put(p.getName(),System.currentTimeMillis());
  return 0;
}

Fixed version (ground truth):
@Override public int runInventoryCheck(Player p,Inventory inv,InventoryAction ia){
  if (p.isBlocking() || p.isSneaking() || p.isSprinting()|| p.isSleeping()) {
    int id=this.vars.raiseViolationLevel(CheckType.IMPOSSIBLE,p);
    ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.IMPOSSIBLE,p);
    Bukkit.getServer().getPluginManager().callEvent(vte);
    if (!vte.isCancelled()) {
      if (id != 0) {
        String message=Setting.impossibleclick;
        message=message.replaceAll("String_Node_Str",ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN);
        message=message.replaceAll("String_Node_Str",id + "String_Node_Str");
        Utils.messageAdmins(message);
      }
      return 1;
    }
  }
  if (p.getGameMode() == GameMode.CREATIVE) {
    if (inv.getType() == InventoryType.CREATIVE) {
    }
  }
  if (Setting.debug) {
    Bukkit.broadcastMessage("String_Node_Str" + inv.getType() + "String_Node_Str"+ ia.toString().toLowerCase());
  }
  long diff=(System.currentTimeMillis() - this.getLastClicked(p.getName()));
  if (diff <= Setting.fcs) {
    int id=this.vars.raiseViolationLevel(CheckType.FASTCLICK,p);
    ViolationTriggeredEvent vte=new ViolationTriggeredEvent(id,CheckType.FASTCLICK,p);
    Bukkit.getServer().getPluginManager().callEvent(vte);
    this.lastclick.put(p.getName(),System.currentTimeMillis());
    if (!vte.isCancelled()) {
      if (id != 0) {
        Utils.messageAdmins(ChatColor.YELLOW + "String_Node_Str" + p.getName()+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str"+ id);
      }
      return 1;
    }
  }
  this.lastclick.put(p.getName(),System.currentTimeMillis());
  return 0;
}
Program: 25892
Project: 25892
Buggy source:
private StringBuilder createStepTeplate(ArrayList<String> stepTexts){
  StringBuilder step=new StringBuilder();
  if (stepTexts.size() == 1) {
    return step.append("String_Node_Str").append(stepTexts.get(0)).append("String_Node_Str");
  }
 else {
    StringBuilder commaSeparated=new StringBuilder();
    for (    String stepText : stepTexts) {
      commaSeparated.append("String_Node_Str").append(stepText).append("String_Node_Str");
    }
    return step.append("String_Node_Str").append(commaSeparated).append("String_Node_Str");
  }
}

Fixed version (ground truth):
private StringBuilder createStepTeplate(ArrayList<String> stepTexts){
  StringBuilder step=new StringBuilder();
  if (stepTexts.size() == 1) {
    return step.append("String_Node_Str").append(stepTexts.get(0)).append("String_Node_Str");
  }
 else {
    StringBuilder commaSeparated=new StringBuilder();
    for (    String stepText : stepTexts) {
      commaSeparated.append("String_Node_Str").append(stepText).append("String_Node_Str");
    }
    StringBuilder res=step.append("String_Node_Str").append(commaSeparated.substring(0,commaSeparated.length() - 1)).append("String_Node_Str");
    return res;
  }
}