nus-yam/ex-repair huggingface dataset:
Program: 120572
Project: 120572
Buggy source:
@Override public void init(TreeViewer viewer,IStructuredSelection selection){
  if (!ExtractMetaDataUtils.haveLoadMetadataNode()) {
    setEnabled(false);
    return;
  }
  super.init(viewer,selection);
}

Fixed version (ground truth):
@Override public void init(TreeViewer viewer,IStructuredSelection selection){
  if (!ExtractMetaDataUtils.getInstance().haveLoadMetadataNode()) {
    setEnabled(false);
    return;
  }
  super.init(viewer,selection);
}
Program: 120577
Project: 120577
Buggy source:
protected boolean checkExistConnections(IMetadataConnection metadataConnection){
  java.sql.Connection connection=null;
  try {
    List list=new ArrayList();
    list=ExtractMetaDataUtils.connect(metadataConnection.getDbType(),metadataConnection.getUrl(),metadataConnection.getUsername(),metadataConnection.getPassword(),metadataConnection.getDriverClass(),metadataConnection.getDriverJarPath(),metadataConnection.getDbVersionString(),metadataConnection.getAdditionalParams());
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          connection=(java.sql.Connection)list.get(i);
        }
      }
    }
  }
 catch (  SQLException e) {
    return false;
  }
catch (  Exception e) {
    return false;
  }
 finally {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    }
 catch (    SQLException e) {
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean checkExistConnections(IMetadataConnection metadataConnection){
  java.sql.Connection connection=null;
  try {
    List list=new ArrayList();
    list=ExtractMetaDataUtils.getInstance().connect(metadataConnection.getDbType(),metadataConnection.getUrl(),metadataConnection.getUsername(),metadataConnection.getPassword(),metadataConnection.getDriverClass(),metadataConnection.getDriverJarPath(),metadataConnection.getDbVersionString(),metadataConnection.getAdditionalParams());
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          connection=(java.sql.Connection)list.get(i);
        }
      }
    }
  }
 catch (  SQLException e) {
    return false;
  }
catch (  Exception e) {
    return false;
  }
 finally {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    }
 catch (    SQLException e) {
    }
  }
  return true;
}
Program: 120579
Project: 120579
Buggy source:
private String getTrueDBType(String className){
  return ExtractMetaDataUtils.getDbTypeByClassName(className);
}

Fixed version (ground truth):
private String getTrueDBType(String className){
  return ExtractMetaDataUtils.getInstance().getDbTypeByClassName(className);
}
Program: 120580
Project: 120580
Buggy source:
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=ExtractMetaDataUtils.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=ExtractMetaDataUtils.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if ((driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || isJavaDB() || dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName())|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) && wapperDriver != null) {
      try {
        if (conn != null && !conn.isClosed()) {
          conn.close();
        }
        if (isJavaDB()) {
          wapperDriver.connect("String_Node_Str",null);
        }
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=extractMeta.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=extractMeta.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if ((driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || isJavaDB() || dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName())|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) && wapperDriver != null) {
      try {
        if (conn != null && !conn.isClosed()) {
          conn.close();
        }
        if (isJavaDB()) {
          wapperDriver.connect("String_Node_Str",null);
        }
      }
 catch (      SQLException e) {
      }
    }
  }
}
Program: 120581
Project: 120581
Buggy source:
private void genarateDriverJarPath(){
  List<String> drivers=EDatabaseVersion4Drivers.getDrivers(dbType,dbVersion);
  if (drivers.size() == 1) {
    String driverName=EDatabaseVersion4Drivers.getDriversStr(dbType,dbVersion);
    if (driverName != null) {
      driverJarPath=ExtractMetaDataUtils.getJavaLibPath() + driverName;
    }
  }
 else {
    driverJarPath=null;
  }
}

Fixed version (ground truth):
private void genarateDriverJarPath(){
  List<String> drivers=EDatabaseVersion4Drivers.getDrivers(dbType,dbVersion);
  if (drivers.size() == 1) {
    String driverName=EDatabaseVersion4Drivers.getDriversStr(dbType,dbVersion);
    if (driverName != null) {
      driverJarPath=ExtractMetaDataUtils.getInstance().getJavaLibPath() + driverName;
    }
  }
 else {
    driverJarPath=null;
  }
}
Program: 120582
Project: 120582
Buggy source:
private void generateDriverName(){
  if (EDatabaseTypeName.HIVE.getDisplayName().equals(dbType)) {
    if (url.startsWith(DatabaseConnConstants.HIVE_2_URL_FORMAT)) {
      driverClassName=EDatabase4DriverClassName.HIVE2.getDriverClass();
    }
 else {
      driverClassName=EDatabase4DriverClassName.HIVE.getDriverClass();
    }
  }
  driverClassName=ExtractMetaDataUtils.getDriverClassByDbType(dbType);
}

Fixed version (ground truth):
private void generateDriverName(){
  if (EDatabaseTypeName.HIVE.getDisplayName().equals(dbType)) {
    if (url.startsWith(DatabaseConnConstants.HIVE_2_URL_FORMAT)) {
      driverClassName=EDatabase4DriverClassName.HIVE2.getDriverClass();
    }
 else {
      driverClassName=EDatabase4DriverClassName.HIVE.getDriverClass();
    }
  }
  driverClassName=ExtractMetaDataUtils.getInstance().getDriverClassByDbType(dbType);
}
Program: 120583
Project: 120583
Buggy source:
/** 
 * qzhang Comment method "addOpenSqlBulderButton".
 * @param subComposite
 * @param param
 * @param top
 * @param numInRow
 * @param nbInRow
 * @return
 */
private Control addOpenSqlBulderButton(Composite subComposite,IElementParameter param,int top,int numInRow,int nbInRow){
  final DecoratedField dField1=new DecoratedField(subComposite,SWT.PUSH,new IControlCreator(){
    @Override public Control createControl(    Composite parent,    int style){
      return new Button(parent,style);
    }
  }
);
  Control buttonControl=dField1.getLayoutControl();
  Button openSQLEditorButton=(Button)dField1.getControl();
  openSQLEditorButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  openSQLEditorButton.setImage(ImageProvider.getImage(ImageProvider.getImageDesc(EImage.READ_ICON)));
  buttonControl.setBackground(subComposite.getBackground());
  openSQLEditorButton.setEnabled(!param.isReadOnly());
  openSQLEditorButton.setData(NAME,SQLEDITOR);
  openSQLEditorButton.setData(PARAMETER_NAME,param.getName());
  if (param.getFieldType() == EParameterFieldType.DBTABLE) {
    openSQLEditorButton.setEnabled(ExtractMetaDataUtils.haveLoadMetadataNode());
  }
  openSQLEditorButton.addSelectionListener(openSQLListener);
  return buttonControl;
}

Fixed version (ground truth):
/** 
 * qzhang Comment method "addOpenSqlBulderButton".
 * @param subComposite
 * @param param
 * @param top
 * @param numInRow
 * @param nbInRow
 * @return
 */
private Control addOpenSqlBulderButton(Composite subComposite,IElementParameter param,int top,int numInRow,int nbInRow){
  final DecoratedField dField1=new DecoratedField(subComposite,SWT.PUSH,new IControlCreator(){
    @Override public Control createControl(    Composite parent,    int style){
      return new Button(parent,style);
    }
  }
);
  Control buttonControl=dField1.getLayoutControl();
  Button openSQLEditorButton=(Button)dField1.getControl();
  openSQLEditorButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  openSQLEditorButton.setImage(ImageProvider.getImage(ImageProvider.getImageDesc(EImage.READ_ICON)));
  buttonControl.setBackground(subComposite.getBackground());
  openSQLEditorButton.setEnabled(!param.isReadOnly());
  openSQLEditorButton.setData(NAME,SQLEDITOR);
  openSQLEditorButton.setData(PARAMETER_NAME,param.getName());
  if (param.getFieldType() == EParameterFieldType.DBTABLE) {
    openSQLEditorButton.setEnabled(ExtractMetaDataUtils.getInstance().haveLoadMetadataNode());
  }
  openSQLEditorButton.addSelectionListener(openSQLListener);
  return buttonControl;
}
Program: 120587
Project: 120587
Buggy source:
private Control addGuessQueryButton(Composite subComposite,IElementParameter param,Control lastControl,int numInRow,int top){
  final DecoratedField dField1=new DecoratedField(subComposite,SWT.PUSH,new IControlCreator(){
    @Override public Control createControl(    Composite parent,    int style){
      return new Button(parent,style);
    }
  }
);
  Button guessQueryButton=null;
  Control buttonControl=dField1.getLayoutControl();
  guessQueryButton=(Button)dField1.getControl();
  guessQueryButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  buttonControl.setBackground(subComposite.getBackground());
  guessQueryButton.setEnabled(!param.isReadOnly() || !ExtractMetaDataUtils.haveLoadMetadataNode());
  guessQueryButton.setData(NAME,GUESS_QUERY_NAME);
  guessQueryButton.setData(PARAMETER_NAME,param.getName());
  guessQueryButton.setText(GUESS_QUERY_NAME);
  FormData data1=new FormData();
  data1.left=new FormAttachment(lastControl,0);
  data1.top=new FormAttachment(0,top);
  data1.height=STANDARD_HEIGHT + 2;
  buttonControl.setLayoutData(data1);
  guessQueryButton.addSelectionListener(listenerSelection);
  return buttonControl;
}

Fixed version (ground truth):
private Control addGuessQueryButton(Composite subComposite,IElementParameter param,Control lastControl,int numInRow,int top){
  final DecoratedField dField1=new DecoratedField(subComposite,SWT.PUSH,new IControlCreator(){
    @Override public Control createControl(    Composite parent,    int style){
      return new Button(parent,style);
    }
  }
);
  Button guessQueryButton=null;
  Control buttonControl=dField1.getLayoutControl();
  guessQueryButton=(Button)dField1.getControl();
  guessQueryButton.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  buttonControl.setBackground(subComposite.getBackground());
  guessQueryButton.setEnabled(!param.isReadOnly() || !ExtractMetaDataUtils.getInstance().haveLoadMetadataNode());
  guessQueryButton.setData(NAME,GUESS_QUERY_NAME);
  guessQueryButton.setData(PARAMETER_NAME,param.getName());
  guessQueryButton.setText(GUESS_QUERY_NAME);
  FormData data1=new FormData();
  data1.left=new FormAttachment(lastControl,0);
  data1.top=new FormAttachment(0,top);
  data1.height=STANDARD_HEIGHT + 2;
  buttonControl.setLayoutData(data1);
  guessQueryButton.addSelectionListener(listenerSelection);
  return buttonControl;
}
Program: 120590
Project: 120590
Buggy source:
@Override public boolean executeCommand(IGEFProcess process,Command cmd){
  if (cmd != null && process instanceof org.talend.designer.core.ui.editor.process.Process) {
    ((org.talend.designer.core.ui.editor.process.Process)process).getCommandStack().execute(cmd);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean executeCommand(final IGEFProcess process,final Command cmd){
  if (cmd != null && process instanceof org.talend.designer.core.ui.editor.process.Process) {
    final org.talend.designer.core.ui.editor.process.Process p=((org.talend.designer.core.ui.editor.process.Process)process);
    if (p.getEditor() != null) {
      p.getEditor().getEditorSite().getShell().getDisplay().syncExec(new Runnable(){
        @Override public void run(){
          p.getCommandStack().execute(cmd);
        }
      }
);
    }
 else {
      p.getCommandStack().execute(cmd);
    }
    return true;
  }
  return false;
}
Program: 120592
Project: 120592
Buggy source:
private void createLoopLinks(List<FOXTreeNode> treeData){
  for (  FOXTreeNode treeNode : treeData) {
    if (treeNode.getColumn() != null) {
      TableItem tableItem=null;
      for (      TableItem curTableItem : getSource().getItems()) {
        if (curTableItem.getText().equals(treeNode.getColumnLabel())) {
          tableItem=curTableItem;
          break;
        }
      }
      if (tableItem == null) {
        continue;
      }
      String path=tableItem.getText();
      if (path != null) {
        TreeItem treeItem=getTreeItem(treeNode);
        addLoopLink(tableItem,tableItem.getData(),xmlViewer.getTree(),(FOXTreeNode)treeItem.getData());
      }
    }
    createLoopLinks(treeNode.getChildren());
  }
}

Fixed version (ground truth):
private void createLoopLinks(List<FOXTreeNode> treeData){
  for (  FOXTreeNode treeNode : treeData) {
    if (treeNode.getColumn() != null) {
      TableItem tableItem=null;
      for (      TableItem curTableItem : getSource().getItems()) {
        if (curTableItem.getText().equals(treeNode.getColumnLabel())) {
          tableItem=curTableItem;
          break;
        }
      }
      if (tableItem == null) {
        continue;
      }
      String path=tableItem.getText();
      if (path != null) {
        TreeItem treeItem=getTreeItem(treeNode);
        if (treeItem != null) {
          addLoopLink(tableItem,tableItem.getData(),xmlViewer.getTree(),(FOXTreeNode)treeItem.getData());
        }
      }
    }
    createLoopLinks(treeNode.getChildren());
  }
}
Program: 120593
Project: 120593
Buggy source:
public TreeItem getTreeItem(FOXTreeNode foxTreeNode){
  String path=getAbsoluteXPath(foxTreeNode);
  TreeItem[] items=xmlViewer.getTree().getItems();
  TreeItem item=null;
  while (!path.isEmpty()) {
    for (    TreeItem curItem : items) {
      if (path.equals("String_Node_Str" + curItem.getText()) || path.startsWith("String_Node_Str" + curItem.getText() + "String_Node_Str")) {
        item=curItem;
        path=path.replaceFirst("String_Node_Str" + curItem.getText(),"String_Node_Str");
        break;
      }
    }
    if (!path.isEmpty()) {
      items=item.getItems();
    }
  }
  return item;
}

Fixed version (ground truth):
public TreeItem getTreeItem(FOXTreeNode foxTreeNode){
  TreeItem[] items=xmlViewer.getTree().getItems();
  return getTreeItem(items,foxTreeNode,false);
}
Program: 120597
Project: 120597
Buggy source:
public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}

Fixed version (ground truth):
@Override public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}
Program: 120600
Project: 120600
Buggy source:
public static int[] parseSpecPath(String strSpec){
  int[] result=new int[4];
  java.util.StringTokenizer tok=new java.util.StringTokenizer(strSpec,"String_Node_Str",false);
  if (tok.hasMoreTokens())   tok.nextToken();
  int i=1;
  while (tok.hasMoreTokens()) {
    String tmp=tok.nextToken();
    if (i == 1) {
      if (tmp.indexOf("String_Node_Str") > 0 && tmp.indexOf("String_Node_Str") > tmp.indexOf("String_Node_Str")) {
        result[0]=Integer.parseInt(tmp.substring(0,tmp.indexOf("String_Node_Str")));
        result[1]=Integer.parseInt(tmp.substring(tmp.indexOf("String_Node_Str") + 1,tmp.indexOf("String_Node_Str"))) - 1;
      }
 else {
        result[0]=Integer.parseInt(tmp);
        result[1]=0;
      }
    }
 else {
      result[i]=Integer.parseInt(tmp);
    }
    i++;
  }
  if (result[1] < 0) {
    result[1]=0;
  }
  if (result[2] == 0) {
    result[2]=1;
  }
  if (result[3] == 0) {
    result[3]=1;
  }
  return result;
}

Fixed version (ground truth):
public static int[] parseSpecPath(String strSpec){
  int[] result=new int[4];
  java.util.StringTokenizer tok=new java.util.StringTokenizer(strSpec,"String_Node_Str",false);
  if (tok.hasMoreTokens()) {
    tok.nextToken();
  }
  int i=1;
  while (tok.hasMoreTokens()) {
    String tmp=tok.nextToken();
    if (i == 1) {
      if (tmp.indexOf("String_Node_Str") > 0 && tmp.indexOf("String_Node_Str") > tmp.indexOf("String_Node_Str")) {
        result[0]=Integer.parseInt(tmp.substring(0,tmp.indexOf("String_Node_Str")));
        result[1]=Integer.parseInt(tmp.substring(tmp.indexOf("String_Node_Str") + 1,tmp.indexOf("String_Node_Str"))) - 1;
      }
 else {
        result[0]=Integer.parseInt(tmp);
        result[1]=0;
      }
    }
 else {
      result[i]=Integer.parseInt(tmp);
    }
    i++;
  }
  if (result[1] < 0) {
    result[1]=0;
  }
  if (result[2] == 0) {
    result[2]=1;
  }
  if (result[3] == 0) {
    result[3]=1;
  }
  return result;
}
Program: 120601
Project: 120601
Buggy source:
public static void main(String[] args) throws Exception {
  String[][] paths=getMSH3();
  for (  String[] arrPaths : paths) {
    for (int j=0; j < arrPaths.length; j++) {
      System.out.println(arrPaths[j]);
    }
  }
  HL7Message message=new HL7Message();
  Segment seg=new Segment("String_Node_Str");
  message.addSegment(seg);
  for (  String[] path : paths) {
    Field field=TalendHL7Util.setValue(path[0],path[1]);
    seg.addField(field);
  }
  System.out.println(message.message());
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  String[][] paths=getMSH3();
  for (  String[] arrPaths : paths) {
    for (    String arrPath : arrPaths) {
      System.out.println(arrPath);
    }
  }
  HL7Message message=new HL7Message();
  Segment seg=new Segment("String_Node_Str");
  message.addSegment(seg);
  for (  String[] path : paths) {
    Field field=TalendHL7Util.setValue(path[0],path[1]);
    seg.addField(field);
  }
  System.out.println(message.message());
}
Program: 120602
Project: 120602
Buggy source:
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType modes=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (modes == null) {
    ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
  }
  ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType modes=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (modes == null) {
    ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
  }
  String mode=ComponentUtilities.getNodePropertyValue(node,"String_Node_Str");
  if (mode == null || "String_Node_Str".equals(mode.trim())) {
    ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
  }
}
Program: 120603
Project: 120603
Buggy source:
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str"};
  IComponentConversion changeDBName4Hive=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType modes=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (modes == null) {
        ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
      }
      ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(changeDBName4Hive));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str"};
  IComponentConversion changeDBName4Hive=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType modes=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (modes == null) {
        ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
      }
      String mode=ComponentUtilities.getNodePropertyValue(node,"String_Node_Str");
      if (mode == null || "String_Node_Str".equals(mode.trim())) {
        ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
      }
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(changeDBName4Hive));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}
Program: 120605
Project: 120605
Buggy source:
public void updateActionButton(String title,Image image){
  if (actionBtn != null && !actionBtn.isDisposed()) {
    if (title != null) {
      actionBtn.setText(title);
    }
 else {
      actionBtn.setText(BLANK);
    }
    actionBtn.setImage(image);
  }
}

Fixed version (ground truth):
public void updateActionButton(String title,Image image){
  if (actionBtn != null && !actionBtn.isDisposed()) {
    if (title != null) {
      actionBtn.setText(title);
    }
 else {
      actionBtn.setText(BLANK);
    }
  }
}
Program: 120606
Project: 120606
Buggy source:
public MessagesWithActionComposite(Composite parent,int style){
  super(parent,style);
  actionBtn=new Button(this,SWT.PUSH);
  updateActionButton(null,ImageProvider.getImage(EImage.THREE_DOTS_ICON));
}

Fixed version (ground truth):
public MessagesWithActionComposite(Composite parent,int style){
  super(parent,style);
  actionBtn=new Button(this,SWT.PUSH);
  updateActionButton("String_Node_Str",null);
}
Program: 120607
Project: 120607
Buggy source:
public ExportItemWizard(){
  super();
}

Fixed version (ground truth):
public ExportItemWizard(String baseViewId){
  super();
  this.baseViewId=baseViewId;
}
Program: 120608
Project: 120608
Buggy source:
@Override public void addPages(){
  super.addPages();
  mainPage=new ExportItemWizardPage(getWindowTitle(),selection);
  addPage(mainPage);
  AbstractUIPlugin plugin=(AbstractUIPlugin)Platform.getPlugin(PlatformUI.PLUGIN_ID);
  IDialogSettings workbenchSettings=plugin.getDialogSettings();
  IDialogSettings section=workbenchSettings.getSection("String_Node_Str");
  if (section == null) {
    section=workbenchSettings.addNewSection("String_Node_Str");
  }
  setDialogSettings(section);
}

Fixed version (ground truth):
@Override public void addPages(){
  super.addPages();
  mainPage=new ExportItemWizardPage(getWindowTitle(),selection,baseViewId);
  addPage(mainPage);
  AbstractUIPlugin plugin=(AbstractUIPlugin)Platform.getPlugin(PlatformUI.PLUGIN_ID);
  IDialogSettings workbenchSettings=plugin.getDialogSettings();
  IDialogSettings section=workbenchSettings.getSection("String_Node_Str");
  if (section == null) {
    section=workbenchSettings.addNewSection("String_Node_Str");
  }
  setDialogSettings(section);
}
Program: 120609
Project: 120609
Buggy source:
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  return (CheckboxTreeViewer)provider.createViewer(parent);
}

Fixed version (ground truth):
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  if (baseViewId != null) {
    provider.setViewId(baseViewId);
  }
  return (CheckboxTreeViewer)provider.createViewer(parent);
}
Program: 120610
Project: 120610
Buggy source:
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
  filteredCheckboxTree.getViewer().addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (element instanceof RepositoryNode) {
        return selectRepositoryNode(viewer,(RepositoryNode)element);
      }
 else {
        for (        IExtendedNodeHandler nodeHandler : RepositoryContentManager.getExtendedNodeHandler()) {
          boolean exportFilter=nodeHandler.exportFilter(viewer,parentElement,element);
          if (!exportFilter) {
            return exportFilter;
          }
        }
      }
      return true;
    }
  }
);
}

Fixed version (ground truth):
private void createTreeViewer(Composite itemComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(itemComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI){
    @Override protected CheckboxTreeViewer doCreateTreeViewer(    Composite parent,    int style){
      RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
      if (baseViewId != null) {
        provider.setViewId(baseViewId);
      }
      return (CheckboxTreeViewer)provider.createViewer(parent);
    }
    @Override protected void refreshCompleted(){
      getViewer().expandToLevel(3);
      restoreCheckedElements();
    }
    @Override protected boolean isNodeCollectable(    TreeItem item){
      Object obj=item.getData();
      if (obj instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)obj;
        if (node.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
          return true;
        }
      }
      return false;
    }
  }
;
  filteredCheckboxTree.getViewer().addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (element instanceof RepositoryNode) {
        return selectRepositoryNode(viewer,(RepositoryNode)element);
      }
 else {
        for (        IExtendedNodeHandler nodeHandler : RepositoryContentManager.getExtendedNodeHandler()) {
          boolean exportFilter=nodeHandler.exportFilter(viewer,parentElement,element);
          if (!exportFilter) {
            return exportFilter;
          }
        }
      }
      return true;
    }
  }
);
}
Program: 120611
Project: 120611
Buggy source:
protected ExportItemWizardPage(String pageName,IStructuredSelection selection){
  super(pageName);
  this.selection=selection;
  setDescription(Messages.getString("String_Node_Str"));
  setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_WIZBAN_EXPORT_WIZ));
  TimeMeasure.display=CommonsPlugin.isDebugMode();
  TimeMeasure.displaySteps=CommonsPlugin.isDebugMode();
  TimeMeasure.measureActive=CommonsPlugin.isDebugMode();
}

Fixed version (ground truth):
protected ExportItemWizardPage(String pageName,IStructuredSelection selection,String baseViewId){
  super(pageName);
  this.selection=selection;
  this.baseViewId=baseViewId;
  setDescription(Messages.getString("String_Node_Str"));
  setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_WIZBAN_EXPORT_WIZ));
  TimeMeasure.display=CommonsPlugin.isDebugMode();
  TimeMeasure.displaySteps=CommonsPlugin.isDebugMode();
  TimeMeasure.measureActive=CommonsPlugin.isDebugMode();
}
Program: 120612
Project: 120612
Buggy source:
public String getLabel(){
  return language.getLocation(entry.getParentName(),entry.getName());
}

Fixed version (ground truth):
public String getLabel(){
  if (entry instanceof GlobalMapEntry) {
    return GLOBAL_PREFIX + entry.getName();
  }
  return language.getLocation(entry.getParentName(),entry.getName());
}
Program: 120613
Project: 120613
Buggy source:
public String getContent(){
  content=language.getLocation(entry.getParentName(),entry.getName()) + "String_Node_Str";
  return content;
}

Fixed version (ground truth):
public String getContent(){
  if (entry instanceof GlobalMapEntry) {
    content=entry.getName();
  }
 else {
    content=language.getLocation(entry.getParentName(),entry.getName()) + "String_Node_Str";
  }
  return content;
}
Program: 120615
Project: 120615
Buggy source:
public void init(IDataMapTable currentTable,Zone[] zones,ITableEntry currentEntry){
  tables=new ArrayList<AbstractDataMapTable>();
  for (int i=0; i < zones.length; i++) {
    if (zones[i] == Zone.INPUTS) {
      tables.addAll(mapperManager.getInputTables());
    }
 else     if (zones[i] == Zone.OUTPUTS) {
      tables.addAll(mapperManager.getOutputTables());
    }
 else     if (zones[i] == Zone.VARS) {
      tables.addAll(mapperManager.getVarsTables());
    }
  }
  this.currentModifiedEntry=currentEntry;
}

Fixed version (ground truth):
public void init(IDataMapTable currentTable,Zone[] zones,ITableEntry currentEntry){
  tables=new ArrayList<AbstractDataMapTable>();
  for (  Zone zone : zones) {
    if (zone == Zone.INPUTS) {
      tables.addAll(mapperManager.getInputTables());
    }
 else     if (zone == Zone.OUTPUTS) {
      tables.addAll(mapperManager.getOutputTables());
    }
 else     if (zone == Zone.VARS) {
      tables.addAll(mapperManager.getVarsTables());
    }
  }
  this.currentModifiedEntry=currentEntry;
}
Program: 120616
Project: 120616
Buggy source:
public IContentProposal[] getProposals(String contents,int position){
  List<IContentProposal> proposals=new ArrayList<IContentProposal>();
  TableEntryLocation sourceEntryLocation=new TableEntryLocation();
  for (  IDataMapTable table : this.tables) {
    List<IColumnEntry> dataMapTableEntries=table.getColumnEntries();
    for (    IColumnEntry entrySource : dataMapTableEntries) {
      sourceEntryLocation.tableName=entrySource.getParentName();
      sourceEntryLocation.columnName=entrySource.getName();
      if (mapperManager.getUiManager().checkSourceLocationIsValid(entrySource,currentModifiedEntry)) {
        proposals.add(new EntryContentProposal(entrySource,this.currentLanguage));
      }
    }
  }
  for (  IContentProposalProvider contentProposalProvider : otherContentProposalProviders) {
    proposals.addAll(Arrays.asList(contentProposalProvider.getProposals(contents,position)));
  }
  IContentProposal[] res=new IContentProposal[proposals.size()];
  res=proposals.toArray(res);
  return res;
}

Fixed version (ground truth):
public IContentProposal[] getProposals(String contents,int position){
  List<IContentProposal> proposals=new ArrayList<IContentProposal>();
  TableEntryLocation sourceEntryLocation=new TableEntryLocation();
  for (  IDataMapTable table : this.tables) {
    List<IColumnEntry> dataMapTableEntries=table.getColumnEntries();
    for (    IColumnEntry entrySource : dataMapTableEntries) {
      sourceEntryLocation.tableName=entrySource.getParentName();
      sourceEntryLocation.columnName=entrySource.getName();
      if (mapperManager.getUiManager().checkSourceLocationIsValid(entrySource,currentModifiedEntry)) {
        proposals.add(new EntryContentProposal(entrySource,this.currentLanguage));
      }
    }
    if (table instanceof InputTable) {
      InputTable inputTable=(InputTable)table;
      List<GlobalMapEntry> globalMapEntries=inputTable.getGlobalMapEntries();
      for (      GlobalMapEntry entry : globalMapEntries) {
        proposals.add(new EntryContentProposal(entry,this.currentLanguage));
      }
    }
  }
  for (  IContentProposalProvider contentProposalProvider : otherContentProposalProviders) {
    proposals.addAll(Arrays.asList(contentProposalProvider.getProposals(contents,position)));
  }
  IContentProposal[] res=new IContentProposal[proposals.size()];
  res=proposals.toArray(res);
  return res;
}
Program: 120617
Project: 120617
Buggy source:
public ChangeValuesFromRepository(IElement elem,Connection connection,IMetadataTable table,String propertyName,String value,boolean reOpenXSDBool){
  this(elem,connection,propertyName,value,reOpenXSDBool);
  this.table=table;
}

Fixed version (ground truth):
public ChangeValuesFromRepository(IElement elem,Connection connection,IMetadataTable table,String propertyName,String value){
  this(elem,connection,propertyName,value);
  this.table=table;
}
Program: 120619
Project: 120619
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  processContext.setLog4jLevel(log4jLevel.getText());
  processContext.setLog4jLevel(log4jLevel.getText());
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  processContext.setLog4jLevel(log4jLevel.getText());
  processManager.setLog4jLevel(log4jLevel.getText());
}
Program: 120620
Project: 120620
Buggy source:
/** 
 * DOC Administrator Comment method "addListeners".
 */
private void addListeners(){
  watchBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setWatchAllowed(watchBtn.getSelection());
      processManager.setExecTime(watchBtn.getSelection());
    }
  }
);
  saveJobBeforeRunButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setSaveBeforeRun(saveJobBeforeRunButton.getSelection());
      processManager.setSaveJobBeforeRun(saveJobBeforeRunButton.getSelection());
    }
  }
);
  perfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      processContext.setMonitorPerf(perfBtn.getSelection());
      processManager.setStat(perfBtn.getSelection());
    }
  }
);
  clearBeforeExec.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setClearBeforeExec(clearBeforeExec.getSelection());
      processManager.setClearBeforeExec(clearBeforeExec.getSelection());
    }
  }
);
  log4jLevel.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setLog4jLevel(log4jLevel.getText());
      processContext.setLog4jLevel(log4jLevel.getText());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC Administrator Comment method "addListeners".
 */
private void addListeners(){
  watchBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setWatchAllowed(watchBtn.getSelection());
      processManager.setExecTime(watchBtn.getSelection());
    }
  }
);
  saveJobBeforeRunButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setSaveBeforeRun(saveJobBeforeRunButton.getSelection());
      processManager.setSaveJobBeforeRun(saveJobBeforeRunButton.getSelection());
    }
  }
);
  perfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      processContext.setMonitorPerf(perfBtn.getSelection());
      processManager.setStat(perfBtn.getSelection());
    }
  }
);
  clearBeforeExec.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setClearBeforeExec(clearBeforeExec.getSelection());
      processManager.setClearBeforeExec(clearBeforeExec.getSelection());
    }
  }
);
  log4jLevel.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      processContext.setLog4jLevel(log4jLevel.getText());
      processManager.setLog4jLevel(log4jLevel.getText());
    }
  }
);
}
Program: 120621
Project: 120621
Buggy source:
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  initRefProjects(currentProject);
  List<RoutinesParameterType> routinesDependencies=process.getParameters().getRoutinesParameter();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        userRoutines.add(record);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  Set<Project> referenceProjects=new HashSet<Project>();
  this.getAllReferenceProjects(currentProject,referenceProjects);
  initRefProjects(referenceProjects);
  List<RoutinesParameterType> routinesDependencies=process.getParameters().getRoutinesParameter();
  List<String> typeNames=new ArrayList<String>();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        if (typeNames.contains(type.getName())) {
          break;
        }
 else {
          typeNames.add(type.getName());
          userRoutines.add(record);
        }
      }
    }
  }
}
Program: 120622
Project: 120622
Buggy source:
private void initRefProjects(Project currentProject){
  for (  Project p : ProjectManager.getInstance().getReferencedProjects(currentProject)) {
    initModels(p);
    initRefProjects(p);
  }
}

Fixed version (ground truth):
private void initRefProjects(Set<Project> referenceProjects){
  for (  Project p : referenceProjects) {
    initModels(p);
  }
}
Program: 120623
Project: 120623
Buggy source:
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  initRefProjects(currentProject);
  List<RoutinesParameterType> routinesDependencies=process.getParameters().getRoutinesParameter();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        userRoutines.add(record);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  Set<Project> referenceProjects=new HashSet<Project>();
  this.getAllReferenceProjects(currentProject,referenceProjects);
  initRefProjects(referenceProjects);
  List<RoutinesParameterType> routinesDependencies=process.getParameters().getRoutinesParameter();
  List<String> typeNames=new ArrayList<String>();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        if (typeNames.contains(type.getName())) {
          break;
        }
 else {
          typeNames.add(type.getName());
          userRoutines.add(record);
        }
      }
    }
  }
}
Program: 120624
Project: 120624
Buggy source:
private void initRefProjects(Project currentProject){
  for (  Project p : ProjectManager.getInstance().getReferencedProjects(currentProject)) {
    initModels(p);
    initRefProjects(p);
  }
}

Fixed version (ground truth):
private void initRefProjects(Set<Project> referenceProjects){
  for (  Project p : referenceProjects) {
    initModels(p);
  }
}
Program: 120625
Project: 120625
Buggy source:
/** 
 * DOC ocarbone Comment method "checkField".
 */
protected void checkFieldsValue(){
  if (nameText.getText().length() == 0) {
    nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    if (!nameText.getText().endsWith("String_Node_Str")) {
      technicalNameText.setText(Project.createTechnicalName(nameText.getText()));
    }
    if (!Pattern.matches(RepositoryConstants.PROJECT_PATTERN,nameText.getText()) || isKeywords(nameText.getText().toLowerCase()) || "String_Node_Str".equalsIgnoreCase(nameText.getText())) {
      nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
    }
 else {
      if (isProjectNameAlreadyUsed(nameText.getText())) {
        nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
      }
 else {
        nameStatus=createOkStatus();
        descriptionStatus=createOkStatus();
        if (!languageJavaRadio.getSelection() && !languagePerlRadio.getSelection()) {
          languageStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
        }
 else         if (!languageEnable(getLanguage())) {
          languageStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.WARNING,Messages.getString("String_Node_Str",getLanguage()),null);
        }
 else {
          languageStatus=createOkStatus();
        }
      }
    }
  }
  updatePageStatus();
}

Fixed version (ground truth):
/** 
 * DOC ocarbone Comment method "checkField".
 */
protected void checkFieldsValue(){
  if (nameText.getText().length() == 0) {
    nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    if (!nameText.getText().endsWith("String_Node_Str")) {
      technicalNameText.setText(Project.createTechnicalName(nameText.getText()));
    }
    if (ProjectUtils.isValidProjectName(nameText.getText())) {
      nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
    }
 else {
      if (isProjectNameAlreadyUsed(nameText.getText())) {
        nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
      }
 else {
        nameStatus=createOkStatus();
        descriptionStatus=createOkStatus();
        if (!languageJavaRadio.getSelection() && !languagePerlRadio.getSelection()) {
          languageStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
        }
 else         if (!languageEnable(getLanguage())) {
          languageStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.WARNING,Messages.getString("String_Node_Str",getLanguage()),null);
        }
 else {
          languageStatus=createOkStatus();
        }
      }
    }
  }
  updatePageStatus();
}
Program: 120627
Project: 120627
Buggy source:
protected void checkFieldsValue(){
  if (nameText.getText().length() == 0) {
    nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    technicalNameText.setText(Project.createTechnicalName(nameText.getText()));
    if (!Pattern.matches(RepositoryConstants.PROJECT_PATTERN,nameText.getText())) {
      nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
    }
 else {
      if (isProjectNameAlreadyUsed(nameText.getText())) {
        nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
      }
 else {
        nameStatus=createOkStatus();
      }
    }
  }
  if (lastPath == null || lastPath.length() == 0) {
    fileNameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    fileNameStatus=createOkStatus();
  }
  updatePageStatus();
}

Fixed version (ground truth):
protected void checkFieldsValue(){
  if (nameText.getText().length() == 0) {
    nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    technicalNameText.setText(Project.createTechnicalName(nameText.getText()));
    if (ProjectUtils.isValidProjectName(nameText.getText())) {
      nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
    }
 else {
      if (isProjectNameAlreadyUsed(nameText.getText())) {
        nameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
      }
 else {
        nameStatus=createOkStatus();
      }
    }
  }
  if (lastPath == null || lastPath.length() == 0) {
    fileNameStatus=new Status(IStatus.ERROR,RepositoryPlugin.PLUGIN_ID,IStatus.OK,Messages.getString("String_Node_Str"),null);
  }
 else {
    fileNameStatus=createOkStatus();
  }
  updatePageStatus();
}