for ( int i = 0, length = localDeclarations.length; i < length; i++ ) {
<BUG>map.put( localDeclarations[i].getIdentifier(),
</BUG>
localDeclarations[i] );
<BUG>}
factory.setLocalDeclarationMap( map );
factory.setGlobalsMap( context.getPkg().getGlobals() );</BUG>
final Serializable expr = MVEL.compileExpression( (String) predicateDescr.getContent() );
predicate.setPredicateExpression( new MVELPredicateExpression( expr,
factory ) );

for ( int i = 0, length = localDeclarations.length; i < length; i++ ) {
localMap.put( localDeclarations[i].getIdentifier(),
localDeclarations[i] );
}
final DroolsMVELFactory factory = new DroolsMVELFactory(previousMap, localMap,  context.getPkg().getGlobals() );
final Serializable expr = MVEL.compileExpression( (String) predicateDescr.getContent() );
predicate.setPredicateExpression( new MVELPredicateExpression( expr,
factory ) );
