buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void appendToDocument (Document doc, Element parent)
{
int mods = jclass.getModifiers ();
if (!Modifier.isPublic (mods) && !Modifier.isProtected (mods))
return;
Element e = doc.createElement (jclass.isInterface () ? "interface" : "class");
if (!jclass.isInterface ()) {
Type t = jclass.getGeneric... | public void appendToDocument (Document doc, Element parent)
{
int mods = jclass.getModifiers ();
Element e = doc.createElement (jclass.isInterface () ? "interface" : "class");
if (!jclass.isInterface ()) {
Type t = jclass.getGenericSuperclass ();
if (t != null)
e.setAttribute ("extends", getGenericTy... |
private JettyLauncher(int port, final String trunk) throws IOException {
server = new Server(port);
Context context = new Context(server, "/", Context.SESSIONS);
//context.setBaseResource(Resource.newClassPathResource("/endtoend"));
context.setResourceBase(Resource.newClassPathResource("/endtoend").... | private JettyLauncher(int port, final String trunk) throws IOException {
server = new Server(port);
Context context = new Context(server, "/", Context.SESSIONS);
//context.setBaseResource(Resource.newClassPathResource("/endtoend"));
context.setResourceBase(Resource.newClassPathResource("/endtoend").... |
public void testMinimalTableEntity() {
final EntityPersister persister = sfi().getEntityPersister( MinimalTableEntity.class.getName() );
IdentifierGenerator generator = persister.getIdentifierGenerator();
assertTrue( TableGenerator.class.isInstance( generator ) );
TableGenerator tabGenerator = (TableGenerator)... | public void testMinimalTableEntity() {
final EntityPersister persister = sfi().getEntityPersister( MinimalTableEntity.class.getName() );
IdentifierGenerator generator = persister.getIdentifierGenerator();
assertTrue( TableGenerator.class.isInstance( generator ) );
TableGenerator tabGenerator = (TableGenerator)... |
private String getMetadata() {
ActionBean bean = null;
String action = getAction();
FormTag form = getForm();
if (form != null) {
if (action != null)
log.warn("Parameters action and/or beanclass specified but field-metadata tag is inside of a Stripes fo... | private String getMetadata() {
ActionBean bean = null;
String action = getAction();
FormTag form = getForm();
if (form != null) {
if (action != null)
log.warn("Parameters action and/or beanclass specified but field-metadata tag is inside of a Stripes fo... |
public void processCommandPlayer(EntityPlayer sender, String[] args)
{
if (args.length <= 1)
{
error(sender);
return;
}
if (args.length == 1)
{
if (args[0].equalsIgnoreCase("help"))
{
OutputHandler.chatConfirmation(sender, Localization.get("command.setspawn.help.1"));
OutputHandler.chat... | public void processCommandPlayer(EntityPlayer sender, String[] args)
{
if (args.length <= 0)
{
error(sender);
return;
}
if (args.length == 1)
{
if (args[0].equalsIgnoreCase("help"))
{
OutputHandler.chatConfirmation(sender, Localization.get("command.setspawn.help.1"));
OutputHandler.chat... |
public Meeting returnMeeting(Set<Meeting> meetingSet, int id, char whatKindOfMeeting)
{
for (Iterator<Meeting> itr = meetingSet.iterator(); itr.hasNext();)
{
if (itr.next().getId() == id && whatKindOfMeeting == 'f') // i.e. this needs to be a FUTURE meeting
{
... | protected Meeting returnMeeting(Set<Meeting> meetingSet, int id, char whatKindOfMeeting)
{
for (Iterator<Meeting> itr = meetingSet.iterator(); itr.hasNext();)
{
if (itr.next().getId() == id && whatKindOfMeeting == 'f') // i.e. this needs to be a FUTURE meeting
{
... |
public void testAccessItemChecked() {
// NONE mode
mListView.setChoiceMode(ListView.CHOICE_MODE_NONE);
assertEquals(ListView.CHOICE_MODE_NONE, mListView.getChoiceMode());
mListView.setItemChecked(1, true);
assertEquals(ListView.INVALID_POSITION, mListView.getCheckedItemPosit... | public void testAccessItemChecked() {
// NONE mode
mListView.setChoiceMode(ListView.CHOICE_MODE_NONE);
assertEquals(ListView.CHOICE_MODE_NONE, mListView.getChoiceMode());
mListView.setItemChecked(1, true);
assertEquals(ListView.INVALID_POSITION, mListView.getCheckedItemPosit... |
public String createSqlQuery(String toplevelCorpusName)
{
String template = "SELECT DISTINCT meta.namespace, meta.name, meta.value \n" +
"from corpus this, corpus docs \n" +
"FULL JOIN corpus_annotation meta \n" +
"ON docs.pre=meta.corpus_ref \n" +
"WHERE this.name = :toplevelnam... | public String createSqlQuery(String toplevelCorpusName)
{
String template = "SELECT DISTINCT meta.namespace, meta.name, meta.value \n" +
"from corpus this, corpus docs \n" +
"FULL JOIN corpus_annotation meta \n" +
"ON docs.id=meta.corpus_ref \n" +
"WHERE this.name = :toplevelname... |
public void testPublisherFailsOver() throws Exception {
ActiveMQDestination destination = new ActiveMQQueue("TEST");
int deliveryMode = DeliveryMode.NON_PERSISTENT;
// Start a normal consumer on the local broker
StubConnection connection1 = createConnection();
ConnectionInfo... | public void testPublisherFailsOver() throws Exception {
ActiveMQDestination destination = new ActiveMQQueue("TEST");
int deliveryMode = DeliveryMode.NON_PERSISTENT;
// Start a normal consumer on the local broker
StubConnection connection1 = createConnection();
ConnectionInfo... |
protected Control createDialogArea(Composite parent) {
this.getShell().setText("Gcov - Open coverage results...");
Composite composite = (Composite) super.createDialogArea(parent);
/* first line */
Group c = new Group(composite, SWT.NONE);
c.setText("Binary File");
c.setTo... | protected Control createDialogArea(Composite parent) {
this.getShell().setText("Gcov - Open coverage results...");
Composite composite = (Composite) super.createDialogArea(parent);
/* first line */
Group c = new Group(composite, SWT.NONE);
c.setText("Binary File");
c.setTo... |
protected void relayActions() {
BlockLocation container = container();
Location location = container.getLocation();
for (Entity i : container.getWorld().getEntitiesByClass(Item.class)) {
if (i.getLocation().distance(location) < suctionDistance) {
ItemStack item = ... | protected void relayActions() {
BlockLocation container = container();
Location location = container.getLocation();
for (Entity i : container.getWorld().getEntitiesByClass(Item.class)) {
if (! i.isDead() && i.getLocation().distance(location) < suctionDistance) {
I... |
private ASMOclType parseTypeInternal(CharacterIterator ci) throws SignatureParsingException {
ASMOclType ret = null;
switch(ci.current()) {
case 'Q': case 'G': case 'C': // Sequence, Bag, Collection,
case 'E': case 'O': case 'N': // Set, OrderedSet, Native type
ci.next();
//ASMOclType elementType ... | private ASMOclType parseTypeInternal(CharacterIterator ci) throws SignatureParsingException {
ASMOclType ret = null;
switch(ci.current()) {
case 'Q': case 'G': case 'C': // Sequence, Bag, Collection,
case 'E': case 'O': case 'N': // Set, OrderedSet, Native type
ci.next();
ASMOclType elementType = ... |
public static void tagHTML(HashMap<MyDocument, LinkedDocument> docs) {
for (LinkedDocument doc : docs.values()){
String line;
ArrayList<String> lignes = new ArrayList<String>();
InputStream file = null;
String repoSaved="docTxt/docSaved/";
String repoTagged="docTxt/docTagged/";
try {
... | public static void tagHTML(HashMap<MyDocument, LinkedDocument> docs) {
for (LinkedDocument doc : docs.values()){
String line;
ArrayList<String> lignes = new ArrayList<String>();
InputStream file = null;
String repoSaved="docTxt/docSaved/";
String repoTagged="docTxt/docTagged/";
try {
... |
public static Graph<Vertex, Edge> getGraph( String file) throws FileNotFoundException
{
Scanner scan = new Scanner(new FileReader(file)).useDelimiter("\\s");
String first = scan.next().trim();
String[] fArray = first.split(",");
int numV = fArray.length;
int[][] mat = new int[numV][numV];
for(int... | public static Graph<Vertex, Edge> getGraph( String file) throws FileNotFoundException
{
Scanner scan = new Scanner(new FileReader(file)).useDelimiter("\\n");
String first = scan.next().trim();
String[] fArray = first.split(",");
int numV = fArray.length;
int[][] mat = new int[numV][numV];
for(int... |
private void updateModel(TableModelEvent e) {
switch (e.getType()) {
case TableModelEvent.DELETE: {
try {
final int firstRow = e.getFirstRow();
rowset.deleteRows(firstRow, e.getLastRow());
if (rowset.getFetchedRowCount()... | private void updateModel(TableModelEvent e) {
switch (e.getType()) {
case TableModelEvent.DELETE: {
try {
final int firstRow = e.getFirstRow();
rowset.deleteRows(firstRow, e.getLastRow());
if (rowset.getFetchedRowCount()... |
private String qualifiedPath(Node that, Declaration d, boolean inProto) {
boolean isMember = d.isClassOrInterfaceMember();
if (!isMember && isImported(that == null ? null : that.getUnit().getPackage(), d)) {
return names.moduleAlias(d.getUnit().getPackage().getModule());
}
... | private String qualifiedPath(Node that, Declaration d, boolean inProto) {
boolean isMember = d.isClassOrInterfaceMember();
if (!isMember && isImported(that == null ? null : that.getUnit().getPackage(), d)) {
return names.moduleAlias(d.getUnit().getPackage().getModule());
}
... |
public static URL buildUrl(String host, int port, String path, List parameters) throws MalformedURLException {
StringBuffer buffer = new StringBuffer();
buffer.append("http://");
buffer.append(host);
if (port > 0) {
buffer.append(":");
buffer.append(port);
... | public static URL buildUrl(String host, int port, String path, List parameters) throws MalformedURLException {
StringBuffer buffer = new StringBuffer();
buffer.append("http://");
buffer.append(host);
if (port > 0) {
buffer.append(":");
buffer.append(port);
... |
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,
Scriptable thisObj, Object[] args)
{
if (!f.hasTag(GENERATOR_TAG)) {
return super.execIdCall(f, cx, scope, thisObj, args);
}
int id = f.methodId();
if (!(thisObj i... | public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,
Scriptable thisObj, Object[] args)
{
if (!f.hasTag(GENERATOR_TAG)) {
return super.execIdCall(f, cx, scope, thisObj, args);
}
int id = f.methodId();
if (!(thisObj i... |
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityPlayer, World world, int x, int y, int z, int side, float par8, float par9, float par10)
{
if (side == 0)
return false;
else if (side == 1)
return false;
else
{
int orientation = Dir... | public boolean onItemUse(ItemStack itemstack, EntityPlayer entityPlayer, World world, int x, int y, int z, int side, float par8, float par9, float par10)
{
if (side == 0)
return false;
else if (side == 1)
return false;
else
{
int orientation = Dir... |
public void registerPattern(Pattern pattern) {
IncQueryMatcher<GenericPatternMatch> matcher = null;
try {
matcher = new GenericPatternMatcher(pattern, key.getNotifier());
}
catch (IncQueryRuntimeException e) {
logger.log(new Status(IStatus.ERROR,
IncQueryGUIPlugin.PLUGIN_ID,
"Cannot initialize... | public void registerPattern(Pattern pattern) {
IncQueryMatcher<GenericPatternMatch> matcher = null;
try {
matcher = new GenericPatternMatcher(pattern, key.getNotifier());
}
catch (IncQueryRuntimeException e) {
logger.log(new Status(IStatus.ERROR,
IncQueryGUIPlugin.PLUGIN_ID,
"Cannot initialize... |
public synchronized void sample() {
if (closed) {
return;
}
// the nodes we are going to ping include the core listed nodes that were added
// and the last round of discovered nodes
Map<TransportAddress, DiscoveryNode> nodesToPing = Ma... | public synchronized void sample() {
if (closed) {
return;
}
// the nodes we are going to ping include the core listed nodes that were added
// and the last round of discovered nodes
Map<TransportAddress, DiscoveryNode> nodesToPing = Ma... |
private void initComponents() {
timeGroup = new javax.swing.ButtonGroup();
servicesScrollPane = new javax.swing.JScrollPane();
servicesTable = new javax.swing.JTable();
jPanel1 = new javax.swing.JPanel();
advancedButton = new javax.swing.JButton();
jSeparator2 = new ... | private void initComponents() {
timeGroup = new javax.swing.ButtonGroup();
servicesScrollPane = new javax.swing.JScrollPane();
servicesTable = new javax.swing.JTable();
jPanel1 = new javax.swing.JPanel();
advancedButton = new javax.swing.JButton();
jSeparator2 = new ... |
public static boolean isMarker(int position, Method method, Object[] args) {
return method.getParameterTypes().length >= position && method.getParameterTypes()[position].equals(Marker.class) && INSTANCE.equals(args[position]);
}
| public static boolean isMarker(int position, Method method, Object[] args) {
return method.getParameterTypes().length > position && method.getParameterTypes()[position].equals(Marker.class) && INSTANCE.equals(args[position]);
}
|
public void run() throws RuntimeException {
log.debug("Starting run method of AsyncMeme " );
Thread thisThread = Thread.currentThread();
Email myEmail = new Email();
myEmail.setTo(userLoggedIn.getEmail());
GeneList thisGeneList = myGeneListAnalysis.getAnalysisGeneList();
String mainContent = user... | public void run() throws RuntimeException {
log.debug("Starting run method of AsyncMeme " );
Thread thisThread = Thread.currentThread();
Email myEmail = new Email();
myEmail.setTo(userLoggedIn.getEmail());
GeneList thisGeneList = myGeneListAnalysis.getAnalysisGeneList();
String mainContent = user... |
public void Spawn() {
if (isConsole) {
return;
}
Location spawn;
if (plugin.mainProperties.getBoolean("PerWorldSpawn", false)) {
try {
spawn = plugin.getServer().getWorld(plugin.mainProperties.getString("DefaultWorld", "world")).getSpawnLocation();
} catch (NullPointerException e) {
spawn =... | public void Spawn() {
if (isConsole) {
return;
}
Location spawn;
if (plugin.mainProperties.getBoolean("perWorldSpawn", false)) {
try {
spawn = plugin.getServer().getWorld(plugin.mainProperties.getString("defaultWorld", "world")).getSpawnLocation();
} catch (NullPointerException e) {
spawn =... |
public void cleanup() throws IOException, InterruptedException {
String command = "connect " + getService().getRestUrl() + ";list-application";
String output = CommandTestUtils.runCommandAndWait(command);
if (output.contains(appName)) {
uninstallApplicationAndWait(appName);
}
}
| public void cleanup() throws IOException, InterruptedException {
String command = "connect " + getService().getRestUrl() + ";list-applications";
String output = CommandTestUtils.runCommandAndWait(command);
if (output.contains(appName)) {
uninstallApplicationAndWait(appName);
}
}
|
public boolean savePreset(Player player, int number)
{
String wert = "";
if(configFile.exists())
{
try
{
ItemStack item;
for(int i = 0; i < 9; i++)
{
item = player.getInventory().getItem(i);
if(i != 0)
{
wert += ",";
}
wert += item.getTypeId();
if(... | public boolean savePreset(Player player, int number)
{
String wert = "";
if(configFile.exists())
{
try
{
ItemStack item;
for(int i = 0; i < 9; i++)
{
item = player.getInventory().getItem(i);
if(i != 0)
{
wert += ",";
}
wert += item.getTypeId();
if(... |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View result = inflater.inflate(R.layout.meteo_fragment, container, false);
final ListView meteoListView = (ListView) result
.findViewById(... | public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View result = inflater.inflate(R.layout.meteo_fragment, container, false);
final ListView meteoListView = (ListView) result
.findViewById(... |
public HashMap<String, String> parse() throws FileNotFoundException
{
confMap = new HashMap<String, String>();
if (!confFile.exists() || !confFile.canRead())
{
throw new FileNotFoundException();
}
//go line by line and add to the hash map if it's not a comment;
Scanner scanner = new Scanner(confF... | public HashMap<String, String> parse() throws FileNotFoundException
{
confMap = new HashMap<String, String>();
if (!confFile.exists() || !confFile.canRead())
{
System.err.println("Failed to parse conf file: " + confFile);
throw new FileNotFoundException();
}
//go line by line and add to the hash... |
public void goToCamera(View v) {
Spinner sp = (Spinner) findViewById(R.id.Spinner_Webcam);
String currentWebcam = sp.getSelectedItem().toString();
Toast t = Toast.makeText(getApplicationContext(), currentWebcam, Toast.LENGTH_SHORT);
t.show();
Intent intent = new Intent();
// Can't have... | public void goToCamera(View v) {
Spinner sp = (Spinner) findViewById(R.id.Spinner_Webcam);
String currentWebcam = sp.getSelectedItem().toString();
Toast t = Toast.makeText(getApplicationContext(), currentWebcam, Toast.LENGTH_SHORT);
t.show();
Intent intent = new Intent();
// Can't have... |
private void setLanguage(String language) throws Exception {
String path = Platform.getInstallLocation().getURL().toExternalForm();
String fileNameOrg = Platform.getProduct().getName() + ".ini"; //$NON-NLS-1$
String fileNameBak = fileNameOrg + ".bak"; //$NON-NLS-1$
if ("macosx".equa... | private void setLanguage(String language) throws Exception {
String path = Platform.getInstallLocation().getURL().toExternalForm();
String fileNameOrg = Platform.getProduct().getName() + ".ini"; //$NON-NLS-1$
String fileNameBak = fileNameOrg + ".bak"; //$NON-NLS-1$
if ("macosx".equa... |
public void ArticleCRUDAnon_003_CreateEditArticle()
{
CommonFunctions.logOut(driver);
WikiBasePageObject wiki = new WikiBasePageObject(driver, Global.DOMAIN);
pageName = "QAarticle"+wiki.getTimeStamp();
wiki.openWikiPage();
WikiArticleEditMode edit = wiki.createNewArticle(pageName, 1);
edit.deleteArticleC... | public void ArticleCRUDAnon_003_CreateEditArticle()
{
CommonFunctions.logOut(driver);
WikiBasePageObject wiki = new WikiBasePageObject(driver, Global.DOMAIN);
pageName = "QAarticle"+wiki.getTimeStamp();
wiki.openWikiPage();
WikiArticleEditMode edit = wiki.createNewArticle(pageName, 1);
edit.deleteArticleC... |
protected void paintComponent(final Graphics g) {
super.paintComponent(g);
if (!splinePainted) {
// nothing to do, bail out
return;
}
final Collection<JSlider> sliders = sliderMap.values();
Double[] p = new Double[slid... | protected void paintComponent(final Graphics g) {
super.paintComponent(g);
if (!splinePainted || model.getEqualizerCategoryCount() < 2) {
// nothing to do, bail out
return;
}
final Collection<JSlider> sliders = sliderMap.values();... |
public void onProtectionInteract(LWCProtectionInteractEvent event) {
if (event.getResult() == Result.CANCEL || !isEnabled()) {
return;
}
// The more important check
if (!event.canAccess()) {
return;
}
Protection protection = event.getProtecti... | public void onProtectionInteract(LWCProtectionInteractEvent event) {
if (event.getResult() == Result.CANCEL || !isEnabled()) {
return;
}
// The more important check
if (!event.canAccess()) {
return;
}
Protection protection = event.getProtecti... |
public void registerReferenceProviders(PsiReferenceRegistrar registrar) {
registrar.registerReferenceProvider(PsiJavaPatterns.psiLiteral(), new PsiReferenceProvider() {
@NotNull
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext conte... | public void registerReferenceProviders(PsiReferenceRegistrar registrar) {
registrar.registerReferenceProvider(PsiJavaPatterns.psiLiteral(), new PsiReferenceProvider() {
@NotNull
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext conte... |
public void initGUI(){
try {
preInitGUI();
GridLayout thisLayout = new GridLayout(7, true);
thisLayout.marginWidth = 10;
thisLayout.marginHeight = 10;
thisLayout.numColumns = 7;
thisLayout.makeColumnsEqualWidth = false;
thisLayout.horizontalSpacing = 5;
thisLayout.verticalSpacing = 5;
thi... | public void initGUI(){
try {
preInitGUI();
GridLayout thisLayout = new GridLayout(7, true);
thisLayout.marginWidth = 10;
thisLayout.marginHeight = 10;
thisLayout.numColumns = 7;
thisLayout.makeColumnsEqualWidth = false;
thisLayout.horizontalSpacing = 5;
thisLayout.verticalSpacing = 5;
thi... |
private static void deleteMonitoringReports(
EntityManager session, Long summaryId) {
ITestResultSummaryPO summaryPo = null;
if (summaryId != null) {
summaryPo = session.find(
PoMaker.getTestResultSummaryClass(), summaryId);
if (summar... | private static void deleteMonitoringReports(
EntityManager session, Long summaryId) {
ITestResultSummaryPO summaryPo = null;
if (summaryId != null) {
summaryPo = session.find(
PoMaker.getTestResultSummaryClass(), summaryId);
if (summar... |
protected List<AttributedElementClass> createTypeList(Schema schema)
throws EvaluateException {
ArrayList<AttributedElementClass> returnTypes = new ArrayList<AttributedElementClass>();
AttributedElementClass elemClass = (AttributedElementClass) schema
.getAttributedElementClass(new QualifiedName(vertex.getNam... | protected List<AttributedElementClass> createTypeList(Schema schema)
throws EvaluateException {
ArrayList<AttributedElementClass> returnTypes = new ArrayList<AttributedElementClass>();
AttributedElementClass elemClass = (AttributedElementClass) schema
.getAttributedElementClass(new QualifiedName(vertex.getNam... |
protected File createMetadataFile( URL metadata, String username, String password )
throws IOException
{
getLogger().info( "Downloading " + metadata.toExternalForm() );
InputStream is = null;
if ( metadata.getProtocol().startsWith( "http" ) )
{
is = new Mung... | protected File createMetadataFile( URL metadata, String username, String password )
throws IOException
{
getLogger().info( "Downloading " + metadata.toExternalForm() );
InputStream is = null;
if ( metadata.getProtocol().startsWith( "http" ) )
{
is = new Mung... |
public void render(Graphics g) {
this.g = g;
this.drawBackgroundScreen();
// this.drawAnimatedBackground();
//game.getFontRenderer().drawCenteredString(Game.TITLE, 36, 3);
g.drawImage(game.logo, (game.getWidth()/2)-164, 36, 328, 66, game);
ScreenTools.drawButton((game.getWidth()/2)-116, 116, 232, 25, "Sing... | public void render(Graphics g) {
this.g = g;
this.drawBackgroundScreen();
// this.drawAnimatedBackground();
//game.getFontRenderer().drawCenteredString(Game.TITLE, 36, 3);
g.drawImage(game.logo, (game.getWidth()/2)-164, 36, 328, 66, game);
ScreenTools.drawButton((game.getWidth()/2)-116, 116, 232, 25, "Sing... |
private MidiEvent getEvent()
{
if (TDebug.TraceAlsaMidiIn) { TDebug.out("AlsaMidiIn.getEvent(): before eventInput()"); }
while (true)
{
int nReturn = getAlsaSeq().eventInput(m_event);
if (nReturn >= 0)
{
break;
}
/*
* Sleep for 1 ms to enable scheduling.
*/
if (TDebug.TraceAlsaMid... | private MidiEvent getEvent()
{
if (TDebug.TraceAlsaMidiIn) { TDebug.out("AlsaMidiIn.getEvent(): before eventInput()"); }
while (true)
{
int nReturn = getAlsaSeq().eventInput(m_event);
if (nReturn >= 0)
{
break;
}
/*
* Sleep for 1 ms to enable scheduling.
*/
if (TDebug.TraceAlsaMid... |
public HttpRequest getRequest() throws IOException {
String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD);
if (httpMethod == null) {
httpMethod = "POST";
}
endpointURLPrefix = (String) msgContext.getProperty(NhttpConstants.ENDPOINT_PRE... | public HttpRequest getRequest() throws IOException {
String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD);
if (httpMethod == null) {
httpMethod = "POST";
}
endpointURLPrefix = (String) msgContext.getProperty(NhttpConstants.ENDPOINT_PRE... |
public void drawInventory(Graphics g, Pointer c) {
this.c=c;
if (c.getPointer()==2)
{
if (selectedItem<10)
selectedItem++;
c.setPointer(6);
}
if (c.getPointer()==0)
{
if (selectedItem>0)
selectedItem--;
c.setPointer(6);
}
if (c.getPointer()==10)
{
if (selectedItem<10)
{
... | public void drawInventory(Graphics g, Pointer c) {
this.c=c;
if (c.getPointer()==2)
{
if (selectedItem<10)
selectedItem++;
c.setPointer(6);
}
if (c.getPointer()==0)
{
if (selectedItem>0)
selectedItem--;
c.setPointer(6);
}
if (c.getPointer()==10)
{
if (selectedItem<10)
{
... |
void pulse(final ServerSession remote, final ServerMessage.Mutable message) {
if (request.containsKey(message.getChannel())) {
request.get(message.getChannel()).stop();
request.remove(message.getChannel());
System.out.println("pulse request on channel:" + message.getChannel()+" | receivers: "+request.siz... | void pulse(final ServerSession remote, final ServerMessage.Mutable message) {
if (request.containsKey(message.getChannel())) {
request.get(message.getChannel()).stop();
request.remove(message.getChannel());
System.out.println("pulse request on channel:" + message.getChannel()+" | receivers: "+request.siz... |
public int checkPermission(RiotUser user, String action, Object object) {
if (log.isDebugEnabled()) {
StringBuffer message = new StringBuffer();
message.append("user: [").append(user.getUserId()).append("], ");
message.append("action: [").append(action).append("], ");
message.append("object: ");
if (o... | public int checkPermission(RiotUser user, String action, Object object) {
if (log.isDebugEnabled()) {
StringBuffer message = new StringBuffer();
message.append("user: [").append(user.getUserId()).append("], ");
message.append("action: [").append(action).append("], ");
message.append("object: ");
if (o... |
public ITuplePartitionComputer createPartitioner() {
return new ITuplePartitionComputer() {
@Override
public int partition(IFrameTupleAccessor accessor, int tIndex,
int nParts) {
if (nParts == 1) {
return 0;
}
int startOffset = accessor.getTupleStartOffset(tIndex);
int fieldOffset = a... | public ITuplePartitionComputer createPartitioner() {
return new ITuplePartitionComputer() {
@Override
public int partition(IFrameTupleAccessor accessor, int tIndex,
int nParts) {
int startOffset = accessor.getTupleStartOffset(tIndex);
int fieldOffset = accessor.getFieldStartOffset(tIndex, 0);
... |
public void run() {
LogUtils.logI("DecoderThread.run() [Start thread]");
while (mRunning) {
EngineId engineId = EngineId.UNDEFINED;
Type type = Type.PUSH_MSG;
int reqId = -1;
try {
if (mResponses.size() > 0) {
LogUti... | public void run() {
LogUtils.logI("DecoderThread.run() [Start thread]");
while (mRunning) {
EngineId engineId = EngineId.UNDEFINED;
Type type = Type.PUSH_MSG;
int reqId = -1;
try {
if (mResponses.size() > 0) {
LogUti... |
public static Expression parseExpression(Node root){
LOGGER.finer("parsingExpression "+root.getNodeName());
//NodeList children = root.getChildNodes();
//LOGGER.finest("children "+children);
if(root == null || root.getNodeType() != Node.ELEMENT_NODE){
LO... | public static Expression parseExpression(Node root){
LOGGER.finer("parsingExpression "+root.getNodeName());
//NodeList children = root.getChildNodes();
//LOGGER.finest("children "+children);
if(root == null || root.getNodeType() != Node.ELEMENT_NODE){
LO... |
public Feature[] split() {
if (isSplittable()) {
final PureNewFeature[] ret = new PureNewFeature[2];
int from = ((Integer)(splitPolygonFromHandle.getClientProperty("coordinate_position_in_arr"))).intValue(); // NOI18N
int to = ((Integer)(splitPolygonToHandle.getClientProp... | public Feature[] split() {
if (isSplittable()) {
final PureNewFeature[] ret = new PureNewFeature[2];
int from = ((Integer)(splitPolygonFromHandle.getClientProperty("coordinate_position_coord"))).intValue(); // NOI18N
int to = ((Integer)(splitPolygonToHandle.getClientPrope... |
public Object run() {
/* We need to load awt here because of usage trace and
* disposer frameworks
*/
System.loadLibrary("awt");
System.loadLibrary("lcms");
return null;
... | public Object run() {
/* We need to load awt here because of usage trace and
* disposer frameworks
*/
System.loadLibrary("awt");
System.loadLibrary("javalcms");
return null;
... |
public int compile(String[] args,
Context context,
List<JavaFileObject> fileObjects)
{
String[] args2 = new String[args.length + 1];
for (int i = 0; i < args.length; ++i) {
args2[i+1] = args[i];
}
args2[0] = "-XDdumpjava=I:\\work";
... | public int compile(String[] args,
Context context,
List<JavaFileObject> fileObjects)
{
registerServices(context, args);
if (options == null)
options = Options.instance(context); // creates a new one
filenames = new ListBuffer<Fil... |
protected ExtendedHeaderFooter createExtendedHeaderFooter()
{
return new ExtendedHeaderFooter( this )
{
@Override
public void onStartPage( PdfWriter writer, Document doc )
{
super.onStartPage( writer, doc );
StylableDocument.thi... | protected ExtendedHeaderFooter createExtendedHeaderFooter()
{
return new ExtendedHeaderFooter( this )
{
@Override
public void onStartPage( PdfWriter writer, Document doc )
{
super.onStartPage( writer, doc );
StylableDocument.thi... |
private void applyExecInt() throws JasonException {
confP.step = State.ClrInt; // default next step
if (conf.C.SI.isFinished()) {
return;
}
// get next formula in the body of the intended means
// on the top of the selected intention
Int... | private void applyExecInt() throws JasonException {
confP.step = State.ClrInt; // default next step
if (conf.C.SI.isFinished()) {
return;
}
// get next formula in the body of the intended means
// on the top of the selected intention
Int... |
public void setup () {
size(1250, 750, P2D);
frameRate(10);
background(40);
//initLocalProlog("prolog/init.pl");
PrologInterface.initJPLProlog("re_comm");
new jpl.Query("use_module(library('knowrob_coordinates'))").oneSolution();
new jpl.Query("use_module(library('comp_similarity'))").oneSolution()... | public void setup () {
size(1250, 750, P2D);
frameRate(10);
background(40);
//initLocalProlog("prolog/init.pl");
PrologInterface.initJPLProlog("mod_vis");
new jpl.Query("use_module(library('knowrob_coordinates'))").oneSolution();
new jpl.Query("use_module(library('comp_similarity'))").oneSolution()... |
public static List<VagrantBoxItem> getCommunityBoxes() {
LinkedList<VagrantBoxItem> boxes = new LinkedList<VagrantBoxItem>();
String boxesUrl = VagrantOptions.getInstance().getBoxesUrl();
try {
// parse HTML
Document doc = Jsoup.connect(boxesUrl).get();
E... | public static List<VagrantBoxItem> getCommunityBoxes() {
LinkedList<VagrantBoxItem> boxes = new LinkedList<VagrantBoxItem>();
String boxesUrl = VagrantOptions.getInstance().getBoxesUrl();
try {
// parse HTML
Document doc = Jsoup.connect(boxesUrl).get();
E... |
public void testStatement() {
InnerSelectableAjaxBehavior selectableAjaxBehavior = new InnerSelectableAjaxBehavior();
WebMarkupContainer component = new WebMarkupContainer("anId");
component.setMarkupId("anId");
component.add(selectableAjaxBehavior);
WebPage webPage = new InnerPage();
webPage.add(componen... | public void testStatement() {
InnerSelectableAjaxBehavior selectableAjaxBehavior = new InnerSelectableAjaxBehavior();
WebMarkupContainer component = new WebMarkupContainer("anId");
component.setMarkupId("anId");
component.add(selectableAjaxBehavior);
WebPage webPage = new InnerPage();
webPage.add(componen... |
public static void main (String[] args) throws InterruptedException {
Context context = ZMQ.context(1);
Socket sink = context.socket(ZMQ.ROUTER);
sink.bind("inproc://example");
// First allow 0MQ to set the identity, [00] + random 4byte
Socket anonymous = context.socket(ZM... | public static void main (String[] args) throws InterruptedException {
Context context = ZMQ.context(1);
Socket sink = context.socket(ZMQ.ROUTER);
sink.bind("inproc://example");
// First allow 0MQ to set the identity, [00] + random 4byte
Socket anonymous = context.socket(ZM... |
public void run() {
try {
System.out.println("In thread for check position");
this.distConfig = DistConfig.get_Instance();
// Get the input stream for the client
BufferedReader inStream = new BufferedReader (
new Input... | public void run() {
try {
System.out.println("In thread for check position");
this.distConfig = DistConfig.get_Instance();
// Get the input stream for the client
BufferedReader inStream = new BufferedReader (
new Input... |
public void onPlayerJoin(PlayerJoinEvent e){
//define string, constants, and other.
String modsMessage = ChatColor.RED + "This string is for mod news";
String retModMessage = ChatColor.RED + "This string is for retired mod news";
Player player = e.getPlayer();
GameMode gamemode = player.getGameMode();
Str... | public void onPlayerJoin(PlayerJoinEvent e){
//define string, constants, and other.
String modsMessage = ChatColor.RED + "This string is for mod news";
String retModMessage = ChatColor.RED + "This string is for retired mod news";
Player player = e.getPlayer();
GameMode gamemode = player.getGameMode();
Str... |
public WebDriver getDriver() {
FirefoxBinary firefoxBinary = new FirefoxBinary(new File(firefoxLocation));
firefoxBinary.setEnvironmentProperty("DISPLAY", System.getProperty("display", ":0.0"));
return new FirefoxDriver(firefoxBinary, new FirefoxProfile());
}
| public WebDriver getDriver() {
FirefoxBinary firefoxBinary = new FirefoxBinary(new File(firefoxLocation));
firefoxBinary.setEnvironmentProperty("DISPLAY", System.getProperty("functional.test.display", ":0.0"));
return new FirefoxDriver(firefoxBinary, new FirefoxProfile());
}
|
public ContactInfoPane() {
pane = new JPanel();
pane.setLayout(new MigLayout("", "[][grow]", "[][][][][][][][][]"));
JLabel lblAddress = new JLabel("Address");
pane.add(lblAddress, "flowx,cell 0 0");
addressPanel = new JPanel();
pane.add(addressPanel, "cell 0 1,grow,span");
JLabel lblEmail = new JLabe... | public ContactInfoPane() {
pane = new JPanel();
pane.setLayout(new MigLayout("", "[][grow]", "[][][][][][][][][]"));
JLabel lblAddress = new JLabel("Address");
pane.add(lblAddress, "flowx,cell 0 0");
addressPanel = new JPanel();
pane.add(addressPanel, "cell 0 1,grow,span");
JLabel lblEmail = new JLabe... |
public void test() throws ClassNotFoundException {
String className = "activeweb.mock.MockController";
ControllerClassLoader cl1 = new ControllerClassLoader(ControllerClassLoaderSpec.class.getClassLoader(), "target/test-classes");
ControllerClassLoader cl2 = new ControllerClassLoader(Contr... | public void test() throws ClassNotFoundException {
String className = "app.controllers.BlahController";
ControllerClassLoader cl1 = new ControllerClassLoader(ControllerClassLoaderSpec.class.getClassLoader(), "target/test-classes");
ControllerClassLoader cl2 = new ControllerClassLoader(Cont... |
private Iterator<PostingInfo> getWildcardIterator(String token, List<CloseableIterator<Datatypes.Posting>> openedIterators, Suggestions sugest) throws Exception {
final String stemmedToken = Normalize.getBasisWord(token);
final String suffix = token.substring(stemmedToken.length(), token.length());
... | private Iterator<PostingInfo> getWildcardIterator(String token, List<CloseableIterator<Datatypes.Posting>> openedIterators, Suggestions sugest) throws Exception {
final String stemmedToken = Normalize.getBasisWord(token);
final String suffix = token.substring(stemmedToken.length(), token.length());
... |
public static void main(String[] args)
{
// rescale coordinates and turn on animation mode
StdDraw.setXscale(0, 32768);
StdDraw.setYscale(0, 32768);
StdDraw.show(0);
//input processing.
String filename = args[0];
In in = new In(filename);
int N = in.readInt();... | public static void main(String[] args)
{
// rescale coordinates and turn on animation mode
StdDraw.setXscale(0, 32768);
StdDraw.setYscale(0, 32768);
StdDraw.show(0);
//input processing.
String filename = args[0];
In in = new In(filename);
int N = in.readInt();... |
public Object invokeMethod(String methodName, Object[] args) {
try {
String n = schemaName;
String subSchema = "";
Map m = null;
if( args!=null ) {
m = (Map)args[0];
//used for subschema for entity managers.
... | public Object invokeMethod(String methodName, Object[] args) {
try {
String n = schemaName;
String subSchema = "";
Map m = null;
if( args!=null ) {
if( args.length > 0 ) {
m = (Map)args[0];
... |
public void parseCommand(String cmd, String[] args) {
PacketHandler ph = new PacketHandler();
DataManager dm = new DataManager();
if(cmd.equalsIgnoreCase("quit")) {
String msg = "";
for(int i = 0; i < args.length; i++) msg += args[i] + " ";
msg = ... | public void parseCommand(String cmd, String[] args) {
PacketHandler ph = new PacketHandler();
DataManager dm = new DataManager();
if(cmd.equalsIgnoreCase("quit")) {
String msg = "";
for(int i = 0; i < args.length; i++) msg += args[i] + " ";
msg = ... |
public Queue<EventObject> execute(Queue<EventObject> events) throws ActionException {
listenerForwarder.started();
listenerForwarder.setTask("build the output absolute file name");
// return
final Queue<EventObject> ret = new LinkedList<EventObject>();
listenerForwarder.se... | public Queue<EventObject> execute(Queue<EventObject> events) throws ActionException {
listenerForwarder.started();
listenerForwarder.setTask("build the output absolute file name");
// return
final Queue<EventObject> ret = new LinkedList<EventObject>();
listenerForwarder.se... |
public void testUnpackOverWriteIfNewer()
throws IOException, MojoExecutionException, InterruptedException
{
mojo.silent = false;
stubFactory.setCreateFiles( true );
Artifact artifact = stubFactory.getSnapshotArtifact();
assertTrue( artifact.getFile().setLastModified( Syst... | public void testUnpackOverWriteIfNewer()
throws IOException, MojoExecutionException, InterruptedException
{
mojo.silent = false;
stubFactory.setCreateFiles( true );
Artifact artifact = stubFactory.getSnapshotArtifact();
assertTrue( artifact.getFile().setLastModified( Syst... |
public void run() {
Job.logger.logp(Level.FINE, CLASS_NAME, "run", getName());
EJob finishedEJob = null;
for (;;) {
ejob = Job.jobManager.selectEJob(finishedEJob);
Job.logger.logp(Level.FINER, CLASS_NAME, "run", "selectedJob {0}", ejob.jobName);
isServerTh... | public void run() {
Job.logger.logp(Level.FINE, CLASS_NAME, "run", getName());
EJob finishedEJob = null;
for (;;) {
ejob = Job.jobManager.selectEJob(finishedEJob);
Job.logger.logp(Level.FINER, CLASS_NAME, "run", "selectedJob {0}", ejob.jobName);
isServerTh... |
public void addTrackedChange(String optionalComment) {
final boolean isTrackingChanges = GeneralStorage.getInstance()
.getProject().getIsTrackingActivated();
if (isTrackingChanges) {
final long timestamp = new Date().getTime();
// remove tracked changes, if th... | public void addTrackedChange(String optionalComment) {
final IProjectPO project = GeneralStorage.getInstance().getProject();
boolean isTrackingChanges = false;
if (project != null) {
isTrackingChanges = project.getIsTrackingActivated();
}
if (isTrackingChanges) {
... |
protected void onDraw(Canvas canvas) {
// canvas.drawRect(0, 0, gap, unit_width*0.75f, marginPaint);//��߿�
// canvas.drawRect(gap, 0, gap+unit_width, unit_width*0.75f, mPaint);//�����
// if(hasRightEdge)
// canvas.drawRect(gap+unit_width, 0, gap+gap+unit_width, unit_width*0.75f, marginPaint);//�ұ߿�
//
/... | protected void onDraw(Canvas canvas) {
// canvas.drawRect(0, 0, gap, unit_width*0.75f, marginPaint);//��߿�
// canvas.drawRect(gap, 0, gap+unit_width, unit_width*0.75f, mPaint);//�����
// if(hasRightEdge)
// canvas.drawRect(gap+unit_width, 0, gap+gap+unit_width, unit_width*0.75f, marginPaint);//�ұ߿�
//
/... |
public static void whitelistFromJSON(JSONObject jsonObject) {
JSONArray donationJSON = jsonObject.getJSONArray("donation");
for (int i = 0; i < donationJSON.length(); i++) {
String jsonObjectString = donationJSON.get(i).toString();
String playerName = jsonObjectString.substring(jsonObjectString.indexOf(... | public static void whitelistFromJSON(JSONObject jsonObject) {
JSONArray donationJSON = jsonObject.getJSONArray("donation");
for (int i = 0; i < donationJSON.length(); i++) {
String jsonObjectString = donationJSON.get(i).toString();
String playerName = jsonObjectString.substring(jsonObjectString.indexOf(... |
private void handleTerminateEvent(final MakeGoodLaunch launch) {
// TODO This code is to avoid calling terminate() twice by PDT.
if (terminateEventFired(launch)) {
return;
}
markAsTerminateEventFired(launch);
if (!createEventFired(launch)) {
return;
... | private void handleTerminateEvent(final MakeGoodLaunch launch) {
// TODO This code is to avoid calling terminate() twice by PDT.
if (terminateEventFired(launch)) {
return;
}
markAsTerminateEventFired(launch);
if (!createEventFired(launch)) {
TestLifec... |
public void testError( ReportEntry report, String stdOut, String stdErr )
{
super.testError(report, stdOut, stdErr);
String stackTrace = getStackTrace(report);
Xpp3Dom error = createElement (testCase, "error");
String message = StringUtils.replace(repor... | public void testError( ReportEntry report, String stdOut, String stdErr )
{
super.testError(report, stdOut, stdErr);
String stackTrace = getStackTrace(report);
Xpp3Dom error = createElement (testCase, "error");
String message = StringUtils.replace(repor... |
public static final void setFormEntity(final FormComponent form, final Entity entity) {
form.setEntity(entity);
}
| public static void setFormEntity(final FormComponent form, final Entity entity) {
form.setEntity(entity);
}
|
public void render(Map<String, ?> model, HttpServletRequest request,
HttpServletResponse response) throws Exception {
Object data = model.get(DATA_FIELD_NAME);
OutputStream ostream = response.getOutputStream();
if (data == null) {
String err = "Model doesn'... | public void render(Map<String, ?> model, HttpServletRequest request,
HttpServletResponse response) throws Exception {
Object data = model.get(DATA_FIELD_NAME);
response.setContentType("application/json");
OutputStream ostream = response.getOutputStream();
if (d... |
private List<String> generateLore(ItemStack itemStack) {
List<String> lore = new ArrayList<String>();
if (itemStack == null || tier == null) {
return lore;
}
List<String>
tooltipFormat =
MythicDropsPlugin.getInstance().getConfigSettings().getTooltipFormat();
String minecraft... | private List<String> generateLore(ItemStack itemStack) {
List<String> lore = new ArrayList<String>();
if (itemStack == null || tier == null) {
return lore;
}
List<String>
tooltipFormat =
MythicDropsPlugin.getInstance().getConfigSettings().getTooltipFormat();
String minecraft... |
public Collection<CorrelationKey> getCorrelationKeys() {
ArrayList<CorrelationKey> correlationKeys = new ArrayList<CorrelationKey>();
if (_correlationKeys.indexOf("^") > 0) {
for (StringTokenizer tokenizer = new StringTokenizer(_correlationKeys, "^"); tokenizer.hasMoreTokens();) {
... | public Collection<CorrelationKey> getCorrelationKeys() {
ArrayList<CorrelationKey> correlationKeys = new ArrayList<CorrelationKey>();
if (_correlationKeys != null) {
if (_correlationKeys.indexOf("^") > 0) {
for (StringTokenizer tokenizer = new StringTokenizer(_correlationKey... |
public static void remove(FinalizerReference reference) {
synchronized (FinalizerReference.class) {
FinalizerReference next = reference.next;
FinalizerReference prev = reference.prev;
reference.next = null;
reference.prev = null;
if (prev != null) ... | public static void remove(FinalizerReference reference) {
synchronized (FinalizerReference.class) {
FinalizerReference next = reference.next;
FinalizerReference prev = reference.prev;
reference.next = null;
reference.prev = null;
if (prev != null) ... |
public void step(SimState state){
//People is a bag of all people
Bag people = Sim.instance( ).people.getAllNodes( );
//We're going to print out the people for sanity check
System.out.println("The contents of the bag: ");
for(int m=0; m<people.size( ); m++){
Person mP = (Person) people.get(m);
System.o... | public void step(SimState state){
//People is a bag of all people
Bag people = Sim.instance( ).people.getAllNodes( );
//We're going to print out the people for sanity check
System.out.println("The contents of the bag: ");
for(int m=0; m<people.size( ); m++){
Person mP = (Person) people.get(m);
System.o... |
public void writeScores(RecordSet rs, ScoreFunction sf) {
Variable[] variables = rs.getVariableArray();
if( variables.length > 31 )
throw new UnsupportedOperationException("Current implementation does not support more than 31 variables.");
long[] bitmas... | public void writeScores(RecordSet rs, ScoreFunction sf) {
Variable[] variables = rs.getVariableArray();
if( variables.length > 31 )
throw new UnsupportedOperationException("Current implementation does not support more than 31 variables.");
final long[] ... |
private static boolean isOverlap(Event e1, Event e2) {
Calendar newDay = Calendar.getInstance();
long newStart = ((newDay.get(Calendar.HOUR) * 60 + newDay.get(Calendar.MINUTE)) * 60 * 1000) % DAY_MILLIS;
long newEnd = (newStart + e1.getDuration()) % DAY_MILLIS;
Calendar oldDay = Calendar.getInstance();
lo... | private static boolean isOverlap(Event e1, Event e2) {
Calendar newDay = Calendar.getInstance();
newDay.setTimeInMillis(e1.getFirstTime());
long newStart = ((newDay.get(Calendar.HOUR) * 60 + newDay.get(Calendar.MINUTE)) * 60 * 1000) % DAY_MILLIS;
long newEnd = (newStart + e1.getDuration()) % DAY_MILLIS;
C... |
public Object getQuery(Stanza stanza, Object payload) {
// all received IQs contain a community element
LOG.info("get Query received");
if (payload.getClass().equals(CommunityMethods.class)) {
LOG.info("community type received");
CommunityMethods c = (CommunityMethods) payload;
// JOIN
if (c.getJoin... | public Object getQuery(Stanza stanza, Object payload) {
// all received IQs contain a community element
LOG.info("get Query received");
if (payload.getClass().equals(CommunityMethods.class)) {
LOG.info("community type received");
CommunityMethods c = (CommunityMethods) payload;
// JOIN
if (c.getJoin... |
public ButtonLogicBufferSelect(GuiRedNetLogic containerScreen, int x, int y, int pinIndex, LogicButtonType buttonType, int rotation)
{
super(containerScreen, x, y, 30, 14);
_logicScreen = containerScreen;
_buttonType = buttonType;
_pinIndex = pinIndex;
char[] dir = {'F','R','B','L'};
char[] dirMap = ne... | public ButtonLogicBufferSelect(GuiRedNetLogic containerScreen, int x, int y, int pinIndex, LogicButtonType buttonType, int rotation)
{
super(containerScreen, x, y, 30, 14);
_logicScreen = containerScreen;
_buttonType = buttonType;
_pinIndex = pinIndex;
char[] dir = {'L','B','R','F',};
char[] dirMap = n... |
private void printToFileIfApplicable(Object doc,
OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
if (outputGenaratorParam.getParameters() != null) {
if (outputGenaratorParam.getParameters().get("writeToFile") != null
&& "true".equals(outputGenaratorParam.getParameters(... | private void printToFileIfApplicable(Object doc,
OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
if (outputGenaratorParam.getParameters() != null) {
if (outputGenaratorParam.getParameters().get("writeToFile") != null
&& "true".equals(outputGenaratorParam.getParameters(... |
public static <T> MashapeResponse<T> doRequest (Class<T> clazz, HttpMethod httpMethod, String url, Map<String, Object> parameters, ContentType contentType, ResponseType responseType, List<Authentication> authenticationHandlers) {
if (authenticationHandlers == null) authenticationHandlers = new ArrayList<Authenticati... | public static <T> MashapeResponse<T> doRequest (Class<T> clazz, HttpMethod httpMethod, String url, Map<String, Object> parameters, ContentType contentType, ResponseType responseType, List<Authentication> authenticationHandlers) {
if (authenticationHandlers == null) authenticationHandlers = new ArrayList<Authenticati... |
public static String removeQueryString(String url, String ... keys) throws
URISyntaxException, UnsupportedEncodingException {
URI aURI = new URI(url);
List<String> pairStrings = new ArrayList<String>();
Set<String> keySet = new HashSet(Arrays.asList(keys));
for (String p... | public static String removeQueryString(String url, String ... keys) throws
URISyntaxException, UnsupportedEncodingException {
URI aURI = new URI(url);
List<String> pairStrings = new ArrayList<>();
Set<String> keySet = new HashSet<>(Arrays.asList(keys));
for (String pairS... |
public void onSubscribe(SubscriptionEvent event) {
if (event.isLocalOnly() || !event.isRemote() || !event.getSubject().startsWith("cdi.event:")) return;
String name = event.getSubject().substring("cdi.event:".length());
try {
if (observedEvents.containsKey(name) && event.getCoun... | public void onSubscribe(SubscriptionEvent event) {
if (event.isLocalOnly() || !event.isRemote() || !event.getSubject().startsWith("cdi.event:")) return;
String name = event.getSubject().substring("cdi.event:".length());
try {
if (observedEvents.containsKey(name) && event.getCoun... |
PhenoTipsPhenotype(XWikiDocument doc, DBStringListProperty property, String value)
{
this.id = value;
this.propertyName = property.getName();
Matcher nameMatch = NEGATIVE_PREFIX.matcher(this.propertyName);
this.present = !nameMatch.lookingAt();
this.type = nameMatch.repla... | PhenoTipsPhenotype(XWikiDocument doc, DBStringListProperty property, String value)
{
this.id = value;
this.propertyName = property.getName();
Matcher nameMatch = NEGATIVE_PREFIX.matcher(this.propertyName);
this.present = !nameMatch.lookingAt();
this.type = nameMatch.repla... |
public void start(BundleContext bc)
throws Exception
{
logger.debug("Starting the Growl Notification implementation.");
this.bundleContext = bc;
/* Register to Growl */
try
{
Constructor constructor = Growl.class.getConstructor(new Class[]
... | public void start(BundleContext bc)
throws Exception
{
logger.debug("Starting the Growl Notification implementation.");
this.bundleContext = bc;
/* Register to Growl */
try
{
Constructor constructor = Growl.class.getConstructor(new Class[]
... |
protected void doDownload (Resource rsrc)
throws IOException
{
// download the resource from the specified URL
URLConnection conn = rsrc.getRemote().openConnection();
conn.connect();
// make sure we got a satisfactory response code
if (conn instanceof HttpURLConn... | protected void doDownload (Resource rsrc)
throws IOException
{
// download the resource from the specified URL
URLConnection conn = rsrc.getRemote().openConnection();
conn.connect();
// make sure we got a satisfactory response code
if (conn instanceof HttpURLConn... |
private void layoutComponents() {
setVisible(false);
removeAll();
int index = 0;
if (trigger == null) {
add(new TextLabel("You must add at least one trigger before you can add conditions."),
"alignx center, aligny top, grow, push, w 90%!");
} e... | private void layoutComponents() {
setVisible(false);
removeAll();
int index = 0;
if (trigger == null) {
add(new TextLabel("You must add at least one trigger before you can add conditions."),
"alignx center, aligny top, grow, push, w 90%!");
} e... |
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
/* FIXME Intentionally verbose: always log this until we've
fully debugged the app failing to start up */
Log.v("AlarmAlert.onCreate()");
setContentView(R.layout.alarm_alert);
mKlaxon = AlarmKlaxon... | protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
/* FIXME Intentionally verbose: always log this until we've
fully debugged the app failing to start up */
Log.v("AlarmAlert.onCreate()");
setContentView(R.layout.alarm_alert);
mKlaxon = AlarmKlaxon... |
public void id85() {
//Create data------------------------------------------------------------
SP sp = new SP();
sp.loadFromTemplateSOPXFile("resources/filesForTesting/fileForTesting.sopx");
//Create properties
GlobalProperty gpColor = new GlobalProperty("Color");
Va... | public void id85() {
//Create data------------------------------------------------------------
SP sp = new SP();
sp.loadFromTemplateSOPXFile("resources/filesForTesting/fileForTesting.sopx");
//Create properties
GlobalProperty gpColor = new GlobalProperty("Color");
Va... |
public static <E> void f(List<E> list, Comparator<E> comparator) {
BST<E> tree = new BST<E>(list, comparator);
list = tree.traversalInOrderRecursive();
}
| public static <E> void f(final List<E> list, Comparator<E> comparator) {
BST<E> tree = new BST<E>(list, comparator);
List<E> tmp = tree.traversalInOrderRecursive();
for (int i = 0; i < list.size(); i++) {
list.set(i, tmp.get(i));
}
}
|
public void runRsync(File src, File dst,
List<String> subDirs,
String[] extraArgs)
throws IOException
{
try
{
// First the basic arguments
ArrayList<String> args = new ArrayList(6);
args.add("rsync");
args.add("-av");
//args.... | public void runRsync(File src, File dst,
List<String> subDirs,
String[] extraArgs)
throws IOException
{
try
{
// First the basic arguments
ArrayList<String> args = new ArrayList(6);
args.add("rsync");
args.add("-av");
//args.... |
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
// If not our command
if ((!label.equalsIgnoreCase("join") || args.length != 1) &&
(!label.equalsIgnoreCase("ch") || args.length != 2 || !args[0].equalsIgnoreCase("join"))) {
TownyMessaging.sendErrorMsg(sender, "[Town... | public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
// If not our command
if ((!label.equalsIgnoreCase("join") || args.length != 1) &&
(!label.equalsIgnoreCase("ch") || args.length != 2 || !args[0].equalsIgnoreCase("join"))) {
TownyMessaging.sendErrorMsg(sender, "[Town... |
public void exportMap(IMap map, File exportFile)
throws ExportServiceException {
FileOutputStream fos = null;
try {
checkArgs(map, exportFile);
generator = getGenerator();//new MetabolicSBMLExportAdapter<IModel>();
IContextAdapterValidationService validator = serviceProvider
.getValidationServi... | public void exportMap(IMap map, File exportFile) throws ExportServiceException {
if(map == null || exportFile == null){
throw new IllegalArgumentException("parameters map or exportFile canot be null");
}
FileOutputStream fos = null;
try {
checkArgs(map, exportFile);
generator = getGenerator();//new M... |
public org.w3c.dom.Document getCustomConfiguration() {
Configuration customConfig = config.getChild("custom-config", false);
if (customConfig != null) {
org.w3c.dom.Document doc = null;
javax.xml.parsers.DocumentBuilderFactory dbf= javax.xml.parsers.DocumentBuilderFactory.new... | public org.w3c.dom.Document getCustomConfiguration() {
Configuration customConfig = config.getChild("custom-config", false);
if (customConfig != null) {
org.w3c.dom.Document doc = null;
javax.xml.parsers.DocumentBuilderFactory dbf= javax.xml.parsers.DocumentBuilderFactory.new... |
public void printTree(CommonTree t) {
if ( t != null ) {
for ( int i = 0; i < t.getChildCount(); i++ ) {
switch(t.getType()){
//TODO: Add Code
case TanGParser.ADDSUB:
//print out ruby code to a file
break;
case TanGParser.AND:
break;
case TanGParser.ASSERT:
break... | public void printTree(CommonTree t) {
if ( t != null ) {
for ( int i = 0; i < t.getChildCount(); i++ ) {
System.out.println("node text:"+t.getText());
switch(t.getType()){
//TODO: Add Code
case TanGParser.ADDSUB:
//print out ruby code to a file
break;
case TanGParser.AND:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.