test_class.file: iguana.corecontroller/src/test/java/org/aksw/iguana/cc/utils/FileUtilsTest.java
test_class.identifier: FileUtilsTest
test_case.body: @Test
      public void readLineAtTest() throws IOException {
          //get test file
          File f = new File("src/test/resources/fileUtils.txt");
          //read line at 2, 15
          assertEquals("a", FileUtils.readLineAt(0, f));
          assertEquals("abc", FileUtils.readLineAt(2, f));
          //is at actual line 16, but as all the lines between line 4-10 and 12-15 are empty this should be the 4th
          assertEquals("dfe", FileUtils.readLineAt(4, f));
          //read line at -1
          assertEquals("", FileUtils.readLineAt(-1, f));
      }
test_case.class_method_signature: FileUtilsTest.readLineAtTest()
test_case.full_signature: @Test public void readLineAtTest()
test_case.identifier: readLineAtTest
test_case.invocations: assertEquals readLineAt assertEquals readLineAt assertEquals readLineAt assertEquals readLineAt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void readLineAtTest()
focal_class.file: iguana.corecontroller/src/main/java/org/aksw/iguana/cc/utils/FileUtils.java
focal_class.identifier: FileUtils
focal_class.class_method_signature: FileUtils.countLines(File filename)
focal_class.full_signature: public static int countLines(File filename)
focal_class.identifier: countLines
focal_class.modifiers: public static
focal_class.parameters: (File filename)
focal_class.return: int
focal_class.signature: int countLines(File filename)
focal_class.class_method_signature: FileUtils.readLineAt(int pos, File filename)
focal_class.full_signature: public static String readLineAt(int pos, File filename)
focal_class.identifier: readLineAt
focal_class.modifiers: public static
focal_class.parameters: (int pos, File filename)
focal_class.return: String
focal_class.signature: String readLineAt(int pos, File filename)
focal_class.class_method_signature: FileUtils.getHashcodeFromFileContent(String filepath)
focal_class.full_signature: public static int getHashcodeFromFileContent(String filepath)
focal_class.identifier: getHashcodeFromFileContent
focal_class.modifiers: public static
focal_class.parameters: (String filepath)
focal_class.return: int
focal_class.signature: int getHashcodeFromFileContent(String filepath)
focal_class.class_method_signature: FileUtils.readFile(String path)
focal_class.full_signature: public static String readFile(String path)
focal_class.identifier: readFile
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: String
focal_class.signature: String readFile(String path)
focal_method.body: public static String readLineAt(int pos, File filename) throws IOException {
  		try (InputStream is = new BufferedInputStream(new FileInputStream(filename));){
  		StringBuilder line = new StringBuilder();
  		
  			byte[] c = new byte[1024];
  			int count = 0;
  			int readChars = 0;
  			byte lastChar = '\n';
  			while ((readChars = is.read(c)) != -1) {
  				for (int i = 0; i < readChars; ++i) {
  					if (c[i] == '\n') {
  						// Check if line was empty
  						if (lastChar != '\n') {
  							++count;
  						}
  					} else if (count == pos) {
  						// Now the line
  						line.append((char) c[i]);
  					}
  					lastChar = c[i];
  				}
  			}
  
  			return line.toString();
  		} 
  	}
focal_method.class_method_signature: FileUtils.readLineAt(int pos, File filename)
focal_method.full_signature: public static String readLineAt(int pos, File filename)
focal_method.identifier: readLineAt
focal_method.invocations: read append toString
focal_method.modifiers: public static
focal_method.parameters: (int pos, File filename)
focal_method.return: String
focal_method.signature: String readLineAt(int pos, File filename)