Program: 117872
Project: 117872
Buggy source:
/** 
 * nrousseau Comment method "checkNodePropertiesFromRepository".
 * @param node
 * @return true if the data have been modified
 */
@SuppressWarnings("String_Node_Str") private List<UpdateResult> checkNodePropertiesFromRepository(final Node node,boolean onlySimpleShow){
  if (node == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> propertiesResults=new ArrayList<UpdateResult>();
  for (  IElementParameter curPropertyParam : node.getElementParametersFromField(EParameterFieldType.PROPERTY_TYPE)) {
    String propertyType=(String)curPropertyParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).getValue();
    if (propertyType != null) {
      if (propertyType.equals(EmfComponent.REPOSITORY)) {
        List<IProcess2> openedProcesses=UpdateManagerUtils.getOpenedProcess();
        IElementParameter repositoryPropertyParam=curPropertyParam.getChildParameters().get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
        String propertyValue=(String)repositoryPropertyParam.getValue();
        if (node.getComponent().getName().startsWith("String_Node_Str")) {
          if (propertyValue.contains("String_Node_Str")) {
            propertyValue=propertyValue.split("String_Node_Str")[0];
          }
        }
        IRepositoryViewObject lastVersion=UpdateRepositoryUtils.getRepositoryObjectById(propertyValue);
        UpdateCheckResult result=null;
        Connection repositoryConnection=null;
        RulesItem repositoryRulesItem=null;
        LinkRulesItem repositoryLinkRulesItem=null;
        String source=null;
        Item item=null;
        if (lastVersion != null) {
          item=lastVersion.getProperty().getItem();
          if (item != null && item instanceof ConnectionItem) {
            source=UpdateRepositoryUtils.getRepositorySourceName(item);
            repositoryConnection=((ConnectionItem)item).getConnection();
          }
          if (item != null && item instanceof FileItem) {
            if (item instanceof RulesItem) {
              repositoryRulesItem=(RulesItem)item;
            }
          }
          if (item != null && item instanceof LinkRulesItem) {
            repositoryLinkRulesItem=(LinkRulesItem)item;
          }
        }
        if (repositoryConnection != null) {
          boolean sameValues=true;
          boolean isXsdPath=false;
          if (repositoryConnection instanceof XmlFileConnectionImpl) {
            String filePath=((XmlFileConnectionImpl)repositoryConnection).getXmlFilePath();
            if (filePath != null) {
              if (XmlUtil.isXSDFile(filePath)) {
                isXsdPath=true;
              }
            }
          }
          boolean needBuildIn=false;
          if (repositoryConnection instanceof SalesforceSchemaConnection && !((SalesforceSchemaConnection)repositoryConnection).isUseCustomModuleName()) {
            IElementParameter param=node.getElementParameter("String_Node_Str");
            if (param != null) {
              boolean found=false;
              SalesforceSchemaConnection salesforceConnection=(SalesforceSchemaConnection)repositoryConnection;
              List<SalesforceModuleUnit> units=salesforceConnection.getModules();
              for (              SalesforceModuleUnit unit : units) {
                if (unit.getLabel() != null && unit.getLabel().equals(param.getValue())) {
                  found=true;
                  break;
                }
              }
              if (!found) {
                result=new UpdateCheckResult(node);
                result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.BUIL_IN,repositoryPropertyParam);
                needBuildIn=true;
              }
            }
          }
          for (          IElementParameter param : node.getElementParameters()) {
            if (needBuildIn) {
              break;
            }
            if (param.getRepositoryValue() == null || param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(curPropertyParam.getName())) {
              continue;
            }
            if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {
              continue;
            }
            if (param.getFieldType() == EParameterFieldType.SCHEMA_REFERENCE) {
              continue;
            }
            String repositoryValue=getReposiotryValueForOldJDBC(node,repositoryConnection,param);
            String relatedComponent=node.getComponent().getName();
            if ((repositoryValue != null) && (param.isShow(node.getElementParameters()) || (node instanceof INode && ((INode)node).getComponent().getName().equals("String_Node_Str")) || (node instanceof INode && ((INode)node).getComponent().getName().equals("String_Node_Str")))) {
              if ((param.getFieldType().equals(EParameterFieldType.FILE) && isXsdPath) || (repositoryConnection instanceof SalesforceSchemaConnection && "String_Node_Str".equals(repositoryValue) && !((SalesforceSchemaConnection)repositoryConnection).isUseCustomModuleName())) {
                continue;
              }
              IMetadataTable table=null;
              if (!node.getMetadataList().isEmpty()) {
                table=node.getMetadataList().get(0);
              }
              Object objectValue=RepositoryToComponentProperty.getValue(repositoryConnection,repositoryValue,table,relatedComponent);
              if (objectValue == null || "String_Node_Str".equals(objectValue)) {
                if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
                  IESBService service=(IESBService)GlobalServiceRegister.getDefault().getService(IESBService.class);
                  if (service != null) {
                    Object objectValueFromESB=service.getValue(item,repositoryValue,node);
                    if (objectValueFromESB != null) {
                      objectValue=objectValueFromESB;
                    }
                  }
                }
              }
              if (param.getName().equals(EParameterName.CDC_TYPE_MODE.getName()) && item instanceof DatabaseConnectionItem) {
                if (PluginChecker.isCDCPluginLoaded()) {
                  ICDCProviderService service=(ICDCProviderService)GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
                  if (service != null) {
                    try {
                      List<IRepositoryViewObject> all;
                      all=CorePlugin.getDefault().getProxyRepositoryFactory().getAll(ERepositoryObjectType.METADATA_CONNECTIONS);
                      for (                      IRepositoryViewObject obj : all) {
                        Item tempItem=obj.getProperty().getItem();
                        if (tempItem instanceof DatabaseConnectionItem) {
                          String cdcLinkId=service.getCDCConnectionLinkId((DatabaseConnectionItem)tempItem);
                          if (cdcLinkId != null && item.getProperty().getId().equals(cdcLinkId)) {
                            objectValue=RepositoryToComponentProperty.getValue(((DatabaseConnectionItem)tempItem).getConnection(),repositoryValue,node.getMetadataList().get(0));
                            break;
                          }
                        }
                      }
                    }
 catch (                    PersistenceException e) {
                      ExceptionHandler.process(e);
                    }
                  }
                }
              }
              Object value=param.getValue();
              if (objectValue != null) {
                if ((param.getFieldType().equals(EParameterFieldType.CLOSED_LIST) && UpdatesConstants.TYPE.equals(param.getRepositoryValue()))) {
                  boolean found=false;
                  String[] list=param.getListRepositoryItems();
                  for (int i=0; (i < list.length) && (!found); i++) {
                    if (objectValue.equals(list[i])) {
                      found=true;
                    }
                  }
                  if (!found) {
                    sameValues=false;
                  }
                }
 else {
                  if (param.getFieldType().equals(EParameterFieldType.TABLE)) {
                    List<Map<String,Object>> oldList=(List<Map<String,Object>>)value;
                    String name=param.getName();
                    if ("String_Node_Str".equals(name) || "String_Node_Str".equals(name) || "String_Node_Str".equals(name) && !oldList.isEmpty() && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      if (oldList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < oldList.size(); i++) {
                          Map<String,Object> oldMap=oldList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && ((oldMap.get("String_Node_Str") == null && objectMap.get("String_Node_Str") == null) || (oldMap.get("String_Node_Str") != null && objectMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))))&& ((oldMap.get("String_Node_Str") == null && objectMap.get("String_Node_Str") == null) || (oldMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if (param.getName().equals("String_Node_Str") && oldList != null && objectValue instanceof List) {
                      List repList=(List)objectValue;
                      if (oldList.size() == repList.size()) {
                        for (                        Map<String,Object> line : oldList) {
                          final String sheetName="String_Node_Str";
                          Object oldValue=line.get(sheetName);
                          if (oldValue instanceof String && repList.get(0) instanceof Map) {
                            boolean found=false;
                            for (                            Map map : (List<Map>)repList) {
                              Object repValue=map.get(sheetName);
                              if (oldValue.equals(repValue)) {
                                found=true;
                                break;
                              }
                            }
                            if (!found) {
                              sameValues=false;
                              break;
                            }
                          }
                        }
                      }
 else {
                        sameValues=false;
                      }
                    }
 else                     if (("String_Node_Str".equals(param.getName()) || "String_Node_Str".equals(param.getName()) || param.getName().equals("String_Node_Str")) && oldList != null && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      List<Map<String,Object>> filterBuildInList=collectHadoopPropertiesList(oldList);
                      if (filterBuildInList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < filterBuildInList.size(); i++) {
                          Map<String,Object> oldMap=filterBuildInList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if ((param.getName().equals("String_Node_Str")) && oldList != null && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      if (oldList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < oldList.size(); i++) {
                          Map<String,Object> oldMap=oldList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if (param.getName().equals("String_Node_Str") && oldList != null) {
                      sameValues=sameDriverForJDBC(node,repositoryConnection,oldList,objectValue);
                      if (!sameValues) {
                        break;
                      }
                    }
                  }
 else                   if (value instanceof String && objectValue instanceof String) {
                    if (!value.equals("String_Node_Str") && !value.equals(objectValue)) {
                      if (repositoryConnection instanceof XmlFileConnection) {
                        if ((((XmlFileConnection)repositoryConnection).getXmlFilePath().endsWith("String_Node_Str") || ((XmlFileConnection)repositoryConnection).getXmlFilePath().endsWith("String_Node_Str")) && repositoryValue.equals("String_Node_Str")) {
                        }
 else {
                          sameValues=false;
                        }
                      }
 else {
                        sameValues=false;
                      }
                    }
                    if (repositoryValue.equals("String_Node_Str")) {
                      IElementParameter paramEncoding=param.getChildParameters().get(EParameterName.ENCODING_TYPE.getName());
                      if (paramEncoding != null) {
                        if (repositoryConnection instanceof FTPConnection) {
                          if (((FTPConnection)repositoryConnection).getEcoding() != null) {
                            paramEncoding.setValue(((FTPConnection)repositoryConnection).getEcoding());
                          }
 else {
                            paramEncoding.setValue(EmfComponent.ENCODING_TYPE_CUSTOM);
                          }
                        }
                      }
                    }
                  }
 else                   if (value instanceof Boolean && objectValue instanceof Boolean) {
                    sameValues=((Boolean)value).equals(objectValue);
                  }
                }
              }
 else               if (param.getFieldType().equals(EParameterFieldType.TABLE) && UpdatesConstants.XML_MAPPING.equals(repositoryValue)) {
                List<Map<String,Object>> newMaps=RepositoryToComponentProperty.getXMLMappingValue(repositoryConnection,node.getMetadataList(),getColumnRenamedMap());
                if ((value instanceof List) && newMaps != null) {
                  List<Map<String,Object>> oldMaps=(List<Map<String,Object>>)value;
                  if (oldMaps.size() != newMaps.size()) {
                    sameValues=false;
                    break;
                  }
                  for (int i=0; i < newMaps.size() && sameValues; i++) {
                    Map<String,Object> newmap=newMaps.get(i);
                    Map<String,Object> oldmap=null;
                    if (i < oldMaps.size()) {
                      oldmap=oldMaps.get(i);
                    }
                    if (oldmap != null && sameValues) {
                      Object o=newmap.get(UpdatesConstants.QUERY);
                      if (o != null) {
                        sameValues=newmap.get(UpdatesConstants.QUERY).equals(oldmap.get(UpdatesConstants.QUERY));
                      }
 else {
                        sameValues=oldmap.get(UpdatesConstants.QUERY) == null;
                      }
                    }
                    if (newmap.get(UpdatesConstants.SCHEMA) != null) {
                      if (!newmap.get(UpdatesConstants.SCHEMA).equals(newmap.get(UpdatesConstants.SCHEMA))) {
                        oldmap=null;
                        for (int j=0; j < oldMaps.size(); j++) {
                          Map<String,Object> m=oldMaps.get(j);
                          if (newmap.get(UpdatesConstants.SCHEMA).equals(m.get(UpdatesConstants.SCHEMA))) {
                            oldmap=m;
                          }
                        }
                      }
                      if (oldmap == null) {
                        sameValues=false;
                      }
 else {
                        Object o=newmap.get(UpdatesConstants.MAPPING);
                        if (o != null) {
                          sameValues=o.equals(oldmap.get(UpdatesConstants.MAPPING));
                        }
 else {
                          sameValues=oldmap.get(UpdatesConstants.MAPPING) == null;
                        }
                      }
                    }
                    if (!sameValues) {
                      break;
                    }
                  }
                }
              }
 else               if (param.getFieldType().equals(EParameterFieldType.TABLE) && param.getName().equals("String_Node_Str")) {
                objectValue=RepositoryToComponentProperty.getValue(repositoryConnection,param.getName(),node.getMetadataList().get(0));
                if (value == null) {
                  sameValues=false;
                  break;
                }
                if (objectValue == null) {
                  sameValues=false;
                  break;
                }
                List<Map<String,Object>> oldMaps=(List<Map<String,Object>>)value;
                List repList=(List)objectValue;
                if (oldMaps.size() == repList.size()) {
                  for (                  Map<String,Object> line : oldMaps) {
                    final String sheetName="String_Node_Str";
                    Object oldValue=line.get(sheetName);
                    if (oldValue instanceof String && repList.get(0) instanceof String) {
                      boolean found=false;
                      for (                      String str : (List<String>)repList) {
                        Object repValue=TalendTextUtils.addQuotes(str);
                        if (oldValue.equals(repValue)) {
                          found=true;
                          break;
                        }
                      }
                      if (!found) {
                        sameValues=false;
                        break;
                      }
                    }
                  }
                }
 else {
                  sameValues=false;
                }
              }
            }
            if (!sameValues) {
              break;
            }
          }
          if (onlySimpleShow || !sameValues) {
            result=new UpdateCheckResult(node);
            result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.UPDATE,item,source);
          }
          for (          IElementParameter param : node.getElementParameters()) {
            String repositoryValue=param.getRepositoryValue();
            if (param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(curPropertyParam.getName())) {
              continue;
            }
            if (repositoryValue != null && (!param.getName().equals(EParameterName.PROPERTY_TYPE.getName())) && param.getFieldType() != EParameterFieldType.MEMO_SQL && !("String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(param.getRepositoryValue())) && !("String_Node_Str".equals(node.getComponent().getName()) && param.getName().equals(UpdatesConstants.MAPPING)) && !("String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(repositoryValue)) && param.isShow(node.getElementParameters())) {
              param.setRepositoryValueUsed(true);
              param.setReadOnly(true);
            }
          }
          List<UpdateResult> contextResults=checkParameterContextMode(node.getElementParameters(),(ConnectionItem)lastVersion.getProperty().getItem(),null);
          if (contextResults != null) {
            propertiesResults.addAll(contextResults);
          }
        }
 else         if (item != null && "String_Node_Str".equalsIgnoreCase(item.getFileExtension())) {
          ITDQPatternService service=null;
          if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQPatternService.class)) {
            service=(ITDQPatternService)GlobalServiceRegister.getDefault().getService(ITDQPatternService.class);
          }
          if (service != null && node.getComponent().getName().startsWith("String_Node_Str")) {
            IElementParameter nameParam=node.getElementParameter(ITDQPatternService.PATTERN_NAME);
            if (!service.isSameName(item,(String)nameParam.getValue())) {
              String newVlaue=getItemNewName(item);
              ElementParameter newValueParameter=new ElementParameter(nameParam.getElement());
              newValueParameter.setName(nameParam.getName());
              newValueParameter.setValue(newVlaue);
              createUpdateCheckResult(node,propertiesResults,newValueParameter,openedProcesses);
            }
            String regex=service.getRegex(node,item);
            IElementParameter reParam=node.getElementParameter(ITDQPatternService.PATTERN_REGEX);
            if (!StringUtils.equals(regex,(String)reParam.getValue())) {
              ElementParameter newValueParameter=new ElementParameter(reParam.getElement());
              newValueParameter.setName(reParam.getName());
              newValueParameter.setValue(regex);
              if (result != null) {
                propertiesResults.add(result);
              }
              createUpdateCheckResult(node,propertiesResults,newValueParameter,openedProcesses);
            }
          }
        }
 else         if (item != null && item instanceof RulesItem) {
        }
 else {
          result=new UpdateCheckResult(node);
          result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.BUIL_IN,repositoryPropertyParam);
        }
        if (node.getComponent().getName().startsWith("String_Node_Str")) {
          checkMultiPattern(node,propertiesResults,openedProcesses);
        }
        if (result != null) {
          if (!openedProcesses.contains(getProcess())) {
            result.setFromItem(true);
          }
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          propertiesResults.add(result);
        }
      }
    }
  }
  return propertiesResults;
}

Fixed version (ground truth):
/** 
 * nrousseau Comment method "checkNodePropertiesFromRepository".
 * @param node
 * @return true if the data have been modified
 */
@SuppressWarnings("String_Node_Str") private List<UpdateResult> checkNodePropertiesFromRepository(final Node node,boolean onlySimpleShow){
  if (node == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> propertiesResults=new ArrayList<UpdateResult>();
  for (  IElementParameter curPropertyParam : node.getElementParametersFromField(EParameterFieldType.PROPERTY_TYPE)) {
    String propertyType=(String)curPropertyParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).getValue();
    if (propertyType != null) {
      if (propertyType.equals(EmfComponent.REPOSITORY)) {
        List<IProcess2> openedProcesses=UpdateManagerUtils.getOpenedProcess();
        IElementParameter repositoryPropertyParam=curPropertyParam.getChildParameters().get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
        String propertyValue=(String)repositoryPropertyParam.getValue();
        if (node.getComponent().getName().startsWith("String_Node_Str")) {
          if (propertyValue.contains("String_Node_Str")) {
            propertyValue=propertyValue.split("String_Node_Str")[0];
          }
        }
        IRepositoryViewObject lastVersion=UpdateRepositoryUtils.getRepositoryObjectById(propertyValue);
        UpdateCheckResult result=null;
        Connection repositoryConnection=null;
        RulesItem repositoryRulesItem=null;
        LinkRulesItem repositoryLinkRulesItem=null;
        String source=null;
        Item item=null;
        if (lastVersion != null) {
          item=lastVersion.getProperty().getItem();
          if (item != null && item instanceof ConnectionItem) {
            source=UpdateRepositoryUtils.getRepositorySourceName(item);
            repositoryConnection=((ConnectionItem)item).getConnection();
          }
          if (item != null && item instanceof FileItem) {
            if (item instanceof RulesItem) {
              repositoryRulesItem=(RulesItem)item;
            }
          }
          if (item != null && item instanceof LinkRulesItem) {
            repositoryLinkRulesItem=(LinkRulesItem)item;
          }
        }
        if (repositoryConnection != null) {
          boolean sameValues=true;
          boolean isXsdPath=false;
          if (repositoryConnection instanceof XmlFileConnectionImpl) {
            String filePath=((XmlFileConnectionImpl)repositoryConnection).getXmlFilePath();
            if (filePath != null) {
              if (XmlUtil.isXSDFile(filePath)) {
                isXsdPath=true;
              }
            }
          }
          boolean needBuildIn=false;
          if (repositoryConnection instanceof SalesforceSchemaConnection && !((SalesforceSchemaConnection)repositoryConnection).isUseCustomModuleName()) {
            IElementParameter param=node.getElementParameter("String_Node_Str");
            if (param != null) {
              boolean found=false;
              SalesforceSchemaConnection salesforceConnection=(SalesforceSchemaConnection)repositoryConnection;
              List<SalesforceModuleUnit> units=salesforceConnection.getModules();
              for (              SalesforceModuleUnit unit : units) {
                if (unit.getLabel() != null && unit.getLabel().equals(param.getValue())) {
                  found=true;
                  break;
                }
              }
              if (!found) {
                result=new UpdateCheckResult(node);
                result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.BUIL_IN,repositoryPropertyParam);
                needBuildIn=true;
              }
            }
          }
          for (          IElementParameter param : node.getElementParameters()) {
            if (needBuildIn) {
              break;
            }
            if (param.getRepositoryValue() == null || param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(curPropertyParam.getName())) {
              continue;
            }
            if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {
              continue;
            }
            if (param.getFieldType() == EParameterFieldType.SCHEMA_REFERENCE) {
              continue;
            }
            String repositoryValue=getReposiotryValueForOldJDBC(node,repositoryConnection,param);
            String relatedComponent=node.getComponent().getName();
            if ((repositoryValue != null) && (param.isShow(node.getElementParameters()) || (node instanceof INode && ((INode)node).getComponent().getName().equals("String_Node_Str")) || (node instanceof INode && ((INode)node).getComponent().getName().equals("String_Node_Str")))) {
              if ((param.getFieldType().equals(EParameterFieldType.FILE) && isXsdPath) || (repositoryConnection instanceof SalesforceSchemaConnection && "String_Node_Str".equals(repositoryValue) && !((SalesforceSchemaConnection)repositoryConnection).isUseCustomModuleName())) {
                continue;
              }
              IMetadataTable table=null;
              if (!node.getMetadataList().isEmpty()) {
                table=node.getMetadataList().get(0);
              }
              Object objectValue=RepositoryToComponentProperty.getValue(repositoryConnection,repositoryValue,table,relatedComponent);
              if (objectValue == null || "String_Node_Str".equals(objectValue)) {
                if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
                  IESBService service=(IESBService)GlobalServiceRegister.getDefault().getService(IESBService.class);
                  if (service != null) {
                    Object objectValueFromESB=service.getValue(item,repositoryValue,node);
                    if (objectValueFromESB != null) {
                      objectValue=objectValueFromESB;
                    }
                  }
                }
              }
              if (param.getName().equals(EParameterName.CDC_TYPE_MODE.getName()) && item instanceof DatabaseConnectionItem) {
                if (PluginChecker.isCDCPluginLoaded()) {
                  ICDCProviderService service=(ICDCProviderService)GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
                  if (service != null) {
                    try {
                      List<IRepositoryViewObject> all;
                      all=CorePlugin.getDefault().getProxyRepositoryFactory().getAll(ERepositoryObjectType.METADATA_CONNECTIONS);
                      for (                      IRepositoryViewObject obj : all) {
                        Item tempItem=obj.getProperty().getItem();
                        if (tempItem instanceof DatabaseConnectionItem) {
                          String cdcLinkId=service.getCDCConnectionLinkId((DatabaseConnectionItem)tempItem);
                          if (cdcLinkId != null && item.getProperty().getId().equals(cdcLinkId)) {
                            objectValue=RepositoryToComponentProperty.getValue(((DatabaseConnectionItem)tempItem).getConnection(),repositoryValue,node.getMetadataList().get(0));
                            break;
                          }
                        }
                      }
                    }
 catch (                    PersistenceException e) {
                      ExceptionHandler.process(e);
                    }
                  }
                }
              }
              Object value=param.getValue();
              if (objectValue != null) {
                if ((param.getFieldType().equals(EParameterFieldType.CLOSED_LIST) && UpdatesConstants.TYPE.equals(param.getRepositoryValue()))) {
                  boolean found=false;
                  String[] list=param.getListRepositoryItems();
                  for (int i=0; (i < list.length) && (!found); i++) {
                    if (objectValue.equals(list[i])) {
                      found=true;
                    }
                  }
                  if (!found) {
                    sameValues=false;
                  }
                }
 else {
                  if (param.getFieldType().equals(EParameterFieldType.TABLE)) {
                    List<Map<String,Object>> oldList=(List<Map<String,Object>>)value;
                    String name=param.getName();
                    if ("String_Node_Str".equals(name) || "String_Node_Str".equals(name) || "String_Node_Str".equals(name) && !oldList.isEmpty() && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      if (oldList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < oldList.size(); i++) {
                          Map<String,Object> oldMap=oldList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && ((oldMap.get("String_Node_Str") == null && objectMap.get("String_Node_Str") == null) || (oldMap.get("String_Node_Str") != null && objectMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))))&& ((oldMap.get("String_Node_Str") == null && objectMap.get("String_Node_Str") == null) || (oldMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str") != null && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if (param.getName().equals("String_Node_Str") && oldList != null && objectValue instanceof List) {
                      List repList=(List)objectValue;
                      if (oldList.size() == repList.size()) {
                        for (                        Map<String,Object> line : oldList) {
                          final String sheetName="String_Node_Str";
                          Object oldValue=line.get(sheetName);
                          if (oldValue instanceof String && repList.get(0) instanceof Map) {
                            boolean found=false;
                            for (                            Map map : (List<Map>)repList) {
                              Object repValue=map.get(sheetName);
                              if (oldValue.equals(repValue)) {
                                found=true;
                                break;
                              }
                            }
                            if (!found) {
                              sameValues=false;
                              break;
                            }
                          }
                        }
                      }
 else {
                        sameValues=false;
                      }
                    }
 else                     if (("String_Node_Str".equals(param.getName()) || "String_Node_Str".equals(param.getName()) || param.getName().equals("String_Node_Str")) && oldList != null && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      List<Map<String,Object>> filterBuildInList=collectHadoopPropertiesList(oldList);
                      if (filterBuildInList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < filterBuildInList.size(); i++) {
                          Map<String,Object> oldMap=filterBuildInList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if ((param.getName().equals("String_Node_Str")) && oldList != null && objectValue instanceof List) {
                      List objectList=(List)objectValue;
                      if (oldList.size() != objectList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < oldList.size(); i++) {
                          Map<String,Object> oldMap=oldList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)objectList.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
 else                     if ((param.getName().equals("String_Node_Str") || param.getName().equals("String_Node_Str")) && oldList != null) {
                      sameValues=sameDriverForJDBC(node,repositoryConnection,oldList,objectValue);
                      if (!sameValues) {
                        break;
                      }
                    }
                  }
 else                   if (value instanceof String && objectValue instanceof String) {
                    if (!value.equals("String_Node_Str") && !value.equals(objectValue)) {
                      if (repositoryConnection instanceof XmlFileConnection) {
                        if ((((XmlFileConnection)repositoryConnection).getXmlFilePath().endsWith("String_Node_Str") || ((XmlFileConnection)repositoryConnection).getXmlFilePath().endsWith("String_Node_Str")) && repositoryValue.equals("String_Node_Str")) {
                        }
 else {
                          sameValues=false;
                        }
                      }
 else {
                        sameValues=false;
                      }
                    }
                    if (repositoryValue.equals("String_Node_Str")) {
                      IElementParameter paramEncoding=param.getChildParameters().get(EParameterName.ENCODING_TYPE.getName());
                      if (paramEncoding != null) {
                        if (repositoryConnection instanceof FTPConnection) {
                          if (((FTPConnection)repositoryConnection).getEcoding() != null) {
                            paramEncoding.setValue(((FTPConnection)repositoryConnection).getEcoding());
                          }
 else {
                            paramEncoding.setValue(EmfComponent.ENCODING_TYPE_CUSTOM);
                          }
                        }
                      }
                    }
                  }
 else                   if (value instanceof Boolean && objectValue instanceof Boolean) {
                    sameValues=((Boolean)value).equals(objectValue);
                  }
                }
              }
 else               if (param.getFieldType().equals(EParameterFieldType.TABLE) && UpdatesConstants.XML_MAPPING.equals(repositoryValue)) {
                List<Map<String,Object>> newMaps=RepositoryToComponentProperty.getXMLMappingValue(repositoryConnection,node.getMetadataList(),getColumnRenamedMap());
                if ((value instanceof List) && newMaps != null) {
                  List<Map<String,Object>> oldMaps=(List<Map<String,Object>>)value;
                  if (oldMaps.size() != newMaps.size()) {
                    sameValues=false;
                    break;
                  }
                  for (int i=0; i < newMaps.size() && sameValues; i++) {
                    Map<String,Object> newmap=newMaps.get(i);
                    Map<String,Object> oldmap=null;
                    if (i < oldMaps.size()) {
                      oldmap=oldMaps.get(i);
                    }
                    if (oldmap != null && sameValues) {
                      Object o=newmap.get(UpdatesConstants.QUERY);
                      if (o != null) {
                        sameValues=newmap.get(UpdatesConstants.QUERY).equals(oldmap.get(UpdatesConstants.QUERY));
                      }
 else {
                        sameValues=oldmap.get(UpdatesConstants.QUERY) == null;
                      }
                    }
                    if (newmap.get(UpdatesConstants.SCHEMA) != null) {
                      if (!newmap.get(UpdatesConstants.SCHEMA).equals(newmap.get(UpdatesConstants.SCHEMA))) {
                        oldmap=null;
                        for (int j=0; j < oldMaps.size(); j++) {
                          Map<String,Object> m=oldMaps.get(j);
                          if (newmap.get(UpdatesConstants.SCHEMA).equals(m.get(UpdatesConstants.SCHEMA))) {
                            oldmap=m;
                          }
                        }
                      }
                      if (oldmap == null) {
                        sameValues=false;
                      }
 else {
                        Object o=newmap.get(UpdatesConstants.MAPPING);
                        if (o != null) {
                          sameValues=o.equals(oldmap.get(UpdatesConstants.MAPPING));
                        }
 else {
                          sameValues=oldmap.get(UpdatesConstants.MAPPING) == null;
                        }
                      }
                    }
                    if (!sameValues) {
                      break;
                    }
                  }
                }
              }
 else               if (param.getFieldType().equals(EParameterFieldType.TABLE) && param.getName().equals("String_Node_Str")) {
                objectValue=RepositoryToComponentProperty.getValue(repositoryConnection,param.getName(),node.getMetadataList().get(0));
                if (value == null) {
                  sameValues=false;
                  break;
                }
                if (objectValue == null) {
                  sameValues=false;
                  break;
                }
                List<Map<String,Object>> oldMaps=(List<Map<String,Object>>)value;
                List repList=(List)objectValue;
                if (oldMaps.size() == repList.size()) {
                  for (                  Map<String,Object> line : oldMaps) {
                    final String sheetName="String_Node_Str";
                    Object oldValue=line.get(sheetName);
                    if (oldValue instanceof String && repList.get(0) instanceof String) {
                      boolean found=false;
                      for (                      String str : (List<String>)repList) {
                        Object repValue=TalendTextUtils.addQuotes(str);
                        if (oldValue.equals(repValue)) {
                          found=true;
                          break;
                        }
                      }
                      if (!found) {
                        sameValues=false;
                        break;
                      }
                    }
                  }
                }
 else {
                  sameValues=false;
                }
              }
            }
            if (!sameValues) {
              break;
            }
          }
          if (onlySimpleShow || !sameValues) {
            result=new UpdateCheckResult(node);
            result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.UPDATE,item,source);
          }
          for (          IElementParameter param : node.getElementParameters()) {
            String repositoryValue=param.getRepositoryValue();
            if (param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(curPropertyParam.getName())) {
              continue;
            }
            if (repositoryValue != null && (!param.getName().equals(EParameterName.PROPERTY_TYPE.getName())) && param.getFieldType() != EParameterFieldType.MEMO_SQL && !("String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(param.getRepositoryValue())) && !("String_Node_Str".equals(node.getComponent().getName()) && param.getName().equals(UpdatesConstants.MAPPING)) && !("String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(repositoryValue)) && param.isShow(node.getElementParameters())) {
              param.setRepositoryValueUsed(true);
              param.setReadOnly(true);
            }
          }
          List<UpdateResult> contextResults=checkParameterContextMode(node.getElementParameters(),(ConnectionItem)lastVersion.getProperty().getItem(),null);
          if (contextResults != null) {
            propertiesResults.addAll(contextResults);
          }
        }
 else         if (item != null && "String_Node_Str".equalsIgnoreCase(item.getFileExtension())) {
          ITDQPatternService service=null;
          if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQPatternService.class)) {
            service=(ITDQPatternService)GlobalServiceRegister.getDefault().getService(ITDQPatternService.class);
          }
          if (service != null && node.getComponent().getName().startsWith("String_Node_Str")) {
            IElementParameter nameParam=node.getElementParameter(ITDQPatternService.PATTERN_NAME);
            if (!service.isSameName(item,(String)nameParam.getValue())) {
              String newVlaue=getItemNewName(item);
              ElementParameter newValueParameter=new ElementParameter(nameParam.getElement());
              newValueParameter.setName(nameParam.getName());
              newValueParameter.setValue(newVlaue);
              createUpdateCheckResult(node,propertiesResults,newValueParameter,openedProcesses);
            }
            String regex=service.getRegex(node,item);
            IElementParameter reParam=node.getElementParameter(ITDQPatternService.PATTERN_REGEX);
            if (!StringUtils.equals(regex,(String)reParam.getValue())) {
              ElementParameter newValueParameter=new ElementParameter(reParam.getElement());
              newValueParameter.setName(reParam.getName());
              newValueParameter.setValue(regex);
              if (result != null) {
                propertiesResults.add(result);
              }
              createUpdateCheckResult(node,propertiesResults,newValueParameter,openedProcesses);
            }
          }
        }
 else         if (item != null && item instanceof RulesItem) {
        }
 else {
          result=new UpdateCheckResult(node);
          result.setResult(EUpdateItemType.NODE_PROPERTY,EUpdateResult.BUIL_IN,repositoryPropertyParam);
        }
        if (node.getComponent().getName().startsWith("String_Node_Str")) {
          checkMultiPattern(node,propertiesResults,openedProcesses);
        }
        if (result != null) {
          if (!openedProcesses.contains(getProcess())) {
            result.setFromItem(true);
          }
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          propertiesResults.add(result);
        }
      }
    }
  }
  return propertiesResults;
}