/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; }
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; }
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
/** * Answer the problems (errors and warnings) encountered during compilation. * * This is not a compiler internal API - it has side-effects ! * It is intended to be used only once all problems have been detected, * and makes sure the problems slot as the exact size of the number of * problems. */ public CategorizedProblem[] getProblems() { // Re-adjust the size of the problems if necessary. if (this.problems != null) { if (this.problemCount != this.problems.length) { System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){ quickPrioritize(this.problems, 0, this.problemCount - 1); this.problemCount = this.maxProblemPerUnit; System.arraycopy(this.problems, 0, (this.problems = new CategorizedProblem[this.problemCount]), 0, this.problemCount); } // Stable sort problems per source positions. Arrays.sort(this.problems, 0, this.problems.length, CompilationResult.PROBLEM_COMPARATOR); //quickSort(problems, 0, problems.length-1); } return this.problems; } /**
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }
private void quickPrioritize(CategorizedProblem[] problemList, int left, int right) { if (left >= right) return; // sort the problems by their priority... starting with the highest priority int original_left = left; int original_right = right; int mid = computePriority(problemList[left + (right - left) / 2]); do { while (computePriority(problemList[right]) < mid) right--; while (mid < computePriority(problemList[left])) left++; if (left <= right) { CategorizedProblem tmp = problemList[left]; problemList[left] = problemList[right]; problemList[right] = tmp; left++; right--; } } while (left <= right); if (original_left < right) quickPrioritize(problemList, original_left, right); if (left < original_right) quickPrioritize(problemList, left, original_right); }