Bug 38481 getters/setters: insertion point incorrect
20020604 public class Ad { void f(){} int foo; int foo1; int foo2; } i seleced f() as the insert point and it added the getter after all the fields
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java
return asFirstMethod(fType);
			else if (comboBoxIndex == 1)		
				return null;
			else								
				return atMethodPosition(fType, comboBoxIndex);
		} catch (JavaModelException e) {
			return null;
		}			
	}
	
	private IMethod asFirstMethod(IType type) throws JavaModelException {
		if (type != null) {
			IMethod[] methods= type.getMethods();
			if (methods.length > 0) {
				return methods[0];		
			}
		}
		return null;
	}
	private IMethod atMethodPosition(IType type, int index) throws JavaModelException {
		if (type != null) {
			IMethod[] methods= type.getMethods();
			if ((index-1) < methods.length) {
				return methods[index-1];		
			}
		}
		return null;
	}
}