Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public boolean isDisplayJMeterProperties() {
return displayJMeterProperties;
}

public void setDisplayJMeterProperties(boolean displayJMeterPropterties) {
this.displayJMeterProperties = displayJMeterPropterties;
public void setDisplayJMeterProperties(boolean displayJMeterProperties) {
this.displayJMeterProperties = displayJMeterProperties;
}

public boolean isDisplaySamplerProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public boolean isDisplayJMeterProperties() {
return displayJMeterProperties;
}

public void setDisplayJMeterProperties(boolean displayJMeterPropterties) {
this.displayJMeterProperties = displayJMeterPropterties;
public void setDisplayJMeterProperties(boolean displayJMeterProperties) {
this.displayJMeterProperties = displayJMeterProperties;
}

public boolean isDisplaySystemProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.slf4j.LoggerFactory;

/**
* This class implements a constant throughput timer. A Constant Throughtput
* This class implements a constant throughput timer. A Constant Throughput
* Timer paces the samplers under its influence so that the total number of
* samples per unit of time approaches a given constant as much as possible.
*
Expand Down Expand Up @@ -98,7 +98,7 @@ public String toString() {
//For calculating throughput across all threads
private static final ThroughputInfo allThreadsInfo = new ThroughputInfo();

//For holding the ThrougputInfo objects for all ThreadGroups. Keyed by AbstractThreadGroup objects
//For holding the ThroughputInfo objects for all ThreadGroups. Keyed by AbstractThreadGroup objects
private static final ConcurrentMap<AbstractThreadGroup, ThroughputInfo> threadGroupsInfoMap =
new ConcurrentHashMap<>();

Expand Down
2 changes: 1 addition & 1 deletion src/core/src/main/java/org/apache/jmeter/JMeter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ public static void convertSubTree(HashTree tree) {
* </ul>
* THIS IS INTERNAL JMETER API and should be used with care
* @param tree The {@link HashTree} to convert
* @param cloneAtEnd boolean wether we clone the tree at end
* @param cloneAtEnd boolean whether we clone the tree at end
* @return HashTree the output {@link HashTree} to use
*/
public static HashTree convertSubTree(HashTree tree, boolean cloneAtEnd) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,17 +423,17 @@ private void moveDown() {

/**
* ensure that a row is visible in the viewport
* @param rowIndx row index
* @param rowIndex row index
*/
private void scrollToRowIfNotVisible(int rowIndx) {
private void scrollToRowIfNotVisible(int rowIndex) {
if(table.getParent() instanceof JViewport) {
Rectangle visibleRect = table.getVisibleRect();
final int cellIndex = 0;
Rectangle cellRect = table.getCellRect(rowIndx, cellIndex, false);
Rectangle cellRect = table.getCellRect(rowIndex, cellIndex, false);
if (visibleRect.y > cellRect.y) {
table.scrollRectToVisible(cellRect);
} else {
Rectangle rect2 = table.getCellRect(rowIndx + getNumberOfVisibleRows(table), cellIndex, true);
Rectangle rect2 = table.getCellRect(rowIndex + getNumberOfVisibleRows(table), cellIndex, true);
int width = rect2.y - cellRect.y;
table.scrollRectToVisible(new Rectangle(cellRect.x, cellRect.y, cellRect.width, cellRect.height + width));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Collection<String> getMenuCategories() {
}

/**
* Redefined to remove change parent and inserrt parent menu
* Redefined to remove change parent and insert parent menu
* @see org.apache.jmeter.control.gui.AbstractControllerGui#createPopupMenu()
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ default void stopTest() {
}
/**
*
* @param now boolean that tell wether stop is immediate (interrupt) or not (wait for current sample end)
* @param now boolean that tell whether stop is immediate (interrupt) or not (wait for current sample end)
*/
void stopTest(boolean now);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public static boolean insertLoadedTree(final int id, final HashTree tree, final
guiInstance.getMainFrame().getTree().setSelectionPath(
new TreePath(((JMeterTreeNode) newTree.getArray()[0]).getPath()));
final HashTree subTree = guiInstance.getCurrentSubTree();
// Send different event wether we are merging a test plan into another test plan,
// Send different event whether we are merging a test plan into another test plan,
// or loading a testplan from scratch
ActionEvent actionEvent =
new ActionEvent(subTree.get(subTree.getArray()[subTree.size() - 1]), id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class FilePanelEntry extends HorizontalPanel implements ActionListener {

private boolean onlyDirectories = false;

// Mainly needed for unit test Serialisable tests
// Mainly needed for unit test Serializable tests
public FilePanelEntry() {
this(JMeterUtils.getResString("file_visualizer_filename")); //$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ public class JLabeledRadioI18N extends JPanel implements JLabeledField, ActionLi

/**
*
* @param label_resouce text resource name for group label
* @param label_resource text resource name for group label
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java convention for naming parameters is to use camel case, so I will change it.

* @param item_resources list of resource names for individual buttons
* @param selectedItem button to be selected (if not null)
*/
public JLabeledRadioI18N(String label_resouce, String[] item_resources, String selectedItem) {
setLabel(label_resouce);
public JLabeledRadioI18N(String label_resource, String[] item_resources, String selectedItem) {
setLabel(label_resource);
init(item_resources, selectedItem);
}

Expand All @@ -80,13 +80,13 @@ public JLabeledRadioI18N() {
* The resource name is used as the action command for the button model,
* and the resource value is used to set the button label.
*
* @param resouces list of resource names
* @param resources list of resource names
* @param selected initially selected resource (if not null)
*
*/
private void init(String[] resouces, String selected) {
private void init(String[] resources, String selected) {
this.add(mLabel);
initButtonGroup(resouces, selected);
initButtonGroup(resources, selected);
}

/**
Expand All @@ -96,12 +96,12 @@ private void init(String[] resouces, String selected) {
* The resource name is used as the action command for the button model,
* and the resource value is used to set the button label.
*
* @param resouces list of resource names
* @param resources list of resource names
* @param selected initially selected resource (if not null)
*
*/
private void initButtonGroup(String[] resouces, String selected) {
for (String resource : resouces) {
private void initButtonGroup(String[] resources, String selected) {
for (String resource : resources) {
JRadioButton btn = new JRadioButton(JMeterUtils.getResString(resource));
btn.setActionCommand(resource);
btn.addActionListener(this);
Expand All @@ -123,11 +123,11 @@ private void initButtonGroup(String[] resouces, String selected) {
* The resource name is used as the action command for the button model,
* and the resource value is used to set the button label.
*
* @param resouces list of resource names
* @param resources list of resource names
* @param selected initially selected resource (if not null)
*
*/
public void resetButtons(String[] resouces, String selected) {
public void resetButtons(String[] resources, String selected) {
Enumeration<AbstractButton> buttons = bGroup.getElements();
List<AbstractButton> buttonsToRemove = new ArrayList<>(this.bGroup.getButtonCount());
while (buttons.hasMoreElements()) {
Expand All @@ -142,7 +142,7 @@ public void resetButtons(String[] resouces, String selected) {
for (AbstractButton abstractButton : buttonsToRemove) {
this.remove(abstractButton);
}
initButtonGroup(resouces, selected);
initButtonGroup(resources, selected);
}

/**
Expand All @@ -158,14 +158,14 @@ public String getText() {
* The implementation will iterate through the radio buttons and find the
* match. It then sets it to selected and sets all other radio buttons as
* not selected.
* @param resourcename name of resource whose button is to be selected
* @param resourceName name of resource whose button is to be selected
*/
@Override
public void setText(String resourcename) {
public void setText(String resourceName) {
Enumeration<AbstractButton> en = this.bGroup.getElements();
while (en.hasMoreElements()) {
ButtonModel model = en.nextElement().getModel();
if (model.getActionCommand().equals(resourcename)) {
if (model.getActionCommand().equals(resourceName)) {
this.bGroup.setSelected(model, true);
} else {
this.bGroup.setSelected(model, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1104,14 +1104,14 @@ public static String[] csvSplitString(String line, char delim)
public static void saveSampleResult(SampleEvent event, PrintWriter out) {
SampleSaveConfiguration saveConfiguration = event.getResult().getSaveConfig();
String delimiter = saveConfiguration.getDelimiter();
String savee = resultToDelimitedString(event, event.getResult(), saveConfiguration, delimiter);
out.println(savee);
String save = resultToDelimitedString(event, event.getResult(), saveConfiguration, delimiter);
out.println(save);

if(saveConfiguration.saveSubresults()) {
SampleResult result = event.getResult();
for (SampleResult subResult : result.getSubResults()) {
savee = resultToDelimitedString(event, subResult, saveConfiguration, delimiter);
out.println(savee);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if savee meant the thing that is to be saved, so I will rename the variable to formattedResult. It seems to me, that it is exactly that.

save = resultToDelimitedString(event, subResult, saveConfiguration, delimiter);
out.println(save);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/core/src/main/java/org/apache/jmeter/util/JMeterUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private LazyPatternCacheHolder() {
private static String jmDir; // JMeter Home directory (excludes trailing separator)
private static String jmBin; // JMeter bin directory (excludes trailing separator)

private static volatile boolean ignoreResorces = false; // Special flag for use in debugging resources
private static volatile boolean ignoreResources = false; // Special flag for use in debugging resources

private static final ThreadLocal<Perl5Matcher> localMatcher = ThreadLocal.withInitial(Perl5Matcher::new);

Expand Down Expand Up @@ -381,10 +381,10 @@ public static void setLocale(Locale loc) {
}
if ("ignoreResources".equals(loc.toString())){ // $NON-NLS-1$
log.warn("Resource bundles will be ignored");
ignoreResorces = true;
ignoreResources = true;
// Keep existing settings
} else {
ignoreResorces = false;
ignoreResources = false;
ResourceBundle resBund = ResourceBundle.getBundle("org.apache.jmeter.resources.messages", loc); // $NON-NLS-1$
resources = resBund;
locale = loc;
Expand Down Expand Up @@ -527,11 +527,11 @@ private static String getResStringDefault(String key, String defaultValue, Local
}
resString = defaultValue;
}
if (ignoreResorces ){ // Special mode for debugging resource handling
if (ignoreResources ){ // Special mode for debugging resource handling
return "["+key+"]";
}
} catch (MissingResourceException mre) { // NOSONAR We handle correctly exception
if (ignoreResorces ){ // Special mode for debugging resource handling
if (ignoreResources ){ // Special mode for debugging resource handling
return "[?"+key+"?]";
}
if(defaultValue == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public HashTree remove(Object key) {
}

/**
* Recurses down into the HashTree stucture using each subsequent key in the
* Recurses down into the HashTree structure using each subsequent key in the
* array of keys, and returns the Set of keys of the HashTree object at the
* end of the recursion. If the HashTree represented a file system, this
* would be like getting a list of all the files in a directory specified by
Expand All @@ -762,7 +762,7 @@ public Collection<?> list(Object[] treePath) {
}

/**
* Recurses down into the HashTree stucture using each subsequent key in the
* Recurses down into the HashTree structure using each subsequent key in the
* List of keys, and returns the Set of keys of the HashTree object at the
* end of the recursion. If the HashTree represented a file system, this
* would be like getting a list of all the files in a directory specified by
Expand Down Expand Up @@ -823,7 +823,7 @@ public Object[] getArray(Object key) {
}

/**
* Recurses down into the HashTree stucture using each subsequent key in the
* Recurses down into the HashTree structure using each subsequent key in the
* array of keys, and returns an array of keys of the HashTree object at the
* end of the recursion. If the HashTree represented a file system, this
* would be like getting a list of all the files in a directory specified by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public class Cookie extends AbstractTestElement implements Serializable {
private static final int DEFAULT_VERSION = 1;

/**
* create the coookie
* create the cookie
*/
public Cookie() {
this("","","","",false,0,false,false);
}

/**
* create the coookie
* create the cookie
* @param name name of the cookie
* @param value value of the cookie
* @param domain domain for which the cookie is valid
Expand All @@ -75,7 +75,7 @@ public Cookie(String name, String value, String domain, String path, boolean sec
}

/**
* create the coookie
* create the cookie
* @param name name of the cookie
* @param value value of the cookie
* @param domain domain for which the cookie is valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void clearGui(){
}

/**
* Redefined to remove change parent and inserrt parent menu
* Redefined to remove change parent and insert parent menu
* @see org.apache.jmeter.control.gui.AbstractControllerGui#createPopupMenu()
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private void createTestPlan(ActionEvent e, Request request, String statusText)
guiPackage.getMainFrame().getTree()
.setSelectionPath(new TreePath(((JMeterTreeNode) newTree.getArray()[0]).getPath()));
final HashTree subTree = guiPackage.getCurrentSubTree();
// Send different event wether we are merging a test plan into another test
// Send different event whether we are merging a test plan into another test
// plan,
// or loading a testplan from scratch
ActionEvent actionEvent = new ActionEvent(subTree.get(subTree.getArray()[subTree.size() - 1]), e.getID(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static String formFound() {
* @return The header in a string;
*/
public static String formMethod() {
return formError("303 Method unseported", "Method unseported");
return formError("303 Method unsupported", "Method unsupported");
}

/**
Expand All @@ -195,7 +195,7 @@ public static String formNotModified() {
* @return The header in a string;
*/
public static String formUnauthorized() {
return formError("401 Unathorized", "Unathorized use of this service");
return formError("401 Unauthorized", "Unauthorized use of this service");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ private void buildNodesModel(JMeterTreeNode node, String parentName, int level)
}

/**
* Redefined to remove change parent and inserrt parent menu
* Redefined to remove change parent and insert parent menu
* @see org.apache.jmeter.control.gui.AbstractControllerGui#createPopupMenu()
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ protected String setupHttpEntityEnclosingRequestData(HttpEntityEnclosingRequestB
Header contentTypeHeader = entityEnclosingRequest.getFirstHeader(HTTPConstants.HEADER_CONTENT_TYPE);
boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.getValue() != null && contentTypeHeader.getValue().length() > 0;
// If there are no arguments, we can send a file as the body of the request
// TODO: needs a multiple file upload scenerio
// TODO: needs a multiple file upload scenario
if(!hasArguments() && getSendFileAsPostBody()) {
// If getSendFileAsPostBody returned true, it's sure that file is not null
HTTPFileArg file = files[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public void setHeaders(URLConnection connection, HTTPSamplerBase sampler) throws
// Allow the mimetype of the file to control the content type
// This is not obvious in GUI if you are not uploading any files,
// but just sending the content of nameless parameters
// TODO: needs a multiple file upload scenerio
// TODO: needs a multiple file upload scenario
if(!hasContentTypeHeader) {
HTTPFileArg file = files.length > 0? files[0] : null;
if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private class DataSourceComponentImpl {
* @return String connection information
*/
public String getConnectionInfo() {
BasicDataSource dsc = getConfiguredDatatSource();
BasicDataSource dsc = getConfiguredDataSource();
StringBuilder builder = new StringBuilder(100);
builder.append("shared:").append(sharedDSC != null)
.append(", driver:").append(dsc.getDriverClassName())
Expand All @@ -351,7 +351,7 @@ public String getConnectionInfo() {
* @throws SQLException if database access error occurred
*/
public Connection getConnection() throws SQLException {
BasicDataSource dsc = getConfiguredDatatSource();
BasicDataSource dsc = getConfiguredDataSource();
Connection conn=dsc.getConnection();
int isolation = DataSourceElementBeanInfo.getTransactionIsolationMode(getTransactionIsolation());
if (isolation >= 0 && conn.getTransactionIsolation() != isolation) {
Expand All @@ -368,7 +368,7 @@ public Connection getConnection() throws SQLException {
return conn;
}

private BasicDataSource getConfiguredDatatSource() {
private BasicDataSource getConfiguredDataSource() {
BasicDataSource dsc;
if (sharedDSC != null){ // i.e. shared pool
dsc = sharedDSC;
Expand Down
Loading