Skip to content

Commit

Permalink
GEODE-5118: Fix common typos in string literals and comments. (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
PivotalSarge authored Apr 25, 2018
1 parent 2cb8683 commit de8e243
Show file tree
Hide file tree
Showing 107 changed files with 414 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public final void postSetUp() throws Exception {
private void postSetUpRestAPITestBase() throws Exception {}

/**
* close the clients and teh servers
* close the clients and the servers
*/
@Override
public final void preTearDown() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static void registerRefreshNotification(NotificationListener client, Object user
timerNotificationId = refreshTimer.addNotification(type.getType(), // type
type.getMessage(), // message = "refresh"
userData, // userData
new Date(System.currentTimeMillis() + refreshInterval * 1000), // first occurence
new Date(System.currentTimeMillis() + refreshInterval * 1000), // first occurrence
refreshInterval * 1000); // period to repeat

// put an entry into the map for the listener...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static void reexecute(ExecutablePool pool, Function function,
} catch (InternalFunctionInvocationTargetException e) {
if (isDebugEnabled) {
logger.debug(
"ExecuteFunctionOp#reexecute : Recieved InternalFunctionInvocationTargetException. The failed nodes are {}",
"ExecuteFunctionOp#reexecute : Received InternalFunctionInvocationTargetException. The failed nodes are {}",
e.getFailedNodeSet());
}
reexecute = true;
Expand Down Expand Up @@ -309,7 +309,7 @@ public static void reexecute(ExecutablePool pool, String functionId,
} catch (InternalFunctionInvocationTargetException e) {
if (isDebugEnabled) {
logger.debug(
"ExecuteFunctionOp#reexecute : Recieved InternalFunctionInvocationTargetException. The failed nodes are {}",
"ExecuteFunctionOp#reexecute : Received InternalFunctionInvocationTargetException. The failed nodes are {}",
e.getFailedNodeSet());
}
reexecute = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public interface SelectResults<E> extends Collection<E> {
* <code>element</code> is not present in this collection, then 0 is returned.
*
* @param element the element
* @return the number of occurrances of element
* @return the number of occurrences of element
* @since GemFire 5.1
*/
int occurrences(E element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,18 @@ public boolean add(Object element) {
// gets an Object [] indicating field values as parameter
// from the CompiledSelect
public int addAndGetOccurence(Object element) {
int occurence;
int occurrence;
if (element == null) {
numNulls++;
occurence = numNulls;
occurrence = numNulls;
} else {
occurence = this.mapGet(element); // 0 if not
// found
this.mapPut(element, ++occurence);
occurrence = this.mapGet(element); // 0 if not
// found
this.mapPut(element, ++occurrence);
}
this.size++;
assert this.size >= 0 : this.size;
return occurence;
return occurrence;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public CompiledValue getMapLookupKey() {
}


public CompiledValue getRecieverSansIndexArgs() {
public CompiledValue getReceiverSansIndexArgs() {
return this.receiver;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,8 @@ private SelectResults applyProjectionOnCollection(SelectResults resultSet,
for (int i = 0; i < values.length; i++) {
((RuntimeIterator) iterators.get(i)).setCurrent(values[i]);
}
int occurence = applyProjectionAndAddToResultSet(context, pResultSet, ignoreOrderBy);
if (occurence == 1 || (occurence > 1 && !this.distinct)) {
int occurrence = applyProjectionAndAddToResultSet(context, pResultSet, ignoreOrderBy);
if (occurrence == 1 || (occurrence > 1 && !this.distinct)) {
// (Unique i.e first time occurrence) or subsequent occurrence
// for non distinct query
++numElementsAdded;
Expand Down Expand Up @@ -1129,22 +1129,22 @@ private ObjectType getFieldTypeOfProjAttrib(ExecutionContext context, CompiledVa
// could be a distinct subquery)
// in future, it would be good to simplify this to always work with a bag
// (converting all sets to bags) until the end when we enforce distinct
// The number returned indicates the occurence of the data in the SelectResults
// The number returned indicates the occurrence of the data in the SelectResults
// Thus if the SelectResults is of type ResultsSet or StructSet
// then 1 will indicate that data was added to the results & that was the
// first occurence. For this 0 will indicate that the data was not added
// first occurrence. For this 0 will indicate that the data was not added
// because it was a duplicate
// If the SelectResults is an instance ResultsBag or StructsBag , the number will
// indicate the occurence. Thus 1 will indicate it being added for first time
// indicate the occurrence. Thus 1 will indicate it being added for first time
// Currently orderBy is present only for StructSet & ResultSet which are
// unique object holders. So the occurence for them can be either 0 or 1 only
// unique object holders. So the occurrence for them can be either 0 or 1 only

private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectResults resultSet,
boolean ignoreOrderBy) throws FunctionDomainException, TypeMismatchException,
NameResolutionException, QueryInvocationTargetException {
List currrentRuntimeIters = context.getCurrentIterators();

int occurence = 0;
int occurrence = 0;
ObjectType elementType = resultSet.getCollectionType().getElementType();
boolean isStruct = elementType != null && elementType.isStructType();

Expand Down Expand Up @@ -1193,7 +1193,7 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
// until
// the end of evaluate call to this CompiledSelect object.
this.countStartQueryResult++;
occurence = 1;
occurrence = 1;
} else {
// if order by is present
if (applyOrderBy) {
Expand All @@ -1203,10 +1203,10 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
if (values.length == 1 && values[0] instanceof StructImpl) {
structImpl = (StructImpl) values[0];
comparator.addEvaluatedSortCriteria(structImpl.getFieldValues(), context);
occurence = resultSet.add(structImpl) ? 1 : 0;
occurrence = resultSet.add(structImpl) ? 1 : 0;
} else {
comparator.addEvaluatedSortCriteria(values, context);
occurence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
occurrence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
}
// TODO:Instead of a normal Map containing which holds
// StructImpl object
Expand All @@ -1215,22 +1215,22 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
// creating objects of type Object[]
} else {
comparator.addEvaluatedSortCriteria(values[0], context);
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
}
} else {
if (isStruct) {
if (values.length == 1 && values[0] instanceof StructImpl) {
structImpl = (StructImpl) values[0];
comparator.addEvaluatedSortCriteria(structImpl.getFieldValues(), context);
occurence = ((Bag) resultSet).addAndGetOccurence(structImpl.getFieldValues());
occurrence = ((Bag) resultSet).addAndGetOccurence(structImpl.getFieldValues());
} else {
comparator.addEvaluatedSortCriteria(values, context);
occurence = ((Bag) resultSet).addAndGetOccurence(values);
occurrence = ((Bag) resultSet).addAndGetOccurence(values);

}
} else {
comparator.addEvaluatedSortCriteria(values[0], context);
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}
}
} else {
Expand All @@ -1243,28 +1243,28 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
structImpl = new StructImpl((StructTypeImpl) elementType, values);
}
if (this.distinct) {
occurence = resultSet.add(structImpl) ? 1 : 0;
occurrence = resultSet.add(structImpl) ? 1 : 0;
} else {
occurence = ((Bag) resultSet).addAndGetOccurence(structImpl);
occurrence = ((Bag) resultSet).addAndGetOccurence(structImpl);
}
} else {
if (this.distinct) {
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
} else {
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}

}
} else {
if (this.distinct) {
if (isStruct) {
occurence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
occurrence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
} else {
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
}
} else {
if (isStruct) {
occurence = ((Bag) resultSet).addAndGetOccurence(values);
occurrence = ((Bag) resultSet).addAndGetOccurence(values);
} else {
boolean add = true;
if (context.isCqQueryContext()) {
Expand All @@ -1284,7 +1284,7 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
}
}
if (add) {
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}
}
}
Expand Down Expand Up @@ -1318,59 +1318,59 @@ private int applyProjectionAndAddToResultSet(ExecutionContext context, SelectRes
if (distinct) {
if (isStruct) {
comparator.addEvaluatedSortCriteria(values, context);
// Occurence field is used to identify the corrcet number of
// Occurrence field is used to identify the corrcet number of
// iterations
// required to implement the limit based on the presence or absence
// of distinct clause
occurence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
occurrence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
} else {
comparator.addEvaluatedSortCriteria(values[0], context);
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
}
} else {
if (isStruct) {
comparator.addEvaluatedSortCriteria(values, context);
occurence = ((Bag) resultSet).addAndGetOccurence(values);
occurrence = ((Bag) resultSet).addAndGetOccurence(values);
} else {
comparator.addEvaluatedSortCriteria(values[0], context);
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}
}
} else {
if (isLinkedStructure) {
if (isStruct) {
StructImpl structImpl = new StructImpl((StructTypeImpl) elementType, values);
if (this.distinct) {
occurence = resultSet.add(structImpl) ? 1 : 0;
occurrence = resultSet.add(structImpl) ? 1 : 0;
} else {
occurence = ((Bag) resultSet).addAndGetOccurence(structImpl);
occurrence = ((Bag) resultSet).addAndGetOccurence(structImpl);
}

} else {
if (this.distinct) {
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
} else {
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}
}
} else {
if (this.distinct) {
if (isStruct) {
occurence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
occurrence = ((StructFields) resultSet).addFieldValues(values) ? 1 : 0;
} else {
occurence = resultSet.add(values[0]) ? 1 : 0;
occurrence = resultSet.add(values[0]) ? 1 : 0;
}
} else {
if (isStruct) {
occurence = ((Bag) resultSet).addAndGetOccurence(values);
occurrence = ((Bag) resultSet).addAndGetOccurence(values);
} else {
occurence = ((Bag) resultSet).addAndGetOccurence(values[0]);
occurrence = ((Bag) resultSet).addAndGetOccurence(values[0]);
}
}
}
}
}
return occurence;
return occurrence;
}

private String generateProjectionName(CompiledValue projExpr, ExecutionContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public List getCurrentIterators() {
* Independent Iterator which is passed as a parameter to the function. For correct usage it is
* necessary that the RuntimeIterator passed is independent. If there are no dependent Iterators
* then the list will just contain one element which will be the RuntimeIterator passed as
* argument . Also the self independent Runtime Iterator present in the scope ( that is teh
* argument . Also the self independent Runtime Iterator present in the scope ( that is the
* RuntimeIterator same as the independent iterator passed as argument) is added at start of the
* list. If an iterator is dependent on more than one independent iterator, it is not added to the
* List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public interface MapIndexable {
CompiledValue getMapLookupKey();

CompiledValue getRecieverSansIndexArgs();
CompiledValue getReceiverSansIndexArgs();

List<CompiledValue> getIndexingKeys();
}
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ public MapIndexOperation(CompiledValue rcvr, List<CompiledValue> indexList) {
this.indexList = indexList;
}

public CompiledValue getRecieverSansIndexArgs() {
public CompiledValue getReceiverSansIndexArgs() {
return rcvr;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public void fromData(DataInput in) throws IOException, ClassNotFoundException {

while (numLeft > 0) {
Object key = DataSerializer.readObject(in);
int occurence = in.readInt();
this.map.put(key, occurence);
numLeft -= occurence;
int occurrence = in.readInt();
this.map.put(key, occurrence);
numLeft -= occurrence;
}
}

Expand All @@ -169,12 +169,12 @@ public void toData(DataOutput out) throws IOException {
Entry entry = itr.next();
Object key = entry.getKey();
DataSerializer.writeObject(key, out);
int occurence = entry.getValue();
if (numLeft < occurence) {
occurence = numLeft;
int occurrence = entry.getValue();
if (numLeft < occurrence) {
occurrence = numLeft;
}
out.writeInt(occurence);
numLeft -= occurence;
out.writeInt(occurrence);
numLeft -= occurrence;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void setModifiable(boolean modifiable) {

// Asif : If the underlying collection is a ordered
// one then it will allow duplicates. In such case , our
// limit iterator will correctly give the number of occurences
// limit iterator will correctly give the number of occurrences
// but if the underlying collection is not ordered , it will
// not allow duplicates, but then since we have already truncated
// the unordered set, it will work correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public int occurrences(Object element) {
count++;
encounteredObject = true;
} else if (encounteredObject) {
// Asif: No possibility of its occurence again
// Asif: No possibility of its occurrence again
break;
}
}
Expand Down Expand Up @@ -273,7 +273,7 @@ public boolean retainAll(StructFields ss) {

/**
* Return an iterator over the elements in this collection. Duplicates will show up the number of
* times it has occurrances.
* times it has occurrences.
*/
@Override
public Iterator iterator() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public int occurrences(Object element) {
count++;
encounteredObject = true;
} else if (encounteredObject) {
// Asif: No possibility of its occurence again
// Asif: No possibility of its occurrence again
break;
}
}
Expand Down Expand Up @@ -381,7 +381,7 @@ public boolean retainAll(StructFields ss) {

/**
* Return an iterator over the elements in this collection. Duplicates will show up the number of
* times it has occurrances.
* times it has occurrences.
*/
@Override
public Iterator iterator() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class CountPRQueryNode implements Aggregator {
private int count = 0;

/**
* Recieves the input of the individual counts from the bucket nodes.
* Receives the input of the individual counts from the bucket nodes.
*/
@Override
public void accumulate(Object value) {
Expand Down
Loading

0 comments on commit de8e243

Please sign in to comment.