nus-yam/ex-repair huggingface dataset:
Program: 122668
Project: 122668
Buggy source:
public boolean sendToServerSingleRC(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    HttpEntity entity=sendToServer(qparams,strAPIUrl);
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    boolean bStatus=Boolean.getBoolean(csv.get(0));
    csv.close();
    entity.consumeContent();
    return bStatus;
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public boolean sendToServerSingleRC(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    HttpEntity entity=sendToServer(qparams,strAPIUrl);
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    boolean bStatus=Boolean.getBoolean(result[0]);
    csv.close();
    entity.consumeContent();
    return bStatus;
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122669
Project: 122669
Buggy source:
public String getRulefunctions() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",getPaloToken()));
  try {
    StringBuilder sb=new StringBuilder();
    HttpEntity entity=sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    while (csv.readRecord()) {
      sb.append(csv.get(0));
    }
    csv.close();
    entity.consumeContent();
    return sb.toString();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public String getRulefunctions() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",getPaloToken()));
  try {
    StringBuilder sb=new StringBuilder();
    HttpEntity entity=sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=null;
    while ((result=csv.readNext()) != null) {
      sb.append(result[0]);
    }
    csv.close();
    entity.consumeContent();
    return sb.toString();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122670
Project: 122670
Buggy source:
protected void finalize() throws Throwable {
  try {
    if (paloHttpClient != null)     paloHttpClient.getConnectionManager().shutdown();
  }
 catch (  Exception e) {
  }
 finally {
    super.finalize();
  }
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  try {
    if (paloHttpClient != null) {
      paloHttpClient.getConnectionManager().shutdown();
    }
  }
 catch (  Exception e) {
  }
 finally {
    super.finalize();
  }
}
Program: 122671
Project: 122671
Buggy source:
public paloconnection(String strUserName,String strUserPW,String strServer,String strPort) throws paloexception {
  super();
  this.strUserName=strUserName;
  this.strUserPW=strUserPW;
  this.strServer=strServer;
  this.strPort=strPort;
  initConnection();
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.strUserName));
  qparams.add(new BasicNameValuePair("String_Node_Str",palohelpers.getMD5(this.strUserPW)));
  try {
    HttpEntity entity=sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    this.strToken=csv.get(0);
    this.iSessionTimeOut=Integer.valueOf(csv.get(1));
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.toString());
  }
}

Fixed version (ground truth):
public paloconnection(String strUserName,String strUserPW,String strServer,String strPort) throws paloexception {
  super();
  this.strUserName=strUserName;
  this.strUserPW=strUserPW;
  this.strServer=strServer;
  this.strPort=strPort;
  initConnection();
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.strUserName));
  qparams.add(new BasicNameValuePair("String_Node_Str",palohelpers.getMD5(this.strUserPW)));
  try {
    HttpEntity entity=sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    this.strToken=result[0];
    this.iSessionTimeOut=Integer.valueOf(result[1]);
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.toString());
  }
}
Program: 122672
Project: 122672
Buggy source:
public void clear(String strArrArea) throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
  if (strArrArea == null) {
    qparams.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  }
 else {
    qparams.add(new BasicNameValuePair("String_Node_Str",strArrArea));
  }
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    this.iCubeId=palohelpers.StringToInt(csv.get(0));
    this.strCubeName=csv.get(1);
    this.iNumberOfDimensions=palohelpers.StringToInt(csv.get(2));
    this.iArrDimensionsIdentifier=palohelpers.StringToIntArray(csv.get(3),palohelpers.StringToInt(csv.get(2)));
    this.iNumberOfCells=palohelpers.StringToLong(csv.get(4));
    this.lNumberOfFilledCells=palohelpers.StringToLong(csv.get(5));
    this.iCubeStatus=palohelpers.StringToInt(csv.get(6));
    this.iCubeType=palohelpers.StringToInt(csv.get(7));
    this.iCubeToken=palohelpers.StringToInt(csv.get(8));
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public void clear(String strArrArea) throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
  if (strArrArea == null) {
    qparams.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  }
 else {
    qparams.add(new BasicNameValuePair("String_Node_Str",strArrArea));
  }
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    this.iCubeId=palohelpers.StringToInt(result[0]);
    this.strCubeName=result[1];
    this.iNumberOfDimensions=palohelpers.StringToInt(result[2]);
    this.iArrDimensionsIdentifier=palohelpers.StringToIntArray(result[3],palohelpers.StringToInt(result[2]));
    this.iNumberOfCells=palohelpers.StringToLong(result[4]);
    this.lNumberOfFilledCells=palohelpers.StringToLong(result[5]);
    this.iCubeStatus=palohelpers.StringToInt(result[6]);
    this.iCubeType=palohelpers.StringToInt(result[7]);
    this.iCubeToken=palohelpers.StringToInt(result[8]);
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122673
Project: 122673
Buggy source:
public void rename(String strCubeNewName) throws paloexception {
  if (null != strCubeNewName && strCubeNewName.length() > 0 && !strCubeName.equals(strCubeNewName)) {
    List<NameValuePair> qparams=new ArrayList<NameValuePair>();
    qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
    qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
    qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
    qparams.add(new BasicNameValuePair("String_Node_Str",strCubeNewName));
    try {
      HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
      CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
      csv.setDelimiter(';');
      csv.setTextQualifier('"');
      csv.readRecord();
      this.strCubeName=csv.get(1);
      csv.close();
      entity.consumeContent();
    }
 catch (    Exception e) {
      throw new paloexception(e.getMessage());
    }
  }
}

Fixed version (ground truth):
public void rename(String strCubeNewName) throws paloexception {
  if (null != strCubeNewName && strCubeNewName.length() > 0 && !strCubeName.equals(strCubeNewName)) {
    List<NameValuePair> qparams=new ArrayList<NameValuePair>();
    qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
    qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
    qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
    qparams.add(new BasicNameValuePair("String_Node_Str",strCubeNewName));
    try {
      HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
      CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
      String[] result=csv.readNext();
      this.strCubeName=result[1];
      csv.close();
      entity.consumeContent();
    }
 catch (    Exception e) {
      throw new paloexception(e.getMessage());
    }
  }
}
Program: 122674
Project: 122674
Buggy source:
public void refreshCubeInfo() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    this.iCubeId=palohelpers.StringToInt(csv.get(0));
    this.strCubeName=csv.get(1);
    this.iNumberOfDimensions=palohelpers.StringToInt(csv.get(2));
    this.iArrDimensionsIdentifier=palohelpers.StringToIntArray(csv.get(3),palohelpers.StringToInt(csv.get(2)));
    this.iNumberOfCells=palohelpers.StringToLong(csv.get(4));
    this.lNumberOfFilledCells=palohelpers.StringToLong(csv.get(5));
    this.iCubeStatus=palohelpers.StringToInt(csv.get(6));
    this.iCubeType=palohelpers.StringToInt(csv.get(7));
    this.iCubeToken=palohelpers.StringToInt(csv.get(8));
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public void refreshCubeInfo() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(iCubeId)));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    this.iCubeId=palohelpers.StringToInt(result[0]);
    this.strCubeName=result[1];
    this.iNumberOfDimensions=palohelpers.StringToInt(result[2]);
    this.iArrDimensionsIdentifier=palohelpers.StringToIntArray(result[3],palohelpers.StringToInt(result[2]));
    this.iNumberOfCells=palohelpers.StringToLong(result[4]);
    this.lNumberOfFilledCells=palohelpers.StringToLong(result[5]);
    this.iCubeStatus=palohelpers.StringToInt(result[6]);
    this.iCubeType=palohelpers.StringToInt(result[7]);
    this.iCubeToken=palohelpers.StringToInt(result[8]);
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122675
Project: 122675
Buggy source:
public palocube getCube(String strCubeName){
  for (  palocube paloCube : paloCubes) {
    if (paloCube.getName().equals(strCubeName))     return paloCube;
  }
  return null;
}

Fixed version (ground truth):
public palocube getCube(String strCubeName){
  for (  palocube paloCube : paloCubes) {
    if (paloCube.getName().equals(strCubeName)) {
      return paloCube;
    }
  }
  return null;
}
Program: 122677
Project: 122677
Buggy source:
public palocube getCubeByIdentifier(int iCubeId){
  for (  palocube paloCube : paloCubes) {
    if (paloCube.getCubeId() == iCubeId)     return paloCube;
  }
  return null;
}

Fixed version (ground truth):
public palocube getCubeByIdentifier(int iCubeId){
  for (  palocube paloCube : paloCubes) {
    if (paloCube.getCubeId() == iCubeId) {
      return paloCube;
    }
  }
  return null;
}
Program: 122680
Project: 122680
Buggy source:
private void buildDimElemIteratorFromArray(){
  iDimensionElementLength=strDimensionElementsArray.length;
  for (int i=0; i < strDimensionElementsArray.length; i++)   lstDimensionElements.add(Arrays.asList(strDimensionElementsArray[i]));
  itDimensionElements=palohelpers.finiteCartesianProduct(lstDimensionElements).iterator();
}

Fixed version (ground truth):
private void buildDimElemIteratorFromArray(){
  iDimensionElementLength=strDimensionElementsArray.length;
  for (  String[] element : strDimensionElementsArray) {
    lstDimensionElements.add(Arrays.asList(element));
  }
  itDimensionElements=palohelpers.finiteCartesianProduct(lstDimensionElements).iterator();
}
Program: 122682
Project: 122682
Buggy source:
public void refreshDatabaseInfo() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(this.lDatabaseId)));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    this.strDatabaseName=csv.get(1);
    this.iNumberOfDimensions=Integer.valueOf(csv.get(2));
    this.iNumberOfCubes=Integer.valueOf(csv.get(3));
    this.iStatus=Integer.valueOf(csv.get(4));
    this.iType=Integer.valueOf(csv.get(5));
    this.strDatabaseToken=csv.get(6);
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public void refreshDatabaseInfo() throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(this.lDatabaseId)));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    this.strDatabaseName=result[1];
    this.iNumberOfDimensions=Integer.valueOf(result[2]);
    this.iNumberOfCubes=Integer.valueOf(result[3]);
    this.iStatus=Integer.valueOf(result[4]);
    this.iType=Integer.valueOf(result[5]);
    this.strDatabaseToken=result[6];
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122683
Project: 122683
Buggy source:
public void rename(String strNewName) throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(this.lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",strNewName));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
    csv.setDelimiter(';');
    csv.setTextQualifier('"');
    csv.readRecord();
    this.strDatabaseName=csv.get(1);
    this.iNumberOfDimensions=Integer.valueOf(csv.get(2));
    this.iNumberOfCubes=Integer.valueOf(csv.get(3));
    this.iStatus=Integer.valueOf(csv.get(4));
    this.iType=Integer.valueOf(csv.get(5));
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public void rename(String strNewName) throws paloexception {
  List<NameValuePair> qparams=new ArrayList<NameValuePair>();
  qparams.add(new BasicNameValuePair("String_Node_Str",this.plConn.getPaloToken()));
  qparams.add(new BasicNameValuePair("String_Node_Str",String.valueOf(this.lDatabaseId)));
  qparams.add(new BasicNameValuePair("String_Node_Str",strNewName));
  try {
    HttpEntity entity=this.plConn.sendToServer(qparams,"String_Node_Str");
    CSVReader csv=new CSVReader(entity.getContent(),"String_Node_Str","String_Node_Str",';','"','\\',false,0);
    String[] result=csv.readNext();
    this.strDatabaseName=result[1];
    this.iNumberOfDimensions=Integer.valueOf(result[2]);
    this.iNumberOfCubes=Integer.valueOf(result[3]);
    this.iStatus=Integer.valueOf(result[4]);
    this.iType=Integer.valueOf(result[5]);
    csv.close();
    entity.consumeContent();
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 122684
Project: 122684
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (urlText.getText().trim().length() > 0) {
    Context ctx=CorePlugin.getContext();
    RepositoryContext oldContext=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    try {
      ProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
      factory.setRepositoryFactoryFromProvider(RepositoryFactoryProvider.getRepositoriyById(RepositoryConstants.REPOSITORY_REMOTE_ID));
      if (factory.isLocalConnectionProvider()) {
        MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      }
 else {
        RepositoryContext repositoryContext=new RepositoryContext();
        repositoryContext.setFields(new HashMap<String,String>());
        repositoryContext.getFields().put(RepositoryConstants.REPOSITORY_URL,urlText.getText());
        ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY,repositoryContext);
        enableSandboxProject=factory.enableSandboxProject();
        if (!enableSandboxProject) {
          MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        }
      }
    }
 catch (    PersistenceException e1) {
      ExceptionHandler.process(e1);
      MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),e1.getMessage());
    }
 finally {
      if (oldContext != null) {
        ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY,oldContext);
      }
    }
  }
  checkFields();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (urlText.getText().trim().length() > 0) {
    Context ctx=CorePlugin.getContext();
    RepositoryContext oldContext=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
    try {
      ProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
      factory.setRepositoryFactoryFromProvider(RepositoryFactoryProvider.getRepositoriyById(RepositoryConstants.REPOSITORY_REMOTE_ID));
      if (factory.isLocalConnectionProvider()) {
        MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      }
 else {
        RepositoryContext repositoryContext=new RepositoryContext();
        repositoryContext.setFields(new HashMap<String,String>());
        repositoryContext.getFields().put(RepositoryConstants.REPOSITORY_URL,urlText.getText());
        ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY,repositoryContext);
        enableSandboxProject=factory.enableSandboxProject();
        if (!enableSandboxProject) {
          MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        }
      }
    }
 catch (    PersistenceException e1) {
      ExceptionHandler.process(e1);
      MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),e1.getMessage());
    }
 finally {
      if (oldContext != null) {
        ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY,oldContext);
      }
    }
  }
  checkFields();
}
Program: 122685
Project: 122685
Buggy source:
private void createProjectInfors(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite urlComp=new Composite(composite,SWT.NONE);
  urlComp.setLayout(new GridLayout(3,false));
  urlComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  urlText=new LabelledText(urlComp,Messages.getString("String_Node_Str"));
  checkBtn=new Button(urlComp,SWT.PUSH);
  checkBtn.setText(Messages.getString("String_Node_Str"));
  projectGroup=new Group(composite,SWT.NONE);
  projectGroup.setText(Messages.getString("String_Node_Str"));
  projectGroup.setLayout(new GridLayout(2,false));
  projectGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
  projectLabelText=new LabelledText(projectGroup,Messages.getString("String_Node_Str"),1,SWT.SINGLE);
  GridData layoutData=new GridData();
  layoutData.widthHint=180;
  layoutData.minimumWidth=180;
  projectLabelText.setLayoutData(layoutData);
  projectLabelText.getTextControl().setEditable(false);
  languageCombo=new LabelledCombo(projectGroup,Messages.getString("String_Node_Str"),null,new String[]{ECodeLanguage.JAVA.getName(),ECodeLanguage.PERL.getName()});
  layoutData=new GridData();
  layoutData.widthHint=100;
  layoutData.minimumWidth=100;
  languageCombo.getCombo().setLayoutData(layoutData);
  languageCombo.select(0);
  createUserInfors(projectGroup);
}

Fixed version (ground truth):
private void createProjectInfors(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite urlComp=new Composite(composite,SWT.NONE);
  urlComp.setLayout(new GridLayout(3,false));
  urlComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  urlText=new LabelledText(urlComp,Messages.getString("String_Node_Str"));
  checkBtn=new Button(urlComp,SWT.PUSH);
  checkBtn.setText(Messages.getString("String_Node_Str"));
  projectGroup=new Group(composite,SWT.NONE);
  projectGroup.setText(Messages.getString("String_Node_Str"));
  projectGroup.setLayout(new GridLayout(2,false));
  projectGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
  projectLabelText=new LabelledText(projectGroup,Messages.getString("String_Node_Str"),1,SWT.SINGLE);
  GridData layoutData=new GridData();
  layoutData.widthHint=180;
  layoutData.minimumWidth=180;
  projectLabelText.setLayoutData(layoutData);
  projectLabelText.getTextControl().setEditable(false);
  languageCombo=new LabelledCombo(projectGroup,Messages.getString("String_Node_Str"),null,new String[]{ECodeLanguage.JAVA.getName()});
  layoutData=new GridData();
  layoutData.widthHint=100;
  layoutData.minimumWidth=100;
  languageCombo.getCombo().setLayoutData(layoutData);
  languageCombo.select(0);
  createUserInfors(projectGroup);
}
Program: 122686
Project: 122686
Buggy source:
public void setErrorMessage(String newErrorMessage){
  super.setErrorMessage(newErrorMessage);
  Button button=getButton(IDialogConstants.OK_ID);
  if (button != null && !button.isDisposed()) {
    button.setEnabled(newErrorMessage == null);
  }
}

Fixed version (ground truth):
@Override public void setErrorMessage(String newErrorMessage){
  super.setErrorMessage(newErrorMessage);
  Button button=getButton(IDialogConstants.OK_ID);
  if (button != null && !button.isDisposed()) {
    button.setEnabled(newErrorMessage == null);
  }
}
Program: 122689
Project: 122689
Buggy source:
private void createKeyListener(Table table){
  table.addKeyListener(new KeyAdapter(){
    public void keyPressed(    KeyEvent event){
      ISelection selection=tableViewer.getSelection();
      if (selection instanceof IStructuredSelection) {
        IStructuredSelection structuredSelection=(IStructuredSelection)selection;
        if (event.keyCode == SWT.DEL) {
        }
 else         if (new KeyHelper().anyModifierPressed(event.keyCode)) {
        }
 else         if (new KeyHelper().cursorPressed(event.keyCode)) {
        }
 else {
          tableViewer.editElement(structuredSelection.getFirstElement(),2);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void createKeyListener(Table table){
  table.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent event){
      ISelection selection=tableViewer.getSelection();
      if (selection instanceof IStructuredSelection) {
        IStructuredSelection structuredSelection=(IStructuredSelection)selection;
        if (event.keyCode == SWT.DEL) {
        }
 else         if (new KeyHelper().anyModifierPressed(event.keyCode)) {
        }
 else         if (new KeyHelper().cursorPressed(event.keyCode)) {
        }
 else {
          tableViewer.editElement(structuredSelection.getFirstElement(),2);
        }
      }
    }
  }
);
}
Program: 122690
Project: 122690
Buggy source:
public boolean canModify(Object element,String property){
  return property.equals(columnProperties[2]);
}

Fixed version (ground truth):
@Override public boolean canModify(Object element,String property){
  return property.equals(columnProperties[2]);
}
Program: 122691
Project: 122691
Buggy source:
private void createDoubleClickListener(){
  tableViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void createDoubleClickListener(){
  tableViewer.addDoubleClickListener(new IDoubleClickListener(){
    @Override public void doubleClick(    DoubleClickEvent event){
      BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
        }
      }
    }
  }
);
}
Program: 122693
Project: 122693
Buggy source:
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
        }
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}

Fixed version (ground truth):
private void createPopupMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager mgr){
      BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
      if (businessAssignment != null) {
        repositoryNode=createRepositoryNode(businessAssignment);
        if (repositoryNode != null) {
          List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
          for (          ITreeContextualAction action : contextualsActions) {
            if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
              action.init(null,new StructuredSelection(repositoryNode));
              if (action.isVisible()) {
                ((AContextualAction)action).setAvoidUnloadResources(true);
                mgr.add(action);
              }
            }
          }
        }
        CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(tableViewer.getControl());
  tableViewer.getControl().setMenu(menu);
}
Program: 122694
Project: 122694
Buggy source:
public void keyPressed(KeyEvent event){
  ISelection selection=tableViewer.getSelection();
  if (selection instanceof IStructuredSelection) {
    IStructuredSelection structuredSelection=(IStructuredSelection)selection;
    if (event.keyCode == SWT.DEL) {
    }
 else     if (new KeyHelper().anyModifierPressed(event.keyCode)) {
    }
 else     if (new KeyHelper().cursorPressed(event.keyCode)) {
    }
 else {
      tableViewer.editElement(structuredSelection.getFirstElement(),2);
    }
  }
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent event){
  ISelection selection=tableViewer.getSelection();
  if (selection instanceof IStructuredSelection) {
    IStructuredSelection structuredSelection=(IStructuredSelection)selection;
    if (event.keyCode == SWT.DEL) {
    }
 else     if (new KeyHelper().anyModifierPressed(event.keyCode)) {
    }
 else     if (new KeyHelper().cursorPressed(event.keyCode)) {
    }
 else {
      tableViewer.editElement(structuredSelection.getFirstElement(),2);
    }
  }
}
Program: 122696
Project: 122696
Buggy source:
public Object getValue(Object element,String property){
  return EmfPropertyHelper.getValue(itemPropertyDescriptor,element);
}

Fixed version (ground truth):
@Override public Object getValue(Object element,String property){
  return EmfPropertyHelper.getValue(itemPropertyDescriptor,element);
}
Program: 122697
Project: 122697
Buggy source:
public void modify(Object element,String property,Object value){
  if (element instanceof TableItem) {
    TableItem tableItem=(TableItem)element;
    itemPropertyDescriptor.setPropertyValue(tableItem.getData(),value);
  }
}

Fixed version (ground truth):
@Override public void modify(Object element,String property,Object value){
  if (element instanceof TableItem) {
    TableItem tableItem=(TableItem)element;
    itemPropertyDescriptor.setPropertyValue(tableItem.getData(),value);
  }
}
Program: 122698
Project: 122698
Buggy source:
public void doubleClick(DoubleClickEvent event){
  BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
    }
  }
}

Fixed version (ground truth):
@Override public void doubleClick(DoubleClickEvent event){
  BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
    }
  }
}
Program: 122699
Project: 122699
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
  if (businessAssignment != null) {
    final IRepositoryView repositoryView=getRepositoryView();
    if (repositoryView != null) {
      IProjectRepositoryNode rootRepositoryNode=repositoryView.getRoot();
      TalendItem item=businessAssignment.getTalendItem();
      if (item instanceof Routine && rootRepositoryNode instanceof ProjectRepositoryNode) {
        RepositoryNodeUtilities.expandParentNode(getRepositoryView(),((ProjectRepositoryNode)rootRepositoryNode).getRootRepositoryNode(ERepositoryObjectType.CODE));
      }
      selectChild(item,(IRepositoryNode)rootRepositoryNode);
    }
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  BusinessAssignment businessAssignment=getBusinessAssignment(event.getSelection());
  if (businessAssignment != null) {
    final IRepositoryView repositoryView=getRepositoryView();
    if (repositoryView != null) {
      IProjectRepositoryNode rootRepositoryNode=repositoryView.getRoot();
      TalendItem item=businessAssignment.getTalendItem();
      if (item instanceof Routine && rootRepositoryNode instanceof ProjectRepositoryNode) {
        RepositoryNodeUtilities.expandParentNode(getRepositoryView(),((ProjectRepositoryNode)rootRepositoryNode).getRootRepositoryNode(ERepositoryObjectType.CODE));
      }
      selectChild(item,(IRepositoryNode)rootRepositoryNode);
    }
  }
}
Program: 122700
Project: 122700
Buggy source:
public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
    }
    CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
  }
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager mgr){
  BusinessAssignment businessAssignment=getBusinessAssignment(tableViewer.getSelection());
  if (businessAssignment != null) {
    repositoryNode=createRepositoryNode(businessAssignment);
    if (repositoryNode != null) {
      List<ITreeContextualAction> contextualsActions=ActionsHelper.getRepositoryContextualsActions();
      for (      ITreeContextualAction action : contextualsActions) {
        if (action.isReadAction() || action.isEditAction() || action.isPropertiesAction()) {
          action.init(null,new StructuredSelection(repositoryNode));
          if (action.isVisible()) {
            ((AContextualAction)action).setAvoidUnloadResources(true);
            mgr.add(action);
          }
        }
      }
    }
    CorePlugin.getDefault().getDiagramModelService().addDeleteAssignmentAction(mgr,tableViewer.getSelection());
  }
}
Program: 122701
Project: 122701
Buggy source:
public void undo(){
  connection.disconnect();
  INodeConnector nodeConnectorSource, nodeConnectorTarget;
  nodeConnectorSource=connection.getSourceNodeConnector();
  if (nodeConnectorSource != null) {
    nodeConnectorSource.setCurLinkNbOutput(nodeConnectorSource.getCurLinkNbOutput() - 1);
  }
  nodeConnectorTarget=connection.getTargetNodeConnector();
  if (nodeConnectorTarget != null) {
    nodeConnectorTarget.setCurLinkNbInput(nodeConnectorTarget.getCurLinkNbInput() - 1);
  }
  if (newMetadata != null) {
    source.getMetadataList().remove(newMetadata);
  }
  ((Process)source.getProcess()).checkStartNodes();
  source.checkAndRefreshNode();
  target.checkAndRefreshNode();
}

Fixed version (ground truth):
@Override public void undo(){
  if (connection == null) {
    return;
  }
  connection.disconnect();
  INodeConnector nodeConnectorSource, nodeConnectorTarget;
  nodeConnectorSource=connection.getSourceNodeConnector();
  if (nodeConnectorSource != null) {
    nodeConnectorSource.setCurLinkNbOutput(nodeConnectorSource.getCurLinkNbOutput() - 1);
  }
  nodeConnectorTarget=connection.getTargetNodeConnector();
  if (nodeConnectorTarget != null) {
    nodeConnectorTarget.setCurLinkNbInput(nodeConnectorTarget.getCurLinkNbInput() - 1);
  }
  if (newMetadata != null) {
    source.getMetadataList().remove(newMetadata);
  }
  ((Process)source.getProcess()).checkStartNodes();
  source.checkAndRefreshNode();
  target.checkAndRefreshNode();
}
Program: 122702
Project: 122702
Buggy source:
public String isValid(String newText){
  if (newText != null) {
    if (!source.getProcess().checkValidConnectionName(newText,creatingConnection) || KeywordsValidator.isKeyword(newText) || newText.equals("String_Node_Str")) {
      return Messages.getString("String_Node_Str");
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String isValid(String newText){
  if (newText != null) {
    if (!source.getProcess().checkValidConnectionName(newText,creatingConnection) || KeywordsValidator.isKeyword(newText) || newText.equals("String_Node_Str")) {
      return Messages.getString("String_Node_Str");
    }
  }
  return null;
}
Program: 122703
Project: 122703
Buggy source:
public void redo(){
  execute();
}

Fixed version (ground truth):
@Override public void redo(){
  execute();
}
Program: 122706
Project: 122706
Buggy source:
protected boolean refreshNewJob(){
  if (alreadyEditedByUser) {
    return false;
  }
  StructuredSelection selection=(StructuredSelection)mainPage.getSelection();
  if (!selection.isEmpty()) {
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    boolean lastVersion=node.getObject().getVersion().equals(originalVersion);
    if (!lastVersion) {
      originalVersion=node.getObject().getVersion();
      String newVersion=processObject.getVersion();
      processObject=node.getObject();
      processObject.getProperty().setVersion(newVersion);
    }
  }
  IProxyRepositoryFactory repositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
  try {
    repositoryFactory.save(getProperty(),this.originaleObjectLabel,this.originalVersion);
    ExpressionPersistance.getInstance().jobNameChanged(originaleObjectLabel,processObject.getLabel());
    ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    return true;
  }
 catch (  PersistenceException e) {
    MessageBoxExceptionHandler.process(e);
    return false;
  }
}

Fixed version (ground truth):
protected boolean refreshNewJob(){
  if (alreadyEditedByUser) {
    return false;
  }
  StructuredSelection selection=(StructuredSelection)mainPage.getSelection();
  if (selection != null && selection.isEmpty()) {
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    boolean lastVersion=node.getObject().getVersion().equals(originalVersion);
    if (!lastVersion) {
      originalVersion=node.getObject().getVersion();
      String newVersion=processObject.getVersion();
      processObject=node.getObject();
      processObject.getProperty().setVersion(newVersion);
    }
  }
  IProxyRepositoryFactory repositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
  try {
    repositoryFactory.save(getProperty(),this.originaleObjectLabel,this.originalVersion);
    ExpressionPersistance.getInstance().jobNameChanged(originaleObjectLabel,processObject.getLabel());
    ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    return true;
  }
 catch (  PersistenceException e) {
    MessageBoxExceptionHandler.process(e);
    return false;
  }
}
Program: 122708
Project: 122708
Buggy source:
public void removeColumnSortedListener(IColumnSortedListener columnSortedListener){
}

Fixed version (ground truth):
@Override public void removeColumnSortedListener(IColumnSortedListener columnSortedListener){
}
Program: 122709
Project: 122709
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 122710
Project: 122710
Buggy source:
public TableViewerCreatorColumn getTableViewerCreatorColumn(){
  return null;
}

Fixed version (ground truth):
@Override public TableViewerCreatorColumn getTableViewerCreatorColumn(){
  return null;
}
Program: 122711
Project: 122711
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  TableItem items[]=tableViewerCreator.getTable().getItems();
  String columnId=tableViewerCreatorColumn.getId();
  boolean modified=false;
  for (  TableItem tableItem : items) {
    tableViewerCreator.getCellModifier().modify(tableItem,columnId,checked ? false : true);
    if (!modified) {
      modified=true;
    }
  }
  if (modified) {
    this.param.getValue();
    if (checked) {
      checked=false;
    }
 else {
      checked=true;
    }
    tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
    this.param.setValue(new Boolean(checked));
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  String columnId=tableViewerCreatorColumn.getId();
  IBeanPropertyAccessors accessor=tableViewerCreator.getColumn(columnId).getBeanPropertyAccessors();
  List inputList=tableViewerCreator.getInputList();
  for (int i=0; i < inputList.size(); i++) {
    accessor.set(inputList.get(i),checked ? false : true);
  }
  if (checked) {
    checked=false;
  }
 else {
    checked=true;
  }
  tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
  tableViewerCreator.refreshTableEditorControls();
}
Program: 122712
Project: 122712
Buggy source:
public TableViewerCreator getTableViewerCreator(){
  return null;
}

Fixed version (ground truth):
@Override public TableViewerCreator getTableViewerCreator(){
  return null;
}
Program: 122713
Project: 122713
Buggy source:
public void addColumnSortedListener(IColumnSortedListener columnSortedListener){
}

Fixed version (ground truth):
@Override public void addColumnSortedListener(IColumnSortedListener columnSortedListener){
}
Program: 122714
Project: 122714
Buggy source:
public void setTableViewerCreator(TableViewerCreatorNotModifiable tableViewerCreator){
  this.tableViewerCreator=tableViewerCreator;
}

Fixed version (ground truth):
@Override public void setTableViewerCreator(TableViewerCreatorNotModifiable tableViewerCreator){
  this.tableViewerCreator=tableViewerCreator;
}
Program: 122715
Project: 122715
Buggy source:
public void setTableViewerCreatorColumn(TableViewerCreatorColumnNotModifiable tableViewerCreatorColumn){
  this.tableViewerCreatorColumn=tableViewerCreatorColumn;
}

Fixed version (ground truth):
@Override public void setTableViewerCreatorColumn(TableViewerCreatorColumnNotModifiable tableViewerCreatorColumn){
  this.tableViewerCreatorColumn=tableViewerCreatorColumn;
}
Program: 122716
Project: 122716
Buggy source:
protected IBeanPropertyAccessors<MetadataColumnExt,String> getFunctionAccessor(final ComboBoxCellEditor functComboBox){
  return new IBeanPropertyAccessors<MetadataColumnExt,String>(){
    @Override public String get(    MetadataColumnExt bean){
      if (bean.getFunction() != null) {
        if (getTable() != null) {
          generatorUI.updateFunParameter(getTable());
        }
        String[] arrayFunctions=bean.getArrayFunctions();
        functComboBox.setItems(arrayFunctions);
        return FunctionManagerExt.getFunctionLable(bean.getFunction());
      }
      return "String_Node_Str";
    }
    @Override public void set(    MetadataColumnExt bean,    String value){
      bean.setFunction(functionManager.getCurrentFunction(value,bean));
      bean.setChanged(true);
    }
  }
;
}

Fixed version (ground truth):
protected IBeanPropertyAccessors<MetadataColumnExt,String> getFunctionAccessor(final ComboBoxCellEditor functComboBox){
  return new IBeanPropertyAccessors<MetadataColumnExt,String>(){
    @Override public String get(    MetadataColumnExt bean){
      if (bean.getFunction() != null) {
        if (getTable() != null) {
          generatorUI.updateFunParameter(getTable());
        }
        String[] arrayFunctions=bean.getArrayFunctions();
        functComboBox.setItems(arrayFunctions);
        String selectedFunction=FunctionManagerExt.getFunctionLable(bean.getFunction());
        int index=Arrays.asList(arrayFunctions).indexOf(selectedFunction);
        functComboBox.setValue(index);
        return selectedFunction;
      }
      return "String_Node_Str";
    }
    @Override public void set(    MetadataColumnExt bean,    String value){
      bean.setFunction(functionManager.getCurrentFunction(value,bean));
      bean.setChanged(true);
    }
  }
;
}
Program: 122717
Project: 122717
Buggy source:
/** 
 * wzhang Comment method "sortOrder".
 * @param treeNode
 * @param node
 */
public void sortOrder(FOXTreeNode treeNode,FOXTreeNode node){
  if (node != null) {
    List<FOXTreeNode> children=node.getChildren();
    if (treeNode != null) {
      int tmpOrder=0;
      int attrNsCount=0;
      for (      FOXTreeNode child : children) {
        if (child.getOrder() < treeNode.getOrder()) {
          tmpOrder++;
        }
        if (child instanceof Attribute || child instanceof NameSpaceNode) {
          attrNsCount++;
        }
      }
      if (tmpOrder > -1) {
        int oldOrder=children.indexOf(treeNode);
        if (oldOrder != -1 && oldOrder != tmpOrder) {
          node.removeChild(treeNode);
          if (children.size() > tmpOrder) {
            node.addChild(tmpOrder - attrNsCount,treeNode);
          }
 else {
            node.addChild(treeNode);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * wzhang Comment method "sortOrder".
 * @param treeNode
 * @param node
 */
public void sortOrder(FOXTreeNode treeNode,FOXTreeNode node){
  if (node != null) {
    List<FOXTreeNode> children=node.getChildren();
    if (treeNode != null) {
      int tmpOrder=0;
      int attrNsCount=0;
      for (      FOXTreeNode child : children) {
        if (child.getOrder() < treeNode.getOrder()) {
          tmpOrder++;
        }
        if (child.isAttribute() || child.isNameSpace()) {
          attrNsCount++;
        }
      }
      if (tmpOrder > -1) {
        int oldOrder=children.indexOf(treeNode);
        if (oldOrder != -1 && oldOrder != tmpOrder) {
          node.removeChild(treeNode);
          if (children.size() > tmpOrder) {
            node.addChild(tmpOrder - attrNsCount,treeNode);
          }
 else {
            node.addChild(treeNode);
          }
        }
      }
    }
  }
}
Program: 122719
Project: 122719
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  repositoryFactory.create(processItem,mainPage.getDestinationPath());
  RelationshipItemBuilder.getInstance().addOrUpdateItem(processItem);
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  repositoryFactory.create(processItem,mainPage.getDestinationPath());
}