GP-2974: Fixing warnings

This commit is contained in:
Ryan Kurtz
2023-04-26 08:03:57 -04:00
parent 113156a19f
commit 7fa3389119
662 changed files with 2198 additions and 2216 deletions

View File

@@ -94,7 +94,7 @@ public class FunctionStartClassifier {
results = classifyQ.waitForResults();
}
catch (InterruptedException e) {
monitor.checkCanceled();
monitor.checkCancelled();
Msg.error(this, "Exception while classifying functions: " + e.getMessage());
}
long end = System.nanoTime();

View File

@@ -303,7 +303,7 @@ public class FunctionStartRFParams {
funcEntries = new AddressSet();
funcInteriors = new AddressSet();
while (fIter.hasNext()) {
monitor.checkCanceled();
monitor.checkCancelled();
Function func = fIter.next();
monitor.incrementProgress(1);
if (func.getBody().getNumAddresses() < minFuncSize) {

View File

@@ -52,7 +52,7 @@ public class GetAddressesToClassifyTask extends Task {
monitor.initialize(prog.getFunctionManager().getFunctionCount());
FunctionIterator fIter = prog.getFunctionManager().getFunctions(true);
while (fIter.hasNext()) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.incrementProgress(1);
Function func = fIter.next();
execNonFunc = execNonFunc.subtract(func.getBody());

View File

@@ -116,7 +116,7 @@ public class ModelTrainingUtils {
TaskMonitor monitor) throws CancelledException {
AddressSet following = new AddressSet();
for (Address addr : addresses.getAddresses(true)) {
monitor.checkCanceled();
monitor.checkCancelled();
CodeUnit cu = program.getListing().getCodeUnitAfter(addr);
if (cu == null) {
continue;
@@ -149,7 +149,7 @@ public class ModelTrainingUtils {
TaskMonitor monitor) throws CancelledException {
AddressSet preceding = new AddressSet();
for (Address addr : addresses.getAddresses(true)) {
monitor.checkCanceled();
monitor.checkCancelled();
CodeUnit cu = program.getListing().getCodeUnitBefore(addr);
if (cu == null) {
continue;
@@ -182,7 +182,7 @@ public class ModelTrainingUtils {
program.getListing().getDefinedData(program.getMemory().getExecuteSet(), true);
AddressSet definedData = new AddressSet();
for (Data d : dataIter) {
monitor.checkCanceled();
monitor.checkCancelled();
definedData.add(
new AddressRangeImpl(d.getAddress(), d.getAddress().add(d.getLength() - 1)));
}
@@ -210,7 +210,7 @@ public class ModelTrainingUtils {
monitor.initialize(source.getNumAddresses());
Iterator<Address> addressIter = source.getAddresses(true);
while (addressIter.hasNext()) {
monitor.checkCanceled();
monitor.checkCancelled();
Address addr = addressIter.next();
monitor.incrementProgress(1L);
List<Feature> trainingVector =

View File

@@ -338,7 +338,7 @@ public class RandomForestTrainingTask extends Task {
List<CARTClassificationTrainer> trainers = new ArrayList<>();
for (int i = 0; i < NUM_TREES; ++i) {
monitor.checkCanceled();
monitor.checkCancelled();
//Integer.MAX_VALUE: unlimited depth
trainers.add(new CARTClassificationTrainer(Integer.MAX_VALUE, featureFraction,
ThreadLocalRandom.current().nextLong()));
@@ -371,7 +371,7 @@ public class RandomForestTrainingTask extends Task {
new VotingCombiner());
}
catch (Exception e) {
monitor.checkCanceled();
monitor.checkCancelled();
Msg.error(this, "Exception while training model: " + e.getMessage());
}
return randomForest;
@@ -411,7 +411,7 @@ public class RandomForestTrainingTask extends Task {
RandomForestFunctionFinderPlugin.FUNC_START, errors);
}
catch (Exception e) {
monitor.checkCanceled();
monitor.checkCancelled();
Msg.error(this,
"Exception while evaluating model on known function starts: " + e.getMessage());
}
@@ -430,7 +430,7 @@ public class RandomForestTrainingTask extends Task {
RandomForestFunctionFinderPlugin.NON_START, errors);
}
catch (Exception e) {
monitor.checkCanceled();
monitor.checkCancelled();
Msg.error(this,
"Exception while evaluating model on known function interiors: " + e.getMessage());
}

View File

@@ -53,7 +53,7 @@ public class RandomSubsetUtils {
int addressesVisited = 0;
int listIndex = 0;
while (iter.hasNext() && addressesAdded < k) {
monitor.checkCanceled();
monitor.checkCancelled();
Address addr = iter.next();
if (sortedRandom.get(listIndex) == addressesVisited) {
randomAddresses.add(addr);