@@ -70,10 +70,8 @@ public SummaryGenerator() {
7070 /**
7171 * Generates the summaries for the given set of classes
7272 *
73- * @param classpath
74- * The classpath from which to load the given classes
75- * @param classNames
76- * The classes for which to create summaries
73+ * @param classpath The classpath from which to load the given classes
74+ * @param classNames The classes for which to create summaries
7775 * @return The generated method summaries
7876 */
7977 public ClassSummaries createMethodSummaries (String classpath , Collection <String > classNames ) {
@@ -83,13 +81,10 @@ public ClassSummaries createMethodSummaries(String classpath, Collection<String>
8381 /**
8482 * Generates the summaries for the given set of classes
8583 *
86- * @param classpath
87- * The classpath from which to load the given classes
88- * @param classNames
89- * The classes for which to create summaries
90- * @param handler
91- * The handler that shall be invoked when all methods inside one
92- * class have been summarized
84+ * @param classpath The classpath from which to load the given classes
85+ * @param classNames The classes for which to create summaries
86+ * @param handler The handler that shall be invoked when all methods inside
87+ * one class have been summarized
9388 * @return The generated method summaries
9489 */
9590 public ClassSummaries createMethodSummaries (String classpath , Collection <String > classNames ,
@@ -201,12 +196,8 @@ public ClassSummaries createMethodSummaries(String classpath, Collection<String>
201196 curSummaries .merge (newSums );
202197 }
203198
204- System .out .println ("Class summaries for "
205- + entry .getKey ()
206- + " done in "
207- + (System .nanoTime () - nanosBeforeClass ) / 1E9
208- + " seconds for "
209- + curSummaries .getFlowCount ()
199+ System .out .println ("Class summaries for " + entry .getKey () + " done in "
200+ + (System .nanoTime () - nanosBeforeClass ) / 1E9 + " seconds for " + curSummaries .getFlowCount ()
210201 + " summaries" );
211202 }
212203
@@ -227,13 +218,11 @@ public ClassSummaries createMethodSummaries(String classpath, Collection<String>
227218 }
228219
229220 /**
230- * Checks whether the given method is to be included in the summary
231- * generation. If so, it is added to the set of classes to be analyzed
221+ * Checks whether the given method is to be included in the summary generation.
222+ * If so, it is added to the set of classes to be analyzed
232223 *
233- * @param classes
234- * The set of classes to be analyzed
235- * @param className
236- * The class to check
224+ * @param classes The set of classes to be analyzed
225+ * @param className The class to check
237226 */
238227 private void checkAndAdd (Set <String > classes , String className ) {
239228 if (config .getExcludes () != null )
@@ -250,13 +239,12 @@ private void checkAndAdd(Set<String> classes, String className) {
250239 }
251240
252241 /**
253- * Gets all classes that are sub-classes of the given class / implementors
254- * of the given interface
242+ * Gets all classes that are sub-classes of the given class / implementors of
243+ * the given interface
255244 *
256- * @param sc
257- * The class or interface of which to get the implementors
258- * @return The concrete implementors of the given interface / subclasses of
259- * the given parent class
245+ * @param sc The class or interface of which to get the implementors
246+ * @return The concrete implementors of the given interface / subclasses of the
247+ * given parent class
260248 */
261249 private Collection <? extends String > getImplementorsOf (SootClass sc ) {
262250 Set <String > classes = new HashSet <>();
@@ -284,8 +272,7 @@ private Collection<? extends String> getImplementorsOf(SootClass sc) {
284272 /**
285273 * Calculates the external dependencies of the given summary set
286274 *
287- * @param summaries
288- * The summary set for which to calculate the dependencies
275+ * @param summaries The summary set for which to calculate the dependencies
289276 */
290277 private void calculateDependencies (ClassSummaries summaries ) {
291278 for (MethodFlow flow : summaries .getAllFlows ()) {
@@ -307,8 +294,7 @@ private void calculateDependencies(ClassSummaries summaries) {
307294 /**
308295 * Gets the name of the field type from a field definition
309296 *
310- * @param apElement
311- * The field definition to parse
297+ * @param apElement The field definition to parse
312298 * @return The type name in the field definition
313299 */
314300 private String getTypeFromFieldDef (String apElement ) {
@@ -324,17 +310,15 @@ private String getTypeFromFieldDef(String apElement) {
324310 /**
325311 * Creates a method summary for the method m
326312 *
327- * It is assumed that only the default constructor of c is executed before m
328- * is called.
313+ * It is assumed that only the default constructor of c is executed before m is
314+ * called.
329315 *
330- * The result of that assumption is that some fields of c may be null. A
331- * null field is not identified as a source and there for will not create a
332- * Field -> X flow.
316+ * The result of that assumption is that some fields of c may be null. A null
317+ * field is not identified as a source and there for will not create a Field ->
318+ * X flow.
333319 *
334- * @param classpath
335- * The classpath containing the classes to summarize
336- * @param methodSig
337- * method for which a summary will be created
320+ * @param classpath The classpath containing the classes to summarize
321+ * @param methodSig method for which a summary will be created
338322 * @return summary of method m
339323 */
340324 public MethodSummaries createMethodSummary (String classpath , String methodSig ) {
@@ -344,29 +328,26 @@ public MethodSummaries createMethodSummary(String classpath, String methodSig) {
344328 /**
345329 * Creates a method summary for the method m.
346330 *
347- * It is assumed that all method in mDependencies and the default
348- * constructor of c is executed before m is executed.
331+ * It is assumed that all method in mDependencies and the default constructor of
332+ * c is executed before m is executed.
349333 *
350334 * That allows e.g. to call a setter before a getter method is analyzed and
351335 * there for the getter field is not null.
352336 *
353- * @param classpath
354- * The classpath containing the classes to summarize
355- * @param methodSig
356- * method for which a summary will be created
357- * @param parentClass
358- * The parent class on which the method to be analyzed shall be
359- * invoked
360- * @param gapManager
361- * The gap manager to be used for creating new gaps
337+ * @param classpath The classpath containing the classes to summarize
338+ * @param methodSig method for which a summary will be created
339+ * @param parentClass The parent class on which the method to be analyzed shall
340+ * be invoked
341+ * @param gapManager The gap manager to be used for creating new gaps
362342 * @return summary of method m
363343 */
364344 private MethodSummaries createMethodSummary (String classpath , final String methodSig , final String parentClass ,
365345 final GapManager gapManager ) {
366346 System .out .println ("Computing method summary for " + methodSig );
367347 long nanosBeforeMethod = System .nanoTime ();
368348
369- final SourceSinkFactory sourceSinkFactory = new SourceSinkFactory (config .getAccessPathLength ());
349+ final SourceSinkFactory sourceSinkFactory = new SourceSinkFactory (
350+ config .getAccessPathConfiguration ().getAccessPathLength ());
370351 final SummarySourceSinkManager sourceSinkManager = new SummarySourceSinkManager (methodSig , parentClass ,
371352 sourceSinkFactory );
372353 final MethodSummaries summaries = new MethodSummaries ();
@@ -407,11 +388,8 @@ public void onResultsAvailable(IInfoflowCFG cfg, InfoflowResults results) {
407388 throw e ;
408389 }
409390
410- System .out .println ("Method summary for "
411- + methodSig
412- + " done in "
413- + (System .nanoTime () - nanosBeforeMethod ) / 1E9
414- + " seconds" );
391+ System .out .println ("Method summary for " + methodSig + " done in "
392+ + (System .nanoTime () - nanosBeforeMethod ) / 1E9 + " seconds" );
415393 return summaries ;
416394 }
417395
@@ -447,13 +425,11 @@ public boolean supportsPathReconstruction() {
447425 }
448426
449427 /**
450- * Initializes the taint wrapper to be used for constructing gaps during
451- * summary generation
428+ * Initializes the taint wrapper to be used for constructing gaps during summary
429+ * generation
452430 *
453- * @param summaries
454- * The summary data object to receive the flows
455- * @param gapManager
456- * The gap manager to be used when handling callbacks
431+ * @param summaries The summary data object to receive the flows
432+ * @param gapManager The gap manager to be used when handling callbacks
457433 * @return The taint wrapper to be used during summary generation
458434 */
459435 protected SummaryGenerationTaintWrapper createTaintWrapper (MethodSummaries summaries , GapManager gapManager ) {
@@ -463,10 +439,8 @@ protected SummaryGenerationTaintWrapper createTaintWrapper(MethodSummaries summa
463439 /**
464440 * Initializes the data flow tracker
465441 *
466- * @param summaries
467- * The summary data object to receive the flows
468- * @param gapManager
469- * The gap manager to be used when handling callbacks
442+ * @param summaries The summary data object to receive the flows
443+ * @param gapManager The gap manager to be used when handling callbacks
470444 * @return The initialized data flow engine
471445 */
472446 protected Infoflow initInfoflow (MethodSummaries summaries , GapManager gapManager ) {
@@ -582,8 +556,7 @@ public SummaryGeneratorConfiguration getConfig() {
582556 /**
583557 * Sets the configuration object to be used when generating summaries
584558 *
585- * @param config
586- * The configuration object to be used when generating summaries
559+ * @param config The configuration object to be used when generating summaries
587560 */
588561 public void setConfig (SummaryGeneratorConfiguration config ) {
589562 this .config = config ;
0 commit comments