nus-yam/ex-repair huggingface dataset:
Program: 44215
Project: 44215
Buggy source:
/** 
 * @param id the ID of the managed source to delete
 * @return this
 */
public FutureData<DataSiftResult> delete(String id){
  if (id == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<DataSiftResult> future=new FutureData<>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(DELETE));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new BaseDataSiftResult(),config))).form("String_Node_Str",id);
  applyConfig(request).execute();
  return future;
}

Fixed version (ground truth):
/** 
 * @param id the ID of the managed source to delete
 * @return this
 */
public FutureData<DataSiftResult> delete(String id){
  if (id == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<DataSiftResult> future=new FutureData<>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(DELETE));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new BaseDataSiftResult(),config))).form("String_Node_Str",id);
  performRequest(future,request);
  return future;
}
Program: 44216
Project: 44216
Buggy source:
/** 
 * Get the data that's available for the given preview
 * @param preview the historics preview to fetch
 * @return the data available
 */
public FutureData<HistoricsPreviewData> get(HistoricsPreview preview){
  if (preview == null || preview.id() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<HistoricsPreviewData> future=new FutureData<HistoricsPreviewData>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(GET));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new HistoricsPreviewData(),config))).form("String_Node_Str",preview.id());
  applyConfig(request).execute();
  return future;
}

Fixed version (ground truth):
/** 
 * Get the data that's available for the given preview
 * @param preview the historics preview to fetch
 * @return the data available
 */
public FutureData<HistoricsPreviewData> get(HistoricsPreview preview){
  if (preview == null || preview.id() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<HistoricsPreviewData> future=new FutureData<HistoricsPreviewData>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(GET));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new HistoricsPreviewData(),config))).form("String_Node_Str",preview.id());
  performRequest(future,request);
  return future;
}
Program: 44220
Project: 44220
Buggy source:
public void testConstruction(){
  try {
    api_client.setResponse("String_Node_Str" + DataForTests.definition_hash + "String_Node_Str",200);
    Historic h=def.createHistoric(DataForTests.historic_start,DataForTests.historic_end,DataForTests.historic_sources,DataForTests.historic_sample,DataForTests.historic_name);
    assertEquals("String_Node_Str",DataForTests.definition_hash,h.getStreamHash());
    assertEquals("String_Node_Str",DataForTests.historic_name,h.getName());
    assertEquals("String_Node_Str",DataForTests.historic_start,h.getStartDate());
    assertEquals("String_Node_Str",DataForTests.historic_end,h.getEndDate());
    assertEquals("String_Node_Str","String_Node_Str",h.getStatus());
    assertEquals("String_Node_Str",0,h.getProgress());
    assertEquals("String_Node_Str",DataForTests.historic_sample,h.getSample());
    String[] sources_input=DataForTests.historic_sources.split("String_Node_Str");
    ArrayList<String> sources=h.getSources();
    assertEquals("String_Node_Str",sources_input.length,sources.size());
    for (    String source : sources_input) {
      assertTrue("String_Node_Str" + source + "String_Node_Str",sources.contains(source));
    }
    HashMap<String,Integer> volume_info=h.getVolumeInfo();
    assertEquals("String_Node_Str",0,volume_info.size());
  }
 catch (  EInvalidData e) {
    fail("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    fail("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void testConstruction(){
  try {
    api_client.setResponse("String_Node_Str" + DataForTests.definition_hash + "String_Node_Str",200);
    Historic h=def.createHistoric(DataForTests.historic_start,DataForTests.historic_end,DataForTests.historic_sources,DataForTests.historic_sample,DataForTests.historic_name);
    assertEquals("String_Node_Str",DataForTests.definition_hash,h.getStreamHash());
    assertEquals("String_Node_Str",DataForTests.historic_name,h.getName());
    assertEquals("String_Node_Str",DataForTests.historic_start,h.getStartDate());
    assertEquals("String_Node_Str",DataForTests.historic_end,h.getEndDate());
    assertEquals("String_Node_Str","String_Node_Str",h.getStatus());
    assertEquals("String_Node_Str",0,h.getProgress());
    assertEquals("String_Node_Str",DataForTests.historic_sample,h.getSample());
    String[] sources_input=DataForTests.historic_sources.split("String_Node_Str");
    ArrayList<String> sources=h.getSources();
    assertEquals("String_Node_Str",sources_input.length,sources.size());
    for (    String source : sources_input) {
      assertTrue("String_Node_Str" + source + "String_Node_Str",sources.contains(source));
    }
  }
 catch (  EInvalidData e) {
    fail("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    fail("String_Node_Str" + e.getMessage());
  }
}
Program: 44221
Project: 44221
Buggy source:
/** 
 * Constructor.
 * @param User user
 * @param ArrayList<String>hashes
 * @param IMultiStreamConsumerEvents eventHandler
 * @throws EInvalidData
 * @throws ECompileFailed
 * @throws EAccessDenied
 * @throws EAPIError 
 * @throws URISyntaxException 
 * @throws WebSocketException 
 */
public WS(User user,IMultiStreamConsumerEvents eventHandler,boolean isHistoric,String... hashes) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  super(user,eventHandler);
  try {
    _is_historic=isHistoric;
    _thread=new WSThread(this,user,Arrays.asList(hashes));
  }
 catch (  WebSocketException e) {
    throw new EAPIError(e.getMessage());
  }
catch (  URISyntaxException e) {
    throw new EAPIError(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param User user
 * @param ArrayList<String>hashes
 * @param IMultiStreamConsumerEvents eventHandler
 * @throws EInvalidData
 * @throws ECompileFailed
 * @throws EAccessDenied
 * @throws EAPIError 
 * @throws URISyntaxException 
 * @throws WebSocketException 
 */
public WS(User user,IMultiStreamConsumerEvents eventHandler,boolean isHistoric,String... hashes) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  super(user,eventHandler);
  try {
    _is_historic=isHistoric;
    _thread=new WSThread(this,user,hashes == null ? new ArrayList<String>() : Arrays.asList(hashes));
  }
 catch (  WebSocketException e) {
    throw new EAPIError(e.getMessage());
  }
catch (  URISyntaxException e) {
    throw new EAPIError(e.getMessage());
  }
}
Program: 44222
Project: 44222
Buggy source:
/** 
 * Get the data availability info. If the historic has not yet been prepared that will be done automagically to obtain the cost.
 * @return HistoricDataAvailability
 * @throws EAPIError 
 * @throws EAccessDenied 
 * @throws EInvalidData 
 */
public HistoricDataAvailability getAvailability() throws EInvalidData, EAccessDenied, EAPIError {
  if (_availability == null) {
    prepare();
  }
  return _availability;
}

Fixed version (ground truth):
/** 
 * Get the data availability info. If the historic has not yet been prepared that will be done automagically to obtain the availability data.
 * @return HistoricDataAvailability
 * @throws EAPIError 
 * @throws EAccessDenied 
 * @throws EInvalidData 
 */
public HistoricDataAvailability getAvailability() throws EInvalidData, EAccessDenied, EAPIError {
  if (_availability == null) {
    prepare();
  }
  return _availability;
}
Program: 44223
Project: 44223
Buggy source:
/** 
 * Save changes to the name and output_parameters of this subscription.
 * @throws EInvalidData
 * @throws EAPIError
 * @throws EAccessDenied
 */
public void save() throws EInvalidData, EAPIError, EAccessDenied {
  HashMap<String,String> params=new HashMap<String,String>();
  params.put("String_Node_Str",getId());
  for (  String key : _output_params.keySet()) {
    params.put("String_Node_Str" + key,_output_params.get(key));
  }
  params.put("String_Node_Str",getName());
  init(_user.callAPI("String_Node_Str",params));
}

Fixed version (ground truth):
/** 
 * Save changes to the name and output_parameters of this subscription.
 * @throws EInvalidData
 * @throws EAPIError
 * @throws EAccessDenied
 */
public void save() throws EInvalidData, EAPIError, EAccessDenied {
  HashMap<String,String> params=new HashMap<String,String>();
  params.put("String_Node_Str",getId());
  for (  String key : _output_params.keySet()) {
    params.put(OUTPUT_PARAMS_PREFIX + key,_output_params.get(key));
  }
  params.put("String_Node_Str",getName());
  init(_user.callAPI("String_Node_Str",params));
}
Program: 44224
Project: 44224
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  Env.init(args);
  if (Env.getArgCount() < 4) {
    usage();
  }
  String stream_hash=Env.getArg(0);
  String start_date=Env.getArg(1);
  String end_date=Env.getArg(2);
  String sources=Env.getArg(3);
  double sample=Double.parseDouble(Env.getArg(4));
  String name=Env.getArg(5);
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  Date start=null;
  Date end=null;
  try {
    start=df.parse(start_date);
  }
 catch (  ParseException e2) {
    System.err.println("String_Node_Str" + Env.getArg(1));
    System.exit(1);
  }
  try {
    end=df.parse(end_date);
  }
 catch (  ParseException e2) {
    System.err.println("String_Node_Str" + Env.getArg(1));
    System.exit(1);
  }
  try {
    Historic historic=Env.getUser().createHistoric(stream_hash,start,end,sources,sample,name);
    Env.displayHistoricDetails(historic);
  }
 catch (  EInvalidData e) {
    System.err.println("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    System.err.println("String_Node_Str" + e.getMessage());
  }
  System.out.println("String_Node_Str" + Env.getUser().getRateLimitRemaining());
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  Env.init(args);
  if (Env.getArgCount() != 6) {
    usage();
  }
  String stream_hash=Env.getArg(0);
  String start_date=Env.getArg(1);
  String end_date=Env.getArg(2);
  String sources=Env.getArg(3);
  double sample=Double.parseDouble(Env.getArg(4));
  String name=Env.getArg(5);
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  Date start=null;
  Date end=null;
  try {
    start=df.parse(start_date);
  }
 catch (  ParseException e2) {
    System.err.println("String_Node_Str" + Env.getArg(1));
    System.exit(1);
  }
  try {
    end=df.parse(end_date);
  }
 catch (  ParseException e2) {
    System.err.println("String_Node_Str" + Env.getArg(1));
    System.exit(1);
  }
  try {
    Historic historic=Env.getUser().createHistoric(stream_hash,start,end,sources,sample,name);
    Env.displayHistoricDetails(historic);
  }
 catch (  EInvalidData e) {
    System.err.println("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    System.err.println("String_Node_Str" + e.getMessage());
  }
  System.out.println("String_Node_Str" + Env.getUser().getRateLimitRemaining());
}
Program: 44225
Project: 44225
Buggy source:
static public void displaySubscriptionDetails(PushSubscription subscription){
  String output_type=subscription.getOutputType();
  System.out.println("String_Node_Str" + String.valueOf(subscription.getId()));
  System.out.println("String_Node_Str" + subscription.getName());
  System.out.println("String_Node_Str" + subscription.getStatus());
  System.out.println("String_Node_Str" + subscription.getCreatedAt());
  System.out.println("String_Node_Str" + subscription.getLastRequest());
  System.out.println("String_Node_Str" + subscription.getLastSuccess());
  System.out.println("String_Node_Str" + output_type);
  System.out.println("String_Node_Str");
  PushOutputParams output_params=subscription.getOutputParams();
  for (  String key : output_params.keySet()) {
    System.out.println("String_Node_Str" + key + "String_Node_Str"+ output_params.get(key));
  }
}

Fixed version (ground truth):
static public void displaySubscriptionDetails(PushSubscription subscription){
  System.out.println("String_Node_Str" + subscription.getId());
  System.out.println("String_Node_Str" + subscription.getName());
  System.out.println("String_Node_Str" + subscription.getStatus());
  System.out.println("String_Node_Str" + subscription.getCreatedAt());
  System.out.println("String_Node_Str" + subscription.getLastRequest());
  System.out.println("String_Node_Str" + subscription.getLastSuccess());
  System.out.println("String_Node_Str" + subscription.getOutputType());
  System.out.println("String_Node_Str");
  PushOutputParams output_params=subscription.getOutputParams();
  for (  String key : output_params.keySet()) {
    System.out.println("String_Node_Str" + key + "String_Node_Str"+ output_params.get(key));
  }
}
Program: 44226
Project: 44226
Buggy source:
public static void usage(String message,boolean exit){
  if (message.length() > 0) {
    System.err.println("String_Node_Str");
    System.err.println(message);
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (exit) {
    System.exit(1);
  }
}

Fixed version (ground truth):
public static void usage(String message,boolean exit){
  if (message.length() > 0) {
    System.err.println("String_Node_Str");
    System.err.println(message);
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (exit) {
    System.exit(1);
  }
}
Program: 44227
Project: 44227
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  Env.init(args);
  try {
switch (Env.getArgCount()) {
case 0:
      Log log=Env.getUser().getPushSubscriptionLogs();
    if (log.getCount() == 0) {
      System.out.println("String_Node_Str");
    }
 else {
      for (      LogEntry l : log) {
        System.out.println(new SimpleDateFormat("String_Node_Str").format(l.getRequestTime()) + "String_Node_Str" + String.valueOf(l.getSubscriptionId())+ "String_Node_Str"+ (l.getSuccess() ? "String_Node_Str" : "String_Node_Str")+ l.getMessage());
      }
    }
  break;
case 1:
String subscription_id=Env.getArg(0);
PushSubscription push=Env.getUser().getPushSubscription(subscription_id);
Log subscription_log=push.getLog();
if (subscription_log.getCount() == 0) {
System.out.println("String_Node_Str" + subscription_id + "String_Node_Str");
}
 else {
for (LogEntry l : subscription_log) {
System.out.println(new SimpleDateFormat("String_Node_Str").format(l.getRequestTime()) + "String_Node_Str" + (l.getSuccess() ? "String_Node_Str" : "String_Node_Str")+ l.getMessage());
}
}
break;
default :
System.err.println("String_Node_Str");
break;
}
}
 catch (NumberFormatException e) {
System.err.println("String_Node_Str");
}
catch (EAPIError e) {
System.err.println("String_Node_Str" + e.getMessage());
}
catch (EAccessDenied e) {
System.err.println("String_Node_Str" + e.getMessage());
}
catch (EInvalidData e) {
System.err.println("String_Node_Str" + e.getMessage());
}
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  Env.init(args);
  try {
switch (Env.getArgCount()) {
case 0:
      Log log=Env.getUser().getPushSubscriptionLogs();
    if (log.getCount() == 0) {
      System.out.println("String_Node_Str");
    }
 else {
      for (      LogEntry l : log) {
        System.out.println(new SimpleDateFormat("String_Node_Str").format(l.getRequestTime()) + "String_Node_Str" + l.getSubscriptionId()+ "String_Node_Str"+ (l.getSuccess() ? "String_Node_Str" : "String_Node_Str")+ l.getMessage());
      }
    }
  break;
case 1:
String subscription_id=Env.getArg(0);
PushSubscription push=Env.getUser().getPushSubscription(subscription_id);
Log subscription_log=push.getLog();
if (subscription_log.getCount() == 0) {
System.out.println("String_Node_Str" + subscription_id + "String_Node_Str");
}
 else {
for (LogEntry l : subscription_log) {
System.out.println(new SimpleDateFormat("String_Node_Str").format(l.getRequestTime()) + "String_Node_Str" + (l.getSuccess() ? "String_Node_Str" : "String_Node_Str")+ l.getMessage());
}
}
break;
default :
System.err.println("String_Node_Str");
break;
}
}
 catch (NumberFormatException e) {
System.err.println("String_Node_Str");
}
catch (EAPIError e) {
System.err.println("String_Node_Str" + e.getMessage());
}
catch (EAccessDenied e) {
System.err.println("String_Node_Str" + e.getMessage());
}
catch (EInvalidData e) {
System.err.println("String_Node_Str" + e.getMessage());
}
}
Program: 44228
Project: 44228
Buggy source:
/** 
 * Call the DataSift API to prepare this historic query.
 * @throws EInvalidData
 * @throws EAccessDenied
 * @throws EAPIError
 */
public void prepare() throws EInvalidData, EAccessDenied, EAPIError {
  if (_playback_id.length() != 0) {
    throw new EInvalidData("String_Node_Str");
  }
  JSONObject res=null;
  try {
    HashMap<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str",_hash);
    params.put("String_Node_Str",String.valueOf(_start.getTime() / 1000));
    params.put("String_Node_Str",String.valueOf(_end.getTime() / 1000));
    params.put("String_Node_Str",_name);
    params.put("String_Node_Str",Utils.join(_feeds,"String_Node_Str"));
    params.put("String_Node_Str",String.valueOf(_sample));
    res=_user.callAPI("String_Node_Str",params);
    try {
      _playback_id=res.getString("String_Node_Str");
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
    try {
      _dpus=res.getDouble("String_Node_Str");
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
    try {
      _availability=new HistoricDataAvailability(res.getJSONObject("String_Node_Str"));
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
  }
 catch (  EAPIError e) {
switch (e.getCode()) {
case 400:
      throw new EInvalidData(e.getMessage());
default :
    throw new EAPIError("String_Node_Str" + e.getCode() + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
}
}
reloadData();
}

Fixed version (ground truth):
/** 
 * Call the DataSift API to prepare this historic query.
 * @throws EInvalidData
 * @throws EAccessDenied
 * @throws EAPIError
 */
public void prepare() throws EInvalidData, EAccessDenied, EAPIError {
  if (_playback_id.length() != 0) {
    throw new EInvalidData("String_Node_Str");
  }
  JSONObject res=null;
  try {
    HashMap<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str",_hash);
    params.put("String_Node_Str",String.valueOf(_start.getTime() / 1000));
    params.put("String_Node_Str",String.valueOf(_end.getTime() / 1000));
    params.put("String_Node_Str",_name);
    params.put("String_Node_Str",Utils.join(_sources,"String_Node_Str"));
    params.put("String_Node_Str",String.valueOf(_sample));
    res=_user.callAPI("String_Node_Str",params);
    try {
      _playback_id=res.getString("String_Node_Str");
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
    try {
      _dpus=res.getDouble("String_Node_Str");
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
    try {
      _availability=new HistoricDataAvailability(res.getJSONObject("String_Node_Str"));
    }
 catch (    JSONException e) {
      throw new EAPIError("String_Node_Str");
    }
  }
 catch (  EAPIError e) {
switch (e.getCode()) {
case 400:
      throw new EInvalidData(e.getMessage());
default :
    throw new EAPIError("String_Node_Str" + e.getCode() + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
}
}
reloadData();
}
Program: 44230
Project: 44230
Buggy source:
/** 
 * Factory method that takes a Historic object.
 * @param user
 * @param type
 * @param definition
 * @param eventHandler
 * @return
 * @throws EAccessDenied
 * @throws ECompileFailed
 * @throws EInvalidData
 * @throws EAPIError 
 */
public static StreamConsumer historicFactory(User user,String type,Historic historic,IMultiStreamConsumerEvents eventHandler) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  if (type == StreamConsumer.TYPE_WS) {
    return new WS(user,eventHandler,true);
  }
  throw new EInvalidData("String_Node_Str" + type);
}

Fixed version (ground truth):
/** 
 * Factory method that takes a Historic object for websockets.
 * @param user
 * @param type
 * @param definition
 * @param eventHandler
 * @return
 * @throws EAccessDenied
 * @throws ECompileFailed
 * @throws EInvalidData
 * @throws EAPIError 
 */
public static StreamConsumer historicFactory(User user,String type,Historic historic,IMultiStreamConsumerEvents eventHandler) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  if (type == StreamConsumer.TYPE_WS) {
    return new WS(user,eventHandler,true,historic.getHash());
  }
  throw new EInvalidData("String_Node_Str" + type);
}
Program: 44231
Project: 44231
Buggy source:
/** 
 * Constructor.
 * @param User user
 * @param ArrayList<String>hashes
 * @param IMultiStreamConsumerEvents eventHandler
 * @param boolean isHistoric
 * @throws EInvalidData
 * @throws ECompileFailed
 * @throws EAccessDenied
 * @throws EAPIError 
 * @throws URISyntaxException 
 * @throws WebSocketException 
 */
public WS(User user,IMultiStreamConsumerEvents eventHandler) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  this(user,eventHandler,null);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param User user
 * @param ArrayList<String>hashes
 * @param IMultiStreamConsumerEvents eventHandler
 * @throws EInvalidData
 * @throws ECompileFailed
 * @throws EAccessDenied
 * @throws EAPIError 
 * @throws URISyntaxException 
 * @throws WebSocketException 
 */
public WS(User user,IMultiStreamConsumerEvents eventHandler,boolean isHistoric,String... hashes) throws EInvalidData, ECompileFailed, EAccessDenied, EAPIError {
  super(user,eventHandler);
  try {
    _is_historic=isHistoric;
    _thread=new WSThread(this,user,Arrays.asList(hashes));
  }
 catch (  WebSocketException e) {
    throw new EAPIError(e.getMessage());
  }
catch (  URISyntaxException e) {
    throw new EAPIError(e.getMessage());
  }
}
Program: 44233
Project: 44233
Buggy source:
public void testConstruction(){
  try {
    api_client.setResponse("String_Node_Str" + DataForTests.definition_hash + "String_Node_Str",200);
    Historic h=def.createHistoric(DataForTests.historic_start,DataForTests.historic_end,DataForTests.historic_feeds,DataForTests.historic_sample,DataForTests.historic_name);
    assertEquals("String_Node_Str",DataForTests.definition_hash,h.getStreamHash());
    assertEquals("String_Node_Str",DataForTests.historic_name,h.getName());
    assertEquals("String_Node_Str",DataForTests.historic_start,h.getStartDate());
    assertEquals("String_Node_Str",DataForTests.historic_end,h.getEndDate());
    assertEquals("String_Node_Str","String_Node_Str",h.getStatus());
    assertEquals("String_Node_Str",0,h.getProgress());
    assertEquals("String_Node_Str",DataForTests.historic_sample,h.getSample());
    String[] feeds_input=DataForTests.historic_feeds.split("String_Node_Str");
    ArrayList<String> feeds=h.getFeeds();
    assertEquals("String_Node_Str",feeds_input.length,feeds.size());
    for (    String feed : feeds_input) {
      assertTrue("String_Node_Str" + feed + "String_Node_Str",feeds.contains(feed));
    }
    HashMap<String,Integer> volume_info=h.getVolumeInfo();
    assertEquals("String_Node_Str",0,volume_info.size());
  }
 catch (  EInvalidData e) {
    fail("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    fail("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void testConstruction(){
  try {
    api_client.setResponse("String_Node_Str" + DataForTests.definition_hash + "String_Node_Str",200);
    Historic h=def.createHistoric(DataForTests.historic_start,DataForTests.historic_end,DataForTests.historic_sources,DataForTests.historic_sample,DataForTests.historic_name);
    assertEquals("String_Node_Str",DataForTests.definition_hash,h.getStreamHash());
    assertEquals("String_Node_Str",DataForTests.historic_name,h.getName());
    assertEquals("String_Node_Str",DataForTests.historic_start,h.getStartDate());
    assertEquals("String_Node_Str",DataForTests.historic_end,h.getEndDate());
    assertEquals("String_Node_Str","String_Node_Str",h.getStatus());
    assertEquals("String_Node_Str",0,h.getProgress());
    assertEquals("String_Node_Str",DataForTests.historic_sample,h.getSample());
    String[] sources_input=DataForTests.historic_sources.split("String_Node_Str");
    ArrayList<String> sources=h.getSources();
    assertEquals("String_Node_Str",sources_input.length,sources.size());
    for (    String source : sources_input) {
      assertTrue("String_Node_Str" + source + "String_Node_Str",sources.contains(source));
    }
    HashMap<String,Integer> volume_info=h.getVolumeInfo();
    assertEquals("String_Node_Str",0,volume_info.size());
  }
 catch (  EInvalidData e) {
    fail("String_Node_Str" + e.getMessage());
  }
catch (  EAccessDenied e) {
    fail("String_Node_Str" + e.getMessage());
  }
}
Program: 44235
Project: 44235
Buggy source:
public synchronized void processLine(String line){
  try {
    JSONdn data=new JSONdn(line);
    if (data.has("String_Node_Str")) {
      String status=data.getStringVal("String_Node_Str");
      if (status.equals("String_Node_Str") || status.equals("String_Node_Str")) {
        _consumer.onError(data.getStringVal("String_Node_Str"));
        _consumer.stop();
      }
 else       if (status.equals("String_Node_Str")) {
        _consumer.onWarning(data.getStringVal("String_Node_Str"));
      }
 else       if (status.equals("String_Node_Str")) {
        _consumer.onStatus(status,data);
      }
 else {
        _consumer.onError("String_Node_Str" + line);
      }
    }
 else     if (data.has("String_Node_Str")) {
      Interaction i=new Interaction(data.getJSONObject("String_Node_Str").toString());
      if (i.has("String_Node_Str")) {
        _consumer.onMultiDeleted(data.getStringVal("String_Node_Str"),i);
      }
 else {
        _consumer.onMultiInteraction(data.getStringVal("String_Node_Str"),i);
      }
    }
 else {
      _consumer.onError("String_Node_Str" + line);
    }
  }
 catch (  JSONException e) {
  }
catch (  EInvalidData e) {
  }
}

Fixed version (ground truth):
public synchronized void processLine(String line){
  try {
    JSONdn data=new JSONdn(line);
    if (data.has("String_Node_Str")) {
      String status=data.getStringVal("String_Node_Str");
      String message=data.getStringVal("String_Node_Str");
      if (status.equals("String_Node_Str") || status.equals("String_Node_Str")) {
        if (message.equals("String_Node_Str")) {
          _consumer.onWarning(message);
        }
 else {
          _consumer.onError(message);
          _consumer.stop();
        }
      }
 else       if (status.equals("String_Node_Str")) {
        _consumer.onWarning(message);
      }
 else {
        _consumer.onStatus(status,data);
      }
    }
 else     if (data.has("String_Node_Str")) {
      Interaction i=new Interaction(data.getJSONObject("String_Node_Str").toString());
      if (i.has("String_Node_Str")) {
        _consumer.onMultiDeleted(data.getStringVal("String_Node_Str"),i);
      }
 else {
        _consumer.onMultiInteraction(data.getStringVal("String_Node_Str"),i);
      }
    }
 else {
      _consumer.onError("String_Node_Str" + line);
    }
  }
 catch (  JSONException e) {
  }
catch (  EInvalidData e) {
  }
}
Program: 44244
Project: 44244
Buggy source:
/** 
 * @param source
 * @throws EInvalidData
 * @throws JSONException
 */
public Usage(String source) throws EInvalidData, JSONException {
  super(source);
  try {
    getJSONObject("String_Node_Str");
  }
 catch (  JSONException e) {
    _items_key="String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * @param source
 * @throws EInvalidData
 * @throws JSONException
 */
public Usage(String source) throws EInvalidData, JSONException {
  super(source);
  _df=new SimpleDateFormat("String_Node_Str");
}
Program: 44245
Project: 44245
Buggy source:
/** 
 * Get usage data for this user.
 * @access public
 * @param int start Specifies the start of the period in which we'reinterested, or 0 for no start timestamp.
 * @param int end Specifies the end of the period in which we're interested,or 0 for no end timestamp.
 * @param String hash Specifies the stream hash in which we're interested, or an empty string for a summary of all streams.
 * @return Usage
 * @throws EAccessDenied
 * @throws EAPIError
 * @throws EInvalidData
 */
public Usage getUsage(int start,int end,String hash) throws EAPIError, EAccessDenied, EInvalidData {
  HashMap<String,String> params=new HashMap<String,String>();
  if (start != 0) {
    if (start < 0) {
      throw new EInvalidData("String_Node_Str");
    }
    if (end > 0 && start > end) {
      throw new EInvalidData("String_Node_Str");
    }
    params.put("String_Node_Str",Integer.toString(start));
  }
  if (end != 0) {
    if (end < 0) {
      throw new EInvalidData("String_Node_Str");
    }
    params.put("String_Node_Str",Integer.toString(end));
  }
  if (hash.length() > 0) {
    params.put("String_Node_Str",hash);
  }
  JSONObject res=callAPI("String_Node_Str",params);
  try {
    return new Usage(res.toString());
  }
 catch (  JSONException e) {
    throw new EAPIError("String_Node_Str" + e.toString());
  }
catch (  EInvalidData e) {
    throw new EAPIError("String_Node_Str" + e.toString());
  }
}

Fixed version (ground truth):
/** 
 * Get usage data for this user.
 * @access public
 * @param String period Use the final static vars in this class to specifyeither "day" or "hour".
 * @return Usage
 * @throws EAccessDenied
 * @throws EAPIError
 * @throws EInvalidData
 */
public Usage getUsage(String period) throws EAPIError, EAccessDenied, EInvalidData {
  HashMap<String,String> params=new HashMap<String,String>();
  if (period != User.USAGE_HOUR && period != User.USAGE_DAY) {
    throw new EInvalidData("String_Node_Str");
  }
  params.put("String_Node_Str",period);
  JSONObject res=callAPI("String_Node_Str",params);
  try {
    return new Usage(res.toString());
  }
 catch (  JSONException e) {
    throw new EAPIError("String_Node_Str" + e.toString());
  }
catch (  EInvalidData e) {
    throw new EAPIError("String_Node_Str" + e.toString());
  }
}
Program: 44246
Project: 44246
Buggy source:
@Override public void loadResource(final Resource resource) throws IOException {
  try {
    Attributes attributes=null;
    EList<EObject> contents=resource.getContents();
    XMLResource.URIHandler uriHandler=new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl();
    if (resource.getURI().hasQuery())     uriHandler.setBaseURI(resource.getURI().trimSegments(1).appendSegment("String_Node_Str"));
 else     uriHandler.setBaseURI(resource.getURI());
    if (uri.hasQuery()) {
      NamingEnumeration<SearchResult> results=null;
      if (uri.lastSegment() == null)       results=ldapService.findUser(URI.decode(uri.query()));
 else       ldapService.find(SearchControls.SUBTREE_SCOPE,URI.decode(uri.lastSegment()),URI.decode(uri.query()));
      ECollection eCollection=ExtFactory.eINSTANCE.createECollection();
      contents.add(eCollection);
      InternalEList<EObject> values=(InternalEList<EObject>)eCollection.getValues();
      while (results.hasMore()) {
        SearchResult searchResult=results.next();
        attributes=searchResult.getAttributes();
        values.addUnique(builder.buildEObject(attributes,uriHandler,true));
      }
    }
 else {
      attributes=ldapService.getAttributes(URI.decode(uri.lastSegment()));
      contents.add(builder.buildEObject(attributes,uriHandler,false));
    }
  }
 catch (  NamingException e) {
    throw new IOException(e);
  }
}

Fixed version (ground truth):
@Override public void loadResource(final Resource resource) throws IOException {
  try {
    Attributes attributes=null;
    EList<EObject> contents=resource.getContents();
    XMLResource.URIHandler uriHandler=new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl();
    if (resource.getURI().hasQuery())     uriHandler.setBaseURI(resource.getURI().trimSegments(1).appendSegment("String_Node_Str"));
 else     uriHandler.setBaseURI(resource.getURI());
    if (uri.hasQuery()) {
      NamingEnumeration<SearchResult> results=null;
      if (uri.lastSegment() == null)       results=ldapService.findUser(URI.decode(uri.query()));
 else       results=ldapService.find(SearchControls.SUBTREE_SCOPE,URI.decode(uri.lastSegment()),URI.decode(uri.query()));
      ECollection eCollection=ExtFactory.eINSTANCE.createECollection();
      contents.add(eCollection);
      InternalEList<EObject> values=(InternalEList<EObject>)eCollection.getValues();
      while (results.hasMore()) {
        SearchResult searchResult=results.next();
        attributes=searchResult.getAttributes();
        values.addUnique(builder.buildEObject(attributes,uriHandler,true));
      }
    }
 else {
      attributes=ldapService.getAttributes(URI.decode(uri.lastSegment()));
      contents.add(builder.buildEObject(attributes,uriHandler,false));
    }
  }
 catch (  NamingException e) {
    throw new IOException(e);
  }
}
Program: 44247
Project: 44247
Buggy source:
@Override public void repositoryRemoved(TaskRepository repository){
synchronized (providers) {
    providers.get(repository.getRepositoryUrl()).dispose();
  }
}

Fixed version (ground truth):
@Override public void repositoryRemoved(TaskRepository repository){
synchronized (providers) {
    providers.remove(repository.getRepositoryUrl()).dispose();
  }
}
Program: 44248
Project: 44248
Buggy source:
/** 
 * Find.
 * @param key the key
 * @return the t
 */
public T find(KeyType key){
  SliceQuery<Object,String,byte[]> query=HFactory.createSliceQuery(keySpace,SerializerTypeInferer.getSerializer(keyTypeClass),StringSerializer.get(),BytesArraySerializer.get());
  QueryResult<ColumnSlice<String,byte[]>> result=query.setColumnFamily(columnFamilyName).setKey(key).setRange("String_Node_Str","String_Node_Str",false,10).execute();
  try {
    if (result.get().getColumns().isEmpty()) {
      return null;
    }
  }
 catch (  Exception e) {
    return null;
  }
  try {
    Constructor<?>[] constructorsT=persistentClass.getConstructors();
    T t=null;
    if (constructorsT.length > 1) {
      if (constructorsT[0].getParameterTypes().length == 1 && constructorsT[0].getParameterTypes()[0].isAssignableFrom(keyTypeClass)) {
        t=(T)constructorsT[0].newInstance(keyTypeClass);
      }
 else {
        t=(T)constructorsT[0].newInstance();
      }
    }
 else {
      if (constructorsT[0].getParameterTypes().length == 1 && (constructorsT[0].getParameterTypes()[0].isAssignableFrom(keyTypeClass) || Object.class.equals(constructorsT[0].getParameterTypes()[0]))) {
        t=(T)constructorsT[0].newInstance(keyTypeClass);
      }
 else {
        t=(T)constructorsT[0].newInstance();
      }
    }
    HectorHelper.populateEntity(t,key,result);
    return t;
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Find.
 * @param key the key
 * @return the t
 */
public T find(KeyType key){
  SliceQuery<Object,String,byte[]> query=HFactory.createSliceQuery(keySpace,SerializerTypeInferer.getSerializer(keyTypeClass),StringSerializer.get(),BytesArraySerializer.get());
  int columnQuerySize=100;
  QueryResult<ColumnSlice<String,byte[]>> result=query.setColumnFamily(columnFamilyName).setKey(key).setRange("String_Node_Str","String_Node_Str",false,columnQuerySize).execute();
  try {
    if (result.get().getColumns().isEmpty()) {
      return null;
    }
  }
 catch (  Exception e) {
    return null;
  }
  try {
    Constructor<?>[] constructorsT=persistentClass.getConstructors();
    T t=null;
    if (constructorsT.length > 1) {
      if (constructorsT[0].getParameterTypes().length == 1 && constructorsT[0].getParameterTypes()[0].isAssignableFrom(keyTypeClass)) {
        t=(T)constructorsT[0].newInstance(keyTypeClass);
      }
 else {
        t=(T)constructorsT[0].newInstance();
      }
    }
 else {
      if (constructorsT[0].getParameterTypes().length == 1 && (constructorsT[0].getParameterTypes()[0].isAssignableFrom(keyTypeClass) || Object.class.equals(constructorsT[0].getParameterTypes()[0]))) {
        t=(T)constructorsT[0].newInstance(keyTypeClass);
      }
 else {
        t=(T)constructorsT[0].newInstance();
      }
    }
    HectorHelper.populateEntity(t,key,result);
    return t;
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 44249
Project: 44249
Buggy source:
@Override public HConsistencyLevel get(OperationType op,String cfName){
switch (op) {
case READ:
    return HConsistencyLevel.QUORUM;
case WRITE:
  return HConsistencyLevel.ONE;
}
return HConsistencyLevel.ONE;
}

Fixed version (ground truth):
@Override public HConsistencyLevel get(OperationType op,String cfName){
switch (op) {
case READ:
    return HConsistencyLevel.QUORUM;
case WRITE:
  return HConsistencyLevel.QUORUM;
}
return HConsistencyLevel.QUORUM;
}
Program: 44250
Project: 44250
Buggy source:
public final void method245(int i,int j,int k,int l,int i1,int j1,int k1){
  if (i1 >= 50000) {
    _mudclient.method71(i,j,k,l,i1 - 50000,j1,k1);
    return;
  }
  if (i1 >= 40000) {
    _mudclient.method68(i,j,k,l,i1 - 40000,j1,k1);
    return;
  }
  if (i1 >= 20000) {
    _mudclient.method45(i,j,k,l,i1 - 20000,j1,k1);
    return;
  }
  if (i1 >= 5000) {
    _mudclient.method52(i,j,k,l,i1 - 5000,j1,k1);
    return;
  }
  super.spriteClip1(i,j,k,l,i1);
}

Fixed version (ground truth):
public final void method245(int i,int j,int k,int l,int i1,int j1,int k1){
  if (i1 == 39999)   i1++;
  if (i1 >= 50000) {
    _mudclient.method71(i,j,k,l,i1 - 50000,j1,k1);
    return;
  }
  if (i1 >= 40000) {
    _mudclient.method68(i,j,k,l,i1 - 40000,j1,k1);
    return;
  }
  if (i1 >= 20000) {
    _mudclient.method45(i,j,k,l,i1 - 20000,j1,k1);
    return;
  }
  if (i1 >= 5000) {
    _mudclient.method52(i,j,k,l,i1 - 5000,j1,k1);
    return;
  }
  super.spriteClip1(i,j,k,l,i1);
}
Program: 44257
Project: 44257
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.isConfigurationSection("String_Node_Str")) {
    List<String> classNames=system.getStringList("String_Node_Str");
    Map<Integer,NumberRange> tiers=new HashMap<>();
    if (system.getList("String_Node_Str") != null) {
      for (      Object obj : system.getList("String_Node_Str")) {
        if (obj instanceof LinkedHashMap) {
          try {
            ConfigurationSection tiersConfig=createTiersConfig(obj);
            Integer tier=tiersConfig.getInt("String_Node_Str");
            String levels=tiersConfig.getString("String_Node_Str");
            String[] levelRange=levels.split("String_Node_Str");
            NumberRange range=new NumberRange(Integer.parseInt(levelRange[0]),Integer.parseInt(levelRange[1]));
            tiers.put(tier,range);
          }
 catch (          Exception e) {
            LoggerUtil.getInstance().severe("String_Node_Str");
          }
        }
      }
    }
    if (!classNames.isEmpty() || !tiers.isEmpty()) {
      HeroesRule rule=new HeroesRule(classNames,tiers);
      rules=new HashMap<>();
      rules.put(HeroesRule.class,rule);
    }
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.isConfigurationSection("String_Node_Str")) {
    List<String> classNames=system.getStringList("String_Node_Str");
    Map<Integer,NumberRange> tiers=new HashMap<>();
    if (system.getList("String_Node_Str") != null) {
      for (      Object obj : system.getList("String_Node_Str")) {
        if (obj instanceof LinkedHashMap) {
          try {
            ConfigurationSection tiersConfig=createTiersConfig(obj);
            Integer tier=tiersConfig.getInt("String_Node_Str");
            String levels=tiersConfig.getString("String_Node_Str");
            String[] range=levels.split("String_Node_Str");
            NumberRange levelRange=new NumberRange(Integer.parseInt(range[0]),Integer.parseInt(range[1]));
            tiers.put(tier,levelRange);
          }
 catch (          Exception e) {
            LoggerUtil.getInstance().severe("String_Node_Str");
          }
        }
      }
    }
    if (!classNames.isEmpty() || !tiers.isEmpty()) {
      HeroesRule rule=new HeroesRule(classNames,tiers);
      rules=new HashMap<>();
      rules.put(HeroesRule.class,rule);
    }
  }
  return rules;
}
Program: 44258
Project: 44258
Buggy source:
@Override protected boolean isBroken(PlayerKilledEvent event){
  boolean ruleBroken=false;
  if (DependencyUtils.hasHeroes()) {
    Hero victim=DependencyUtils.getHeroes().getCharacterManager().getHero(event.getVictim());
    for (    String className : classNames) {
      if (victim.getHeroClass().getName().equals(className)) {
        ruleBroken|=true;
        LoggerUtil.getInstance().debug("String_Node_Str" + event.getKiller().getName() + "String_Node_Str"+ className);
        break;
      }
    }
    Integer tieredLevel=victim.getTieredLevel(victim.getHeroClass());
    Integer level=victim.getLevel(victim.getHeroClass());
    if (tiers.containsKey(tieredLevel) && tiers.get(tieredLevel).containsInteger(level)) {
      ruleBroken|=true;
      LoggerUtil.getInstance().debug("String_Node_Str" + event.getKiller().getName() + "String_Node_Str"+ tieredLevel+ "String_Node_Str"+ level);
    }
  }
  return ruleBroken;
}

Fixed version (ground truth):
@Override protected boolean isBroken(PlayerKilledEvent event){
  boolean ruleBroken=false;
  if (DependencyUtils.hasHeroes()) {
    Hero victim=DependencyUtils.getHeroes().getCharacterManager().getHero(event.getVictim());
    for (    String className : classNames) {
      if (victim.getHeroClass().getName().equals(className)) {
        ruleBroken|=true;
        LoggerUtil.getInstance().debug("String_Node_Str" + event.getKiller().getName() + "String_Node_Str"+ className);
        break;
      }
    }
    Integer tier=victim.getHeroClass().getTier();
    Integer level=victim.getLevel(victim.getHeroClass());
    if (tiers.containsKey(tier) && tiers.get(tier).containsInteger(level)) {
      ruleBroken|=true;
      LoggerUtil.getInstance().debug("String_Node_Str" + event.getKiller().getName() + "String_Node_Str"+ tier+ "String_Node_Str"+ level);
    }
  }
  return ruleBroken;
}
Program: 44259
Project: 44259
Buggy source:
public static boolean hasMcMMO(){
  return mcMMOPlugin != null;
}

Fixed version (ground truth):
public static boolean hasMcMMO(){
  return mcMMOPlugin != null && mcMMOPlugin.isEnabled();
}
Program: 44260
Project: 44260
Buggy source:
public static boolean hasSimpleClans(){
  return simpleClansPlugin != null;
}

Fixed version (ground truth):
public static boolean hasSimpleClans(){
  return simpleClansPlugin != null && simpleClansPlugin.isEnabled();
}
Program: 44261
Project: 44261
Buggy source:
public static boolean hasHeroes(){
  return heroesPlugin != null;
}

Fixed version (ground truth):
public static boolean hasHeroes(){
  return heroesPlugin != null && heroesPlugin.isEnabled();
}
Program: 44262
Project: 44262
Buggy source:
public static boolean hasBattleArena(){
  return battleArenaPlugin != null;
}

Fixed version (ground truth):
public static boolean hasBattleArena(){
  return battleArenaPlugin != null && battleArenaPlugin.isEnabled();
}
Program: 44263
Project: 44263
Buggy source:
public static boolean hasResidence(){
  return residencePlugin != null;
}

Fixed version (ground truth):
public static boolean hasResidence(){
  return residencePlugin != null && residencePlugin.isEnabled();
}
Program: 44264
Project: 44264
Buggy source:
public static boolean hasFactions(){
  return factionsPlugin != null;
}

Fixed version (ground truth):
public static boolean hasFactions(){
  return factionsPlugin != null && factionsPlugin.isEnabled();
}
Program: 44265
Project: 44265
Buggy source:
public static boolean hasVault(){
  return vaultPlugin != null;
}

Fixed version (ground truth):
public static boolean hasVault(){
  return vaultPlugin != null && vaultPlugin.isEnabled();
}
Program: 44266
Project: 44266
Buggy source:
public static boolean hasTowny(){
  return townyPlugin != null;
}

Fixed version (ground truth):
public static boolean hasTowny(){
  return townyPlugin != null && townyPlugin.isEnabled();
}
Program: 44267
Project: 44267
Buggy source:
@SuppressWarnings("String_Node_Str") private static <T>T getPlugin(String pluginName,String className){
  Plugin plugin=Bukkit.getServer().getPluginManager().getPlugin(pluginName);
  try {
    Class<?> testClass=Class.forName(className);
    if (testClass.isInstance(plugin) && plugin.isEnabled()) {
      LoggerUtil.getInstance().info("String_Node_Str" + plugin.getDescription().getName());
      return (T)plugin;
    }
  }
 catch (  ClassNotFoundException e) {
    LoggerUtil.getInstance().debug("String_Node_Str" + pluginName);
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static <T>T getPlugin(String pluginName,String className){
  Plugin plugin=Bukkit.getServer().getPluginManager().getPlugin(pluginName);
  try {
    Class<?> testClass=Class.forName(className);
    if (testClass.isInstance(plugin)) {
      LoggerUtil.getInstance().info("String_Node_Str" + plugin.getDescription().getName());
      return (T)plugin;
    }
  }
 catch (  ClassNotFoundException e) {
    LoggerUtil.getInstance().debug("String_Node_Str" + pluginName);
  }
  return null;
}
Program: 44268
Project: 44268
Buggy source:
public static boolean hasDeathTpPlus(){
  return deathTpPlusPlugin != null;
}

Fixed version (ground truth):
public static boolean hasDeathTpPlus(){
  return deathTpPlusPlugin != null && deathTpPlusPlugin.isEnabled();
}
Program: 44269
Project: 44269
Buggy source:
public static boolean hasWorldGuard(){
  return worldGuardPlugin != null;
}

Fixed version (ground truth):
public static boolean hasWorldGuard(){
  return worldGuardPlugin != null && worldGuardPlugin.isEnabled();
}
Program: 44270
Project: 44270
Buggy source:
private static NumberRange parseRange(String dropString){
  String[] dropParts=dropString.split("String_Node_Str");
  String[] amountRange=dropParts[1].split("String_Node_Str");
  int min=0;
  int max;
  if (amountRange.length == 2) {
    min=Integer.parseInt(amountRange[0]);
    max=Integer.parseInt(amountRange[1]);
  }
 else {
    max=Integer.parseInt(dropParts[1]);
  }
  return new NumberRange(min,max);
}

Fixed version (ground truth):
private static NumberRange parseRange(String dropString){
  String[] dropParts=dropString.split("String_Node_Str");
  String[] amountRange=dropParts[1].split("String_Node_Str");
  double min=0;
  double max;
  if (amountRange.length == 2) {
    min=Double.parseDouble(amountRange[0]);
    max=Double.parseDouble(amountRange[1]);
  }
 else {
    max=Double.parseDouble(dropParts[1]);
  }
  return new NumberRange(min,max);
}