/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**