nus-yam/ex-repair huggingface dataset:
Program: 129335
Project: 129335
Buggy source:
public boolean retrieve(Collection<String> jarsNeeded,String pathToStore,IProgressMonitor... monitorWrap){
  if (jarsNeeded == null || jarsNeeded.size() == 0)   return false;
  boolean allIsOK=true;
  for (  String jar : jarsNeeded) {
    if (!retrieve(jar,pathToStore,monitorWrap)) {
      allIsOK=false;
    }
  }
  return allIsOK;
}

Fixed version (ground truth):
@Override public boolean retrieve(Collection<String> jarsNeeded,String pathToStore,IProgressMonitor... monitorWrap){
  if (jarsNeeded == null || jarsNeeded.size() == 0) {
    return false;
  }
  boolean allIsOK=true;
  for (  String jar : jarsNeeded) {
    if (!retrieve(jar,pathToStore,monitorWrap)) {
      allIsOK=false;
    }
  }
  return allIsOK;
}
Program: 129336
Project: 129336
Buggy source:
public void setInitialized(){
  LibrariesIndexManager.getInstance().loadResource();
  LibrariesIndexManager.getInstance().getIndex().setInitialized(true);
  LibrariesIndexManager.getInstance().saveResource();
}

Fixed version (ground truth):
@Override public void setInitialized(){
  LibrariesIndexManager.getInstance().loadResource();
  LibrariesIndexManager.getInstance().getIndex().setInitialized(true);
  LibrariesIndexManager.getInstance().saveResource();
}
Program: 129337
Project: 129337
Buggy source:
public void clearCache(){
  if (isInitialized()) {
    LibrariesIndexManager.getInstance().loadResource();
    LibrariesIndexManager.getInstance().getIndex().setInitialized(false);
    LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath().clear();
    LibrariesIndexManager.getInstance().saveResource();
  }
}

Fixed version (ground truth):
@Override public void clearCache(){
  if (isInitialized()) {
    LibrariesIndexManager.getInstance().loadResource();
    LibrariesIndexManager.getInstance().getIndex().setInitialized(false);
    LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath().clear();
    LibrariesIndexManager.getInstance().saveResource();
  }
}
Program: 129338
Project: 129338
Buggy source:
public Set<String> list(IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
 else {
    }
  }
 catch (  MalformedURLException e) {
    ExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  names.addAll(jarsToRelative.keySet());
  return names;
}

Fixed version (ground truth):
@Override public Set<String> list(IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
 else {
    }
  }
 catch (  MalformedURLException e) {
    ExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  names.addAll(jarsToRelative.keySet());
  return names;
}
Program: 129339
Project: 129339
Buggy source:
public boolean delete(String jarName){
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        if (file.getName().equals(jarName)) {
          file.delete();
          jarList.remove(jarName);
          return true;
        }
      }
    }
  }
 catch (  MalformedURLException e) {
    ExceptionHandler.process(e);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean delete(String jarName){
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        if (file.getName().equals(jarName)) {
          file.delete();
          jarList.remove(jarName);
          return true;
        }
      }
    }
  }
 catch (  MalformedURLException e) {
    ExceptionHandler.process(e);
  }
  return false;
}
Program: 129340
Project: 129340
Buggy source:
public void deploy(Collection<URI> jarFileUris,IProgressMonitor... monitorWrap){
  if (jarFileUris == null || jarFileUris.size() == 0)   return;
  for (  URI uri : jarFileUris) {
    deploy(uri,monitorWrap);
  }
}

Fixed version (ground truth):
@Override public void deploy(Collection<URI> jarFileUris,IProgressMonitor... monitorWrap){
  if (jarFileUris == null || jarFileUris.size() == 0) {
    return;
  }
  for (  URI uri : jarFileUris) {
    deploy(uri,monitorWrap);
  }
}
Program: 129341
Project: 129341
Buggy source:
/** 
 * get the correct ItemStatePath for TDQ Elements(Patterns, Indicators, Rules, etc.).
 * @param type ERepositoryObjectType of the TDQ Element
 * @param targetPath target path of the TDQ Element
 * @return
 */
private IPath getItemStatePath(ERepositoryObjectType type,IPath targetPath){
  IPath itemStatePath=targetPath;
  if (ERepositoryObjectType.TDQ_PATTERN_REGEX.equals(type) || ERepositoryObjectType.TDQ_PATTERN_SQL.equals(type) || ERepositoryObjectType.TDQ_USERDEFINE_INDICATORS.equals(type)) {
    itemStatePath=Path.fromOSString(type.getFolder()).removeFirstSegments(2).append(targetPath);
  }
  return itemStatePath;
}

Fixed version (ground truth):
/** 
 * get the correct ItemStatePath for TDQ Elements(Patterns, Indicators, Rules, etc.).
 * @param type ERepositoryObjectType of the TDQ Element
 * @param targetPath target path of the TDQ Element
 * @return
 */
private IPath getItemStatePath(ERepositoryObjectType type,IPath targetPath){
  IPath itemStatePath=targetPath;
  if (ERepositoryObjectType.TDQ_PATTERN_REGEX.equals(type) || ERepositoryObjectType.TDQ_PATTERN_SQL.equals(type) || ERepositoryObjectType.TDQ_USERDEFINE_INDICATORS.equals(type)|| ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT.equals(type)) {
    itemStatePath=Path.fromOSString(type.getFolder()).removeFirstSegments(2).append(targetPath);
  }
 else   if (targetPath.toOSString().startsWith(ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT.getFolder())) {
    itemStatePath=targetPath.removeFirstSegments(2);
  }
  return itemStatePath;
}
Program: 129343
Project: 129343
Buggy source:
public String getPurpose(){
  return this.purpose;
}

Fixed version (ground truth):
@Override public String getPurpose(){
  return this.purpose;
}
Program: 129344
Project: 129344
Buggy source:
public String getLabel(){
  return this.label;
}

Fixed version (ground truth):
@Override public String getLabel(){
  return this.label;
}
Program: 129345
Project: 129345
Buggy source:
public User getAuthor(){
  return this.author;
}

Fixed version (ground truth):
@Override public User getAuthor(){
  return this.author;
}
Program: 129346
Project: 129346
Buggy source:
public void setRepositoryNode(IRepositoryNode node){
  this.repositoryNode=node;
}

Fixed version (ground truth):
@Override public void setRepositoryNode(IRepositoryNode node){
  this.repositoryNode=node;
}
Program: 129347
Project: 129347
Buggy source:
public String getId(){
  return this.id;
}

Fixed version (ground truth):
@Override public String getId(){
  return this.id;
}
Program: 129348
Project: 129348
Buggy source:
public String getDescription(){
  return this.description;
}

Fixed version (ground truth):
@Override public String getDescription(){
  return this.description;
}
Program: 129350
Project: 129350
Buggy source:
/** 
 * Getter for projectLabel.
 * @return the projectLabel
 */
public String getProjectLabel(){
  return this.projectLabel;
}

Fixed version (ground truth):
/** 
 * Getter for projectLabel.
 * @return the projectLabel
 */
@Override public String getProjectLabel(){
  return this.projectLabel;
}
Program: 129351
Project: 129351
Buggy source:
public Date getCreationDate(){
  return this.creationDate;
}

Fixed version (ground truth):
@Override public Date getCreationDate(){
  return this.creationDate;
}
Program: 129352
Project: 129352
Buggy source:
public Date getModificationDate(){
  return this.modificationDate;
}

Fixed version (ground truth):
@Override public Date getModificationDate(){
  return this.modificationDate;
}
Program: 129353
Project: 129353
Buggy source:
public IRepositoryNode getRepositoryNode(){
  return this.repositoryNode;
}

Fixed version (ground truth):
@Override public IRepositoryNode getRepositoryNode(){
  return this.repositoryNode;
}
Program: 129354
Project: 129354
Buggy source:
public boolean isDeleted(){
  return deleted;
}

Fixed version (ground truth):
@Override public boolean isDeleted(){
  return deleted;
}
Program: 129355
Project: 129355
Buggy source:
public String getPath(){
  return path;
}

Fixed version (ground truth):
@Override public String getPath(){
  return path;
}
Program: 129356
Project: 129356
Buggy source:
public ERepositoryStatus getRepositoryStatus(){
  return repositoryStatus;
}

Fixed version (ground truth):
@Override public ERepositoryStatus getRepositoryStatus(){
  return repositoryStatus;
}
Program: 129357
Project: 129357
Buggy source:
public String getVersion(){
  return this.version;
}

Fixed version (ground truth):
@Override public String getVersion(){
  return this.version;
}
Program: 129359
Project: 129359
Buggy source:
public ERepositoryStatus getInformationStatus(){
  return informationStatus;
}

Fixed version (ground truth):
@Override public ERepositoryStatus getInformationStatus(){
  return informationStatus;
}
Program: 129360
Project: 129360
Buggy source:
public List<IRepositoryViewObject> getChildren(){
  List<IRepositoryViewObject> toReturn=new ArrayList<IRepositoryViewObject>();
  return toReturn;
}

Fixed version (ground truth):
@Override public List<IRepositoryViewObject> getChildren(){
  List<IRepositoryViewObject> toReturn=new ArrayList<IRepositoryViewObject>();
  return toReturn;
}
Program: 129361
Project: 129361
Buggy source:
public String getStatusCode(){
  return this.statusCode;
}

Fixed version (ground truth):
@Override public String getStatusCode(){
  return this.statusCode;
}
Program: 129362
Project: 129362
Buggy source:
public ERepositoryObjectType getRepositoryObjectType(){
  return type;
}

Fixed version (ground truth):
@Override public ERepositoryObjectType getRepositoryObjectType(){
  return type;
}
Program: 129363
Project: 129363
Buggy source:
/** 
 * DOC sgandon Comment method "registerMergeRefListgener".
 */
private void registerMergeRefListener(){
  if (mergeRefListener == null) {
    mergeRefListener=new IPropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent event){
        if (IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT.equals(event.getProperty())) {
          refreshTopLevelNodes();
        }
      }
    }
;
    IPreferenceStore preferenceStore=RepositoryManager.getPreferenceStore();
    preferenceStore.addPropertyChangeListener(mergeRefListener);
  }
}

Fixed version (ground truth):
/** 
 * DOC sgandon Comment method "registerMergeRefListgener".
 */
private void registerMergeRefListener(){
  if (mergeRefListener == null) {
    mergeRefListener=new IPropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent event){
        if (IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT.equals(event.getProperty())) {
          refreshTopLevelNodes();
        }
      }
    }
;
    if (CoreRuntimePlugin.getInstance().getDesignerCoreService() != null) {
      IPreferenceStore preferenceStore=RepositoryManager.getPreferenceStore();
      preferenceStore.addPropertyChangeListener(mergeRefListener);
    }
  }
}
Program: 129364
Project: 129364
Buggy source:
/** 
 * DOC sgandon Comment method "registerMergeRefListgener".
 */
private void registerMergeRefListener(){
  if (mergeRefListener == null) {
    mergeRefListener=new IPropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent event){
        if (IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT.equals(event.getProperty())) {
          refreshTopLevelNodes();
        }
      }
    }
;
    IPreferenceStore preferenceStore=RepositoryManager.getPreferenceStore();
    preferenceStore.addPropertyChangeListener(mergeRefListener);
  }
}

Fixed version (ground truth):
/** 
 * DOC sgandon Comment method "registerMergeRefListgener".
 */
private void registerMergeRefListener(){
  if (mergeRefListener == null) {
    mergeRefListener=new IPropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent event){
        if (IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT.equals(event.getProperty())) {
          refreshTopLevelNodes();
        }
      }
    }
;
    if (CoreRuntimePlugin.getInstance().getDesignerCoreService() != null) {
      IPreferenceStore preferenceStore=RepositoryManager.getPreferenceStore();
      preferenceStore.addPropertyChangeListener(mergeRefListener);
    }
  }
}
Program: 129366
Project: 129366
Buggy source:
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
    defautVal=TalendQuoteUtils.removeQuotes(defautVal);
    if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
    }
    initialValue.setBody(defautVal);
  }
 else {
    initialValue.setBody(TalendQuoteUtils.addQuotesIfNotExist(defautVal));
  }
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}
Program: 129368
Project: 129368
Buggy source:
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(QUOTATION_MARK)) {
    text=QUOTATION_MARK + text;
  }
  if (!text.endsWith(QUOTATION_MARK)) {
    text=text + QUOTATION_MARK;
  }
  return text;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text,String quote){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(quote)) {
    text=quote + text;
  }
  if (!text.endsWith(quote)) {
    text=text + quote;
  }
  return text;
}
Program: 129369
Project: 129369
Buggy source:
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
 else {
      returnValue=returnValue.replaceAll("String_Node_Str","String_Node_Str");
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}

Fixed version (ground truth):
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}
Program: 129371
Project: 129371
Buggy source:
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
    defautVal=TalendQuoteUtils.removeQuotes(defautVal);
    if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
    }
    initialValue.setBody(defautVal);
  }
 else {
    initialValue.setBody(TalendQuoteUtils.addQuotesIfNotExist(defautVal));
  }
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}
Program: 129372
Project: 129372
Buggy source:
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(QUOTATION_MARK)) {
    text=QUOTATION_MARK + text;
  }
  if (!text.endsWith(QUOTATION_MARK)) {
    text=text + QUOTATION_MARK;
  }
  return text;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text,String quote){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(quote)) {
    text=quote + text;
  }
  if (!text.endsWith(quote)) {
    text=text + quote;
  }
  return text;
}
Program: 129374
Project: 129374
Buggy source:
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
    defautVal=TalendQuoteUtils.removeQuotes(defautVal);
    if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
    }
    initialValue.setBody(defautVal);
  }
 else {
    initialValue.setBody(TalendQuoteUtils.addQuotesIfNotExist(defautVal));
  }
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}
Program: 129375
Project: 129375
Buggy source:
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
 else {
      returnValue=returnValue.replaceAll("String_Node_Str","String_Node_Str");
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}

Fixed version (ground truth):
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}
Program: 129376
Project: 129376
Buggy source:
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(QUOTATION_MARK)) {
    text=QUOTATION_MARK + text;
  }
  if (!text.endsWith(QUOTATION_MARK)) {
    text=text + QUOTATION_MARK;
  }
  return text;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "addQuotesIfNotExist".
 * @param text
 * @return
 */
public static String addQuotesIfNotExist(String text,String quote){
  if (text == null) {
    return null;
  }
  if (!text.startsWith(quote)) {
    text=quote + text;
  }
  if (!text.endsWith(quote)) {
    text=text + quote;
  }
  return text;
}
Program: 129377
Project: 129377
Buggy source:
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
 else {
      returnValue=returnValue.replaceAll("String_Node_Str","String_Node_Str");
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}

Fixed version (ground truth):
/** 
 * Adds double quotes if Talend type is Date or String.
 * @param bean
 * @param value
 * @return
 */
private void handleDefaultValue(MetadataColumn bean){
switch (LanguageManager.getCurrentLanguage()) {
case JAVA:
    String returnValue=bean.getDefaultValue();
  if (bean.getTalendType().equals(JavaTypesManager.STRING.getId()) || bean.getTalendType().equals(JavaTypesManager.DATE.getId())) {
    if (returnValue == null || returnValue.length() == 0) {
      returnValue=null;
    }
 else     if (returnValue.equalsIgnoreCase("String_Node_Str")) {
      returnValue="String_Node_Str";
    }
    bean.setDefaultValue(returnValue);
  }
 else   if (bean.getTalendType().equals(JavaTypesManager.BOOLEAN.getId())) {
    String returnBoolean=TalendQuoteUtils.removeQuotes(returnValue);
    if (returnBoolean != null && returnBoolean.length() > 0 && returnBoolean.getBytes()[0] == 1) {
      returnValue=TalendQuoteUtils.addQuotes("String_Node_Str");
      bean.setDefaultValue(returnValue);
    }
  }
default :
}
}
Program: 129378
Project: 129378
Buggy source:
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    executeCommand(this.commandToExecute);
    afterCommandExecution(this.commandToExecute);
  }
}

Fixed version (ground truth):
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    if (commandToExecute instanceof ExtendedTableCopyCommand) {
      commandToExecute.execute();
    }
 else {
      executeCommand(this.commandToExecute);
      afterCommandExecution(this.commandToExecute);
    }
  }
}
Program: 129379
Project: 129379
Buggy source:
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    executeCommand(this.commandToExecute);
    afterCommandExecution(this.commandToExecute);
  }
}

Fixed version (ground truth):
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    if (commandToExecute instanceof ExtendedTableCopyCommand) {
      commandToExecute.execute();
    }
 else {
      executeCommand(this.commandToExecute);
      afterCommandExecution(this.commandToExecute);
    }
  }
}
Program: 129380
Project: 129380
Buggy source:
public int compare(IConnection connection1,IConnection connection2){
  EConnectionType lineStyle=connection1.getLineStyle();
  EConnectionType lineStyle2=connection2.getLineStyle();
  if ("String_Node_Str".equals(connection1.getConnectorName())) {
    return -1;
  }
  if ("String_Node_Str".equals(connection2.getConnectorName())) {
    return 1;
  }
  if (lineStyle == EConnectionType.FLOW_MAIN || lineStyle == EConnectionType.FLOW_MERGE) {
    return -1;
  }
  if (lineStyle2 == EConnectionType.FLOW_MAIN || lineStyle2 == EConnectionType.FLOW_MERGE) {
    return 1;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int compare(IConnection connection1,IConnection connection2){
  EConnectionType lineStyle=connection1.getLineStyle();
  EConnectionType lineStyle2=connection2.getLineStyle();
  if ("String_Node_Str".equals(connection1.getConnectorName())) {
    return -1;
  }
  if ("String_Node_Str".equals(connection2.getConnectorName())) {
    return 1;
  }
  if (lineStyle == EConnectionType.FLOW_MAIN || lineStyle == EConnectionType.FLOW_MERGE) {
    return -1;
  }
  if (lineStyle2 == EConnectionType.FLOW_MAIN || lineStyle2 == EConnectionType.FLOW_MERGE) {
    return 1;
  }
  return 0;
}
Program: 129382
Project: 129382
Buggy source:
public static List<? extends IConnection> getOutgoingSortedConnections(INode node){
  List<IConnection> conns=null;
  List<? extends IConnection> outgoingConnections=node.getOutgoingConnections();
  if (outgoingConnections != null) {
    conns=new ArrayList<IConnection>(outgoingConnections);
    Collections.sort(conns,new Comparator<IConnection>(){
      public int compare(      IConnection connection1,      IConnection connection2){
        EConnectionType lineStyle=connection1.getLineStyle();
        EConnectionType lineStyle2=connection2.getLineStyle();
        if ("String_Node_Str".equals(connection1.getConnectorName())) {
          return -1;
        }
        if ("String_Node_Str".equals(connection2.getConnectorName())) {
          return 1;
        }
        if (lineStyle == EConnectionType.FLOW_MAIN || lineStyle == EConnectionType.FLOW_MERGE) {
          return -1;
        }
        if (lineStyle2 == EConnectionType.FLOW_MAIN || lineStyle2 == EConnectionType.FLOW_MERGE) {
          return 1;
        }
        return 0;
      }
    }
);
  }
  return conns;
}

Fixed version (ground truth):
public static List<? extends IConnection> getOutgoingSortedConnections(INode node){
  List<IConnection> conns=null;
  List<? extends IConnection> outgoingConnections=node.getOutgoingConnections();
  if (outgoingConnections != null) {
    conns=new ArrayList<IConnection>(outgoingConnections);
    Collections.sort(conns,new Comparator<IConnection>(){
      @Override public int compare(      IConnection connection1,      IConnection connection2){
        EConnectionType lineStyle=connection1.getLineStyle();
        EConnectionType lineStyle2=connection2.getLineStyle();
        if ("String_Node_Str".equals(connection1.getConnectorName())) {
          return -1;
        }
        if ("String_Node_Str".equals(connection2.getConnectorName())) {
          return 1;
        }
        if (lineStyle == EConnectionType.FLOW_MAIN || lineStyle == EConnectionType.FLOW_MERGE) {
          return -1;
        }
        if (lineStyle2 == EConnectionType.FLOW_MAIN || lineStyle2 == EConnectionType.FLOW_MERGE) {
          return 1;
        }
        return 0;
      }
    }
);
  }
  return conns;
}
Program: 129385
Project: 129385
Buggy source:
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    executeCommand(this.commandToExecute);
    afterCommandExecution(this.commandToExecute);
  }
}

Fixed version (ground truth):
/** 
 * This method is not intended to be overriden.
 * @param event
 */
protected void handleSelectionEvent(Event event){
  beforeCommandExecution();
  this.commandToExecute=getCommandToExecute();
  if (this.commandToExecute != null) {
    if (commandToExecute instanceof ExtendedTableCopyCommand) {
      commandToExecute.execute();
    }
 else {
      executeCommand(this.commandToExecute);
      afterCommandExecution(this.commandToExecute);
    }
  }
}
Program: 129387
Project: 129387
Buggy source:
protected EDatabaseTypeName getDbType(){
  return dbType;
}

Fixed version (ground truth):
public EDatabaseTypeName getDbType(){
  return dbType;
}
Program: 129389
Project: 129389
Buggy source:
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
protected List<String> getTableNamesFromTables(ResultSet resultSet,IMetadataConnection metadataConnection) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  if (resultSet != null) {
    while (resultSet.next()) {
      String nameKey=resultSet.getString(GetTable.TABLE_NAME.name());
      String colComment=getTableComment(metadataConnection,resultSet,nameKey);
      itemTablesName.add(nameKey);
      if (tableCommentsMap.containsKey(nameKey)) {
        if (colComment == null) {
          colComment="String_Node_Str";
        }
        tableCommentsMap.remove(nameKey);
        tableCommentsMap.put(nameKey,colComment);
      }
      tableCommentsMap.put(nameKey,colComment);
      if (tableTypeMap.containsKey(nameKey)) {
        tableTypeMap.remove(nameKey);
        tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
      }
 else       tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
    }
    resultSet.close();
  }
  return itemTablesName;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
protected List<String> getTableNamesFromTables(ResultSet resultSet,IMetadataConnection metadataConnection) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  if (resultSet != null) {
    while (resultSet.next()) {
      String nameKey=resultSet.getString(GetTable.TABLE_NAME.name());
      String colComment=getTableComment(metadataConnection,resultSet,nameKey);
      itemTablesName.add(nameKey);
      if (tableCommentsMap.containsKey(nameKey)) {
        if (colComment == null) {
          colComment="String_Node_Str";
        }
        tableCommentsMap.remove(nameKey);
        tableCommentsMap.put(nameKey,colComment);
      }
      tableCommentsMap.put(nameKey,colComment);
      if (tableTypeMap.containsKey(nameKey)) {
        tableTypeMap.remove(nameKey);
        tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
      }
 else {
        tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
      }
    }
    resultSet.close();
  }
  return itemTablesName;
}
Program: 129393
Project: 129393
Buggy source:
public static ExtractManager create(EDatabaseTypeName dbType){
  if (dbType == null) {
    return null;
  }
switch (dbType) {
case ACCESS:
    return new AccessExtractManager();
case AS400:
  return new AS400ExtractManager();
case GENERAL_JDBC:
return new GeneralJDBCExtractManager();
case HIVE:
return new HiveExtractManager();
case HSQLDB:
case HSQLDB_SERVER:
case HSQLDB_WEBSERVER:
case HSQLDB_IN_PROGRESS:
return new HSQLDBExtractManager(dbType);
case IBMDB2:
case IBMDB2ZOS:
return new IBMDB2ExtractManager(dbType);
case JAVADB_EMBEDED:
case JAVADB_DERBYCLIENT:
case JAVADB_JCCJDBC:
return new JAVADBExtractManager(dbType);
case MSSQL:
case MSSQL05_08:
return new MSSQLExtractManager(dbType);
case MYSQL:
return new MySQLExtractManager();
case ORACLEFORSID:
case ORACLESN:
case ORACLE_RAC:
case ORACLE_OCI:
return new OracleExtractManager(dbType);
case TERADATA:
return new TeradataExtractManager();
default :
return new ExtractManager(dbType);
}
}

Fixed version (ground truth):
public static ExtractManager create(EDatabaseTypeName dbType){
  if (dbType == null) {
    return null;
  }
switch (dbType) {
case ACCESS:
    return new AccessExtractManager();
case AS400:
  return new AS400ExtractManager();
case GENERAL_JDBC:
return new GeneralJDBCExtractManager();
case HIVE:
return new HiveExtractManager();
case HSQLDB:
case HSQLDB_SERVER:
case HSQLDB_WEBSERVER:
case HSQLDB_IN_PROGRESS:
return new HSQLDBExtractManager(dbType);
case IBMDB2:
case IBMDB2ZOS:
return new IBMDB2ExtractManager(dbType);
case JAVADB:
case JAVADB_EMBEDED:
case JAVADB_DERBYCLIENT:
case JAVADB_JCCJDBC:
return new JAVADBExtractManager(dbType);
case MSSQL:
case MSSQL05_08:
return new MSSQLExtractManager(dbType);
case MYSQL:
return new MySQLExtractManager();
case ORACLEFORSID:
case ORACLESN:
case ORACLE_RAC:
case ORACLE_OCI:
return new OracleExtractManager(dbType);
case TERADATA:
return new TeradataExtractManager();
default :
return new ExtractManager(dbType);
}
}
Program: 129395
Project: 129395
Buggy source:
/** 
 * DOC cantoine. Method to return a Collection of Column about a Table for a DB connection.
 * @param IMetadataConnection iMetadataConnection
 * @param String tableLabel
 * @return Collection of MetadataColumn Object of a Table
 * @deprecated
 */
public static synchronized List<TdColumn> returnMetadataColumnsFormTable(IMetadataConnection iMetadataConnection,String tableLabel,boolean... dontCreateClose){
  ExtractManager extractManager=ExtractManagerFactory.createByDisplayName(iMetadataConnection.getDbType());
  if (extractManager != null) {
    return extractManager.returnMetadataColumnsFormTable(iMetadataConnection,tableLabel,dontCreateClose);
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
/** 
 * DOC cantoine. Method to return a Collection of Column about a Table for a DB connection.
 * @param IMetadataConnection iMetadataConnection
 * @param String tableLabel
 * @return Collection of MetadataColumn Object of a Table
 * @deprecated
 */
public static synchronized List<TdColumn> returnMetadataColumnsFormTable(IMetadataConnection iMetadataConnection,String tableLabel,boolean... dontCreateClose){
  ExtractManager extractManager=ExtractManagerFactory.createByDisplayName(iMetadataConnection.getDbType());
  if (extractManager != null) {
    List<TdColumn> columns=extractManager.returnMetadataColumnsFormTable(iMetadataConnection,tableLabel,dontCreateClose);
    tableCommentsMap.clear();
    tableCommentsMap.putAll(extractManager.getTableCommentsMap());
    return columns;
  }
  return Collections.emptyList();
}
Program: 129396
Project: 129396
Buggy source:
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
public static List<String> getTableNamesFromQuery(ResultSet resultSet) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  Map<String,String> tableCommentsMap=new HashMap<String,String>();
  while (resultSet.next()) {
    String nameKey=resultSet.getString(1).trim();
    String tableComment=getTableComment(nameKey,resultSet,false);
    if (tableCommentsMap.containsKey(nameKey)) {
      if (tableComment == null) {
        tableComment="String_Node_Str";
      }
      tableCommentsMap.remove(nameKey);
      tableCommentsMap.put(nameKey,tableComment);
    }
    itemTablesName.add(nameKey);
    tableCommentsMap.put(nameKey,tableComment);
  }
  return itemTablesName;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
public static List<String> getTableNamesFromQuery(ResultSet resultSet) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  while (resultSet.next()) {
    String nameKey=resultSet.getString(1).trim();
    String tableComment=getTableComment(nameKey,resultSet,false);
    if (tableCommentsMap.containsKey(nameKey)) {
      if (tableComment == null) {
        tableComment="String_Node_Str";
      }
      tableCommentsMap.remove(nameKey);
      tableCommentsMap.put(nameKey,tableComment);
    }
    itemTablesName.add(nameKey);
    tableCommentsMap.put(nameKey,tableComment);
  }
  return itemTablesName;
}
Program: 129397
Project: 129397
Buggy source:
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
protected List<String> getTableNamesFromTables(ResultSet resultSet,IMetadataConnection metadataConnection) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  Map<String,String> tableCommentsMap=new HashMap<String,String>();
  if (resultSet != null) {
    while (resultSet.next()) {
      String nameKey=resultSet.getString(GetTable.TABLE_NAME.name());
      String colComment=getTableComment(metadataConnection,resultSet,nameKey);
      itemTablesName.add(nameKey);
      if (tableCommentsMap.containsKey(nameKey)) {
        if (colComment == null) {
          colComment="String_Node_Str";
        }
        tableCommentsMap.remove(nameKey);
        tableCommentsMap.put(nameKey,colComment);
      }
      tableCommentsMap.put(nameKey,colComment);
      if (tableTypeMap.containsKey(nameKey)) {
        tableTypeMap.remove(nameKey);
        tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
      }
 else       tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
    }
    resultSet.close();
  }
  return itemTablesName;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
protected List<String> getTableNamesFromTables(ResultSet resultSet,IMetadataConnection metadataConnection) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  if (resultSet != null) {
    while (resultSet.next()) {
      String nameKey=resultSet.getString(GetTable.TABLE_NAME.name());
      String colComment=getTableComment(metadataConnection,resultSet,nameKey);
      itemTablesName.add(nameKey);
      if (tableCommentsMap.containsKey(nameKey)) {
        if (colComment == null) {
          colComment="String_Node_Str";
        }
        tableCommentsMap.remove(nameKey);
        tableCommentsMap.put(nameKey,colComment);
      }
      tableCommentsMap.put(nameKey,colComment);
      if (tableTypeMap.containsKey(nameKey)) {
        tableTypeMap.remove(nameKey);
        tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
      }
 else       tableTypeMap.put(nameKey,resultSet.getString("String_Node_Str"));
    }
    resultSet.close();
  }
  return itemTablesName;
}
Program: 129400
Project: 129400
Buggy source:
/** 
 * DOC amaumont Comment method "getCommentAccessor".
 * @return
 */
protected abstract IBeanPropertyAccessors<B,Integer> getOriginalLengthAccessor();

Fixed version (ground truth):
/** 
 * DOC ldong Comment method "getCommentAccessor".
 * @return
 */
protected abstract IBeanPropertyAccessors<B,Integer> getOriginalLengthAccessor();