Program: 124640
Project: 124640
Buggy source:
@Override protected void matchContextForAttribues(Connection conn,IConnParamName param,String noSqlVariableName){
  NoSQLConnection noSqlConn=(NoSQLConnection)conn;
  EHadoopParamName noSqlParam=(EHadoopParamName)param;
switch (noSqlParam) {
case Server:
    noSqlConn.getAttributes().put(INoSQLCommonAttributes.HOST,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
  break;
case Port:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.PORT,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Database:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.DATABASE,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Keyspace:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.DATABASE,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Databasepath:
noSqlConn.getAttributes().put(INeo4jAttributes.DATABASE_PATH,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case ServerUrl:
noSqlConn.getAttributes().put(INeo4jAttributes.SERVER_URL,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case UserName:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.USERNAME,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Password:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.PASSWORD,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
default :
}
}

Fixed version (ground truth):
@Override protected void matchContextForAttribues(Connection conn,IConnParamName param,String noSqlVariableName){
  NoSQLConnection noSqlConn=(NoSQLConnection)conn;
  EHadoopParamName noSqlParam=(EHadoopParamName)param;
switch (noSqlParam) {
case Server:
    noSqlConn.getAttributes().put(INoSQLCommonAttributes.HOST,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
  break;
case Port:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.PORT,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Database:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.DATABASE,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Keyspace:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.DATABASE,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Databasepath:
noSqlConn.getAttributes().put(INeo4jAttributes.DATABASE_PATH,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case ServerUrl:
noSqlConn.getAttributes().put(INeo4jAttributes.SERVER_URL,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case UserName:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.USERNAME,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case Password:
noSqlConn.getAttributes().put(INoSQLCommonAttributes.PASSWORD,ContextParameterUtils.getNewScriptCode(noSqlVariableName,LANGUAGE));
break;
case ReplicaSets:
String replicaSets=noSqlConn.getAttributes().get(IMongoDBAttributes.REPLICA_SET);
try {
JSONArray jsa=new JSONArray(replicaSets);
for (int i=0; i < jsa.length(); i++) {
JSONObject jso=jsa.getJSONObject(i);
int paramNum=i + 1;
String hostParamName=noSqlVariableName + ExtendedNodeConnectionContextUtils.getReplicaParamName(EHadoopParamName.ReplicaHost,paramNum);
String portParamName=noSqlVariableName + ExtendedNodeConnectionContextUtils.getReplicaParamName(EHadoopParamName.ReplicaPort,paramNum);
jso.put(IMongoConstants.REPLICA_HOST_KEY,ContextParameterUtils.getNewScriptCode(hostParamName,LANGUAGE));
jso.put(IMongoConstants.REPLICA_PORT_KEY,ContextParameterUtils.getNewScriptCode(portParamName,LANGUAGE));
}
noSqlConn.getAttributes().put(IMongoDBAttributes.REPLICA_SET,jsa.toString());
}
 catch (JSONException e) {
ExceptionHandler.process(e);
}
break;
default :
}
}