Bug 51093 [typing] Pressing enter after an opening curly brace closes the curly brace repeatedly.
Pressing enter after an opening curly brace closes the curly brace repeatedly. IF you are about to define a method and you open a curly brace, the completion closing curly brace is added automatically. If you go and press "enter" again in front of the opening curly brace , it adds another closing brace repeatedly.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
case Symbols.TokenRPAREN:
				pasted.replace(pasted.getLength(), 0, ")"); 
				break;
			case Symbols.TokenRBRACKET:
				pasted.replace(pasted.getLength(), 0, "]"); 
				break;
			}
		} catch (BadLocationException e) {
			
			Assert.isTrue(false);
		}
    	
    	int pPos= 0; 
    	int dPos= Math.max(0, command.offset - 1); 
    	while (true) {
    		int token= pScanner.nextToken(pPos, JavaHeuristicScanner.UNBOUND);
   			pPos= pScanner.getPosition();
    		switch (token) {
    			case Symbols.TokenLBRACE:
    			case Symbols.TokenLBRACKET:
    			case Symbols.TokenLPAREN:
    				pPos= skipScope(pScanner, pPos, token);
    				if (pPos == JavaHeuristicScanner.NOT_FOUND)
    					return firstPeer;
    				break; 
    			case Symbols.TokenRBRACE:
    				int peer= dScanner.findOpeningPeer(dPos, '{', '}');
    				dPos= peer - 1; 
    				if (peer == JavaHeuristicScanner.NOT_FOUND)
    					return firstPeer;