Program: 126471
Project: 126471
Buggy source:
private IMetadataTable getMetadataTableBySalesforceServerAPIForOauth(final String endPoint,final String consumeKey,final String consumeSecret,final String callbackHost,final String callbackPort,final String salesforceVersion,final String token,final String timeOut,final String moduleName){
  IMetadataTable metadataTable=new org.talend.core.model.metadata.MetadataTable();
  if (consumeKey == null || consumeSecret == null || consumeKey.equals("String_Node_Str") || consumeSecret.equals("String_Node_Str") || moduleName == null || moduleName.equals("String_Node_Str")) {
    return null;
  }
  org.talend.salesforce.SforceManagement sforceManagement=new org.talend.salesforce.SforceManagementImpl();
  try {
    OAuthClient client=new OAuthClient();
    client.setBaseOAuthURL(endPoint);
    client.setCallbackHost(callbackHost);
    client.setCallbackPort(Integer.parseInt(callbackPort));
    client.setClientID(consumeKey);
    client.setClientSecret(consumeSecret);
    Token tokenFile=salesforceAPI.login(endPoint,consumeKey,consumeSecret,callbackHost,callbackPort,salesforceVersion,token,timeOut);
    String url=client.getSOAPEndpoint(tokenFile,salesforceVersion);
    boolean result=sforceManagement.login(tokenFile.getAccess_token(),url,Integer.parseInt(timeOut),false);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  Field[] fields=fetchSFDescriptionField(moduleName,sforceManagement);
  List<IMetadataColumn> res=new ArrayList<IMetadataColumn>();
  for (  Field field : fields) {
    res.add(parseFieldToMetadataColumn(field));
  }
  if (res.size() == 0) {
    return null;
  }
  metadataTable.setListColumns(res);
  return metadataTable;
}

Fixed version (ground truth):
private IMetadataTable getMetadataTableBySalesforceServerAPIForOauth(final String endPoint,final String consumeKey,final String consumeSecret,final String callbackHost,final String callbackPort,final String salesforceVersion,final String token,final String timeOut,final String moduleName){
  IMetadataTable metadataTable=new org.talend.core.model.metadata.MetadataTable();
  if (consumeKey == null || consumeSecret == null || consumeKey.equals("String_Node_Str") || consumeSecret.equals("String_Node_Str") || moduleName == null || moduleName.equals("String_Node_Str")) {
    return null;
  }
  org.talend.salesforce.SforceManagement sforceManagement=null;
  try {
    OAuthClient client=new OAuthClient();
    client.setBaseOAuthURL(endPoint);
    client.setCallbackHost(callbackHost);
    client.setCallbackPort(Integer.parseInt(callbackPort));
    client.setClientID(consumeKey);
    client.setClientSecret(consumeSecret);
    Token tokenFile=salesforceAPI.login(endPoint,consumeKey,consumeSecret,callbackHost,callbackPort,salesforceVersion,token,timeOut);
    String url=OAuthClient.getSOAPEndpoint(tokenFile,salesforceVersion);
    SforceConnection sforceConn=new SforceSessionConnection.Builder(url,tokenFile.getAccess_token()).setTimeout(Integer.parseInt(timeOut)).needCompression(false).build();
    sforceManagement=new org.talend.salesforce.SforceManagementImpl(sforceConn);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  Field[] fields=fetchSFDescriptionField(moduleName,sforceManagement);
  List<IMetadataColumn> res=new ArrayList<IMetadataColumn>();
  for (  Field field : fields) {
    res.add(parseFieldToMetadataColumn(field));
  }
  if (res.size() == 0) {
    return null;
  }
  metadataTable.setListColumns(res);
  return metadataTable;
}