CPD Results

The following document contains the results of PMD's CPD

Duplications

FileLine
triptracker/testing/DBConversion.java130
triptracker/testing/DBConversion.java208
			}
			
			System.out.println("Updating " + coords.size() + " records...");
			
			// Run update on the queue.
			for (Coordinate coord : coords) {
				String setQuery = "UPDATE trip_coordinate2 "
					+ "SET latitude = '" + coord.getY()
					+ "', longitude = '" + coord.getX()
					+ "', newf = '1' "
					+ "WHERE cId = '" + coord.getCoordId() + "'";
				
				stmt.executeUpdate(setQuery);
			}
			
			stmt.close();
			link.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
		long curTime = System.currentTimeMillis();
		System.out.println("Duration: " + (curTime - time) + " ms");
	}

FileLine
triptracker/client/net/GPSSocket.java176
triptracker/client/net/MapSocket.java311
					routeId = Integer.parseInt(msg[i]);
					int userId = Integer.parseInt(msg[i + 1]);
					String description = msg[i + 2];
					boolean active = Utils.strToBool(msg[i + 3]);
					Date date = Utils.parseDate(msg[i + 4]);
					boolean visible = Utils.strToBool(msg[i + 5]);
					Route route = new Route(routeId, userId, description,
							active, visible, date);
					routes.add(route);
				}