Code Duplication    Length = 5-5 lines in 2 locations

lib/Cake/Model/Datasource/DboSource.php 2 locations

@@ 1193-1197 (lines=5) @@
1190
			}
1191
			if ($type === 'hasMany' && empty($assocData['limit']) && !empty($assocData['foreignKey'])) {
1192
				$ins = $fetch = array();
1193
				foreach ($resultSet as &$result) {
1194
					if ($in = $this->insertQueryData('{$__cakeID__$}', $result, $association, $assocData, $model, $linkModel, $stack)) {
1195
						$ins[] = $in;
1196
					}
1197
				}
1198
1199
				if (!empty($ins)) {
1200
					$ins = array_unique($ins);
@@ 1228-1232 (lines=5) @@
1225
				return $this->_mergeHasMany($resultSet, $fetch, $association, $model, $linkModel);
1226
			} elseif ($type === 'hasAndBelongsToMany') {
1227
				$ins = $fetch = array();
1228
				foreach ($resultSet as &$result) {
1229
					if ($in = $this->insertQueryData('{$__cakeID__$}', $result, $association, $assocData, $model, $linkModel, $stack)) {
1230
						$ins[] = $in;
1231
					}
1232
				}
1233
				if (!empty($ins)) {
1234
					$ins = array_unique($ins);
1235
					if (count($ins) > 1) {