To propose an approach for detecting and locating six bad-smells (such as feature envy, large class, lazy class, long method, long parameter lists, and switch statement) from source code using object-oriented software metrics. The metrics are proposed to be used as indicators for determining whether a particular fraction of code contains the bad-smell or not. The approach also provides suggestion to modify the code by particular refactoring techniques, and then it is evaluated by comparing bad-smell metrics before and after applying the refactoring techniques. This research work also constructs an automated tool for detecting the bad-smell from java source code by measuring bad-smell metrics that are related to the six bad-smell. The result shows that these bad-smell metrics are enhanced after we apply the refactoring. All proposed bad-smell metrics can be used as indicators for detecting and locating bad-smells.