From 933c8065270edbb50f43c03d017cf3edee6710ac Mon Sep 17 00:00:00 2001 From: Zach Wassall Date: Mon, 11 Jan 2016 16:24:44 -0500 Subject: [PATCH] Issues #5, #6: Second instance of getFirstLine() -> getLastLine(). --- .../client/examples/SampleAnalyzeProjectAndCompareFiles.java | 4 ++-- .../examples/SampleAnalyzeProjectAndGetFileComparison.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndCompareFiles.java b/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndCompareFiles.java index 13a7e28..30438ab 100644 --- a/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndCompareFiles.java +++ b/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndCompareFiles.java @@ -271,7 +271,7 @@ public static void main(String[] args) throws Exception { + toComparisonComponentId(discovery.getDiscoveredComponentKey()) + ":" + discovery.getMatchingFileLocation().getFilePath()); for (RelatedSnippets similarity : similarities) { - System.out.println("\t" + similarity.getLeftSnippet().getFirstLine() + " to " + similarity.getLeftSnippet().getFirstLine() + System.out.println("\t" + similarity.getLeftSnippet().getFirstLine() + " to " + similarity.getLeftSnippet().getLastLine() + "\t" + similarity.getRightSnippet().getFirstLine() + " to " + similarity.getRightSnippet().getLastLine()); } @@ -279,7 +279,7 @@ public static void main(String[] args) throws Exception { + toComparisonComponentId(discovery.getDiscoveredComponentKey()) + ":" + discovery.getMatchingFileLocation().getFilePath()); for (RelatedSnippets difference : differences) { - System.out.println("\t" + difference.getLeftSnippet().getFirstLine() + " to " + difference.getLeftSnippet().getFirstLine() + System.out.println("\t" + difference.getLeftSnippet().getFirstLine() + " to " + difference.getLeftSnippet().getLastLine() + "\t" + difference.getRightSnippet().getFirstLine() + " to " + difference.getRightSnippet().getLastLine()); } } catch (SdkFault fault) { diff --git a/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndGetFileComparison.java b/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndGetFileComparison.java index ec8bd08..2f110df 100644 --- a/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndGetFileComparison.java +++ b/protex-sdk-examples/src/main/java/com/blackducksoftware/sdk/protex/client/examples/SampleAnalyzeProjectAndGetFileComparison.java @@ -280,14 +280,14 @@ public static void main(String[] args) throws Exception { System.out.println("Similarities between " + projectFile.getFilePath() + " and " + matchedFile.getComponentOrProjectId() + ":" + matchedFile.getFilePath()); for (RelatedSnippets similarity : similarities) { - System.out.println("\t" + similarity.getLeftSnippet().getFirstLine() + " to " + similarity.getLeftSnippet().getFirstLine() + System.out.println("\t" + similarity.getLeftSnippet().getFirstLine() + " to " + similarity.getLeftSnippet().getLastLine() + "\t" + similarity.getRightSnippet().getFirstLine() + " to " + similarity.getRightSnippet().getLastLine()); } System.out.println("Differences between " + projectFile.getFilePath() + " and " + matchedFile.getComponentOrProjectId() + ":" + matchedFile.getFilePath()); for (RelatedSnippets difference : differences) { - System.out.println("\t" + difference.getLeftSnippet().getFirstLine() + " to " + difference.getLeftSnippet().getFirstLine() + System.out.println("\t" + difference.getLeftSnippet().getFirstLine() + " to " + difference.getLeftSnippet().getLastLine() + "\t" + difference.getRightSnippet().getFirstLine() + " to " + difference.getRightSnippet().getLastLine()); } } catch (SdkFault fault) {