nus-yam/ex-repair huggingface dataset:
Program: 84702
Project: 84702
Buggy source:
public List<SchemaInfo> getDefaultSchemasByServer(String serverId){
  if (serverId == null || serverId.length() == 0)   return new ArrayList<SchemaInfo>();
  if (schemas == null)   schemas=new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getSchemas();
  List<SchemaInfo> schemasByServer=new ArrayList<SchemaInfo>();
  for (  SchemaInfo schemaInfo : schemas) {
    if (schemaInfo.getServerId().equalsIgnoreCase(serverId))     schemasByServer.add(schemaInfo);
  }
  return schemasByServer;
}

Fixed version (ground truth):
public List<SchemaInfo> getDefaultSchemasByServer(String serverId){
  if (serverId == null || serverId.length() == 0)   return new ArrayList<SchemaInfo>();
  schemas=new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getSchemas();
  List<SchemaInfo> schemasByServer=new ArrayList<SchemaInfo>();
  for (  SchemaInfo schemaInfo : schemas) {
    if (schemaInfo.getServerId().equalsIgnoreCase(serverId))     schemasByServer.add(schemaInfo);
  }
  return schemasByServer;
}
Program: 84703
Project: 84703
Buggy source:
public List<SchemaInfo> getDefaultSchemas(){
  if (schemas == null)   schemas=new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getSchemas();
  return schemas;
}

Fixed version (ground truth):
public List<SchemaInfo> getDefaultSchemas(){
  schemas=new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getSchemas();
  return schemas;
}
Program: 84704
Project: 84704
Buggy source:
public List<ServerCheckbox> getServers(){
  return new ServersUtil(servers).getServers();
}

Fixed version (ground truth):
public List<ServerCheckbox> getServers(){
  return serverToServerCheckBox(new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),serverCheckBoxToServer(servers)).getServers());
}
Program: 84705
Project: 84705
Buggy source:
public List<ServerCheckbox> getDefaultServers(){
  return new ServersUtil(null).getDefaultServers();
}

Fixed version (ground truth):
public List<ServerCheckbox> getDefaultServers(){
  return serverToServerCheckBox(new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getDefaultServers());
}
Program: 84706
Project: 84706
Buggy source:
public FormValidation doCheckArtifact(@AncestorInPath AbstractProject project,@QueryParameter String value) throws IOException, ServletException {
  if (value.contains("String_Node_Str")) {
    return FormValidation.error("String_Node_Str");
  }
  if (StringUtils.trimToNull(value) == null || value.length() == 0) {
    return FormValidation.error("String_Node_Str");
  }
 else {
    return FilePath.validateFileMask(project.getSomeWorkspace(),value);
  }
}

Fixed version (ground truth):
public FormValidation doCheckArtifact(@AncestorInPath AbstractProject project,@QueryParameter String value) throws IOException, ServletException {
  if (StringUtils.trimToNull(value) == null || value.length() == 0) {
    return FormValidation.error("String_Node_Str");
  }
 else   if (value.contains("String_Node_Str")) {
    return FormValidation.error("String_Node_Str");
  }
 else {
    return FilePath.validateFileMask(project.getSomeWorkspace(),value);
  }
}
Program: 84708
Project: 84708
Buggy source:
@Override public boolean configure(StaplerRequest req,JSONObject formData) throws FormException {
  authToken=formData.getString("String_Node_Str");
  lrUrl="String_Node_Str" + formData.getString("String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
  save();
  return super.configure(req,formData);
}

Fixed version (ground truth):
@Override public boolean configure(StaplerRequest req,JSONObject formData) throws FormException {
  authToken=formData.getString("String_Node_Str");
  lrUrl="String_Node_Str" + formData.getString("String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
  staticAuthToken=authToken;
  staticLrUrl=lrUrl;
  save();
  return super.configure(req,formData);
}
Program: 84709
Project: 84709
Buggy source:
private List<String> getDeployableServers(){
  List<String> list=new ArrayList<String>();
  if (currentAction.equals(Action.DEPLOYORUPDATE)) {
    if (deployOrUpdate != null && deployOrUpdate.servers != null) {
      for (      ServerCheckbox server : deployOrUpdate.servers)       if (server.isSelected() && !server.isGroup() && server.isOnline())       list.add(server.getServer());
    }
  }
 else   if (currentAction.equals(Action.UNDEPLOY)) {
    if (undeploy != null && undeploy.servers != null) {
      for (      ServerCheckbox server : undeploy.servers)       if (server.isSelected() && !server.isGroup() && server.isOnline())       list.add(server.getServer());
    }
  }
  System.out.println("String_Node_Str" + list);
  return list;
}

Fixed version (ground truth):
private List<String> getDeployableServers(){
  List<String> list=new ArrayList<String>();
  if (currentAction.equals(Action.DEPLOYORUPDATE)) {
    if (deployOrUpdate != null && deployOrUpdate.servers != null) {
      for (      ServerCheckbox server : deployOrUpdate.servers)       if (server.isChecked() && !server.isGroup() && server.isConnected())       list.add(server.getId());
    }
  }
 else   if (currentAction.equals(Action.UNDEPLOY)) {
    if (undeploy != null && undeploy.servers != null) {
      for (      ServerCheckbox server : undeploy.servers)       if (server.isChecked() && !server.isGroup() && server.isConnected())       list.add(server.getId());
    }
  }
  return list;
}
Program: 84710
Project: 84710
Buggy source:
public FormValidation doCheckMetadata(@AncestorInPath AbstractProject project,@QueryParameter String value) throws IOException, ServletException {
  if (value.contains("String_Node_Str")) {
    return FormValidation.error("String_Node_Str");
  }
  if (StringUtils.trimToNull(value) != null) {
    String fileExtension=null;
    try {
      fileExtension=value.substring(value.lastIndexOf('.') + 1);
    }
 catch (    Exception e) {
      return FormValidation.error("String_Node_Str");
    }
    if (!fileExtension.equals("String_Node_Str"))     return FormValidation.error("String_Node_Str");
    return FilePath.validateFileMask(project.getSomeWorkspace(),value);
  }
 else {
    return FormValidation.ok();
  }
}

Fixed version (ground truth):
public FormValidation doCheckMetadata(@AncestorInPath AbstractProject project,@QueryParameter String value) throws IOException, ServletException {
  if (StringUtils.trimToNull(value) != null) {
    if (value.contains("String_Node_Str")) {
      return FormValidation.error("String_Node_Str");
    }
    String fileExtension=null;
    try {
      fileExtension=value.substring(value.lastIndexOf('.') + 1);
    }
 catch (    Exception e) {
      return FormValidation.error("String_Node_Str");
    }
    if (!fileExtension.equals("String_Node_Str"))     return FormValidation.error("String_Node_Str");
    return FilePath.validateFileMask(project.getSomeWorkspace(),value);
  }
 else {
    return FormValidation.ok();
  }
}
Program: 84711
Project: 84711
Buggy source:
public String getServer(){
  return server;
}

Fixed version (ground truth):
public String getServer(){
  return id;
}
Program: 84712
Project: 84712
Buggy source:
public boolean isSelected(){
  return selected;
}

Fixed version (ground truth):
public boolean isSelected(){
  return checked;
}
Program: 84713
Project: 84713
Buggy source:
public boolean isOnline(){
  return online;
}

Fixed version (ground truth):
public boolean isOnline(){
  return connected;
}
Program: 84714
Project: 84714
Buggy source:
@DataBoundConstructor public ServerCheckbox(String server,String title,String parentNames,int indentDepth,boolean selected,boolean online,boolean isGroup){
  this.server=server;
  this.parentNames=parentNames;
  this.indentDepth=indentDepth;
  this.online=online;
  this.title=title;
  this.selected=selected;
  this.isGroup=isGroup;
}

Fixed version (ground truth):
@DataBoundConstructor public ServerCheckbox(String server,String title,String parentNames,int indentDepth,boolean selected,boolean online,boolean isGroup){
  this.id=server;
  this.parentNames=parentNames;
  this.indentDepth=indentDepth;
  this.connected=online;
  this.title=title;
  this.checked=selected;
  this.isGroup=isGroup;
}
Program: 84715
Project: 84715
Buggy source:
public List<ServerCheckbox> getServers(){
  return new ServersUtil(servers).getServers();
}

Fixed version (ground truth):
public List<ServerCheckbox> getServers(){
  return serverToServerCheckBox(new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),serverCheckBoxToServer(servers)).getServers());
}
Program: 84716
Project: 84716
Buggy source:
public List<ServerCheckbox> getDefaultServers(){
  return new ServersUtil(null).getDefaultServers();
}

Fixed version (ground truth):
public List<ServerCheckbox> getDefaultServers(){
  return serverToServerCheckBox(new ServersUtil(LiveRebelDeployBuilder.DescriptorImpl.newCommandCenter(),null).getDefaultServers());
}
Program: 84717
Project: 84717
Buggy source:
@DataBoundConstructor public LiveRebelDeployBuilder(String artifact,String metadata,ActionWrapper actionWrapper,OverrideForm overrideForm){
  this.undeploy=actionWrapper.undeploy;
  this.deployOrUpdate=actionWrapper.deployOrUpdate;
  currentAction=actionWrapper.value;
switch (currentAction) {
case UNDEPLOY:
    this.undeployChecked=true;
  this.distributeChecked=false;
this.deployOrUpdateChecked=false;
break;
case DEPLOYORUPDATE:
this.deployOrUpdateChecked=true;
this.distributeChecked=false;
this.undeployChecked=false;
break;
case DISTRIBUTE:
this.distributeChecked=true;
this.deployOrUpdateChecked=true;
this.undeployChecked=false;
break;
default :
this.distributeChecked=true;
this.deployOrUpdateChecked=false;
this.undeployChecked=false;
}
this.artifact=artifact;
this.metadata=StringUtils.trimToNull(metadata);
if (overrideForm != null) {
this.app=StringUtils.trimToNull(overrideForm.getApp());
this.ver=StringUtils.trimToNull(overrideForm.getVer());
this.isOverride=true;
}
 else {
this.app=null;
this.ver=null;
this.isOverride=false;
}
LOGGER.info("String_Node_Str" + artifact + "String_Node_Str"+ app+ "String_Node_Str"+ ver+ "String_Node_Str"+ metadata+ "String_Node_Str"+ deployOrUpdate+ "String_Node_Str");
}

Fixed version (ground truth):
@DataBoundConstructor public LiveRebelDeployBuilder(String artifact,String metadata,ActionWrapper actionWrapper,OverrideForm overrideForm){
  this.undeploy=actionWrapper.undeploy;
  this.deployOrUpdate=actionWrapper.deployOrUpdate;
  currentAction=actionWrapper.value;
switch (currentAction) {
case UNDEPLOY:
    this.undeployChecked=true;
  this.distributeChecked=false;
this.deployOrUpdateChecked=false;
break;
case DEPLOYORUPDATE:
this.deployOrUpdateChecked=true;
this.distributeChecked=false;
this.undeployChecked=false;
break;
case DISTRIBUTE:
this.distributeChecked=true;
this.deployOrUpdateChecked=false;
this.undeployChecked=false;
break;
default :
this.distributeChecked=true;
this.deployOrUpdateChecked=false;
this.undeployChecked=false;
}
this.artifact=artifact;
this.metadata=StringUtils.trimToNull(metadata);
if (overrideForm != null) {
this.app=StringUtils.trimToNull(overrideForm.getApp());
this.ver=StringUtils.trimToNull(overrideForm.getVer());
this.isOverride=true;
}
 else {
this.app=null;
this.ver=null;
this.isOverride=false;
}
LOGGER.info("String_Node_Str" + artifact + "String_Node_Str"+ app+ "String_Node_Str"+ ver+ "String_Node_Str"+ metadata+ "String_Node_Str"+ deployOrUpdate+ "String_Node_Str");
}
Program: 84718
Project: 84718
Buggy source:
@Override public ArrayList<Scenario> getScenarios(){
  ArrayList<Scenario> scenarios=new ArrayList<Scenario>();
  Bundle bundle=mInfo[0];
  for (  String command : NativeTesterMicro.COMMANDS) {
    String name=bundle.getString(command + "String_Node_Str");
    float[] results=bundle.getFloatArray(command + "String_Node_Str");
    Scenario s=new Scenario(name,mType,mTags);
    for (    float result : results)     s.mResults.add(new Double(result));
    scenarios.add(s);
  }
  Log.e("String_Node_Str","String_Node_Str");
  return scenarios;
}

Fixed version (ground truth):
@Override public ArrayList<Scenario> getScenarios(){
  ArrayList<Scenario> scenarios=new ArrayList<Scenario>();
  Bundle bundle=mInfo[0];
  for (  String command : NativeTesterMicro.COMMANDS) {
    String name=bundle.getString(command + "String_Node_Str");
    float[] results=bundle.getFloatArray(command + "String_Node_Str");
    if (name == null || results == null)     continue;
    Scenario s=new Scenario(name,mType,mTags);
    for (    float result : results)     s.mResults.add(new Double(result));
    scenarios.add(s);
  }
  return scenarios;
}
Program: 84719
Project: 84719
Buggy source:
@Override protected boolean saveResult(Intent intent){
  Bundle bundle=new Bundle();
  for (  String command : getCommands()) {
    String[] lines=mSockets.get(command).split("String_Node_Str");
    String name=lines[0].trim().split("String_Node_Str")[0];
    float[] list=new float[lines.length];
    int i=0;
    for (    String line : lines) {
      String[] sp=line.trim().split("String_Node_Str");
      if (!name.equals(sp[0]))       Log.i(TAG,"String_Node_Str" + name + "String_Node_Str"+ sp[0]);
      list[i]=Float.parseFloat(sp[1]);
      i=i + 1;
    }
    bundle.putString(command + "String_Node_Str",name);
    bundle.putFloatArray(command + "String_Node_Str",list);
  }
  intent.putExtra(RESULT,bundle);
  return true;
}

Fixed version (ground truth):
@Override protected boolean saveResult(Intent intent){
  Bundle bundle=new Bundle();
  for (  String command : getCommands()) {
    if (!mSockets.containsKey(command))     continue;
    String[] lines=mSockets.get(command).split("String_Node_Str");
    String name=lines[0].trim().split("String_Node_Str")[0];
    float[] list=new float[lines.length];
    int i=0;
    for (    String line : lines) {
      String[] sp=line.trim().split("String_Node_Str");
      if (!name.equals(sp[0]))       Log.i(TAG,"String_Node_Str" + name + "String_Node_Str"+ sp[0]);
      list[i]=Float.parseFloat(sp[1]);
      i=i + 1;
    }
    bundle.putString(command + "String_Node_Str",name);
    bundle.putFloatArray(command + "String_Node_Str",list);
  }
  intent.putExtra(RESULT,bundle);
  return true;
}
Program: 84720
Project: 84720
Buggy source:
public String getXMLBenchmark(){
  if (!couldFetchReport()) {
    return "String_Node_Str";
  }
  String result="String_Node_Str";
  ArrayList<Scenario> scenarios=getScenarios();
  for (  Scenario s : scenarios) {
    if (s == null)     continue;
    result+="String_Node_Str";
    result+="String_Node_Str" + s.mName.replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
    result+="String_Node_Str" + s.mType + "String_Node_Str";
    result+="String_Node_Str";
    for (    String tag : s.mTags)     result+=tag + "String_Node_Str";
    result+="String_Node_Str";
    result+="String_Node_Str";
    Double total=0.0;
    for (    Double value : s.mResults) {
      result+=value + "String_Node_Str";
      total+=value;
    }
    if (total == 0)     return "String_Node_Str";
    result+="String_Node_Str";
  }
  Log.e("String_Node_Str","String_Node_Str");
  return result;
}

Fixed version (ground truth):
public String getXMLBenchmark(){
  if (!couldFetchReport()) {
    return "String_Node_Str";
  }
  String result="String_Node_Str";
  ArrayList<Scenario> scenarios=getScenarios();
  for (  Scenario s : scenarios) {
    if (s == null)     continue;
    result+="String_Node_Str";
    result+="String_Node_Str" + s.mName.replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
    result+="String_Node_Str" + s.mType + "String_Node_Str";
    result+="String_Node_Str";
    for (    String tag : s.mTags)     result+=tag + "String_Node_Str";
    result+="String_Node_Str";
    result+="String_Node_Str";
    Double total=0.0;
    for (    Double value : s.mResults) {
      result+=value + "String_Node_Str";
      total+=value;
    }
    if (total == 0)     return "String_Node_Str";
    result+="String_Node_Str";
  }
  return result;
}
Program: 84721
Project: 84721
Buggy source:
public void runCase(LinkedList<Case> list){
  Case pointer=null;
  boolean finish=true;
  for (int i=0; i < list.size(); i++) {
    pointer=list.get(i);
    if (!pointer.isFinish()) {
      finish=false;
      break;
    }
  }
  if (finish) {
    mBannerInfo.setText("String_Node_Str");
  }
 else {
    Intent intent=pointer.generateIntent();
    if (intent != null) {
      startActivityForResult(intent,0);
    }
  }
}

Fixed version (ground truth):
public void runCase(LinkedList<Case> list){
  Case pointer=null;
  boolean finish=true;
  for (int i=0; i < list.size(); i++) {
    pointer=list.get(i);
    if (!pointer.isFinish()) {
      finish=false;
      break;
    }
  }
  if (finish) {
    mBannerInfo.setText("String_Node_Str");
    String result=getResult();
    writeToSDCard(mOutputFile,result);
    mXMLResult=getXMLResult();
    writeToSDCard(mOutputXMLFile,mXMLResult);
    onClick(mShow);
    mTouchable=true;
  }
 else {
    Intent intent=pointer.generateIntent();
    if (intent != null) {
      startActivityForResult(intent,0);
    }
  }
}
Program: 84722
Project: 84722
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  mCases=new LinkedList<Case>();
  Case arith=new CaseArithmetic();
  Case scimark2=new CaseScimark2();
  Case mycase=new CaseCanvas();
  Case glcube=new CaseGLCube();
  Case circle=new CaseDrawCircle();
  Case gc=new CaseGC();
  Case nehe08=new CaseNeheLesson08();
  Case nehe16=new CaseNeheLesson16();
  Case teapot=new CaseTeapot();
  mCases.add(arith);
  mCases.add(scimark2);
  mCases.add(mycase);
  mCases.add(glcube);
  mCases.add(nehe08);
  mCases.add(nehe16);
  mCases.add(teapot);
  mCases.add(circle);
  mCases.add(gc);
  initViews();
  Intent intent=getIntent();
  if (intent.getBooleanExtra("String_Node_Str",false)) {
    ImageView head=(ImageView)findViewById(R.id.banner_img);
    head.setImageResource(R.drawable.icon_auto);
    mTouchable=false;
    initAuto();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  mCases=new LinkedList<Case>();
  Case arith=new CaseArithmetic();
  Case scimark2=new CaseScimark2();
  Case canvas=new CaseCanvas();
  Case glcube=new CaseGLCube();
  Case circle=new CaseDrawCircle();
  Case gc=new CaseGC();
  Case nehe08=new CaseNeheLesson08();
  Case nehe16=new CaseNeheLesson16();
  Case teapot=new CaseTeapot();
  mCases.add(arith);
  mCases.add(scimark2);
  mCases.add(gc);
  mCases.add(canvas);
  mCases.add(circle);
  mCases.add(glcube);
  mCases.add(nehe08);
  mCases.add(nehe16);
  mCases.add(teapot);
  initViews();
  Intent intent=getIntent();
  if (intent.getBooleanExtra("String_Node_Str",false)) {
    ImageView head=(ImageView)findViewById(R.id.banner_img);
    head.setImageResource(R.drawable.icon_auto);
    mTouchable=false;
    initAuto();
  }
}
Program: 84723
Project: 84723
Buggy source:
private void initAuto(){
  for (int i=0; i < mCheckList.length; i++) {
    mCheckList[i].setChecked(true);
  }
  final ProgressDialog dialog=new ProgressDialog(this).show(this,"String_Node_Str","String_Node_Str",true,false);
  new Thread(){
    public void run(){
      SystemClock.sleep(5000);
      dialog.dismiss();
      onClick(mRun);
    }
  }
.start();
  new Thread(){
    public void run(){
      while (!isFinish()) {
        SystemClock.sleep(1000);
      }
      String result=getResult();
      writeToSDCard(mOutputFile,result);
      mXMLResult=getXMLResult();
      writeToSDCard(mOutputXMLFile,mXMLResult);
      onClick(mShow);
      mTouchable=true;
    }
  }
.start();
}

Fixed version (ground truth):
private void initAuto(){
  for (int i=0; i < mCheckList.length; i++) {
    mCheckList[i].setChecked(true);
  }
  final ProgressDialog dialog=new ProgressDialog(this).show(this,"String_Node_Str","String_Node_Str",true,false);
  new Thread(){
    public void run(){
      SystemClock.sleep(5000);
      dialog.dismiss();
      onClick(mRun);
    }
  }
.start();
}
Program: 84724
Project: 84724
Buggy source:
public void run(){
  while (!isFinish()) {
    SystemClock.sleep(1000);
  }
  String result=getResult();
  writeToSDCard(mOutputFile,result);
  mXMLResult=getXMLResult();
  writeToSDCard(mOutputXMLFile,mXMLResult);
  onClick(mShow);
  mTouchable=true;
}

Fixed version (ground truth):
public void run(){
  SystemClock.sleep(5000);
  dialog.dismiss();
  onClick(mRun);
}
Program: 84725
Project: 84725
Buggy source:
public void handleMessage(Message msg){
  int state=msg.getData().getInt(MicroBenchmark.STATE);
  Log.e("String_Node_Str","String_Node_Str" + state);
  if (state != MicroBenchmark.RUNNING) {
    dismissDialog(0);
    if (state == MicroBenchmark.DONE) {
      showDialog(1);
    }
 else {
      showDialog(2);
    }
    Log.e("String_Node_Str",msg.getData().getString(MicroBenchmark.MSG));
  }
}

Fixed version (ground truth):
public void handleMessage(Message msg){
  int state=msg.getData().getInt(MicroBenchmark.STATE);
  Log.e("String_Node_Str","String_Node_Str" + state);
  if (state != MicroBenchmark.RUNNING) {
    dismissDialog(0);
    removeDialog(0);
    if (state == MicroBenchmark.DONE) {
      showDialog(1);
    }
 else {
      showDialog(2);
    }
    Log.e("String_Node_Str",msg.getData().getString(MicroBenchmark.MSG));
  }
}
Program: 84726
Project: 84726
Buggy source:
public void run(){
  String line;
  try {
    while ((line=stdOutReader.readLine()) != null) {
      mLastRead=SystemClock.uptimeMillis();
      mBuffer.append(line + '\n');
      Message m=new Message();
      m.what=GUINOTIFIER;
      mHandler.sendMessage(m);
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void run(){
  String line;
  try {
    while ((line=is.readLine()) != null) {
      mLastRead=SystemClock.uptimeMillis();
      mBuffer.append(line + '\n');
      Message m=new Message();
      m.what=GUINOTIFIER;
      mHandler.sendMessage(m);
    }
  }
 catch (  IOException e) {
  }
}
Program: 84727
Project: 84727
Buggy source:
public String getBenchmark(){
  if (!isFinish()) {
    return TAG + "String_Node_Str";
  }
  String result="String_Node_Str";
  long total=0;
  int length=mResult.length;
  for (int i=0; i < length; i++) {
    total=mResult[i];
    result+="String_Node_Str" + i + "String_Node_Str"+ mResult[i]+ "String_Node_Str";
  }
  result+="String_Node_Str" + (total / length) + "String_Node_Str";
  return result;
}

Fixed version (ground truth):
public String getBenchmark(){
  if (!isFinish()) {
    return TAG + "String_Node_Str";
  }
  String result="String_Node_Str";
  long total=0;
  int length=mResult.length;
  for (int i=0; i < length; i++) {
    total+=mResult[i];
    result+="String_Node_Str" + i + "String_Node_Str"+ mResult[i]+ "String_Node_Str";
  }
  result+="String_Node_Str" + (total / length) + "String_Node_Str";
  return result;
}
Program: 84728
Project: 84728
Buggy source:
/** 
 * Connects to a database of a particular chunk (specified within the split). If a particular host fails during connection, it is avoided and another host is found. The method fails after a set number of maximum connection trials.
 */
protected Connection getConnection(DBInputSplit dbSplit){
  boolean connected=false;
  DBChunkHost avoid_host=null;
  int connect_tries=0;
  Connection connection=null;
  String localHostAddr=getLocatHostAddres();
  DBChunk chunk=dbSplit.getChunk();
  DBChunkHost chunk_host=null;
  while (!connected) {
    if (!chunk.getLocations().contains(localHostAddr)) {
      LOG.info("String_Node_Str" + localHostAddr);
      chunk_host=chunk.getAnyHost(avoid_host);
    }
 else {
      if (avoid_host != chunk.getHost(localHostAddr))       chunk_host=chunk.getHost(localHostAddr);
    }
    LOG.info("String_Node_Str" + localHostAddr + "String_Node_Str"+ chunk.getId()+ "String_Node_Str"+ chunk_host.getHost()+ "String_Node_Str"+ chunk_host.getUrl());
    try {
      Class.forName(chunk_host.getDriver());
      connection=DriverManager.getConnection(chunk_host.getUrl(),chunk_host.getUser(),chunk_host.getPassword());
      connected=true;
    }
 catch (    Exception e) {
      LOG.info("String_Node_Str");
      LOG.info(e);
      if (connect_tries < MAX_CONNECTION_TRIALS) {
        connect_tries++;
        avoid_host=chunk_host;
        chunk_host=null;
      }
 else       throw new RuntimeException(e);
    }
  }
  return connection;
}

Fixed version (ground truth):
/** 
 * Connects to a database of a particular chunk (specified within the split). If a particular host fails during connection, it is avoided and another host is found. The method fails after a set number of maximum connection trials.
 */
protected Connection getConnection(DBInputSplit dbSplit){
  boolean connected=false;
  DBChunkHost avoid_host=null;
  int connect_tries=0;
  Connection connection=null;
  String localHostAddr=getLocatHostAddres();
  DBChunk chunk=dbSplit.getChunk();
  DBChunkHost chunk_host=null;
  while (!connected) {
    if (!chunk.getLocations().contains(localHostAddr)) {
      LOG.info("String_Node_Str" + localHostAddr);
      chunk_host=chunk.getAnyHost(avoid_host);
    }
 else {
      if (avoid_host != chunk.getHost(localHostAddr)) {
        chunk_host=chunk.getHost(localHostAddr);
      }
 else {
        chunk_host=chunk.getAnyHost(avoid_host);
      }
    }
    LOG.info("String_Node_Str" + localHostAddr + "String_Node_Str"+ chunk.getId()+ "String_Node_Str"+ chunk_host.getHost()+ "String_Node_Str"+ chunk_host.getUrl());
    try {
      Class.forName(chunk_host.getDriver());
      connection=DriverManager.getConnection(chunk_host.getUrl(),chunk_host.getUser(),chunk_host.getPassword());
      connected=true;
    }
 catch (    Exception e) {
      LOG.info("String_Node_Str");
      LOG.info(e);
      if (connect_tries < MAX_CONNECTION_TRIALS) {
        connect_tries++;
        avoid_host=chunk_host;
        chunk_host=null;
      }
 else       throw new RuntimeException(e);
    }
  }
  return connection;
}
Program: 84730
Project: 84730
Buggy source:
@Override public void setup(Context ctx){
  Configuration conf=ctx.getConfiguration();
  String classname=conf.get(Parser.class.getCanonicalName());
  try {
    @SuppressWarnings("String_Node_Str") Class<Parser> parserclass=(Class<Parser>)Class.forName(classname);
    parser=(Parser)parserclass.newInstance();
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
  if (parser == null) {
    parser=new SimpleParser();
  }
}

Fixed version (ground truth):
@Override public void setup(Context ctx){
  Configuration conf=ctx.getConfiguration();
  String classname=conf.get(Parser.class.getCanonicalName());
  if (classname != null)   try {
    @SuppressWarnings("String_Node_Str") Class<Parser> parserclass=(Class<Parser>)Class.forName(classname);
    parser=(Parser)parserclass.newInstance();
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
  if (parser == null) {
    parser=new SimpleParser();
  }
}
Program: 84731
Project: 84731
Buggy source:
@Override public void setup(Context ctx){
  Configuration conf=ctx.getConfiguration();
  String classname=conf.get(Parser.class.getCanonicalName());
  try {
    @SuppressWarnings("String_Node_Str") Class<Parser> parserclass=(Class<Parser>)Class.forName(classname);
    parser=(Parser)parserclass.newInstance();
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
  if (parser == null) {
    parser=new SimpleParser();
  }
}

Fixed version (ground truth):
@Override public void setup(Context ctx){
  Configuration conf=ctx.getConfiguration();
  String classname=conf.get(Parser.class.getCanonicalName());
  if (classname != null)   try {
    @SuppressWarnings("String_Node_Str") Class<Parser> parserclass=(Class<Parser>)Class.forName(classname);
    parser=(Parser)parserclass.newInstance();
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
  if (parser == null) {
    parser=new SimpleParser();
  }
}
Program: 84732
Project: 84732
Buggy source:
public void doDraw(Canvas canvas){
synchronized (gameObjects) {
    for (    GameObject gameObject : gameObjects) {
      gameObject.doDraw(canvas);
    }
  }
  mPlayer.doDraw(canvas);
}

Fixed version (ground truth):
public void doDraw(Canvas canvas){
  mLevel.doDraw(canvas);
synchronized (gameObjects) {
    for (    GameObject gameObject : gameObjects) {
      gameObject.doDraw(canvas);
    }
synchronized (gameObjectsAdd) {
      for (      GameObject gameObject : gameObjectsAdd) {
        gameObjects.add(gameObject);
      }
      gameObjectsAdd.clear();
    }
  }
  mPlayer.doDraw(canvas);
}
Program: 84733
Project: 84733
Buggy source:
public void animate(long elapsedTime,float X,float Y){
  mWidth=(int)Panel.mWidth;
  mHeight=(int)Panel.mHeight;
  this.addX(X);
  this.addY(Y);
  if (X + Y != 0 || !initialized) {
    blocksOnScreen.clear();
synchronized (paths) {
      for (      Path path : paths) {
        for (        Block block : path.getBlocks()) {
          if (block.shouldDraw(mDestination)) {
            block.animate(elapsedTime);
            blocksOnScreen.add(block);
          }
        }
      }
    }
    initialized=true;
  }
}

Fixed version (ground truth):
public void animate(long elapsedTime,float X,float Y){
  mWidth=(int)Panel.mWidth;
  mHeight=(int)Panel.mHeight;
  this.addX(X);
  this.addY(Y);
  if (X + Y != 0 || !initialized) {
synchronized (blocksOnScreen) {
      blocksOnScreen.clear();
synchronized (paths) {
        for (        Path path : paths) {
          for (          Block block : path.getBlocks()) {
            if (block.shouldDraw(mDestination)) {
              block.animate(elapsedTime);
              blocksOnScreen.add(block);
            }
          }
        }
      }
      initialized=true;
    }
  }
}
Program: 84734
Project: 84734
Buggy source:
public void animate(long elapsedTime){
synchronized (gameObjects) {
    logic();
    for (    GameObject gameObject : gameObjects) {
      gameObject.animate(elapsedTime);
    }
synchronized (gameObjectsAdd) {
      for (      GameObject gameObject : gameObjectsAdd) {
        gameObjects.add(gameObject);
      }
    }
    gameObjectsAdd.clear();
  }
  mPlayer.animate(elapsedTime);
  mLevel.animate(elapsedTime,gameSpeed,0);
  if (mLevel.reachedEnd()) {
    Panel.beatLevel();
  }
}

Fixed version (ground truth):
public void animate(long elapsedTime){
synchronized (gameObjects) {
    logic();
    for (    GameObject gameObject : gameObjects) {
      gameObject.animate(elapsedTime);
    }
synchronized (gameObjectsAdd) {
      for (      GameObject gameObject : gameObjectsAdd) {
        gameObjects.add(gameObject);
      }
    }
    gameObjectsAdd.clear();
  }
  mPlayer.animate(elapsedTime);
  mLevel.animate(elapsedTime,gameSpeed,0);
  if (mLevel.reachedEnd()) {
    Panel.beatLevel();
    reset();
  }
}
Program: 84735
Project: 84735
Buggy source:
public Panel(Context context){
  super(context);
  getHolder().addCallback(this);
  mThread=new ViewThread(this);
  mPaint.setColor(Color.WHITE);
}

Fixed version (ground truth):
public Panel(Context context){
  super(context);
  Bitmap mBitmap=BitmapFactory.decodeResource(getResources(),R.drawable.run);
  getHolder().addCallback(this);
  mThread=new ViewThread(this);
  mPaint.setColor(Color.WHITE);
  Sprite sprite=new Sprite(mBitmap,46,42,1,100,100);
  mSprites.add(sprite);
}
Program: 84736
Project: 84736
Buggy source:
@Override public boolean onTouchEvent(MotionEvent event){
synchronized (mElements) {
    mElements.add(new Element(getResources(),(int)event.getX(),(int)event.getY()));
    mElementNumber=mElements.size();
  }
  return super.onTouchEvent(event);
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent event){
  return super.onTouchEvent(event);
}
Program: 84737
Project: 84737
Buggy source:
public void animate(long elapsedTime){
synchronized (mElements) {
    for (    Element element : mElements) {
      element.animate(elapsedTime);
    }
  }
}

Fixed version (ground truth):
public void animate(long elapsedTime){
synchronized (mSprites) {
    for (    Sprite Sprite : mSprites) {
      Sprite.animate(elapsedTime);
    }
  }
}
Program: 84738
Project: 84738
Buggy source:
public void doDraw(long elapsed,Canvas canvas){
  canvas.drawColor(Color.BLACK);
synchronized (mElements) {
    for (    Element element : mElements) {
      element.doDraw(canvas);
    }
  }
  canvas.drawText("String_Node_Str" + Math.round(1000f / elapsed) + "String_Node_Str"+ mElementNumber,10,10,mPaint);
}

Fixed version (ground truth):
public void doDraw(long elapsed,Canvas canvas){
  canvas.drawColor(Color.BLACK);
synchronized (mSprites) {
    for (    Sprite sprite : mSprites) {
      sprite.doDraw(canvas);
    }
  }
  canvas.drawText("String_Node_Str" + Math.round(1000f / elapsed) + "String_Node_Str"+ mSprites.size(),10,10,mPaint);
}
Program: 84739
Project: 84739
Buggy source:
public Sprite(Resources res,int height,int width,int speed){
  mBitmap=BitmapFactory.decodeResource(res,R.drawable.icon);
  mIndex=0;
  currentIndex=0;
  setSourceRect();
  numIndexes=(int)Math.floor(mBitmap.getWidth() / width);
  mSpeed=speed;
  mHeight=height;
  mWidth=width;
}

Fixed version (ground truth):
public Sprite(Bitmap res,int height,int width,double speed){
  mBitmap=res;
  mIndex=0;
  currentIndex=0;
  numIndexes=(int)Math.floor(mBitmap.getWidth() / width);
  mSpeed=speed;
  mHeight=height;
  mWidth=width;
  setSourceRect();
}
Program: 84740
Project: 84740
Buggy source:
public int getmSpeed(){
  return mSpeed;
}

Fixed version (ground truth):
public double getmSpeed(){
  return mSpeed;
}
Program: 84741
Project: 84741
Buggy source:
public void animate(long elapsedTime){
  mIndex+=mSpeed;
  if (mIndex > numIndexes)   mIndex=0;
  if (Math.floor(mIndex) != currentIndex) {
    currentIndex=(int)Math.floor(mIndex);
    setSourceRect();
  }
}

Fixed version (ground truth):
public void animate(long elapsedTime){
  mIndex+=mSpeed;
  if (mIndex >= numIndexes)   mIndex=0;
  if (Math.floor(mIndex) != currentIndex) {
    currentIndex=(int)Math.floor(mIndex);
    setSourceRect();
  }
}
Program: 84742
Project: 84742
Buggy source:
public void setmSpeed(int mSpeed){
  this.mSpeed=mSpeed;
}

Fixed version (ground truth):
public void setmSpeed(double mSpeed){
  this.mSpeed=mSpeed;
}
Program: 84743
Project: 84743
Buggy source:
public void addY(int Y){
  mDestination.top=mDestination.top + Y;
  mDestination.bottom=mDestination.top - mHeight;
}

Fixed version (ground truth):
public void addY(int Y){
  mDestination.top=mDestination.top + Y;
  mDestination.bottom=mDestination.top + mHeight;
}
Program: 84744
Project: 84744
Buggy source:
@Override public boolean hasMessage(Method method,TAMAIVRContext context,TAMAMessageType type){
  LocalDate today=today();
  AppointmentReminderMessage message=message(context,today);
  boolean isAppointmentRemindersActivated=patientOnCall.getPatient(context).getPatientPreferences().getActivateAppointmentReminders();
  return shouldPlay(method,context,type,message) && message.isValid(today) && isAppointmentRemindersActivated;
}

Fixed version (ground truth):
@Override public boolean hasMessage(Method method,TAMAIVRContext context,TAMAMessageType type){
  LocalDate today=today();
  AppointmentReminderMessage message=message(context,today);
  boolean isAppointmentRemindersActivated=patientOnCall.getPatient(context).getPatientPreferences().getActivateAppointmentReminders();
  return isAppointmentRemindersActivated && message.isValid(today) && shouldPlay(method,context,type,message);
}
Program: 84748
Project: 84748
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String downloadWeeklyPillReminderReport(@RequestParam("String_Node_Str") String clinicId,@RequestParam("String_Node_Str") String patientId,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate startDate,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate endDate,Model uiModel){
  DateFilter filter=new DateFilter().setDates(startDate,endDate);
  endDate.plusDays(1);
  if (filter.isMoreThanOneYear()) {
    return error(uiModel,"String_Node_Str");
  }
 else {
    return format("String_Node_Str",clinicId,patientId,filter.startDate.toString("String_Node_Str"),filter.getEndDate().toString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String downloadWeeklyPillReminderReport(@RequestParam("String_Node_Str") String clinicId,@RequestParam("String_Node_Str") String patientId,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate startDate,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate endDate,Model uiModel){
  DateFilter filter=new DateFilter().setDates(startDate,endDate);
  if (filter.isMoreThanOneYear()) {
    return error(uiModel,"String_Node_Str");
  }
 else {
    return format("String_Node_Str",clinicId,patientId,filter.startDate.toString("String_Node_Str"),filter.getEndDate().plusDays(1).toString("String_Node_Str"));
  }
}
Program: 84749
Project: 84749
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String downloadWeeklyPillReminderReport(@RequestParam("String_Node_Str") String clinicId,@RequestParam("String_Node_Str") String patientId,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate startDate,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate endDate,Model uiModel){
  DateFilter filter=new DateFilter().setDates(startDate,endDate);
  if (filter.isMoreThanOneYear()) {
    return error(uiModel,"String_Node_Str");
  }
 else {
    return format("String_Node_Str",clinicId,patientId,filter.startDate.toString("String_Node_Str"),filter.getEndDate().toString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String downloadWeeklyPillReminderReport(@RequestParam("String_Node_Str") String clinicId,@RequestParam("String_Node_Str") String patientId,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate startDate,@RequestParam("String_Node_Str") @DateTimeFormat(style="String_Node_Str",pattern=TAMAConstants.DATE_FORMAT) LocalDate endDate,Model uiModel){
  DateFilter filter=new DateFilter().setDates(startDate,endDate);
  endDate.plusDays(1);
  if (filter.isMoreThanOneYear()) {
    return error(uiModel,"String_Node_Str");
  }
 else {
    return format("String_Node_Str",clinicId,patientId,filter.startDate.toString("String_Node_Str"),filter.getEndDate().toString("String_Node_Str"));
  }
}
Program: 84750
Project: 84750
Buggy source:
public void create(Patient patient,String clinicId,String userName){
  populateDefaultMedicaHistory(patient);
  allPatients.addToClinic(patient,clinicId,userName);
  outboxRegistry.getOutbox().enroll(patient);
  allPatientEventLogs.addAll(new ChangedPatientPreferenceContext(null,patient).getEventLogs(),userName);
  patientReportingService.save(requestMapper.map(patient),medicalHistoryRequestMapper.map(patient));
}

Fixed version (ground truth):
public void create(Patient patient,String clinicId,String userName){
  NonHIVMedicalHistory nonHivMedicalHistory=patient.getMedicalHistory().getNonHivMedicalHistory();
  List<SystemCategory> existingSystemCategories=nonHivMedicalHistory.getSystemCategories();
  List<SystemCategory> populatedSystemCategories=getSystemCategories(SystemCategoryDefinition.all(),existingSystemCategories);
  nonHivMedicalHistory.setSystemCategories(populatedSystemCategories);
  try {
    allPatients.addToClinic(patient,clinicId,userName);
  }
 catch (  Exception ex) {
    nonHivMedicalHistory.setSystemCategories(existingSystemCategories);
    throw ex;
  }
  outboxRegistry.getOutbox().enroll(patient);
  allPatientEventLogs.addAll(new ChangedPatientPreferenceContext(null,patient).getEventLogs(),userName);
  patientReportingService.save(requestMapper.map(patient),medicalHistoryRequestMapper.map(patient));
}
Program: 84751
Project: 84751
Buggy source:
@RequestMapping(value="String_Node_Str",params="String_Node_Str",method=RequestMethod.GET) public String updateForm(@PathVariable("String_Node_Str") String id,Model uiModel,HttpServletRequest request){
  Patient patient=allPatients.findByIdAndClinicId(id,loggedInClinic(request));
  if (patient == null)   return "String_Node_Str";
  List<SystemCategory> allSystemCategories=SystemCategoryDefinition.all();
  List<SystemCategory> patientSystemCategories=patient.getMedicalHistory().getNonHivMedicalHistory().getSystemCategories();
  List<SystemCategory> systemCategories=getSystemCategories(allSystemCategories,patientSystemCategories);
  patient.getMedicalHistory().getNonHivMedicalHistory().setSystemCategories(systemCategories);
  initUIModel(uiModel,patient);
  uiModel.addAttribute("String_Node_Str",systemCategories);
  uiModel.addAttribute("String_Node_Str",patient.canTransitionToWeekly(minNumberOfDaysOnDailyBeforeTransitioningToWeekly));
  return UPDATE_VIEW;
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",params="String_Node_Str",method=RequestMethod.GET) public String updateForm(@PathVariable("String_Node_Str") String id,Model uiModel,HttpServletRequest request){
  Patient patient=allPatients.findByIdAndClinicId(id,loggedInClinic(request));
  if (patient == null)   return "String_Node_Str";
  List<SystemCategory> patientSystemCategories=patient.getMedicalHistory().getNonHivMedicalHistory().getSystemCategories();
  initUIModel(uiModel,patient);
  uiModel.addAttribute("String_Node_Str",patientSystemCategories);
  uiModel.addAttribute("String_Node_Str",patient.canTransitionToWeekly(minNumberOfDaysOnDailyBeforeTransitioningToWeekly));
  return UPDATE_VIEW;
}
Program: 84752
Project: 84752
Buggy source:
public HSSFWorkbook buildReport(LocalDate startDate,LocalDate endDate,boolean isAnalystReport){
  ReportBuilder callLogReportBuilder;
  if (!isAnalystReport) {
    callLogReportBuilder=new AnalystCallLogReportBuilder(allCallLogs,allPatients,allIVRLanguages,startDate,endDate);
  }
 else {
    callLogReportBuilder=new AnalystCallLogReportBuilder(allCallLogs,allPatients,allIVRLanguages,startDate,endDate);
  }
  return createExcelReport(callLogReportBuilder);
}

Fixed version (ground truth):
public HSSFWorkbook buildReport(LocalDate startDate,LocalDate endDate,boolean isAnalystReport){
  ReportBuilder callLogReportBuilder;
  if (!isAnalystReport) {
    callLogReportBuilder=new CallLogReportBuilder(allCallLogs,allPatients,allIVRLanguages,startDate,endDate);
  }
 else {
    callLogReportBuilder=new AnalystCallLogReportBuilder(allCallLogs,allPatients,allIVRLanguages,startDate,endDate);
  }
  return createExcelReport(callLogReportBuilder);
}
Program: 84753
Project: 84753
Buggy source:
public String getCompletionStatus(){
  if (getStatus().equals(Status.Active))   if (CollectionUtils.isEmpty(warnings))   return "String_Node_Str";
 else   return "String_Node_Str";
  return StringUtils.EMPTY;
}

Fixed version (ground truth):
public String getCompletionStatus(){
  return getStatus().equals(Status.Active) && !CollectionUtils.isEmpty(warnings) ? "String_Node_Str" : null;
}
Program: 84754
Project: 84754
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public String saveAndActivate(@Valid Patient patient,Model uiModel,HttpServletRequest request){
  patientService.create(patient,loggedInClinic(request),loggedInUserId(request));
  activatePatient(patient.getId(),REDIRECT_TO_SHOW_VIEW + encodeUrlPathSegment(patient.getId(),request),request);
  Patient savedPatient=allPatients.findByPatientIdAndClinicId(patient.getPatientId(),loggedInClinic(request));
  List<String> warning=new IncompletePatientDataWarning(savedPatient,null,null,null,null).value();
  uiModel.addAttribute("String_Node_Str",warning);
  uiModel.addAttribute(EXPRESS_REGISTRATION,"String_Node_Str");
  initUIModel(uiModel,savedPatient);
  return EXPRESS_SHOW_VIEW;
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public String saveAndActivate(@Valid Patient patient,BindingResult bindingResult,Model uiModel,HttpServletRequest request){
  if (bindingResult.hasErrors()) {
    initUIModel(uiModel,patient);
    return CREATE_VIEW;
  }
  try {
    patientService.create(patient,loggedInClinic(request),loggedInUserId(request));
    activatePatient(patient.getId(),REDIRECT_TO_SHOW_VIEW + encodeUrlPathSegment(patient.getId(),request),request);
    Patient savedPatient=allPatients.findByPatientIdAndClinicId(patient.getPatientId(),loggedInClinic(request));
    List<String> warning=new IncompletePatientDataWarning(savedPatient,null,null,null,null).value();
    uiModel.addAttribute("String_Node_Str",warning);
    uiModel.addAttribute(EXPRESS_REGISTRATION,"String_Node_Str");
    initUIModel(uiModel,savedPatient);
  }
 catch (  RuntimeException e) {
    decorateViewWithUniqueConstraintError(patient,bindingResult,uiModel,e);
    return CREATE_VIEW;
  }
  return EXPRESS_SHOW_VIEW;
}
Program: 84755
Project: 84755
Buggy source:
public String getSymptomReported(){
  return this.alert.getDescription();
}

Fixed version (ground truth):
public String getSymptomReported(){
  return isSymptomReportingAlert() ? getDescription() : StringUtils.EMPTY;
}
Program: 84756
Project: 84756
Buggy source:
public DateTime getVisitDate(){
  return visit.getVisitDate();
}

Fixed version (ground truth):
public DateTime getVisitDate(){
  return setTimeZone(visit.getVisitDate());
}
Program: 84757
Project: 84757
Buggy source:
@Override protected List<Object> getRowData(Object object){
  ClinicVisitSummary summary=(ClinicVisitSummary)object;
  List<Object> row=new ArrayList<Object>();
  row.add(summary.getPatientReport().getPatientId());
  row.add(summary.getPatientReport().getClinicName());
  row.add(DateUtils.formatDate(summary.getVisitDate().toDate(),"String_Node_Str"));
  row.add(summary.getRegimen().getDisplayName());
  row.add(summary.getDrugCompositonGroupName());
  populateDosage(row,summary.getDrugDosageOne());
  populateDosage(row,summary.getDrugDosageTwo());
  populateLabResults(row,summary.getLabResults());
  populateVitalStatistics(row,summary.getVitalStatistics());
  row.add(summary.getReportedOpportunisticInfections());
  return row;
}

Fixed version (ground truth):
@Override protected List<Object> getRowData(Object object){
  ClinicVisitSummary summary=(ClinicVisitSummary)object;
  List<Object> row=new ArrayList<Object>();
  row.add(summary.getPatientReport().getPatientId());
  row.add(summary.getPatientReport().getClinicName());
  row.add(format(summary.getVisitDate().toDate(),"String_Node_Str"));
  row.add(summary.getRegimen().getDisplayName());
  row.add(summary.getDrugCompositonGroupName());
  populateDosage(row,summary.getDrugDosageOne());
  populateDosage(row,summary.getDrugDosageTwo());
  populateLabResults(row,summary.getLabResults());
  populateVitalStatistics(row,summary.getVitalStatistics());
  row.add(summary.getReportedOpportunisticInfections());
  return row;
}