Skip to content

Commit f6be751

Browse files
committed
Clean up evaluation code.
1 parent db20775 commit f6be751

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

edu.cuny.hunter.streamrefactoring.eval/src/edu/cuny/hunter/streamrefactoring/eval/handlers/EvaluateConvertToParallelStreamRefactoringHandler.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,16 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
246246
// lines of code
247247
resultsPrinter.print(getProjectLinesOfCode(javaProject));
248248

249+
// set up analysis.
249250
TimeCollector resultsTimeCollector = new TimeCollector();
251+
boolean shouldFindImplicitEntrypoints = shouldFindImplicitEntrypoints();
252+
boolean shouldFindImplicitTestEntrypoints = shouldFindImplicitTestEntrypoints();
253+
boolean shouldFindImplicitBenchmarkEntrypoints = shouldFindImplicitBenchmarkEntrypoints();
250254

251255
resultsTimeCollector.start();
252256
processor = createConvertToParallelStreamRefactoringProcessor(new IJavaProject[] { javaProject },
253-
this.shouldFindImplicitEntrypoints(), this.shouldFindImplicitTestEntrypoints(),
254-
this.shouldFindImplicitBenchmarkEntrypoints(), Optional.of(monitor));
257+
shouldFindImplicitEntrypoints, shouldFindImplicitTestEntrypoints,
258+
shouldFindImplicitBenchmarkEntrypoints, Optional.of(monitor));
255259
resultsTimeCollector.stop();
256260
ConvertToParallelStreamRefactoringProcessor.setLoggingLevel(LOGGING_LEVEL);
257261

@@ -482,7 +486,7 @@ public void acceptSearchMatch(SearchMatch match) throws CoreException {
482486
return ret;
483487
}
484488

485-
private boolean shouldFindImplicitBenchmarkEntrypoints() {
489+
private static boolean shouldFindImplicitBenchmarkEntrypoints() {
486490
String findImplicitBenchmarkEntrypoints = System.getenv(FIND_IMPLICIT_BENCHMARK_ENTRYPOINTS_PROPERTY_KEY);
487491

488492
if (findImplicitBenchmarkEntrypoints == null)
@@ -491,7 +495,7 @@ private boolean shouldFindImplicitBenchmarkEntrypoints() {
491495
return Boolean.valueOf(findImplicitBenchmarkEntrypoints);
492496
}
493497

494-
private boolean shouldFindImplicitEntrypoints() {
498+
private static boolean shouldFindImplicitEntrypoints() {
495499
String findImplicitEntrypoits = System.getenv(FIND_IMPLICIT_ENTRYPOINTS_PROPERTY_KEY);
496500

497501
if (findImplicitEntrypoits == null)
@@ -500,7 +504,7 @@ private boolean shouldFindImplicitEntrypoints() {
500504
return Boolean.valueOf(findImplicitEntrypoits);
501505
}
502506

503-
private boolean shouldFindImplicitTestEntrypoints() {
507+
private static boolean shouldFindImplicitTestEntrypoints() {
504508
String findImplicitTestEntrypoints = System.getenv(FIND_IMPLICIT_TEST_ENTRYPOINTS_PROPERTY_KEY);
505509

506510
if (findImplicitTestEntrypoints == null)
@@ -509,7 +513,7 @@ private boolean shouldFindImplicitTestEntrypoints() {
509513
return Boolean.valueOf(findImplicitTestEntrypoints);
510514
}
511515

512-
private boolean shouldPerformChange() {
516+
private static boolean shouldPerformChange() {
513517
String performChangePropertyValue = System.getenv(PERFORM_CHANGE_PROPERTY_KEY);
514518

515519
if (performChangePropertyValue == null)

0 commit comments

Comments
 (0)