Program: 126408
Project: 126408
Buggy source:
@Override public void saveToEmf(EList contextTypeList){
  ContextType contextType;
  IContext context;
  EList contextTypeParamList;
  ContextParameterType contextParamType;
  IContextParameter contextParam;
  if (listContext.isEmpty()) {
    retrieveDefaultContext();
  }
  for (int i=0; i < listContext.size(); i++) {
    contextType=TalendFileFactory.eINSTANCE.createContextType();
    context=listContext.get(i);
    contextType.setName(context.getName());
    contextType.setConfirmationNeeded(context.isConfirmationNeeded());
    contextTypeParamList=contextType.getContextParameter();
    if (context.getContextParameterList() != null) {
      for (int j=0; j < context.getContextParameterList().size(); j++) {
        contextParamType=TalendFileFactory.eINSTANCE.createContextParameterType();
        contextParam=context.getContextParameterList().get(j);
        contextParamType.setName(contextParam.getName());
        contextParamType.setPrompt(contextParam.getPrompt());
        contextParamType.setType(contextParam.getType());
        if (PasswordEncryptUtil.isPasswordType(contextParamType.getType())) {
          try {
            String password=PasswordEncryptUtil.encryptPassword(contextParam.getValue());
            contextParamType.setValue(password);
          }
 catch (          Exception e) {
            ExceptionHandler.process(e);
          }
        }
 else {
          contextParamType.setValue(contextParam.getValue());
        }
        contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
        contextParamType.setComment(contextParam.getComment());
        if (!contextParam.isBuiltIn()) {
          ContextItem item=ContextUtils.getContextItemById2(contextParam.getSource());
          if (item != null) {
            contextParamType.setRepositoryContextId(item.getProperty().getId());
          }
        }
        contextTypeParamList.add(contextParamType);
      }
    }
    contextTypeList.add(contextType);
  }
}

Fixed version (ground truth):
@Override public void saveToEmf(EList contextTypeList){
  ContextType contextType;
  IContext context;
  EList contextTypeParamList;
  ContextParameterType contextParamType;
  IContextParameter contextParam;
  if (listContext.isEmpty()) {
    retrieveDefaultContext();
  }
  for (int i=0; i < listContext.size(); i++) {
    contextType=TalendFileFactory.eINSTANCE.createContextType();
    context=listContext.get(i);
    contextType.setName(context.getName());
    contextType.setConfirmationNeeded(context.isConfirmationNeeded());
    contextTypeParamList=contextType.getContextParameter();
    if (context.getContextParameterList() != null) {
      for (int j=0; j < context.getContextParameterList().size(); j++) {
        contextParamType=TalendFileFactory.eINSTANCE.createContextParameterType();
        contextParam=context.getContextParameterList().get(j);
        contextParamType.setName(contextParam.getName());
        contextParamType.setPrompt(contextParam.getPrompt());
        contextParamType.setType(contextParam.getType());
        if (PasswordEncryptUtil.isPasswordType(contextParamType.getType())) {
          try {
            String password=PasswordEncryptUtil.encryptPassword(contextParam.getValue());
            contextParamType.setValue(password);
          }
 catch (          Exception e) {
            ExceptionHandler.process(e);
          }
        }
 else {
          contextParamType.setValue(contextParam.getValue());
        }
        contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
        contextParamType.setComment(contextParam.getComment());
        if (!contextParam.isBuiltIn()) {
          Item item=ContextUtils.getContextItemById3(contextParam.getSource());
          if (item != null) {
            contextParamType.setRepositoryContextId(item.getProperty().getId());
          }
        }
        contextTypeParamList.add(contextParamType);
      }
    }
    contextTypeList.add(contextType);
  }
}