repo
stringlengths
1
191
file
stringlengths
23
351
code
stringlengths
0
5.32M
file_length
int64
0
5.32M
avg_line_length
float64
0
2.9k
max_line_length
int64
0
288k
extension_type
stringclasses
1 value
soot
soot-master/tutorial/guide/examples/intermediate_representation/src/dk/brics/soot/intermediate/translation/StmtTranslator.java
package dk.brics.soot.intermediate.translation; import java.util.HashMap; import java.util.Map; import soot.Local; import soot.SootClass; import soot.SootMethod; import soot.Value; import soot.jimple.AbstractStmtSwitch; import soot.jimple.ArrayRef; import soot.jimple.AssignStmt; import soot.jimple.DefinitionStmt; imp...
3,881
25.053691
88
java
soot
soot-master/tutorial/guide/examples/pointsto/src/dk/brics/paddle/PointsToAnalysis.java
package dk.brics.paddle; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import soot.EntryPoints; import soot.Local; import soot.PointsToSet; import soot.Scene; import soot.SootClass; import soot.SootField; import soot.SootMethod; import soot.Value; import soot....
7,050
30.477679
103
java
soot
soot-master/tutorial/guide/examples/pointsto/test/Container.java
public class Container { private Item item;// = new Item(); void setItem(Item item) { this.item = item; } Item getItem() { return this.item; } }
159
12.333333
38
java
soot
soot-master/tutorial/guide/examples/pointsto/test/Item.java
public class Item { Object data; }
36
8.25
19
java
soot
soot-master/tutorial/guide/examples/pointsto/test/Test1.java
public class Test1 { public void go() { Container c1 = new Container(); Item i1 = new Item(); c1.setItem(i1); Container c2 = new Container(); Item i2 = new Item(); c2.setItem(i2); Container c3 = c2; } public static void main(String args[]) { new Test1().go(); } }
296
13.85
41
java
soot
soot-master/tutorial/guide/examples/pointsto/test/Test2.java
public class Test2 { public void go() { Container c1 = new Container(); Item i1 = new Item(); c1.setItem(i1); Container c2 = new Container(); Item i2 = new Item(); c2.setItem(i2); Container c3 = new Container(); Item i3; if ("1".equals(new Integer(1).toString())) i3 = i1; else i3 = i2...
414
14.961538
44
java
soot
soot-master/tutorial/guide/examples/representations/grimp/GrimpExample.java
public class GrimpExample { public static void main(String[] args) { GrimpExample f = new GrimpExample(); int a = 7; int b = 14; int x = (f.bar(21)+a)*b; } public int bar(int n) { return n+21; } }
221
17.5
42
java
soot
soot-master/tutorial/guide/examples/representations/jimple/JimpleExample.java
public class JimpleExample { public static void main(String[] args) { JimpleExample f = new JimpleExample(); f.foo(); } public void foo() { /* assume n%2 = 0 */ int n = 8; /*s*/int[] d = new /*s*/int[n]; /*s*/int[] result = new /*s*/int[n]; int i = 0; int j = 0; ...
662
17.416667
44
java
soot
soot-master/tutorial/guide/examples/representations/shimple/ShimpleExample.java
import java.util.*; public class ShimpleExample { public boolean as_long_as_it_takes = true; public int test() { int x = 100; while(as_long_as_it_takes) { if(x < 200) { x = 100; } else { x = 200; } } return x; } }
284
11.391304
44
java
soot
soot-master/tutorial/intro/Hello.java
public class Hello { public static void main(String[] args) { System.out.println("Hello world!"); } }
122
14.375
43
java
soot
soot-master/tutorial/optimizingCourse/examples/AvailableExpressions.java
/* * Created on Dec 30, 2004 */ /** * @author jlhotak */ public class AvailableExpressions { public static void main(String[] args) { int a = 0; int b = 0; int c = 0; int d = 0; int u = 0; int v = 0; int x = 0; int y = 0; u = a + b; v = c + d; while (x < 100){ x = b + c; y = c + d; } c ...
333
12.36
41
java
soot
soot-master/tutorial/optimizingCourse/examples/CommonSubExp.java
/* * Created on Dec 21, 2004 * */ /** * @author jlhotak */ public class CommonSubExp { public static void main(String[] args) { int x = 3; int y = 9; int b = 9; int c = 4; if (x < y){ x = b + c; } else { y = b + c; } int z = b + c; } }
280
8.689655
41
java
soot
soot-master/tutorial/optimizingCourse/examples/DominatorExample.java
public class DominatorExample { public static void main (String [] args){ int x = 9; for (int i = 9; i < 10; i++){ x++; } for (;;){ if (x < 4) break; x--; } do { x += 2; }while(x < 15); ...
764
16.386364
45
java
soot
soot-master/tutorial/optimizingCourse/examples/GrimpExample.java
/* * Created on Dec 28, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /** * @author jlhotak * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ ...
486
19.291667
68
java
soot
soot-master/tutorial/optimizingCourse/examples/JimpleExample.java
/* * Created on Dec 28, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /** * @author jlhotak * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ ...
487
19.333333
68
java
soot
soot-master/tutorial/optimizingCourse/examples/LiveInteractive.java
/** * @author jlhotak * */ public class LiveInteractive { public void run (){ int x = 4; int z = x + 3; int i = 0; do { z = x * i; x = x - 1; i = i + 2; }while (i <20); int y = 9; z = y + 9; System.out.println(z); } }
257
10.217391
30
java
soot
soot-master/tutorial/optimizingCourse/examples/Liveness.java
/** * @author jlhotak * */ public class Liveness { public void run (){ int x = 4; int z = x + 3; for (int i = 0; i < 10; i++){ z = x * i; } int y = 9; z = y + 9; System.out.println(z); } }
214
10.944444
31
java
soot
soot-master/tutorial/optimizingCourse/examples/LoopInvariant.java
/* * Created on Dec 27, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /** * @author jlhotak * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ ...
589
16.878788
68
java
soot
soot-master/tutorial/optimizingCourse/examples/ReachingDefs.java
public class ReachingDefs { public static void main (String [] args) { ReachingDefs rdt1 = new ReachingDefs(); rdt1.m(8); rdt1.n(); } public void m(int i){ int x = 4; int y = 3; if (i < 10) { x = 5; } else { x = 7; ...
520
16.965517
47
java
soot
soot-master/tutorial/pldi03/examples/LiveVariablesAnalysis.java
package olhotak.liveness; import soot.*; import soot.util.*; import java.util.*; import soot.jimple.*; import soot.toolkits.graph.*; import soot.toolkits.scalar.*; class LiveVariablesAnalysis extends BackwardFlowAnalysis { protected void copy(Object src, Object dest) { FlowSet srcSet = (FlowSet) src;...
1,773
23.30137
63
java
soot
soot-master/tutorial/pldi03/examples/Main.java
class Main { public static void main(String[] args) { soot.G.v().PackManager().getPack("tag").add(new soot.Transform("tag.null", new NullTagAggregator())); soot.Main.main(args); } }
191
26.428571
105
java
soot
soot-master/tutorial/pldi03/examples/NullExample.java
public class NullExample { int foo(Object o, String p) { if (o == null) { return 2; } int i = 2; i += p.length(); System.out.println(p); return 4; } }
231
14.466667
31
java
soot
soot-master/tutorial/pldi03/examples/NullTagAggregator.java
import soot.*; import java.util.*; import soot.baf.*; import soot.tagkit.*; import soot.jimple.toolkits.annotation.tags.NullCheckTag; /** The aggregator for NullCheckAttribute. */ public class NullTagAggregator extends ImportantTagAggregator { public NullTagAggregator() {} public boolean wantTag( Tag t ...
467
14.096774
61
java
soot
soot-master/tutorial/pldi03/examples/NullnessAnalysis.java
import soot.*; import soot.jimple.*; import soot.toolkits.scalar.*; import soot.toolkits.graph.*; import soot.util.*; import java.util.*; /** Tracks which locals are definitely non-null. * Author: Patrick Lam (plam@sable.mcgill.ca) * Based on BranchedRefVarsAnalysis by Janus Godard (janus@place.org). */ class Nulln...
7,640
29.442231
85
java
soot
soot-master/tutorial/pldi03/examples/NullnessAnalysisColorer.java
/* Soot - a J*va Optimization Framework * Copyright (C) 2003 Jennifer Lhotak * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your optio...
2,300
35.52381
78
java
soot
soot-master/tutorial/pldi03/examples/NullnessDriver.java
import soot.Body; import soot.Main; import soot.Pack; import soot.PackManager; import soot.Transform; import soot.Unit; import soot.tagkit.StringTag; import soot.toolkits.scalar.ArraySparseSet; import soot.toolkits.graph.BriefUnitGraph; public class NullnessDriver { public static void main(String[] argv) { ...
1,533
27.407407
75
java
soot
soot-master/tutorial/pldi03/examples/foo.java
class foo { public void sum(int[] a) { int total = 0; int i=0; int b = a[0]; for (i=0; i<a.length; i++) { total += a[i]; } int c = a[i]; } }
155
11
29
java
soot
soot-master/tutorial/profiler/Main.java
/* Soot - a J*va Optimization Framework * Copyright (C) 1997-1999 Raja Vallee-Rai * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your ...
7,884
38.034653
118
java
soot
soot-master/tutorial/profiler2/InvokeStaticInstrumenter.java
/* * InvokeStaticInstrumenter inserts count instructions before * INVOKESTATIC bytecode in a program. The instrumented program will * report how many static invocations happen in a run. * * Goal: * Insert counter instruction before static invocation instruction. * Report counters before program's normal exi...
4,221
31.984375
83
java
soot
soot-master/tutorial/profiler2/MainDriver.java
/* Usage: java MainDriver appClass */ /* import necessary soot packages */ import soot.*; public class MainDriver { public static void main(String[] args) { /* check the arguments */ if (args.length == 0) { System.err.println("Usage: java MainDriver [options] classname"); System.exit(0); }...
681
22.517241
71
java
soot
soot-master/tutorial/profiler2/MyCounter.java
/* The counter class */ public class MyCounter { /* the counter, initialize to zero */ private static int c = 0; /** * increases the counter by <pre>howmany</pre> * @param howmany, the increment of the counter. */ public static synchronized void increase(int howmany) { c += howmany; } /**...
454
18.782609
57
java
soot
soot-master/tutorial/profiler2/TestInvoke.java
class TestInvoke { private static int calls=0; public static void main(String[] args) { for (int i=0; i<10; i++) { foo(); } System.out.println("I made "+calls+" static calls"); } private static void foo(){ calls++; bar(); } private static void bar(){ calls++; } }
295
13.095238
53
java
soot
soot-master/tutorial/tagclass/Main.java
/* Soot - a J*va Optimization Framework * Copyright (C) 1997-1999 Raja Vallee-Rai * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your ...
6,551
33.851064
144
java
null
jabref-main/buildSrc/src/main/java/module-info.java
open module org.jabref { requires javafx.base; }
53
12.5
25
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/Abbreviation.java
package org.jabref.logic.journals; import java.io.Serializable; import java.util.Objects; public class Abbreviation implements Comparable<Abbreviation>, Serializable { private static final long serialVersionUID = 1; private transient String name; private final String abbreviation; private transient ...
3,961
33.754386
180
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/AbbreviationFormat.java
package org.jabref.logic.journals; import org.apache.commons.csv.CSVFormat; public final class AbbreviationFormat { public static final char DELIMITER = ';'; public static final char ESCAPE = '\\'; public static final char QUOTE = '"'; private AbbreviationFormat() { } public static CSVForma...
599
24
45
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/AbbreviationParser.java
package org.jabref.logic.journals; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import jav...
2,919
36.922078
117
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/AbbreviationWriter.java
package org.jabref.logic.journals; import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import org.apache.commons.csv.CSVPrinter; /** * This class provides handy static methods to save a...
1,560
38.025
124
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java
package org.jabref.logic.journals; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collection; import java.util.Collections; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * <p> * This class loads abbreviations from a CSV fi...
2,639
38.402985
138
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/JournalAbbreviationPreferences.java
package org.jabref.logic.journals; import java.util.List; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; public class JournalAbbreviationPreferences { private final ObservableLis...
1,297
29.904762
92
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java
package org.jabref.logic.journals; import java.nio.file.Path; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.TreeSet; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.h2....
7,212
44.08125
162
java
null
jabref-main/buildSrc/src/main/java/org/jabref/logic/journals/package-info.java
/** * This code is copied from src/main/java/org/jabref/logic/journals */ package org.jabref.logic.journals;
111
21.4
67
java
null
jabref-main/src/jmh/java/org/jabref/benchmarks/Benchmarks.java
package org.jabref.benchmarks; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.EnumSet; import java.util.List; import java.util.Random; import java.util.stream.Collectors; import org.jabref.gui.Globals; import org.jabref.logic.bibtex.FieldPreferences; import org....
5,882
37.960265
153
java
null
jabref-main/src/main/java/module-info.java
open module org.jabref { // Swing requires java.desktop; // SQL requires java.sql; requires java.sql.rowset; // JavaFX requires javafx.base; requires javafx.graphics; requires javafx.controls; requires javafx.web; requires javafx.fxml; requires afterburner.fx; requi...
3,780
28.771654
111
java
null
jabref-main/src/main/java/org/jabref/architecture/AllowedToUseAwt.java
package org.jabref.architecture; /** * Annotation to indicate that this logic class can access AWT */ public @interface AllowedToUseAwt { // The rationale String value(); }
185
15.909091
62
java
null
jabref-main/src/main/java/org/jabref/architecture/AllowedToUseLogic.java
package org.jabref.architecture; /** * Annotation to indicate that this logic class can be used in the model package. */ public @interface AllowedToUseLogic { // The rationale String value(); }
206
17.818182
81
java
null
jabref-main/src/main/java/org/jabref/architecture/AllowedToUseStandardStreams.java
package org.jabref.architecture; /** * Annotation to indicate that this class can use System.Out.* instead of using the logging framework */ public @interface AllowedToUseStandardStreams { // The rationale String value(); }
236
20.545455
101
java
null
jabref-main/src/main/java/org/jabref/architecture/AllowedToUseSwing.java
package org.jabref.architecture; /** * Annotation to indicate that this logic class can access swing */ public @interface AllowedToUseSwing { // The rationale String value(); }
189
16.272727
64
java
null
jabref-main/src/main/java/org/jabref/architecture/ApacheCommonsLang3Allowed.java
package org.jabref.architecture; /** * Annotation to indicate that usage of ApacheCommonsLang3 is explicitly allowed. * The intention is to fully switch to Google Guava and only use Apache Commons Lang3 if there is no other possibility */ public @interface ApacheCommonsLang3Allowed { // The rationale Strin...
333
26.833333
118
java
null
jabref-main/src/main/java/org/jabref/cli/ArgumentProcessor.java
package org.jabref.cli; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.Optional; import java.util.Set; import java.uti...
35,760
43.925879
192
java
null
jabref-main/src/main/java/org/jabref/cli/AuxCommandLine.java
package org.jabref.cli; import java.nio.file.Path; import org.jabref.gui.auximport.AuxParserResultViewModel; import org.jabref.logic.auxparser.AuxParser; import org.jabref.logic.auxparser.AuxParserResult; import org.jabref.logic.auxparser.DefaultAuxParser; import org.jabref.model.database.BibDatabase; import org.jabr...
1,131
32.294118
90
java
null
jabref-main/src/main/java/org/jabref/cli/JabRefCLI.java
package org.jabref.cli; import java.util.List; import java.util.Objects; import javafx.util.Pair; import org.jabref.gui.Globals; import org.jabref.logic.exporter.ExporterFactory; import org.jabref.logic.importer.ImportFormatReader; import org.jabref.logic.l10n.Localization; import org.jabref.logic.util.OS; import or...
13,472
34.548813
149
java
null
jabref-main/src/main/java/org/jabref/cli/Launcher.java
package org.jabref.cli; import java.io.File; import java.io.IOException; import java.net.Authenticator; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.Comparator; import java.util.Map; import org.jabref.gui.Globals; import org.jabref.gui.MainApplication; ...
7,712
40.026596
147
java
null
jabref-main/src/main/java/org/jabref/cli/SystemOutputPrinter.java
package org.jabref.cli; import org.jabref.logic.importer.OutputPrinter; public class SystemOutputPrinter implements OutputPrinter { @Override public void setStatus(String s) { System.out.println(s); } @Override public void showMessage(String message, String title, int msgType) { ...
476
20.681818
72
java
null
jabref-main/src/main/java/org/jabref/gui/AbstractViewModel.java
package org.jabref.gui; public class AbstractViewModel { // empty }
73
11.333333
32
java
null
jabref-main/src/main/java/org/jabref/gui/BasePanelMode.java
package org.jabref.gui; /** * Defines the different modes that the BasePanel can operate in */ public enum BasePanelMode { SHOWING_NOTHING, SHOWING_EDITOR, WILL_SHOW_EDITOR }
191
15
64
java
null
jabref-main/src/main/java/org/jabref/gui/ClipBoardManager.java
package org.jabref.gui; import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.io.IOException; import java.util.List; import javafx.application.Platf...
6,324
39.544872
158
java
null
jabref-main/src/main/java/org/jabref/gui/DefaultInjector.java
package org.jabref.gui; import java.util.function.Function; import javax.swing.undo.UndoManager; import org.jabref.gui.keyboard.KeyBindingRepository; import org.jabref.gui.theme.ThemeManager; import org.jabref.gui.util.TaskExecutor; import org.jabref.logic.journals.JournalAbbreviationRepository; import org.jabref.lo...
3,360
38.541176
98
java
null
jabref-main/src/main/java/org/jabref/gui/Dialog.java
package org.jabref.gui; import java.util.Optional; public interface Dialog<R> { Optional<R> showAndWait(); }
115
13.5
30
java
null
jabref-main/src/main/java/org/jabref/gui/DialogService.java
package org.jabref.gui; import java.io.IOException; import java.nio.file.Path; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.function.Consumer; import javafx.concurrent.Task; import javafx.print.PrinterJob; import javafx.scene.control.Alert; import javafx.scene.contro...
13,166
43.938567
182
java
null
jabref-main/src/main/java/org/jabref/gui/DragAndDropDataFormats.java
package org.jabref.gui; import java.util.List; import javafx.scene.input.DataFormat; import org.jabref.logic.preview.PreviewLayout; /** * Contains all the different {@link DataFormat}s that may occur in JabRef. */ public class DragAndDropDataFormats { public static final DataFormat FIELD = new DataFormat("dn...
956
44.571429
160
java
null
jabref-main/src/main/java/org/jabref/gui/DragAndDropHelper.java
package org.jabref.gui; import java.io.File; import java.nio.file.Path; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import javafx.scene.input.Dragboard; import org.jabref.logic.util.io.FileUtil; public class DragAndDropHelper { public static boolean hasBibFiles(Drag...
1,110
27.487179
124
java
null
jabref-main/src/main/java/org/jabref/gui/EntryTypeView.java
package org.jabref.gui; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import javafx.application.Platform; import javafx.event.Event; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.s...
15,879
47.267477
245
java
null
jabref-main/src/main/java/org/jabref/gui/EntryTypeViewModel.java
package org.jabref.gui; import java.util.Optional; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ListProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleListProperty; import javafx.beans.property.Sim...
9,585
43.794393
278
java
null
jabref-main/src/main/java/org/jabref/gui/FXDialog.java
package org.jabref.gui; import javafx.fxml.FXMLLoader; import javafx.scene.control.Alert; import javafx.scene.control.Dialog; import javafx.scene.control.DialogPane; import javafx.scene.image.Image; import javafx.stage.Modality; import javafx.stage.Stage; import org.jabref.gui.icon.IconTheme; import org.jabref.gui.ke...
2,445
29.197531
96
java
null
jabref-main/src/main/java/org/jabref/gui/FallbackExceptionHandler.java
package org.jabref.gui; import org.jabref.gui.util.DefaultTaskExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Catch and log any unhandled exceptions. */ public class FallbackExceptionHandler implements Thread.UncaughtExceptionHandler { private static final Logger LOGGER = LoggerFactor...
932
30.1
103
java
null
jabref-main/src/main/java/org/jabref/gui/Globals.java
package org.jabref.gui; import java.util.Optional; import java.util.UUID; import javafx.stage.Screen; import org.jabref.architecture.AllowedToUseAwt; import org.jabref.gui.keyboard.KeyBindingRepository; import org.jabref.gui.remote.CLIMessageHandler; import org.jabref.gui.theme.ThemeManager; import org.jabref.gui.un...
6,727
38.116279
127
java
null
jabref-main/src/main/java/org/jabref/gui/JabRefDialogService.java
package org.jabref.gui; import java.io.File; import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Path; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.function.Consumer; import ...
19,632
43.722096
194
java
null
jabref-main/src/main/java/org/jabref/gui/JabRefExecutorService.java
package org.jabref.gui; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; impo...
6,782
33.085427
148
java
null
jabref-main/src/main/java/org/jabref/gui/JabRefFrame.java
package org.jabref.gui; import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.TimerTask; import java.util.function.Supplier; import java.util.stream.Collectors; impor...
72,093
48.72
400
java
null
jabref-main/src/main/java/org/jabref/gui/JabRefGUI.java
package org.jabref.gui; import java.nio.file.Path; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.input.KeyEvent; import javafx.stage.Scre...
13,170
40.288401
123
java
null
jabref-main/src/main/java/org/jabref/gui/LibraryTab.java
package org.jabref.gui; import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.Random; import javafx.animation.PauseTransition; import javafx.application.Platform; imp...
39,612
39.922521
221
java
null
jabref-main/src/main/java/org/jabref/gui/MainApplication.java
package org.jabref.gui; import java.util.List; import javafx.application.Application; import javafx.stage.Stage; import org.jabref.gui.openoffice.OOBibBaseConnect; import org.jabref.logic.importer.ParserResult; import org.jabref.model.util.FileUpdateMonitor; import org.jabref.preferences.JabRefPreferences; /** * J...
1,582
31.979167
89
java
null
jabref-main/src/main/java/org/jabref/gui/OpenConsoleAction.java
package org.jabref.gui; import java.io.IOException; import java.util.Optional; import java.util.function.Supplier; import org.jabref.gui.actions.ActionHelper; import org.jabref.gui.actions.SimpleCommand; import org.jabref.gui.desktop.JabRefDesktop; import org.jabref.model.database.BibDatabaseContext; import org.jabre...
2,214
37.859649
171
java
null
jabref-main/src/main/java/org/jabref/gui/SendAsEMailAction.java
package org.jabref.gui; import java.awt.Desktop; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import org.jabref.architecture.AllowedToUseAwt; import org.jabref.gui.actions.SimpleCommand; import org.ja...
4,586
36.598361
146
java
null
jabref-main/src/main/java/org/jabref/gui/SendAsKindleEmailAction.java
package org.jabref.gui; import org.jabref.gui.actions.ActionHelper; import org.jabref.logic.l10n.Localization; import org.jabref.preferences.PreferencesService; /** * Sends attachments for selected entries to the * configured Kindle email */ public class SendAsKindleEmailAction extends SendAsEMailAction { priv...
1,137
31.514286
142
java
null
jabref-main/src/main/java/org/jabref/gui/SendAsStandardEmailAction.java
package org.jabref.gui; import java.io.IOException; import java.io.StringWriter; import java.util.List; import org.jabref.gui.actions.ActionHelper; import org.jabref.logic.bibtex.BibEntryWriter; import org.jabref.logic.bibtex.FieldWriter; import org.jabref.logic.exporter.BibWriter; import org.jabref.logic.util.OS; im...
2,297
34.353846
148
java
null
jabref-main/src/main/java/org/jabref/gui/StateManager.java
package org.jabref.gui; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; import javafx.beans.Observable; import javafx.beans.binding.Bindings; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectPro...
9,545
38.941423
223
java
null
jabref-main/src/main/java/org/jabref/gui/UpdateTimestampListener.java
package org.jabref.gui; import org.jabref.model.entry.event.EntriesEventSource; import org.jabref.model.entry.event.EntryChangedEvent; import org.jabref.model.entry.field.StandardField; import org.jabref.preferences.PreferencesService; import com.google.common.eventbus.Subscribe; /** * Updates the timestamp of chan...
1,245
40.533333
160
java
null
jabref-main/src/main/java/org/jabref/gui/WaitForSaveFinishedDialog.java
package org.jabref.gui; import java.util.List; import javafx.concurrent.Task; import org.jabref.logic.l10n.Localization; /** * Dialog shown when closing of application needs to wait for a save operation to finish. */ public class WaitForSaveFinishedDialog { private final DialogService dialogService; pub...
1,328
29.204545
89
java
null
jabref-main/src/main/java/org/jabref/gui/actions/Action.java
package org.jabref.gui.actions; import java.util.Optional; import org.jabref.gui.icon.JabRefIcon; import org.jabref.gui.keyboard.KeyBinding; public interface Action { default Optional<JabRefIcon> getIcon() { return Optional.empty(); } default Optional<KeyBinding> getKeyBinding() { return...
434
17.913043
50
java
null
jabref-main/src/main/java/org/jabref/gui/actions/ActionFactory.java
package org.jabref.gui.actions; import java.lang.reflect.InaccessibleObjectException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Objects; import javafx.beans.binding.BooleanExpression; import javafx.scene.control.Button; import javafx.scene.control.ButtonBase...
6,742
38.899408
163
java
null
jabref-main/src/main/java/org/jabref/gui/actions/ActionHelper.java
package org.jabref.gui.actions; import java.nio.file.Path; import java.util.Collections; import java.util.List; import java.util.Optional; import javafx.beans.binding.Binding; import javafx.beans.binding.Bindings; import javafx.beans.binding.BooleanExpression; import javafx.collections.ObservableList; import javafx.s...
4,776
44.495238
179
java
null
jabref-main/src/main/java/org/jabref/gui/actions/JabRefAction.java
package org.jabref.gui.actions; import java.util.Map; import javafx.beans.binding.Bindings; import org.jabref.gui.Globals; import org.jabref.gui.keyboard.KeyBindingRepository; import de.saxsys.mvvmfx.utils.commands.Command; /** * Wrapper around one of our actions from {@link Action} to convert them to controlsfx ...
3,110
36.035714
145
java
null
jabref-main/src/main/java/org/jabref/gui/actions/SimpleCommand.java
package org.jabref.gui.actions; import javafx.beans.property.ReadOnlyDoubleProperty; import javafx.beans.property.ReadOnlyStringProperty; import javafx.beans.property.ReadOnlyStringWrapper; import org.jabref.gui.util.BindingsHelper; import de.saxsys.mvvmfx.utils.commands.CommandBase; /** * A simple command that do...
1,004
24.125
82
java
null
jabref-main/src/main/java/org/jabref/gui/actions/Sources.java
package org.jabref.gui.actions; public enum Sources { FromButton, FromMenu }
86
11.428571
31
java
null
jabref-main/src/main/java/org/jabref/gui/actions/StandardActions.java
package org.jabref.gui.actions; import java.util.Optional; import org.jabref.gui.icon.IconTheme; import org.jabref.gui.icon.JabRefIcon; import org.jabref.gui.keyboard.KeyBinding; import org.jabref.logic.l10n.Localization; public enum StandardActions implements Action { COPY_MORE(Localization.lang("Copy") + "......
19,105
69.501845
288
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AppendPersonNamesStrategy.java
package org.jabref.gui.autocompleter; public class AppendPersonNamesStrategy extends AppendWordsStrategy { /** * true if the input should be split at a single white space instead of the usual delimiter " and " for names. * Useful if the input consists of a list of last names. */ private final b...
715
24.571429
114
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AppendWordsStrategy.java
package org.jabref.gui.autocompleter; import java.util.Locale; public class AppendWordsStrategy implements AutoCompletionStrategy { protected String getDelimiter() { return " "; } @Override public AutoCompletionInput analyze(String input) { return determinePrefixAndReturnRemainder(in...
845
30.333333
99
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AutoCompleteFirstNameMode.java
package org.jabref.gui.autocompleter; /** * <ul> * <li>For "ONLY_FULL", the auto completer returns the full name, e.g. "Smith, Bob"</li> * <li>For "ONLY_ABBREVIATED", the auto completer returns the first name abbreviated, e.g. "Smith, B."</li> * <li>For "BOTH", the auto completer returns both versions.</li> ...
795
32.166667
115
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AutoCompletePreferences.java
package org.jabref.gui.autocompleter; import java.util.Set; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.FXCollections; import javafx.collectio...
2,687
29.545455
80
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AutoCompletionInput.java
package org.jabref.gui.autocompleter; public class AutoCompletionInput { private String unfinishedPart; private String prefix; public AutoCompletionInput(String prefix, String unfinishedPart) { this.prefix = prefix; this.unfinishedPart = unfinishedPart; } public String getUnfinish...
432
20.65
70
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AutoCompletionStrategy.java
package org.jabref.gui.autocompleter; public interface AutoCompletionStrategy { AutoCompletionInput analyze(String input); }
130
20.833333
46
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/AutoCompletionTextInputBinding.java
/** * Copyright (c) 2014, 2015, ControlsFX * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
7,365
43.107784
229
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/BibEntrySuggestionProvider.java
package org.jabref.gui.autocompleter; import java.util.Comparator; import java.util.stream.Stream; import org.jabref.logic.bibtex.comparator.EntryComparator; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.field.InternalField; import org.jabref.model...
1,510
29.836735
97
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/ContentSelectorSuggestionProvider.java
package org.jabref.gui.autocompleter; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.stream.Stream; /** * Enriches a suggestion provider by a given set of content selector values. */ public class ContentSelectorSuggestionProvider extends StringSuggestionProvider { ...
1,233
31.473684
93
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/EmptySuggestionProvider.java
package org.jabref.gui.autocompleter; import java.util.Comparator; import java.util.stream.Stream; import com.google.common.base.Equivalence; import org.controlsfx.control.textfield.AutoCompletionBinding; public class EmptySuggestionProvider extends SuggestionProvider<String> { @Override protected Equivalenc...
770
24.7
99
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/FieldValueSuggestionProvider.java
package org.jabref.gui.autocompleter; import java.util.Objects; import java.util.stream.Stream; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.field.Field; /** * Stores the full content of one field. */ class FieldValueSuggestionProvider extends StringSuggestionProvider { private ...
709
25.296296
103
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/JournalsSuggestionProvider.java
package org.jabref.gui.autocompleter; import java.util.stream.Stream; import org.jabref.logic.journals.JournalAbbreviationRepository; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.field.Field; import com.google.common.collect.Streams; public class JournalsSuggestionProvider extends Fie...
746
27.730769
109
java
null
jabref-main/src/main/java/org/jabref/gui/autocompleter/PersonNameStringConverter.java
package org.jabref.gui.autocompleter; import javafx.util.StringConverter; import org.jabref.model.entry.Author; import org.jabref.model.entry.AuthorList; public class PersonNameStringConverter extends StringConverter<Author> { private final boolean autoCompFF; private final boolean autoCompLF; private f...
2,302
30.121622
131
java