The link you added "How to add minutes to my Date" is in Java not google script, or Javascript. Java and javascript are two different programming languages.
This should show you how to get an existing calendar event from your calendar. It searches for events that have a keyword in your calendar but it exports the information to an active spread sheet - which isn't what you want.
Here is the key code in google apps script:
// Reference Websites:
// https://developers.google.com/apps-script/reference/calendar/calendar
// https://developers.google.com/apps-script/reference/calendar/calendar-event
//
var mycal = "user@gmail.com"; // change this email to yours
var cal = CalendarApp.getCalendarById(mycal);
// Optional variations on getEvents
// var events = cal.getEvents(new Date("January 3, 2014 00:00:00 CST"), new Date("January 14, 2014 23:59:59 CST"));
// var events = cal.getEvents(new Date("January 3, 2014 00:00:00 CST"), new Date("January 14, 2014 23:59:59 CST"), {search: 'word1'});
//
// Explanation of how the search section works (as it is NOT quite like most things Google) as part of the getEvents function:
// {search: 'word1'} Search for events with word1
// {search: '-word1'} Search for events without word1
// {search: 'word1 word2'} Search for events with word2 ONLY
// {search: 'word1-word2'} Search for events with ????
// {search: 'word1 -word2'} Search for events without word2
// {search: 'word1+word2'} Search for events with word1 AND word2
// {search: 'word1+-word2'} Search for events with word1 AND without word2
//
var events = cal.getEvents(new Date("January 12, 2014 00:00:00 CST"), new Date("January 18, 2014 23:59:59 CST"), {search: 'event name'});
To extend the end time of the event by 10 minutes you would use getStartTime, getEndTime and setTime. You can use the date field like I did below.
Like:
var newEndTime = new Date(events[eventNumber].getEndTime()+10);
var startTime = new Date(events[eventNumber].getStartTime());
events[eventNumber].setTime(startTime,newEndTime);