nus-yam/ex-repair huggingface dataset:
Program: 129820
Project: 129820
Buggy source:
private void resetMapRelativeXpathValue(Map<String,String> source){
  Map content=new HashMap();
  for (  String key : source.keySet()) {
    String value=source.get(key);
    String newValue=resetRelativeXPath(value);
    content.put(key,newValue);
  }
  source.clear();
  source.putAll(content);
}

Fixed version (ground truth):
private Map resetMapRelativeXpathValue(Map<String,String> source){
  Map content=new HashMap();
  for (  String key : source.keySet()) {
    String value=source.get(key);
    String newValue=resetRelativeXPath(value);
    content.put(key,newValue);
  }
  return content;
}
Program: 129821
Project: 129821
Buggy source:
private void resetMapRelativeXpathKey(Map<String,? extends Object> source){
  Map content=new HashMap();
  for (  String key : source.keySet()) {
    String newKey=resetRelativeXPath(key);
    content.put(newKey,source.get(key));
  }
  source.clear();
  source.putAll(content);
}

Fixed version (ground truth):
private Map resetMapRelativeXpathKey(Map<String,? extends Object> source){
  Map content=new HashMap();
  for (  String key : source.keySet()) {
    String newKey=resetRelativeXPath(key);
    content.put(newKey,source.get(key));
  }
  return content;
}
Program: 129822
Project: 129822
Buggy source:
private void reset(){
  resetMapRelativeXpathKey(lookupInfo);
  resetMapRelativeXpathKey(xpathToTypeMap);
  resetMapRelativeXpathKey(xpathToPatternMap);
  resetMapRelativeXpathValue(xpathOfResults);
}

Fixed version (ground truth):
private void reset(){
  lookupInfo=resetMapRelativeXpathKey(lookupInfo);
  xpathToTypeMap=resetMapRelativeXpathKey(xpathToTypeMap);
  xpathToPatternMap=resetMapRelativeXpathKey(xpathToPatternMap);
  xpathOfResults=resetMapRelativeXpathValue(xpathOfResults);
}
Program: 129823
Project: 129823
Buggy source:
public void flatForLookup(){
  XPath loopXpath=doc.createXPath(currentLoop);
  loopXpath.setNamespaceURIs(xmlNameSpaceMap);
  nodes=loopXpath.selectNodes(doc);
  if (nodes.size() == 0 && !top) {
    setParentAsLoop();
    flatForLookup();
  }
 else {
    if (currentLoop != originalLoop) {
      reset();
    }
  }
}

Fixed version (ground truth):
public void flatForLookup(){
  XPath loopXpath=doc.createXPath(currentLoop);
  loopXpath.setNamespaceURIs(xmlNameSpaceMap);
  nodes=loopXpath.selectNodes(doc);
  if (nodes.size() == 0 && !top) {
    setParentAsLoop();
    flatForLookup();
  }
 else {
    if (currentLoop != originalLoop) {
      loopChanged=true;
      reset();
    }
  }
}
Program: 129826
Project: 129826
Buggy source:
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  Collection<MetadataTable> tables=new ArrayList<MetadataTable>();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0))) {
      tables.add(metadata);
    }
  }
}

Fixed version (ground truth):
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  SalesforceSchemaConnection connection=getConnection();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0)) && metadata.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit moduleUnit=(SalesforceModuleUnit)metadata.eContainer();
      connection.getModules().remove(moduleUnit);
    }
  }
}
Program: 129828
Project: 129828
Buggy source:
protected void evaluateTextField(){
  if (nameText.getText().length() == 0) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (!Pattern.matches(RepositoryConstants.getPattern(getRepositoryObjectType()),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (isKeywords(nameText.getText()) || "String_Node_Str".equalsIgnoreCase(nameText.getText())) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (nameModifiedByUser) {
    if (retrieveNameFinished) {
      if (!isValid(nameText.getText())) {
        nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
      }
 else {
        nameStatus=createOkStatus();
      }
    }
 else {
      nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    }
  }
 else {
    nameStatus=createOkStatus();
  }
  if (property != null && nameStatus.getSeverity() == IStatus.OK) {
    property.setDisplayName(StringUtils.trimToNull(nameText.getText()));
  }
  updatePageStatus();
}

Fixed version (ground truth):
protected void evaluateTextField(){
  if (nameText.getText().length() == 0) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (!Pattern.matches(RepositoryConstants.getPattern(getRepositoryObjectType()),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (isKeywords(nameText.getText()) || "String_Node_Str".equalsIgnoreCase(nameText.getText())) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (nameModifiedByUser) {
    if (retrieveNameFinished) {
      if (!isValid(nameText.getText())) {
        nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
      }
 else {
        nameStatus=createOkStatus();
      }
    }
 else {
      nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    }
  }
 else {
    nameStatus=createOkStatus();
  }
  if (property != null && nameStatus.getSeverity() == IStatus.OK) {
    property.setLabel(StringUtils.trimToNull(nameText.getText()));
    property.setDisplayName(StringUtils.trimToNull(nameText.getText()));
  }
  updatePageStatus();
}
Program: 129829
Project: 129829
Buggy source:
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  Collection<MetadataTable> tables=new ArrayList<MetadataTable>();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0))) {
      tables.add(metadata);
    }
  }
}

Fixed version (ground truth):
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  SalesforceSchemaConnection connection=getConnection();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0)) && metadata.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit moduleUnit=(SalesforceModuleUnit)metadata.eContainer();
      connection.getModules().remove(moduleUnit);
    }
  }
}
Program: 129832
Project: 129832
Buggy source:
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
        tmpProjectNode.dispose();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}

Fixed version (ground truth):
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}
Program: 129834
Project: 129834
Buggy source:
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
        tmpProjectNode.dispose();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}

Fixed version (ground truth):
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}
Program: 129838
Project: 129838
Buggy source:
/** 
 * DOC smallet Comment method "getCopiedLabel".
 * @param copiedProperty
 * @return
 * @throws PersistenceException
 * @throws BusinessException
 */
private void setPropNewName(Property copiedProperty) throws PersistenceException, BusinessException {
  String originalLabel=copiedProperty.getLabel();
  String add1="String_Node_Str";
  String initialTry=add1 + originalLabel;
  copiedProperty.setLabel(initialTry);
  if (isNameAvailable(getRepositoryContext().getProject(),copiedProperty.getItem(),null)) {
    return;
  }
 else {
    char j='a';
    while (!isNameAvailable(getRepositoryContext().getProject(),copiedProperty.getItem(),null)) {
      if (j > 'z') {
        throw new BusinessException(Messages.getString("String_Node_Str"));
      }
      String nextTry=initialTry + "String_Node_Str" + (j++)+ "String_Node_Str";
      copiedProperty.setLabel(nextTry);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC smallet Comment method "getCopiedLabel".
 * @param copiedProperty
 * @return
 * @throws PersistenceException
 * @throws BusinessException
 */
private void setPropNewName(Property copiedProperty) throws PersistenceException, BusinessException {
  String originalLabel=copiedProperty.getLabel();
  String add1="String_Node_Str";
  String initialTry=add1 + originalLabel;
  copiedProperty.setLabel(initialTry);
  copiedProperty.setDisplayName(initialTry);
  if (isNameAvailable(getRepositoryContext().getProject(),copiedProperty.getItem(),null)) {
    return;
  }
 else {
    char j='a';
    while (!isNameAvailable(getRepositoryContext().getProject(),copiedProperty.getItem(),null)) {
      if (j > 'z') {
        throw new BusinessException(Messages.getString("String_Node_Str"));
      }
      String nextTry=initialTry + "String_Node_Str" + (j++)+ "String_Node_Str";
      copiedProperty.setLabel(nextTry);
      copiedProperty.setDisplayName(nextTry);
    }
  }
}
Program: 129840
Project: 129840
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  try {
    final Item newItem=factory.copy(item,path,true);
    newItem.getProperty().setLabel(newName);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem((ProcessItem)newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  try {
    final Item newItem=factory.copy(item,path,true);
    newItem.getProperty().setLabel(newName);
    newItem.getProperty().setDisplayName(newName);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem((ProcessItem)newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 129842
Project: 129842
Buggy source:
private void duplicateSingleVersionItem(final Item item,final IPath path,final String newName){
  RepositoryWorkUnit<Object> rwu=new RepositoryWorkUnit<Object>(this.getText(),this){
    @Override protected void run() throws LoginException, PersistenceException {
      try {
        final Item newItem=factory.copy(item,path,true);
        newItem.getProperty().setLabel(newName);
        if (newItem instanceof RoutineItem) {
          synDuplicatedRoutine((RoutineItem)newItem);
        }
        ICamelDesignerCoreService service=null;
        if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
          service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
        }
        if (service != null && service.isInstanceofCamelBeans(item)) {
          synDuplicatedBean(newItem);
        }
        if (newItem instanceof ProcessItem) {
          RelationshipItemBuilder.getInstance().addOrUpdateItem((ProcessItem)newItem);
        }
        if (newItem instanceof ConnectionItem) {
          ConnectionItem connectionItem=(ConnectionItem)newItem;
          connectionItem.getConnection().getSupplierDependency().clear();
        }
        factory.save(newItem);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  rwu.setAvoidUnloadResources(true);
  factory.executeRepositoryWorkUnit(rwu);
}

Fixed version (ground truth):
private void duplicateSingleVersionItem(final Item item,final IPath path,final String newName){
  RepositoryWorkUnit<Object> rwu=new RepositoryWorkUnit<Object>(this.getText(),this){
    @Override protected void run() throws LoginException, PersistenceException {
      try {
        final Item newItem=factory.copy(item,path,true);
        newItem.getProperty().setLabel(newName);
        newItem.getProperty().setDisplayName(newName);
        if (newItem instanceof RoutineItem) {
          synDuplicatedRoutine((RoutineItem)newItem);
        }
        ICamelDesignerCoreService service=null;
        if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
          service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
        }
        if (service != null && service.isInstanceofCamelBeans(item)) {
          synDuplicatedBean(newItem);
        }
        if (newItem instanceof ProcessItem) {
          RelationshipItemBuilder.getInstance().addOrUpdateItem((ProcessItem)newItem);
        }
        if (newItem instanceof ConnectionItem) {
          ConnectionItem connectionItem=(ConnectionItem)newItem;
          connectionItem.getConnection().getSupplierDependency().clear();
        }
        factory.save(newItem);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  rwu.setAvoidUnloadResources(true);
  factory.executeRepositoryWorkUnit(rwu);
}
Program: 129848
Project: 129848
Buggy source:
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  String pId=perspective.getId();
  if (null == isfirst || "String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
 else   if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    return;
  }
 else   if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
}

Fixed version (ground truth):
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  String pId=perspective.getId();
  disappearGenerateJobCoolBar(pId,PlatformUI.getWorkbench().getActiveWorkbenchWindow());
  if (null == isfirst || "String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
 else   if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    return;
  }
 else   if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
}
Program: 129849
Project: 129849
Buggy source:
/** 
 * DOC Comment method "regisitPerspectiveBarSelectListener".
 */
public static void regisitPerspectiveBarSelectListener(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new PerspectiveAdapter(){
    @Override public void perspectiveActivated(    IWorkbenchPage page,    IPerspectiveDescriptor perspective){
      String pId=perspective.getId();
      if (null == isfirst || "String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
 else       if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        return;
      }
 else       if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC Comment method "regisitPerspectiveBarSelectListener".
 */
public static void regisitPerspectiveBarSelectListener(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new PerspectiveAdapter(){
    @Override public void perspectiveActivated(    IWorkbenchPage page,    IPerspectiveDescriptor perspective){
      String pId=perspective.getId();
      disappearGenerateJobCoolBar(pId,PlatformUI.getWorkbench().getActiveWorkbenchWindow());
      if (null == isfirst || "String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
 else       if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        return;
      }
 else       if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
    }
  }
);
}
Program: 129850
Project: 129850
Buggy source:
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  String pId=perspective.getId();
  if (null == isfirst || "String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
 else   if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    return;
  }
 else   if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
}

Fixed version (ground truth):
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  String pId=perspective.getId();
  disappearGenerateJobCoolBar(pId,PlatformUI.getWorkbench().getActiveWorkbenchWindow());
  if (null == isfirst || "String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
 else   if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    return;
  }
 else   if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
    isfirst=perspective.getId();
    refreshAll();
  }
}
Program: 129851
Project: 129851
Buggy source:
/** 
 * DOC Comment method "regisitPerspectiveBarSelectListener".
 */
public static void regisitPerspectiveBarSelectListener(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new PerspectiveAdapter(){
    @Override public void perspectiveActivated(    IWorkbenchPage page,    IPerspectiveDescriptor perspective){
      String pId=perspective.getId();
      if (null == isfirst || "String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
 else       if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        return;
      }
 else       if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC Comment method "regisitPerspectiveBarSelectListener".
 */
public static void regisitPerspectiveBarSelectListener(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new PerspectiveAdapter(){
    @Override public void perspectiveActivated(    IWorkbenchPage page,    IPerspectiveDescriptor perspective){
      String pId=perspective.getId();
      disappearGenerateJobCoolBar(pId,PlatformUI.getWorkbench().getActiveWorkbenchWindow());
      if (null == isfirst || "String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
 else       if (pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        return;
      }
 else       if (!pId.equals(isfirst) && !"String_Node_Str".equals(isfirst)) {
        isfirst=perspective.getId();
        refreshAll();
      }
    }
  }
);
}
Program: 129852
Project: 129852
Buggy source:
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
public static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}

Fixed version (ground truth):
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}
Program: 129853
Project: 129853
Buggy source:
/** 
 * Retrieve and return the dbms from the given id.
 * @param dbmsId
 * @return the dbms from the given id
 */
static Dbms getDbms(String dbmsId){
  if (dbmsId == null) {
    throw new IllegalArgumentException();
  }
  Dbms[] allDbmsArray=getAllDbmsArray();
  for (int i=0; i < allDbmsArray.length; i++) {
    Dbms dbms=allDbmsArray[i];
    if (dbmsId.equals(dbms.getId())) {
      return dbms;
    }
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",dbmsId));
}

Fixed version (ground truth):
/** 
 * Retrieve and return the dbms from the given id.
 * @param dbmsId
 * @return the dbms from the given id
 */
public static Dbms getDbms(String dbmsId){
  if (dbmsId == null) {
    throw new IllegalArgumentException();
  }
  Dbms[] allDbmsArray=getAllDbmsArray();
  for (int i=0; i < allDbmsArray.length; i++) {
    Dbms dbms=allDbmsArray[i];
    if (dbmsId.equals(dbms.getId())) {
      return dbms;
    }
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",dbmsId));
}
Program: 129854
Project: 129854
Buggy source:
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
public static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}

Fixed version (ground truth):
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}
Program: 129855
Project: 129855
Buggy source:
/** 
 * Retrieve and return the dbms from the given id.
 * @param dbmsId
 * @return the dbms from the given id
 */
public static Dbms getDbms(String dbmsId){
  if (dbmsId == null) {
    throw new IllegalArgumentException();
  }
  Dbms[] allDbmsArray=getAllDbmsArray();
  for (int i=0; i < allDbmsArray.length; i++) {
    Dbms dbms=allDbmsArray[i];
    if (dbmsId.equals(dbms.getId())) {
      return dbms;
    }
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",dbmsId));
}

Fixed version (ground truth):
/** 
 * Retrieve and return the dbms from the given id.
 * @param dbmsId
 * @return the dbms from the given id
 */
static Dbms getDbms(String dbmsId){
  if (dbmsId == null) {
    throw new IllegalArgumentException();
  }
  Dbms[] allDbmsArray=getAllDbmsArray();
  for (int i=0; i < allDbmsArray.length; i++) {
    Dbms dbms=allDbmsArray[i];
    if (dbmsId.equals(dbms.getId())) {
      return dbms;
    }
  }
  throw new IllegalArgumentException(Messages.getString("String_Node_Str",dbmsId));
}
Program: 129857
Project: 129857
Buggy source:
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  updateCheckButton();
  if (urlConnectionStringText.getText().equals("String_Node_Str")) {
    urlConnectionStringText.setText(getStringConnection());
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
 else {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
  }
  if (isReadOnly() != readOnly) {
    adaptFormToReadOnly();
  }
  if (visible) {
    updateStatus(getStatusLevel(),getStatus());
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  updateCheckButton();
  if (urlConnectionStringText.getText().equals("String_Node_Str")) {
    urlConnectionStringText.setText(getStringConnection());
  }
  if (isContextMode()) {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
    adaptFormToEditable();
  }
 else {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
  }
  if (isReadOnly() != readOnly) {
    adaptFormToReadOnly();
  }
  if (visible) {
    updateStatus(getStatusLevel(),getStatus());
  }
}
Program: 129861
Project: 129861
Buggy source:
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  updateCheckButton();
  if (urlConnectionStringText.getText().equals("String_Node_Str")) {
    urlConnectionStringText.setText(getStringConnection());
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
 else {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
  }
  if (isReadOnly() != readOnly) {
    adaptFormToReadOnly();
  }
  if (visible) {
    updateStatus(getStatusLevel(),getStatus());
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  updateCheckButton();
  if (urlConnectionStringText.getText().equals("String_Node_Str")) {
    urlConnectionStringText.setText(getStringConnection());
  }
  if (isContextMode()) {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
    adaptFormToEditable();
  }
 else {
    EDatabaseConnTemplate template=EDatabaseConnTemplate.indexOfTemplate(getConnection().getDatabaseType());
    setPropertiesFormEditable(template != null);
  }
  if (isReadOnly() != readOnly) {
    adaptFormToReadOnly();
  }
  if (visible) {
    updateStatus(getStatusLevel(),getStatus());
  }
}
Program: 129865
Project: 129865
Buggy source:
@Override public boolean performCancel(){
  docItem.getProperty().setVersion(mainPage.getOrignalVersion());
  return super.performCancel();
}

Fixed version (ground truth):
@Override public boolean performCancel(){
  docItem.getProperty().setLabel(mainPage.getOrignalName());
  docItem.getProperty().setDescription(mainPage.getOrignalDescription());
  docItem.getProperty().setPurpose(mainPage.getOrignalpurpose());
  docItem.getProperty().setStatusCode(mainPage.getOrignalStatus());
  docItem.getProperty().setVersion(mainPage.getOrignalversion());
  return super.performCancel();
}
Program: 129869
Project: 129869
Buggy source:
@Override public boolean performCancel(){
  docItem.getProperty().setVersion(mainPage.getOrignalVersion());
  return super.performCancel();
}

Fixed version (ground truth):
@Override public boolean performCancel(){
  docItem.getProperty().setDisplayName(mainPage.getOrignalName());
  docItem.getProperty().setDescription(mainPage.getOrignalDescription());
  docItem.getProperty().setPurpose(mainPage.getOrignalpurpose());
  docItem.getProperty().setStatusCode(mainPage.getOrignalStatus());
  docItem.getProperty().setVersion(mainPage.getOrignalversion());
  return super.performCancel();
}
Program: 129875
Project: 129875
Buggy source:
private XPathPrefix getXPathPrefix(String prefix){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getPrefix().equals(prefix)) {
      return values[i];
    }
  }
  return null;
}

Fixed version (ground truth):
private String getXPathPrefix(String prefix){
  if (prefix == null) {
    return "String_Node_Str";
  }
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getPrefix().equals(prefix)) {
      return values[i].getDisplayName();
    }
  }
  return prefix;
}
Program: 129876
Project: 129876
Buggy source:
@Override protected void adaptFormToEditable(){
  super.adaptFormToEditable();
  xPathPrefixCombo.setReadOnly(isContextMode());
  loopTableEditorView.setReadOnly(isContextMode());
  this.fieldsTableEditorView.setReadOnly(isContextMode());
}

Fixed version (ground truth):
@Override protected void adaptFormToEditable(){
  super.adaptFormToEditable();
  if (isContextMode()) {
    prefixCombo.setBackground(null);
  }
 else {
    prefixCombo.setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_WHITE));
  }
  prefixCombo.setEditable(isContextMode());
  loopTableEditorView.setReadOnly(isContextMode());
  this.fieldsTableEditorView.setReadOnly(isContextMode());
}
Program: 129880
Project: 129880
Buggy source:
/** 
 * Main Fields addControls.
 */
@Override protected void addFieldsListeners(){
  xPathPrefixCombo.getCombo().addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (concept != null) {
        final XPathPrefix xPathPrefixByDisplayName=getXPathPrefixByDisplayName(xPathPrefixCombo.getText());
        if (xPathPrefixByDisplayName != null) {
          concept.setXPathPrefix(xPathPrefixByDisplayName.getPrefix());
        }
      }
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
    public void handleEvent(    ListenableListEvent event){
      checkFieldsValue();
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<ConceptTarget>(){
    public void handleEvent(    ModifiedBeanEvent<ConceptTarget> event){
      updateStatus(IStatus.OK,null);
      String msg=fieldsTableEditorView.checkColumnNames();
      if (!StringUtils.isEmpty(msg)) {
        updateStatus(IStatus.ERROR,msg);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Main Fields addControls.
 */
@Override protected void addFieldsListeners(){
  prefixCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (concept != null) {
        concept.setXPathPrefix(getXPathPrefixByDisplayName(prefixCombo.getText()));
        checkFieldsValue();
      }
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
    public void handleEvent(    ListenableListEvent event){
      checkFieldsValue();
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<ConceptTarget>(){
    public void handleEvent(    ModifiedBeanEvent<ConceptTarget> event){
      updateStatus(IStatus.OK,null);
      String msg=fieldsTableEditorView.checkColumnNames();
      if (!StringUtils.isEmpty(msg)) {
        updateStatus(IStatus.ERROR,msg);
      }
    }
  }
);
}
Program: 129881
Project: 129881
Buggy source:
/** 
 * Initialize value, forceFocus first field.
 */
@Override protected void initialize(){
  File file=MDMUtil.getTempTemplateXSDFile();
  xsdFilePath=file.getParentFile().getAbsolutePath();
  if (!file.exists()) {
    try {
      super.initialize();
    }
 catch (    Exception e) {
      isTemplateExist=false;
    }
  }
 else {
    xsdFilePath=file.getAbsolutePath();
  }
  isTemplateExist=true;
  this.treePopulator=new TreePopulator(availableXmlTree);
  checkFieldsValue();
  if (concept == null) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    concept=ConnectionFactory.eINSTANCE.createConcept();
    getConnection().getSchemas().add(concept);
  }
  loopModel.setConcept(concept);
  if (concept.getLoopLimit() == null) {
    concept.setLoopLimit(-1);
    XmlArray.setLimitToDefault();
    concept.setLoopLimit(XmlArray.getRowLimit());
  }
  fieldsModel.setConcept(concept.getConceptTargets());
  fieldsTableEditorView.getTableViewerCreator().layout();
  if (concept.getXPathPrefix() == null || "String_Node_Str".equals(concept.getXPathPrefix())) {
    xPathPrefixCombo.select(0);
  }
 else {
    final XPathPrefix xPathPrefix=getXPathPrefix(concept.getXPathPrefix());
    xPathPrefixCombo.setText(xPathPrefix.getDisplayName());
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
}

Fixed version (ground truth):
/** 
 * Initialize value, forceFocus first field.
 */
@Override protected void initialize(){
  File file=MDMUtil.getTempTemplateXSDFile();
  xsdFilePath=file.getParentFile().getAbsolutePath();
  if (!file.exists()) {
    try {
      super.initialize();
    }
 catch (    Exception e) {
      isTemplateExist=false;
    }
  }
 else {
    xsdFilePath=file.getAbsolutePath();
  }
  isTemplateExist=true;
  this.treePopulator=new TreePopulator(availableXmlTree);
  checkFieldsValue();
  if (concept == null) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    concept=ConnectionFactory.eINSTANCE.createConcept();
    getConnection().getSchemas().add(concept);
  }
  loopModel.setConcept(concept);
  if (concept.getLoopLimit() == null) {
    concept.setLoopLimit(-1);
    XmlArray.setLimitToDefault();
    concept.setLoopLimit(XmlArray.getRowLimit());
  }
  fieldsModel.setConcept(concept.getConceptTargets());
  fieldsTableEditorView.getTableViewerCreator().layout();
  if (concept.getXPathPrefix() == null || "String_Node_Str".equals(concept.getXPathPrefix())) {
    prefixCombo.select(1);
    concept.setXPathPrefix(XPathPrefix.NONE_ITEM.getPrefix());
  }
 else {
    prefixCombo.setText(getXPathPrefix(concept.getXPathPrefix()));
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
}
Program: 129882
Project: 129882
Buggy source:
private XPathPrefix getXPathPrefixByDisplayName(String dispalyName){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getDisplayName().equals(dispalyName)) {
      return values[i];
    }
  }
  return null;
}

Fixed version (ground truth):
private String getXPathPrefixByDisplayName(String dispalyName){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i] == XPathPrefix.USER_DEFINED_ITEM) {
      continue;
    }
    if (values[i].getDisplayName().equals(dispalyName)) {
      return values[i].getPrefix();
    }
  }
  return dispalyName;
}
Program: 129883
Project: 129883
Buggy source:
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}

Fixed version (ground truth):
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
public static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}
Program: 129884
Project: 129884
Buggy source:
public static boolean isOSX(){
  return Platform.WS_CARBON.equals(ws);
}

Fixed version (ground truth):
public static boolean isOSX(){
  return Platform.WS_CARBON.equals(ws) || Platform.WS_COCOA.equals(ws);
}
Program: 129885
Project: 129885
Buggy source:
public static void addTableForSpecifiedDataPackage(DatabaseConnection dbconn,MetadataTable dbtable){
  IMetadataConnection imetadataConnection=ConvertionHelper.convert(dbconn);
  DatabaseConnection conn=(DatabaseConnection)imetadataConnection.getCurrentConnection();
  Collection<orgomg.cwm.objectmodel.core.Package> newDataPackage=EcoreUtil.copyAll(dbconn.getDataPackage());
  ConnectionHelper.addPackages(newDataPackage,conn);
  String catalog="String_Node_Str";
  String schema="String_Node_Str";
  EObject container=dbtable.eContainer();
  if (container != null) {
    if (container instanceof Schema) {
      schema=((Schema)container).getName();
      EObject c=container.eContainer();
      if (c != null && c instanceof Catalog) {
        catalog=((Catalog)c).getName();
      }
    }
 else     if (container instanceof Catalog) {
      catalog=((Catalog)container).getName();
    }
  }
  boolean isAccess=EDatabaseTypeName.ACCESS.getDisplayName().equals(imetadataConnection.getDbType());
  if (!isAccess) {
    schema=ExtractMetaDataUtils.getMeataConnectionSchema(imetadataConnection);
  }
  addTableForTemCatalogOrSchema(catalog,schema,dbconn,dbtable,imetadataConnection);
}

Fixed version (ground truth):
public static void addTableForSpecifiedDataPackage(DatabaseConnection dbconn,MetadataTable dbtable){
  IMetadataConnection imetadataConnection=ConvertionHelper.convert(dbconn);
  DatabaseConnection conn=(DatabaseConnection)imetadataConnection.getCurrentConnection();
  Collection<orgomg.cwm.objectmodel.core.Package> newDataPackage=EcoreUtil.copyAll(dbconn.getDataPackage());
  ConnectionHelper.addPackages(newDataPackage,conn);
  String catalog=imetadataConnection.getDatabase();
  String schema="String_Node_Str";
  EObject container=dbtable.eContainer();
  if (container != null) {
    if (container instanceof Schema) {
      schema=((Schema)container).getName();
      EObject c=container.eContainer();
      if (c != null && c instanceof Catalog) {
        catalog=((Catalog)c).getName();
      }
    }
 else     if (container instanceof Catalog) {
      catalog=((Catalog)container).getName();
    }
  }
  boolean isAccess=EDatabaseTypeName.ACCESS.getDisplayName().equals(imetadataConnection.getDbType());
  if (!isAccess) {
    schema=ExtractMetaDataUtils.getMeataConnectionSchema(imetadataConnection);
  }
  addTableForTemCatalogOrSchema(catalog,schema,dbconn,dbtable,imetadataConnection);
}
Program: 129886
Project: 129886
Buggy source:
public static String getPattern(ERepositoryObjectType type){
  if (type == ERepositoryObjectType.FOLDER) {
    return FOLDER_PATTERN;
  }
 else   if (type == ERepositoryObjectType.PROCESS || type == ERepositoryObjectType.JOBLET) {
    return CODE_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.ROUTINES) {
    return ROUTINES_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.TDQ_JRAXML_ELEMENT || type == ERepositoryObjectType.TDQ_DATA_PROFILING || type == ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT || type == ERepositoryObjectType.TDQ_REPORT_ELEMENT || type == ERepositoryObjectType.TDQ_LIBRARIES || type == ERepositoryObjectType.TDQ_PATTERN_ELEMENT || type == ERepositoryObjectType.TDQ_PATTERN_REGEX || type == ERepositoryObjectType.TDQ_PATTERN_SQL || type == ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT || type == ERepositoryObjectType.TDQ_RULES || type == ERepositoryObjectType.TDQ_RULES_SQL || type == ERepositoryObjectType.TDQ_INDICATOR_ELEMENT) {
    return TDQ_PAT_ITEM_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return SERVICES_NAME_PATTERN;
  }
 else {
    return TDQ_PAT_ITEM_PATTERN;
  }
}

Fixed version (ground truth):
public static String getPattern(ERepositoryObjectType type){
  if (type == ERepositoryObjectType.FOLDER) {
    return FOLDER_PATTERN;
  }
 else   if (type == ERepositoryObjectType.PROCESS || type == ERepositoryObjectType.JOBLET) {
    return CODE_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.ROUTINES) {
    return ROUTINES_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.TDQ_JRAXML_ELEMENT || type == ERepositoryObjectType.TDQ_DATA_PROFILING || type == ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT || type == ERepositoryObjectType.TDQ_REPORT_ELEMENT || type == ERepositoryObjectType.TDQ_LIBRARIES || type == ERepositoryObjectType.TDQ_PATTERN_ELEMENT || type == ERepositoryObjectType.TDQ_PATTERN_REGEX || type == ERepositoryObjectType.TDQ_PATTERN_SQL || type == ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT || type == ERepositoryObjectType.TDQ_RULES || type == ERepositoryObjectType.TDQ_RULES_SQL || type == ERepositoryObjectType.TDQ_INDICATOR_ELEMENT) {
    return TDQ_PAT_ITEM_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return SERVICES_NAME_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return CODE_ITEM_PATTERN;
  }
 else {
    return TDQ_PAT_ITEM_PATTERN;
  }
}
Program: 129887
Project: 129887
Buggy source:
private void getReferencedProjectBean(List<IRepositoryViewObject> beans,List projects) throws SystemException {
  if (projects == null || projects.isEmpty()) {
    return;
  }
  IProxyRepositoryFactory repositoryFactory=getRepositoryService().getProxyRepositoryFactory();
  for (  Object obj : projects) {
    Project project=null;
    if (obj instanceof Project) {
      project=(Project)obj;
    }
 else     if (obj instanceof ProjectReference) {
      project=new Project(((ProjectReference)obj).getReferencedProject());
    }
    if (project != null) {
      try {
        beans.addAll(repositoryFactory.getAll(project,ERepositoryObjectType.getTypeFromKey("String_Node_Str")));
      }
 catch (      PersistenceException e) {
        throw new SystemException(e);
      }
      getReferencedProjectRoutine(beans,project.getEmfProject().getReferencedProjects());
    }
  }
}

Fixed version (ground truth):
private void getReferencedProjectBean(List<IRepositoryViewObject> beans,List projects) throws SystemException {
  if (projects == null || projects.isEmpty()) {
    return;
  }
  IProxyRepositoryFactory repositoryFactory=getRepositoryService().getProxyRepositoryFactory();
  for (  Object obj : projects) {
    Project project=null;
    if (obj instanceof Project) {
      project=(Project)obj;
    }
 else     if (obj instanceof ProjectReference) {
      project=new Project(((ProjectReference)obj).getReferencedProject());
    }
    if (project != null) {
      try {
        beans.addAll(repositoryFactory.getAll(project,ERepositoryObjectType.getTypeFromKey("String_Node_Str")));
      }
 catch (      PersistenceException e) {
        throw new SystemException(e);
      }
      getReferencedProjectBean(beans,project.getEmfProject().getReferencedProjects());
    }
  }
}
Program: 129888
Project: 129888
Buggy source:
private void getReferencedProjectBean(List<IRepositoryViewObject> beans,List projects) throws SystemException {
  if (projects == null || projects.isEmpty()) {
    return;
  }
  IProxyRepositoryFactory repositoryFactory=getRepositoryService().getProxyRepositoryFactory();
  for (  Object obj : projects) {
    Project project=null;
    if (obj instanceof Project) {
      project=(Project)obj;
    }
 else     if (obj instanceof ProjectReference) {
      project=new Project(((ProjectReference)obj).getReferencedProject());
    }
    if (project != null) {
      try {
        beans.addAll(repositoryFactory.getAll(project,ERepositoryObjectType.getTypeFromKey("String_Node_Str")));
      }
 catch (      PersistenceException e) {
        throw new SystemException(e);
      }
      getReferencedProjectRoutine(beans,project.getEmfProject().getReferencedProjects());
    }
  }
}

Fixed version (ground truth):
private void getReferencedProjectBean(List<IRepositoryViewObject> beans,List projects) throws SystemException {
  if (projects == null || projects.isEmpty()) {
    return;
  }
  IProxyRepositoryFactory repositoryFactory=getRepositoryService().getProxyRepositoryFactory();
  for (  Object obj : projects) {
    Project project=null;
    if (obj instanceof Project) {
      project=(Project)obj;
    }
 else     if (obj instanceof ProjectReference) {
      project=new Project(((ProjectReference)obj).getReferencedProject());
    }
    if (project != null) {
      try {
        beans.addAll(repositoryFactory.getAll(project,ERepositoryObjectType.getTypeFromKey("String_Node_Str")));
      }
 catch (      PersistenceException e) {
        throw new SystemException(e);
      }
      getReferencedProjectBean(beans,project.getEmfProject().getReferencedProjects());
    }
  }
}
Program: 129890
Project: 129890
Buggy source:
public static boolean isOSX(){
  return Platform.WS_CARBON.equals(ws);
}

Fixed version (ground truth):
public static boolean isOSX(){
  return Platform.WS_CARBON.equals(ws) || Platform.WS_COCOA.equals(ws);
}
Program: 129894
Project: 129894
Buggy source:
public Object fromJsonToObject(JSONObject ob,Class<?> clazz) throws JSONException {
  Object o=null;
  try {
    o=clazz.newInstance();
    for (    Field f : clazz.getDeclaredFields()) {
      String name=f.getName();
      String upperName=name.substring(0,1).toUpperCase() + name.substring(1);
      Method m=clazz.getDeclaredMethod("String_Node_Str" + upperName,new Class[]{f.getType()});
      Object value=ob.get(name);
      if (f.getType().isAssignableFrom(String.class) && JSONObject.NULL == value)       value="String_Node_Str";
      m.invoke(o,value);
    }
  }
 catch (  Exception e) {
    throw new JSONException(e);
  }
  return o;
}

Fixed version (ground truth):
public Object fromJsonToObject(JSONObject ob,Class<?> clazz) throws JSONException {
  Object o=null;
  try {
    o=clazz.newInstance();
    for (    Field f : clazz.getDeclaredFields()) {
      String name=f.getName();
      String upperName=name.substring(0,1).toUpperCase() + name.substring(1);
      try {
        Method m=clazz.getDeclaredMethod("String_Node_Str" + upperName,new Class[]{f.getType()});
        Object value=ob.get(name);
        if (f.getType().isAssignableFrom(String.class) && JSONObject.NULL == value)         value="String_Node_Str";
        m.invoke(o,value);
      }
 catch (      NoSuchMethodException nsme) {
        log.equals(nsme);
      }
    }
  }
 catch (  Exception e) {
    throw new JSONException(e);
  }
  return o;
}