PageRenderTime 43ms queryTime 72ms sortTime 11ms getByIdsTime 34ms findMatchingLines 64ms

100+ results results for 'new RuntimeException(e)' (43 ms)

Not the results you expected?
IntegrationTestWFSClient.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 371 lines
                    
111    private Response mockCapabilities() throws IOException, ServiceException {
                    
112        HTTPResponse httpResp = new TestHttpResponse("text/xml", "UTF-8", super.serverURL);
                    
113
                    
180        final DiffFeatureReader<SimpleFeatureType, SimpleFeature> serverFilteredReader;
                    
181        serverFilteredReader = new DiffFeatureReader<SimpleFeatureType, SimpleFeature>(
                    
182                allFeaturesReader, diff);
                    
208                        final DiffFeatureReader<SimpleFeatureType, SimpleFeature> serverFiltered;
                    
209                        serverFiltered = new DiffFeatureReader<SimpleFeatureType, SimpleFeature>(
                    
210                                all, diff);
                    
219                        e.printStackTrace();
                    
220                        throw new RuntimeException(e);
                    
221                    }
                    
277                List<QName> propertyNames = u.getPropertyNames();
                    
278                List<Object> newValues = u.getNewValues();
                    
279
                    
                
AccountDialogFragment.java https://gitlab.com/Kanedias/WalletMaster | Java | 268 lines
                    
160            } catch (SQLException e) { // should not happen
                    
161                throw new RuntimeException(e);
                    
162            }
                    
181            } catch (SQLException e) {
                    
182                throw new RuntimeException(e);
                    
183            }
                    
208            } catch (SQLException e) {
                    
209                throw new RuntimeException(e);
                    
210            }
                    
219            } catch (SQLException e) {
                    
220                throw new RuntimeException(e);
                    
221            }
                    
229            } catch (SQLException e) {
                    
230                throw new RuntimeException(e);
                    
231            }
                    
                
LazyIntDocVector.java https://github.com/earljwagner/Ivory.git | Java | 343 lines
                    
96      int[] positions = posting.getValue();
                    
97      TermPositions tp = new TermPositions();
                    
98      // Write out the first termid.
                    
133    } catch (ArithmeticException e) {
                    
134      throw new RuntimeException(e);
                    
135    }
                    
192        int id = r.nextTerm();
                    
193        TermPositions pos = new TermPositions();
                    
194        r.getPositions(pos);
                    
204  public String toStringWithTerms(DefaultFrequencySortedDictionary map) {
                    
205    StringBuffer s = new StringBuffer("");
                    
206    try {
                    
261      } catch (IOException e) {
                    
262        throw new RuntimeException(e);
                    
263      }
                    
                
StandardSpiderPlot.java https://gitlab.com/samuel-davis/JasperReports-OSGI | Java | 450 lines
                    
71	
                    
72	public static final String PROPERTY_AXIS_LINE_WIDTH = "axisLineWidth";
                    
73	
                    
121		axisLineColor = spiderPlot.getAxisLineColor();
                    
122		axisLineWidth = spiderPlot.getAxisLineWidth();
                    
123		labelGap = spiderPlot.getLabelGap();
                    
325	 */
                    
326	public void setAxisLineWidth(Float axisLineWidth)
                    
327	{
                    
328		Object old = this.axisLineWidth;
                    
329		this.axisLineWidth = axisLineWidth;
                    
330		getEventSupport().firePropertyChange(PROPERTY_AXIS_LINE_WIDTH, old, this.axisLineWidth);
                    
427		{
                    
428			throw new JRRuntimeException(e);
                    
429		}
                    
                
ServerGroupAffectedResourceServerGroupOperationsTestCase.java https://bitbucket.org/cprenzberg/wildfly.git | Java | 377 lines
                    
123
                    
124        final ModelNode operation = new ModelNode();
                    
125        operation.get(OP_ADDR).set(pa.toModelNode());
                    
129
                    
130        new ServerGroupAddHandler(master).execute(operationContext, operation);
                    
131
                    
170
                    
171        final ModelNode operation = new ModelNode();
                    
172        operation.get(OP_ADDR).set(pa.toModelNode());
                    
226
                    
227        final ModelNode operation = new ModelNode();
                    
228        operation.get(OP_ADDR).set(pa.toModelNode());
                    
354                } catch (OperationFailedException e) {
                    
355                    throw new RuntimeException(e);
                    
356                }
                    
                
RenderedContent.java https://github.com/vilmospapp/liferay-portal.git | Java | 445 lines
                    
80		catch (Exception e) {
                    
81			throw new RuntimeException(e);
                    
82		}
                    
112		catch (Exception e) {
                    
113			throw new RuntimeException(e);
                    
114		}
                    
149		catch (Exception e) {
                    
150			throw new RuntimeException(e);
                    
151		}
                    
181		catch (Exception e) {
                    
182			throw new RuntimeException(e);
                    
183		}
                    
211		catch (Exception e) {
                    
212			throw new RuntimeException(e);
                    
213		}
                    
                
AutoText.java https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Java | 279 lines
                    
57
                    
58    private static AutoText sInstance = new AutoText(Resources.getSystem());
                    
59    private static Object sLock = new Object();
                    
81    /**
                    
82     * Returns the instance of AutoText. If the locale has changed, it will create a new
                    
83     * instance of AutoText for the locale.
                    
95            if (!locale.equals(instance.mLocale)) {
                    
96                instance = new AutoText(res);
                    
97                sInstance = instance;
                    
201        } catch (XmlPullParserException e) {
                    
202            throw new RuntimeException(e);
                    
203        } catch (IOException e) {
                    
203        } catch (IOException e) {
                    
204            throw new RuntimeException(e);
                    
205        } finally {
                    
                
XPATHExpressionModifier.java https://github.com/mariofusco/jbpm.git | Java | 253 lines
                    
119//					    } else {
                    
120//					        throw new IllegalArgumentException(contextNode + " is of unsupported type");
                    
121//					    }
                    
174//				} else {
                    
175//					throw new RuntimeException("Not supported step " + remainingSteps + " in expression " + expression);
                    
176//				}
                    
216//		if (node instanceof Document) {
                    
217//		    return newDocument();
                    
218//			// If the node is an element
                    
239//		try {
                    
240//			DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    
241//			return db.newDocument();
                    
243//			//            __log.error(e);
                    
244//			throw new RuntimeException(e);
                    
245//		}
                    
                
TreeOperator.java https://github.com/robotframework/SwingLibrary.git | Java | 267 lines
                    
44public class TreeOperator implements ComponentWrapper {
                    
45    protected PopupCaller popupCaller = new PopupCaller();
                    
46    protected TreePathFactory treePathFactory = new TreePathFactory(this);
                    
50    public TreeOperator(ContainerOperator containerOperator, ComponentChooser componentChooser) {
                    
51        jTreeOperator = new JTreeOperator(containerOperator, componentChooser);
                    
52    }
                    
54    public TreeOperator(ContainerOperator containerOperator, int index) {
                    
55        jTreeOperator = new JTreeOperator(containerOperator, index);
                    
56    }
                    
72        } catch (InterruptedException e) {
                    
73            throw new RuntimeException(e);
                    
74        }
                    
77    private Waiter treePathWaiterFor(final String treePath) {
                    
78        Waiter waiter = new Waiter(new TreePathWaitable(jTreeOperator, treePath));
                    
79        waiter.setTimeouts(new TimeoutCopier(jTreeOperator, 
                    
                
StringUtil.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 393 lines
                    
77		} catch (UnsupportedEncodingException e) {
                    
78			throw new RuntimeException(e);
                    
79		}
                    
228		} catch (UnsupportedEncodingException e) {
                    
229			throw new RuntimeException(e);
                    
230		}
                    
237		} catch (UnsupportedEncodingException e) {
                    
238			throw new RuntimeException(e);
                    
239		}
                    
256		} catch (UnsupportedEncodingException e) {
                    
257			throw new RuntimeException(e);
                    
258		}
                    
265		} catch (UnsupportedEncodingException e) {
                    
266			throw new RuntimeException(e);
                    
267		}
                    
                
ThreadUtils.java https://gitlab.com/manoj-makkuboy/magnetism | Java | 235 lines
                    
64	public static ExecutorService newCachedThreadPool(final String baseName) {
                    
65		return Executors.newCachedThreadPool(new ThreadFactory() {
                    
66			private int nextThreadId = 0;
                    
83	public static ExecutorService newFixedThreadPool(final String baseName, int numThreads) {
                    
84		return Executors.newFixedThreadPool(numThreads, new ThreadFactory() {
                    
85			private int nextThreadId = 0;
                    
106	public static ExecutorService newSingleThreadExecutor(final String name) {
                    
107		return Executors.newSingleThreadExecutor(new ThreadFactory() {
                    
108			public synchronized Thread newThread(Runnable r) {
                    
184			logException(e, false);
                    
185			throw new RuntimeException(e);
                    
186		} catch (ExecutionException e) {
                    
187			logException(e, false);
                    
188			throw new RuntimeException(e);
                    
189		}
                    
                
PageData.java https://github.com/emlang/fitnesse.git | Java | 312 lines
                    
35
                    
36  public static WidgetBuilder classpathWidgetBuilder = new WidgetBuilder(
                    
37      IncludeWidget.class, VariableDefinitionWidget.class,
                    
87  private String content;
                    
88  private WikiPageProperties properties = new WikiPageProperties();
                    
89  private Set<VersionInfo> versions;
                    
99    initializeAttributes();
                    
100    versions = new HashSet<VersionInfo>();
                    
101  }
                    
167    } catch (Exception e) {
                    
168      throw new RuntimeException(e);
                    
169    }
                    
245  private void initializeVariableRoot() throws Exception {
                    
246    variableRoot = new TextIgnoringWidgetRoot(getContentWithVariableRenderTriggers(), wikiPage,
                    
247        literals, variableDefinitionWidgetBuilder
                    
                
PublishCommand.java https://gitlab.com/smartether/buck | Java | 245 lines
                    
125        // This doesn't seem physically possible!
                    
126        throw new RuntimeException(e);
                    
127      }
                    
148
                    
149    Publisher publisher = new Publisher(
                    
150        params.getCell().getFilesystem(),
                    
157      ImmutableSet<DeployResult> deployResults = publisher.publish(
                    
158          new SourcePathResolver(new SourcePathRuleFinder(getBuild().getRuleResolver())),
                    
159          publishables.build());
                    
201                    if (!(input instanceof BuildTargetSpec)) {
                    
202                      throw new IllegalArgumentException(
                    
203                          "Targets must be explicitly defined when using " +
                    
222          if (!(input instanceof BuildTargetSpec)) {
                    
223            throw new IllegalArgumentException(
                    
224                "Need to specify build targets explicitly when publishing. " +
                    
                
FrozenUDTTest.java https://github.com/beobal/cassandra.git | Java | 153 lines
                    
114                {
                    
115                    throw new RuntimeException(e);
                    
116                }
                    
                
TestUnitTestSuite.java https://github.com/rkh/jruby.git | Java | 237 lines
                    
65        BufferedReader testFiles =
                    
66            new BufferedReader(new InputStreamReader(new FileInputStream(testIndexFile)));
                    
67
                    
94        public Interpreter() {
                    
95            in = new ByteArrayInputStream(new byte[0]);
                    
96            out = new ByteArrayOutputStream();
                    
172            try {
                    
173                reader = new BufferedReader(new FileReader(f));
                    
174                while (true) {
                    
186            } catch (FileNotFoundException e) {
                    
187                throw new RuntimeException(e);
                    
188            } catch (IOException e) {
                    
188            } catch (IOException e) {
                    
189                throw new RuntimeException(e);
                    
190            }
                    
                
AbstractNodeBuilder.java https://gitlab.com/smartether/buck | Java | 251 lines
                    
49  private static final TypeCoercerFactory TYPE_COERCER_FACTORY =
                    
50      new DefaultTypeCoercerFactory(ObjectMappers.newDefaultInstance());
                    
51  private static final CoercedTypeCache COERCED_TYPE_CACHE =
                    
51  private static final CoercedTypeCache COERCED_TYPE_CACHE =
                    
52      new CoercedTypeCache(TYPE_COERCER_FACTORY);
                    
53  private static final VisibilityPatternParser VISIBILITY_PATTERN_PARSER =
                    
53  private static final VisibilityPatternParser VISIBILITY_PATTERN_PARSER =
                    
54      new VisibilityPatternParser();
                    
55
                    
67      BuildTarget target) {
                    
68    this(description, target, new FakeProjectFilesystem(), null);
                    
69  }
                    
155    } catch (NoSuchBuildTargetException e) {
                    
156      throw new RuntimeException(e);
                    
157    }
                    
                
AccountsFragment.java https://gitlab.com/Kanedias/WalletMaster | Java | 213 lines
                    
46    private TextView budgetSum;
                    
47    private final EntityDeleteListener mAccountDeleter = new EntityDeleteListener(R.string.really_delete_account);
                    
48
                    
74            case R.id.action_add_account:
                    
75                final AccountDialogFragment accountCreate = new AccountDialogFragment();
                    
76                accountCreate.show(getFragmentManager(), "accCreate");
                    
103                final int accColor = acc.getColor();
                    
104                final float[] rounds = new float[8];
                    
105                Arrays.fill(rounds, convertDpToPixel(10f, mContext));
                    
105                Arrays.fill(rounds, convertDpToPixel(10f, mContext));
                    
106                final ShapeDrawable mDrawable = new ShapeDrawable(new RoundRectShape(rounds, null, null));
                    
107                mDrawable.getPaint().setShader(new LinearGradient(0, 0, mContext.getResources().getDisplayMetrics().widthPixels, 0,
                    
120            } catch (SQLException e) {
                    
121                throw new RuntimeException(e);
                    
122            }
                    
                
TestYearFracCalculatorFromSpreadsheet.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 178 lines
                    
58		HSSFSheet sheet = wb.getSheetAt(0);
                    
59		HSSFFormulaEvaluator formulaEvaluator = new HSSFFormulaEvaluator(wb);
                    
60		int nSuccess = 0;
                    
84				+ " unexpected errors(s) occurred. See stderr for details";
                    
85			throw new AssertionFailedError(msg);
                    
86		}
                    
87		if (nSuccess < 1) {
                    
88			throw new RuntimeException("No test sample cases found");
                    
89		}
                    
104		} catch (EvaluationException e) {
                    
105			throw new RuntimeException(e);
                    
106		}
                    
107		if (expectedValue != actualValue) {
                    
108			throw new ComparisonFailure("Direct calculate failed - row " + (row.getRowNum()+1), 
                    
109					String.valueOf(expectedValue), String.valueOf(actualValue));
                    
                
OrderPreservingPartitioner.java https://github.com/beobal/cassandra.git | Java | 259 lines
                    
53    {
                    
54        return new CachedHashDecoratedKey(getToken(key), key);
                    
55    }
                    
63        Pair<BigInteger,Boolean> midpair = FBUtilities.midpoint(left, right, 16*sigchars);
                    
64        return new StringToken(stringForBig(midpair.left, sigchars, midpair.right));
                    
65    }
                    
128
                    
129    private final Token.TokenFactory tokenFactory = new Token.TokenFactory()
                    
130    {
                    
144            {
                    
145                throw new RuntimeException(e);
                    
146            }
                    
222        {
                    
223            allTokens.put(node, new Float(0.0));
                    
224            sortedRanges.add(new Range<Token>(lastToken, node));
                    
                
SSTableSimpleUnsortedWriter.java https://github.com/thepaul/cassandra.git | Java | 202 lines
                    
49{
                    
50    private static final Buffer SENTINEL = new Buffer();
                    
51
                    
51
                    
52    private Buffer buffer = new Buffer();
                    
53    private final long bufferSize;
                    
55
                    
56    private final BlockingQueue<Buffer> writeQueue = new SynchronousQueue<Buffer>();
                    
57    private final DiskWriter diskWriter = new DiskWriter();
                    
131        {
                    
132            throw new RuntimeException(e);
                    
133        }
                    
150        {
                    
151            throw new RuntimeException(e);
                    
152
                    
                
ModelStorylineView.java https://github.com/kbagstad/aries.git | Java | 430 lines
                    
52		} catch (ThinklabException e) {
                    
53			throw new ThinklabRuntimeException(e);
                    
54		}
                    
195			
                    
196			ArrayList<ZKComponent> components = new ArrayList<ZK.ZKComponent>();
                    
197			
                    
210							tooltip(p.getRunningHead()).
                    
211							hand().listener("onClick", new EventListener() {
                    
212							
                    
256			 */
                    
257			ArrayList<ZKComponent> ibuts = new ArrayList<ZK.ZKComponent>();
                    
258			ibuts.add(ZK.spacer(4));
                    
426		} catch (ThinklabException e) {
                    
427			throw new ThinklabRuntimeException(e);
                    
428		}
                    
                
LocalGameRepository.java https://gitlab.com/mshepherd/generalgameplaying | Java | 326 lines
                    
48    			} catch (IOException e) {
                    
49    				throw new RuntimeException(e);
                    
50    			}
                    
116                    try {
                    
117                        theGameMetaMap.put(gameName, new JSONObject(new String(getResponseBytesForURI("/games/" + gameName + "/"))));
                    
118                    } catch (JSONException e) {
                    
156            // requested actually exists (i.e. is between 0 and the max version).
                    
157            int nMaxVersion = getMaxVersionForDirectory(new File("games", thePrefix));
                    
158            Integer theFetchedVersion = theExplicitVersion;
                    
178            try {
                    
179                JSONObject theMetaJSON = new JSONObject(new String(theMetaBytes));
                    
180                if (nExplicitVersion == null) {
                    
184                }
                    
185                String theRulesheet = new String(getResponseBytesForURI(reqURI.replace("METADATA",theMetaJSON.getString("rulesheet"))));
                    
186                MetadataCompleter.completeMetadataFromRulesheet(theMetaJSON, theRulesheet);
                    
                
AccountSystemBean.java https://gitlab.com/manoj-makkuboy/magnetism | Java | 191 lines
                    
58	public Account createAccountFromResource(Resource res) {
                    
59		User user = new User();
                    
60		user.setNickname(res.getDerivedNickname());
                    
60		user.setNickname(res.getDerivedNickname());
                    
61		Account account = new Account(user);
                    
62		em.persist(user);
                    
79
                    
80	public Client authorizeNewClient(Account acct, String name) {
                    
81		Client c = new Client(acct, name);
                    
82		em.persist(c);
                    
83		acct.authorizeNewClient(c);
                    
84		return c;
                    
89		if (!account.checkClientCookie(authKey))
                    
90			throw new UnauthorizedException("Invalid authorization cookie");
                    
91			
                    
                
ScopeAnalysis.java https://github.com/MrGreen123/Pydev.git | Java | 363 lines
                    
80        if (simpleNode == null){
                    
81            return new Tuple<SimpleNode, List<ASTEntry>>(null, new ArrayList<ASTEntry>());
                    
82        }
                    
121        } catch (Exception e) {
                    
122            throw new RuntimeException(e);
                    
123        }
                    
171        } catch (Exception e) {
                    
172            throw new RuntimeException(e);
                    
173        }
                    
245            } catch (Exception e) {
                    
246                throw new RuntimeException(e);
                    
247            }
                    
252            } catch (Exception e) {
                    
253                throw new RuntimeException(e);
                    
254            }
                    
                
ImageInputStreamImpl.java https://github.com/penberg/classpath.git | Java | 542 lines
                    
102    if (position > streamPos)
                    
103      throw new IndexOutOfBoundsException();
                    
104
                    
159      {
                    
160        throw new RuntimeException(e);
                    
161      }
                    
186
                    
187    // If newOffset is 0 it means we just read the 8th bit in a byte
                    
188    // and therefore we want to advance to the next byte.  Otherwise
                    
190    // calls read bits from the same current byte.
                    
191    if (newOffset != 0)
                    
192      {
                    
535        if (numread < 0)
                    
536          throw new EOFException ();
                    
537        len -= numread;
                    
                
XMLGenerator.java https://bitbucket.org/cprenzberg/resteasy.git | Java | 349 lines
                    
84
                    
85								throw new RuntimeException(e);
                    
86
                    
163
                    
164								throw new RuntimeException(e);
                    
165
                    
167
                    
168								throw new RuntimeException(e);
                    
169							}
                    
199
                    
200				throw new RuntimeException(e);
                    
201
                    
203
                    
204				throw new RuntimeException(e);
                    
205			}
                    
                
AbstractBlockHandlerBean.java https://gitlab.com/manoj-makkuboy/magnetism | Java | 343 lines
                    
159		} catch (IllegalArgumentException e) {
                    
160			throw new RuntimeException(e);
                    
161		} catch (InstantiationException e) {
                    
161		} catch (InstantiationException e) {
                    
162			throw new RuntimeException(e);
                    
163		} catch (IllegalAccessException e) {
                    
163		} catch (IllegalAccessException e) {
                    
164			throw new RuntimeException(e);
                    
165		} catch (InvocationTargetException e) {
                    
165		} catch (InvocationTargetException e) {
                    
166			throw new RuntimeException(e);
                    
167		}
                    
300		} catch (NotFoundException e) {
                    
301			throw new RuntimeException(e);
                    
302		}
                    
                
VolatileNotificationRepoAndFactoryStressTest.java https://github.com/jenkinsci/html-audio-notifier-plugin.git | Java | 189 lines
                    
31    private final VolatileNotificationRepositoryAndFactory impl
                    
32        = new VolatileNotificationRepositoryAndFactory();
                    
33    private final NotificationRepository repo = impl;
                    
36    private final CountDownLatch readyForAction = new CountDownLatch(NUM_CLIENTS);
                    
37    private final CountDownLatch start = new CountDownLatch(1);
                    
38    private final CountDownLatch completed = new CountDownLatch(NUM_CLIENTS);
                    
38    private final CountDownLatch completed = new CountDownLatch(NUM_CLIENTS);
                    
39    private final Set<String> completedClients = Collections.synchronizedSet(new HashSet<String>());
                    
40    
                    
54        assertEquals(asList(n), repo.findNewerThan(asNotificationId(n.getId().getValue() - 1)));
                    
55        assertEquals(asList(n), repo.findNewerThan(null));
                    
56        
                    
78        } catch (InterruptedException e) {
                    
79            throw new RuntimeException(e);
                    
80        }
                    
                
FileUtil.java https://bitbucket.org/fidox/agora-lib.git | Java | 330 lines
                    
44		} catch (IOException e) {
                    
45			throw new RuntimeException(e);
                    
46		}
                    
175		
                    
176		return StringUtils.equals(md5File(new File(fname1)), md5File(new File(fname2)));
                    
177	}
                    
187		final String fname = new File(filename).getName();
                    
188		String[] res = new File(dir).list(new FilenameFilter() {
                    
189
                    
208		final String fname = new File(filename).getName();
                    
209		String[] res = new File(dir).list(new FilenameFilter() {
                    
210
                    
295		} catch(IOException e) {
                    
296			throw new RuntimeException(e);
                    
297		}
                    
                
RemoteDestinationOutboundSocketBindingAddHandler.java https://github.com/smcgowan/wildfly.git | Java | 145 lines
                    
57
                    
58    static final RemoteDestinationOutboundSocketBindingAddHandler INSTANCE = new RemoteDestinationOutboundSocketBindingAddHandler();
                    
59
                    
60    public static ModelNode getOperation(final ModelNode address, final ModelNode remoteDestinationOutboundSocketBinding) {
                    
61        final ModelNode addOperation = new ModelNode();
                    
62        addOperation.get(OP).set(ADD);
                    
109        } catch (UnknownHostException e) {
                    
110            throw new RuntimeException(e);
                    
111        }
                    
133        // create the service
                    
134        final OutboundSocketBindingService outboundSocketBindingService = new RemoteDestinationOutboundSocketBindingService(outboundSocketName, destinationHost, destinationPort, sourcePort, fixedSourcePort);
                    
135        final ServiceBuilder<OutboundSocketBinding> serviceBuilder = serviceTarget.addService(OutboundSocketBinding.OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME.append(outboundSocketName), outboundSocketBindingService);
                    
                
SQLServer.java https://gitlab.com/marcelosabino/OpenbusBR | Java | 413 lines
                    
61    case 5: metricName = (java.lang.String)value$; break;
                    
62    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
                    
63    }
                    
155
                    
156  /** Creates a new SQLServer RecordBuilder */
                    
157  public static br.com.produban.openbus.model.avro.SQLServer.Builder newBuilder() {
                    
157  public static br.com.produban.openbus.model.avro.SQLServer.Builder newBuilder() {
                    
158    return new br.com.produban.openbus.model.avro.SQLServer.Builder();
                    
159  }
                    
161  /** Creates a new SQLServer RecordBuilder by copying an existing Builder */
                    
162  public static br.com.produban.openbus.model.avro.SQLServer.Builder newBuilder(br.com.produban.openbus.model.avro.SQLServer.Builder other) {
                    
163    return new br.com.produban.openbus.model.avro.SQLServer.Builder(other);
                    
408      } catch (Exception e) {
                    
409        throw new org.apache.avro.AvroRuntimeException(e);
                    
410      }
                    
                
ClassPathInfo.java https://bitbucket.org/yossi_gil/services.git | Java | 332 lines
                    
73	/**
                    
74	 * Intitalize a new instance
                    
75	 * 
                    
158	public static List<File> fromClass(Class<?>... cs) throws IllegalArgumentException {
                    
159		final List<File> $ = new ArrayList<File>();
                    
160		for (final Class<?> c : cs) {
                    
186		} catch (final Exception e) {
                    
187			throw new RuntimeException(e);
                    
188		}
                    
229					newPath = "";
                    
230				addFromDirectory(depth + 1, new File(dirOrFile, s), root, result, newPath);
                    
231			}
                    
326	public static void main(String[] args) {
                    
327		final ClassPathInfo cpi = new ClassPathInfo(new File("D:/tools/jdk-1-6-0/jre/lib/rt.jar"));
                    
328		final List<String> list = cpi.getClasses();
                    
                
AbstractTextEdit.java https://github.com/MrGreen123/Pydev.git | Java | 106 lines
                    
45        }
                    
46        this.nodeHelper = new NodeHelper(req.getAdapterPrefs());
                    
47        this.adapterPrefs = req.getAdapterPrefs();
                    
47        this.adapterPrefs = req.getAdapterPrefs();
                    
48        this.astFactory = new PyAstFactory(this.nodeHelper.getAdapterPrefs());
                    
49    }
                    
59        }catch(Exception e){
                    
60            throw new RuntimeException(e);
                    
61        }
                    
67    private String getIndentedSource(SimpleNode node, String source, int indent) {
                    
68        StringBuilder indented = new StringBuilder();
                    
69        String indentation = getIndentation(indent);
                    
88    protected String getIndentation(int indent) {
                    
89        StringBuilder buf = new StringBuilder();
                    
90        for(int i = 0; i < indent; i++){
                    
                
ProtocolAsynchronizer.java https://bitbucket.org/spoticus/yellowbird-mta.git | Java | 167 lines
                    
63public class ProtocolAsynchronizer implements Runnable {
                    
64    private LinkedBlockingQueue<Command> commands = new LinkedBlockingQueue<Command>();
                    
65
                    
93            } catch (InterruptedException e) {
                    
94                throw new RuntimeException(e);
                    
95            }
                    
105            } catch (InterruptedException e) {
                    
106                throw new RuntimeException(e);
                    
107            }
                    
125            } catch (InterruptedException e) {
                    
126                throw new RuntimeException(e);
                    
127            }
                    
137            } catch (InterruptedException e) {
                    
138                throw new RuntimeException(e);
                    
139            }
                    
                
JRBaseChartPlot.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 461 lines
                    
94			labelRotationDouble = plot.getLabelRotationDouble();
                    
95			seriesColors = new TreeSet(plot.getSeriesColors());
                    
96		}
                    
186	{
                    
187		setBackgroundAlpha(new Float(backgroundAlpha));
                    
188	}
                    
202	{
                    
203		setForegroundAlpha(new Float(foregroundAlpha));
                    
204	}
                    
369			{
                    
370				throw new JRRuntimeException(e);
                    
371			}
                    
388		{
                    
389			throw new JRRuntimeException(e);
                    
390		}
                    
                
ControlledCommandFactory.java https://bitbucket.org/cprenzberg/infinispan.git | Java | 352 lines
                    
85   public final CommandsFactory actual;
                    
86   public final ReclosableLatch gate = new ReclosableLatch(true);
                    
87   public final AtomicInteger remoteCommandsReceived = new AtomicInteger(0);
                    
87   public final AtomicInteger remoteCommandsReceived = new AtomicInteger(0);
                    
88   public final AtomicInteger blockTypeCommandsReceived = new AtomicInteger(0);
                    
89   public final List<ReplicableCommand> receivedCommands = new ArrayList<ReplicableCommand>();
                    
118            } catch (InterruptedException e) {
                    
119               throw new RuntimeException(e);
                    
120            }
                    
127      ComponentRegistry componentRegistry = cache.getAdvancedCache().getComponentRegistry();
                    
128      final ControlledCommandFactory ccf = new ControlledCommandFactory(componentRegistry.getCommandsFactory(), toBlock);
                    
129      TestingUtil.replaceField(ccf, "commandsFactory", componentRegistry, ComponentRegistry.class);
                    
173   @Override
                    
174   public ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, long lifespanMillis, long maxIdleTimeMillis, Set<Flag> flags) {
                    
175      return actual.buildReplaceCommand(key, oldValue, newValue, lifespanMillis, maxIdleTimeMillis, flags);
                    
                
Features.java https://bitbucket.org/miguelvega/openapi.git | Java | 209 lines
                    
48    public static <U> SimpleFeature objectToSimpleFeature(SimpleFeatureType featureType, U context) {
                    
49        SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(featureType);
                    
50
                    
65            if (!isNullOrEmpty(column.name())) {
                    
66                attrName = new NameImpl(column.name());
                    
67            } else {
                    
67            } else {
                    
68                attrName = new NameImpl(field.getName());
                    
69            }
                    
155        } catch (UnsupportedEncodingException e) {
                    
156            throw new RuntimeException(e);
                    
157        }
                    
165            //copy over to avoid array store exception
                    
166            values = new ArrayList(split.length);
                    
167            for (int i = 0; i < split.length; i++) {
                    
                
SerializationFactory.java https://github.com/zerohistory/storm.git | Java | 207 lines
                    
59        });
                    
60        put(4, new ISerialization<Double>() {
                    
61                public boolean accept(Class c) {
                    
149        Map<Object, String> customSerializations = (Map<Object, String>) conf.get(Config.TOPOLOGY_SERIALIZATIONS);
                    
150        if(customSerializations==null) customSerializations = new HashMap<Object, String>();
                    
151        for(Object tokenObj: customSerializations.keySet()) {
                    
164                } else {
                    
165                    throw new RuntimeException(e);
                    
166                }
                    
167            } catch(InstantiationException e) {
                    
168                throw new RuntimeException(e);
                    
169            } catch(IllegalAccessException e) {
                    
169            } catch(IllegalAccessException e) {
                    
170                throw new RuntimeException(e);
                    
171            }
                    
                
DynamicThreadPoolExecutorTest.java https://gitlab.com/apachipa/uportal | Java | 315 lines
                    
45    @Test
                    
46    public void testExecutorsNewCachedThreadPool() throws Exception {
                    
47        //See Executors.newCachedThreadPool();
                    
47        //See Executors.newCachedThreadPool();
                    
48        final ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 2, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>()) {
                    
49            @Override
                    
57            @Override
                    
58            protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) {
                    
59                if (runnable instanceof RunnableFuture) {
                    
263        public static LatchFutureTask create() {
                    
264            return new LatchFutureTask(new LatchRunnable());
                    
265        }
                    
310            catch (InterruptedException e) {
                    
311                throw new RuntimeException(e);
                    
312            }
                    
                
BucketizedHiveInputSplit.java https://github.com/steeve/hive.git | Java | 198 lines
                    
114    }
                    
115    return new Path("");
                    
116  }
                    
144      } catch (Exception e) {
                    
145        throw new RuntimeException(e);
                    
146      }
                    
155      } catch (Exception e) {
                    
156        throw new RuntimeException(e);
                    
157      }
                    
172    int numSplits = in.readInt();
                    
173    inputSplits = new InputSplit[numSplits];
                    
174    for (int i = 0; i < numSplits; i++) {
                    
175      try {
                    
176        inputSplits[i] = (InputSplit) ReflectionUtils.newInstance(conf
                    
177            .getClassByName(inputSplitClassName), conf);
                    
                
XmlUtil.java https://github.com/oburakevych/Integration-Payments.git | Java | 142 lines
                    
58		if (!hasValidXmlDeclaration(doc)) {
                    
59			byte[] newdoc = new byte[doc.length + XML_DECL.length];
                    
60			System.arraycopy(XML_DECL, 0, newdoc, 0, XML_DECL.length);
                    
61			System.arraycopy(doc, 0, newdoc, XML_DECL.length, doc.length);
                    
62			return newdoc;
                    
63		} else {
                    
78            documentBuilder.setEntityResolver(resolver);
                    
79            Document doc = documentBuilder.parse(new ByteArrayInputStream(xml));
                    
80
                    
88		try {
                    
89			Transformer transformer = TransformerFactory.newInstance().newTransformer();
                    
90			transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                    
98		} catch (Exception e) {
                    
99			throw new RuntimeException(e);
                    
100		}
                    
                
CustomSurfaceView.java https://gitlab.com/amardeep434/nitro_base | Java | 243 lines
                    
38    private final static long DURATION_TO_MEASURE_PRECISE_MS = 3000;
                    
39    private final static Random mRandom = new Random();
                    
40
                    
40
                    
41    private final Object mSurfaceLock = new Object();
                    
42    private Surface mSurface;
                    
103            if (mCanvas != null) {
                    
104                throw new RuntimeException("Surface canvas was already acquired.");
                    
105            }
                    
115                if (mSurface == null) {
                    
116                    throw new RuntimeException(
                    
117                            "Surface was destroyed but canvas was not released.");
                    
206        } catch (InterruptedException e) {
                    
207            throw new RuntimeException(e);
                    
208        }
                    
                
ClassPathInfo.java https://bitbucket.org/yossi_gil/services.git | Java | 220 lines
                    
58         for(URL url : urls)
                    
59            fs.add(new File(url.getFile()));
                    
60      }
                    
62      String cp = System.getProperty("sun.boot.class.path");
                    
63      for (StringTokenizer st = new StringTokenizer(cp, File.pathSeparator); st.hasMoreTokens();) {
                    
64         File f = new File(st.nextToken());
                    
86		for (int i = 0; i < elements.size(); ++i)
                    
87			result[i] = new File(elements.get(i));
                    
88		return result;
                    
96      } catch (Exception e) {
                    
97         throw new RuntimeException(e);
                    
98      }
                    
212		for (StringTokenizer st = new StringTokenizer(s, File.pathSeparator); st.hasMoreTokens();) {
                    
213			File f = new File(st.nextToken());
                    
214			cpi.add(f);
                    
                
JazzySpellChecker.java https://github.com/chrisco484/core.git | Java | 282 lines
                    
84		{
                    
85			throw new RuntimeException(e);
                    
86		}
                    
94			{
                    
95				throw new RuntimeException(e);
                    
96			}
                    
116		ResourceResponse resourceResponse = new ResourceResponse();
                    
117		resourceResponse.setWriteCallback(new WriteCallback()
                    
118		{
                    
150			ServletInputStream sis = req.getInputStream();
                    
151			reader = new BufferedReader(new InputStreamReader(sis, "UTF-8"));
                    
152			// Used for debugging:
                    
158
                    
159			json = new JSONObject(new JSONTokener(reader));
                    
160			// LOG.debug("JSON Object: {}", json);
                    
                
SQLEntity.java https://gitlab.com/Slind/PermissionsEx | Java | 448 lines
                    
73		} catch (SQLException e) {
                    
74			throw new RuntimeException(e);
                    
75		}
                    
210		} catch (SQLException e) {
                    
211			throw new RuntimeException(e);
                    
212		}
                    
401		} catch (SQLException e) {
                    
402			throw new RuntimeException(e);
                    
403		}
                    
422		} catch (SQLException e) {
                    
423			throw new RuntimeException(e);
                    
424		}
                    
444		} catch (SQLException e) {
                    
445			throw new RuntimeException(e);
                    
446		}
                    
                
BasicAntBuilder.java https://github.com/andrewhj-mn/gradle.git | Java | 108 lines
                    
46        } catch (Exception e) {
                    
47            throw new RuntimeException(e);
                    
48        }
                    
55    public Map<String, Object> getProperties() {
                    
56        throw new UnsupportedOperationException();
                    
57    }
                    
60    public Map<String, Object> getReferences() {
                    
61        throw new UnsupportedOperationException();
                    
62    }
                    
86        } catch (IllegalAccessException e) {
                    
87            throw new RuntimeException(e);
                    
88        }
                    
98        } catch (IllegalAccessException e) {
                    
99            throw new RuntimeException(e);
                    
100        }
                    
                
TestSSTRecord.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 357 lines
                    
53            InputStream is = HSSFTestDataSamples.openSampleFileStream(sampleFileName);
                    
54            BufferedReader br = new BufferedReader(new InputStreamReader(is));
                    
55            try {
                    
64            } catch (IOException e) {
                    
65                throw new RuntimeException(e);
                    
66            }
                    
75    private static SSTRecord createSSTFromRawData(byte[] rawData) {
                    
76        RecordInputStream in = new RecordInputStream(new ByteArrayInputStream(rawData));
                    
77        in.nextRecord();
                    
152                {
                    
153                    new byte[9000], new byte[7433], new byte[9002],
                    
154                    new byte[16998]
                    
161            Arrays.fill( bstrings[k], (byte) ( 'a' + k ) );
                    
162            strings[k] = new UnicodeString( new String(bstrings[k]) );
                    
163            record.addString( strings[k] );
                    
                
DefaultSignatureValidator.java https://github.com/lujop/AndroidBillingLibrary.git | Java | 107 lines
                    
50			KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM);
                    
51			return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey));
                    
52		} catch (NoSuchAlgorithmException e) {
                    
52		} catch (NoSuchAlgorithmException e) {
                    
53			throw new RuntimeException(e);
                    
54		} catch (InvalidKeySpecException e) {
                    
55			Log.e(BillingController.LOG_TAG, "Invalid key specification.");
                    
56			throw new IllegalArgumentException(e);
                    
57		} catch (Base64DecoderException e) {
                    
58			Log.e(BillingController.LOG_TAG, "Base64 decoding failed.");
                    
59			throw new IllegalArgumentException(e);
                    
60		}
                    
                
DefaultLoggingFactory.java https://gitlab.com/gogo649/dropwizard | Java | 233 lines
                    
46public class DefaultLoggingFactory implements LoggingFactory {
                    
47    private static final ReentrantLock MBEAN_REGISTRATION_LOCK = new ReentrantLock();
                    
48    private static final ReentrantLock CHANGE_LOGGER_CONTEXT_LOCK = new ReentrantLock();
                    
129        final LevelFilterFactory<ILoggingEvent> levelFilterFactory = new ThresholdLevelFilterFactory();
                    
130        final AsyncAppenderFactory<ILoggingEvent> asyncAppenderFactory = new AsyncLoggingEventAppenderFactory();
                    
131        final LayoutFactory<ILoggingEvent> layoutFactory = new DropwizardLayoutFactory();
                    
148            if (!server.isRegistered(objectName)) {
                    
149                server.registerMBean(new JMXConfigurator(loggerContext,
                    
150                                server,
                    
155                NotCompliantMBeanException | MBeanRegistrationException e) {
                    
156            throw new RuntimeException(e);
                    
157        } finally {
                    
174    private void configureInstrumentation(Logger root, MetricRegistry metricRegistry) {
                    
175        final InstrumentedAppender appender = new InstrumentedAppender(metricRegistry);
                    
176        appender.setContext(loggerContext);
                    
                
RemotingConnectorService.java https://bitbucket.org/cprenzberg/wildfly.git | Java | 99 lines
                    
53
                    
54    private final InjectedValue<MBeanServer> mBeanServer = new InjectedValue<MBeanServer>();
                    
55
                    
55
                    
56    private final InjectedValue<Endpoint> endpoint = new InjectedValue<Endpoint>();
                    
57
                    
59    public synchronized void start(final StartContext context) throws StartException {
                    
60        server = new RemotingConnectorServer(mBeanServer.getValue(), endpoint.getValue());
                    
61        try {
                    
63        } catch (IOException e) {
                    
64            throw new StartException(e);
                    
65        }
                    
72        } catch (IOException e) {
                    
73            throw new RuntimeException(e);
                    
74        }
                    
                
RDFSliceRDFInputStreamInterator.java https://bitbucket.org/emarx/rdfslice.git | Java | 143 lines
                    
33		if(is == null) {
                    
34			throw new Exception("InputStream could not be Null.");
                    
35		}
                    
40	private void init(InputStream is) throws Exception {
                    
41		br = new LineNumberReader(new InputStreamReader(is, Charset.forName("UTF-8")));	
                    
42		bIS = new BufferedInputStream(is);
                    
42		bIS = new BufferedInputStream(is);
                    
43		prefixTable = new HashMap<String, String>();
                    
44	}
                    
51		} catch (IOException e) {
                    
52			throw new RuntimeException(e);
                    
53		}
                    
114			if(currentLine == null)
                    
115				throw new Exception("Line could not be null");
                    
116			
                    
                
ShadowRemoteViews.java https://github.com/roberttaylor426/robolectric.git | Java | 127 lines
                    
25    private int layoutId;
                    
26    private List<ViewUpdater> viewUpdaters = new ArrayList<ViewUpdater>();
                    
27
                    
44    public void setTextViewText(int viewId, final CharSequence text) {
                    
45        viewUpdaters.add(new ViewUpdater(viewId) {
                    
46            @Override
                    
54    public void setOnClickPendingIntent(int viewId, final PendingIntent pendingIntent) {
                    
55        viewUpdaters.add(new ViewUpdater(viewId) {
                    
56            @Override void doUpdate(final View view) {
                    
56            @Override void doUpdate(final View view) {
                    
57                view.setOnClickListener(new View.OnClickListener() {
                    
58                    @Override
                    
62                        } catch (PendingIntent.CanceledException e) {
                    
63                            throw new RuntimeException(e);
                    
64                        }
                    
                
WebSecurityFORMTestCase.java https://github.com/smcgowan/wildfly.git | Java | 157 lines
                    
64        } catch (Exception e) {
                    
65            throw new RuntimeException(e);
                    
66        }
                    
78    protected void makeCall(String user, String pass, int expectedStatusCode) throws Exception {
                    
79        DefaultHttpClient httpclient = new DefaultHttpClient();
                    
80        try {
                    
80        try {
                    
81            HttpGet httpget = new HttpGet(URL);
                    
82
                    
104            // We should now login with the user name and password
                    
105            HttpPost httpost = new HttpPost(URL + "/j_security_check");
                    
106
                    
106
                    
107            List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                    
108            nvps.add(new BasicNameValuePair("j_username", user));
                    
                
AudioHandler.java https://github.com/jsjohnst/moby-scheme.git | Java | 436 lines
                    
86	volumeControl = (AudioManager) mCtx.getSystemService(Context.AUDIO_SERVICE);
                    
87	mPlayers_file = new HashMap<String, MPlayerStatus>();
                    
88	mPlayers_player = new HashMap<MediaPlayer, MPlayerStatus>();
                    
96      saveFile=file;
                    
97      recorder = new MediaRecorder();
                    
98      recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
                    
117      // this is a hack to save the file as the specified name
                    
118      File f = new File (this.recording);
                    
119      f.renameTo(new File("/sdcard" + file));
                    
140	    File f = File.createTempFile("play", url.substring(url.length()-4));
                    
141	    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(f));
                    
142	    int ch;
                    
149	} catch (IOException e) {
                    
150	    throw new RuntimeException(e);
                    
151	}
                    
                
JRFillXyzSeries.java https://gitlab.com/samuel-davis/JasperReports-OSGI | Java | 142 lines
                    
121		{
                    
122			throw new JRRuntimeException(e);
                    
123		}
                    
139	{
                    
140		throw new UnsupportedOperationException();
                    
141	}
                    
                
LockTestServer.java https://gitlab.com/matticala/apache-camel | Java | 239 lines
                    
98
                    
99        expect().post().withPath("/api/v1/namespaces/test/configmaps").andReply(new ResponseProvider<Object>() {
                    
100            ThreadLocal<Integer> responseCode = new ThreadLocal<>();
                    
101            
                    
102            private Headers headers = new Headers.Builder().build();
                    
103
                    
145            
                    
146            private Headers headers = new Headers.Builder().build();
                    
147
                    
186            .andReply(200,
                    
187            request -> new PodListBuilder().withNewMetadata().withResourceVersion("1").and().withItems(getCurrentPods()
                    
188            .stream().map(name -> new PodBuilder().withNewMetadata().withName(name).and().build()).collect(Collectors.toList())).build())
                    
224            } catch (InterruptedException e) {
                    
225                throw new RuntimeException(e);
                    
226            }
                    
                
JRubyClassLoader.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 241 lines
                    
30
                    
31    private final Map<URL,Set<String>> jarIndexes = new LinkedHashMap<URL,Set<String>>();
                    
32
                    
35    public JRubyClassLoader(ClassLoader parent) {
                    
36        super(new URL[0], parent);
                    
37    }
                    
64                InputStream unloaderStream = getClass().getResourceAsStream("/org/jruby/util/JDBCDriverUnloader.class");
                    
65                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    
66                byte[] buf = new byte[4096];
                    
72                Class unloaderClass = defineClass("org.jruby.util.JDBCDriverUnloader", baos.toByteArray());
                    
73                unloader = (Runnable) unloaderClass.newInstance();
                    
74            } catch (Exception e) {
                    
74            } catch (Exception e) {
                    
75                throw new RuntimeException(e);
                    
76            }
                    
                
SchemaUpdateStrategyTest.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 353 lines
                    
221                Iterator<String> it = template2.iterator();
                    
222                List<Query> list = new ArrayList<Query>();
                    
223                while (it.hasNext()) {
                    
235        String template = "SELECT #result('ARTIST_ID' 'int') FROM ARTIST ORDER BY ARTIST_ID";
                    
236        SQLTemplate query = new SQLTemplate(Object.class, template);
                    
237        DataMap map = getDataMap();
                    
304        catch (Exception e) {
                    
305            throw new CayenneRuntimeException(e);
                    
306        }
                    
340        catch (SQLException e) {
                    
341            throw new CayenneRuntimeException(e);
                    
342        }
                    
347            catch (SQLException e) {
                    
348                throw new CayenneRuntimeException(e);
                    
349            }
                    
                
AutoBalancer.java https://github.com/dvryaboy/giraph.git | Java | 302 lines
                    
136        for (String hostnameId : workerHostnameIdMap.keySet()) {
                    
137            hostToNumEntriesMap.put(hostnameId, new LongWritable(0));
                    
138            hostToVertexRangeMap.put(hostnameId,
                    
214            if (hostnameIds == null) {
                    
215                hostnameIds = new ArrayList<String>();
                    
216                numEntriesToHostMap.put(entry.getValue(), hostnameIds);
                    
228                if (hostnameId.equals(id)) {
                    
229                    newHostnameId = id;
                    
230                    break;
                    
244                } catch (Exception e) {
                    
245                    throw new RuntimeException(e);
                    
246                }
                    
254                } catch (JSONException e) {
                    
255                    throw new RuntimeException(e);
                    
256                }
                    
                
AuthenticationProcessorImpl.java https://gitlab.com/admin-github-cloud/thunder | Java | 179 lines
                    
63        } else {
                    
64            throw new RuntimeException("Should not happen, which class is this? " + message);
                    
65        }
                    
119
                    
120            byte[] data = new byte[keyServer.getPubKey().length + keyClient.getPubKey().length];
                    
121            System.arraycopy(keyServer.getPubKey(), 0, data, 0, keyServer.getPubKey().length);
                    
129        } catch (NoSuchProviderException | NoSuchAlgorithmException e) {
                    
130            throw new RuntimeException(e);
                    
131        }
                    
151
                    
152        byte[] data = new byte[pubKeyClient.getPubKey().length + pubKeyTempServer.getPubKey().length];
                    
153        System.arraycopy(pubKeyClient.getPubKey(), 0, data, 0, pubKeyClient.getPubKey().length);
                    
                
GamePanel.java https://bitbucket.org/critnal/java.git | Java | 289 lines
                    
103			display.setText("Unandled Exception: " + e.toString());
                    
104			throw new RuntimeException(e);
                    
105		}
                    
118			display.setText("Unandled Exception: " + e.getMessage());
                    
119			throw new RuntimeException(e);
                    
120		}
                    
135			display.setText("Unandled Exception: " + e.toString());
                    
136			throw new RuntimeException(e);
                    
137		}
                    
165			display.setText("Unandled Exception: " + e.toString());
                    
166			throw new RuntimeException(e);
                    
167		}
                    
207		constraints.weighty = 10;
                    
208		newGameButton = new JButton("Start New Game");
                    
209		newGameButton.addActionListener(this);
                    
                
JavaScriptEvaluator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 347 lines
                    
147	{
                    
148		StringBuffer defaultExpr = new StringBuffer();
                    
149		StringBuffer oldExpr = new StringBuffer();
                    
149		StringBuffer oldExpr = new StringBuffer();
                    
150		StringBuffer estimatedExpr = new StringBuffer();
                    
151		
                    
201		
                    
202		return new JavaScriptCompileData.Expression(expression.getValueClassName(),
                    
203				defaultExpr.toString(), estimatedExpr.toString(), oldExpr.toString());
                    
223	private ScriptableObject scope;
                    
224	private Map loadedTypes = new HashMap();
                    
225	private Map compiledExpressions = new HashMap();
                    
313		{
                    
314			throw new JRRuntimeException(e);
                    
315		}
                    
                
QuiescingBlobStoreTCKTest.java https://github.com/JerryPan/akubra.git | Java | 266 lines
                    
61    return new Object[] {
                    
62      new QuiescingBlobStoreTestSuite(new QuiescingBlobStore(storeId1, nonTxnStore), storeId1,
                    
63                                      false, true),
                    
63                                      false, true),
                    
64      new QuiescingBlobStoreTestSuite(new QuiescingBlobStore(storeId2, txnStore), storeId2,
                    
65                                      true, false),
                    
132
                    
133              doWithTimeout(new ERunnable() {
                    
134                @Override
                    
147              if (isOutputSupp) {
                    
148                doWithTimeout(new ERunnable() {
                    
149                  @Override
                    
247          } catch (Exception e) {
                    
248            throw new RuntimeException(e);
                    
249          }
                    
                
RobonoboInstance.java https://github.com/coltnz/robonobo.git | Java | 409 lines
                    
36	ScheduledThreadPoolExecutor executor;
                    
37	Map<String, Object> configs = new HashMap<String, Object>();
                    
38	ServiceManager serviceMgr;
                    
117				} catch (ClassNotFoundException e) {
                    
118					throw new RuntimeException(e);
                    
119				} catch (InstantiationException e) {
                    
119				} catch (InstantiationException e) {
                    
120					throw new RuntimeException(e);
                    
121				} catch (IllegalAccessException e) {
                    
121				} catch (IllegalAccessException e) {
                    
122					throw new RuntimeException(e);
                    
123				}
                    
213		} catch (Exception e) {
                    
214			throw new RuntimeException(e);
                    
215		}
                    
                
ObjectUtils.java https://gitlab.com/mfalzetta/poc-ttsec | Java | 338 lines
                    
96            objectOutputStream.close();
                    
97            encoded = new String(Base64.getEncoder().encode(byteArrayOutputStream.toByteArray()));
                    
98
                    
108        try {
                    
109            ObjectInputStream objectInputStream = new ObjectInputStream(new ByteArrayInputStream(bytes));
                    
110            object = (T) objectInputStream.readObject();
                    
157        } catch (Exception e) {
                    
158            throw new RuntimeException(e);
                    
159        }
                    
190        } catch (Exception e) {
                    
191            throw new RuntimeException(e);
                    
192        }
                    
334        } catch (NoSuchAlgorithmException e) {
                    
335            throw new RuntimeException(e);
                    
336        }
                    
                
SecurityUtils.java https://bitbucket.org/ruraj/acwavab.git | Java | 282 lines
                    
112        } catch (GeneralSecurityException e) {
                    
113            throw new SSHRuntimeException(e);
                    
114        }
                    
117        assert undelimited.length() == 32 : "md5 contract";
                    
118        StringBuilder fp = new StringBuilder(undelimited.substring(0, 2));
                    
119        for (int i = 2; i <= undelimited.length() - 2; i += 2)
                    
124    /**
                    
125     * Creates a new instance of {@link KeyAgreement} with the given algorithm.
                    
126     *
                    
162    /**
                    
163     * Creates a new instance of {@link KeyPairGenerator} with the given algorithm.
                    
164     *
                    
166     *
                    
167     * @return new instance
                    
168     *
                    
                
StringParameter.java https://github.com/joshuamckenty/OpenSHA.git | Java | 369 lines
                    
89            throws ConstraintException {
                    
90        this(name, new StringConstraint(strings), null, null);
                    
91    }
                    
157            throws ConstraintException {
                    
158        this(name, new StringConstraint(strings), null, value);
                    
159    }
                    
214        if (!(constraint instanceof StringConstraint)) {
                    
215            throw new ParameterException(
                    
216                    S
                    
266        if (!(obj instanceof StringParameter)) {
                    
267            throw new ClassCastException(S
                    
268                    + "Object not a StringParameter, unable to compare");
                    
360                } catch (Exception e) {
                    
361                    throw new RuntimeException(e);
                    
362                }
                    
                
Utils.java https://github.com/hsablonniere/play.git | Java | 236 lines
                    
83            if (oldValues == null) {
                    
84                newValues = new String[1];
                    
85                newValues[0] = value;
                    
86            } else {
                    
87                newValues = new String[oldValues.length + 1];
                    
88                System.arraycopy(oldValues, 0, newValues, 0, oldValues.length);
                    
115    }
                    
116    private static ThreadLocal<SimpleDateFormat> httpFormatter = new ThreadLocal<SimpleDateFormat>();
                    
117
                    
126    public static Map<String, String[]> filterMap(Map<String, String[]> map, String prefix) {
                    
127        Map<String, String[]> newMap = new HashMap<String, String[]>();
                    
128        for (String key : map.keySet()) {
                    
232        } catch (CharacterCodingException e) {
                    
233            throw new RuntimeException(e);
                    
234        }
                    
                
TestSSLEnginePair.java https://gitlab.com/Atomic-ROM/libcore | Java | 232 lines
                    
56        SSLEngine[] engines = connect(c, hooks, finished);
                    
57        return new TestSSLEnginePair(c, engines[0], engines[1]);
                    
58    }
                    
64    /**
                    
65     * Create a new connected server/client engine pair within a
                    
66     * existing SSLContext. Optionally specify clientCipherSuites to
                    
66     * existing SSLContext. Optionally specify clientCipherSuites to
                    
67     * allow forcing new SSLSession to test SSLSessionContext
                    
68     * caching. Optionally specify serverCipherSuites for testing
                    
74        if (hooks == null) {
                    
75            hooks = new Hooks();
                    
76        }
                    
150        } catch (Exception e) {
                    
151            throw new RuntimeException(e);
                    
152        }
                    
                
MediaTypesTest.java https://gitlab.com/jaragan/jersey | Java | 180 lines
                    
65    public void testConvertToString() {
                    
66        final List<MediaType> emptyList = Lists.newArrayList();
                    
67        Assert.assertEquals("", MediaTypes.convertToString(emptyList));
                    
77        Assert.assertEquals("\"text/plain\", \"application/json\", \"text/html\"",
                    
78                MediaTypes.convertToString(Lists.newArrayList(MediaType.TEXT_PLAIN_TYPE,
                    
79                        MediaType.APPLICATION_JSON_TYPE,
                    
110        // wildcard subtype #1 - concrete type wins
                    
111        m2 = new MediaType("foo", "bar");
                    
112        _testMostSpecific(m1, m2, m2);
                    
115        // wildcard subtype #2 - first parameter in method wins
                    
116        m2 = new MediaType("foo", "*");
                    
117        _testMostSpecific(m1, m2, m1);
                    
173            } catch (ParseException e) {
                    
174                throw new RuntimeException(e);
                    
175            }
                    
                
KeystorePasswordCallback.java https://gitlab.com/matticala/apache-camel | Java | 112 lines
                    
29    
                    
30    private Map<String, String> passwords = new HashMap<>();
                    
31    
                    
65        } catch (Exception e) {
                    
66            throw new RuntimeException(e);
                    
67        }
                    
72        } catch (Exception e) {
                    
73            throw new RuntimeException(e);
                    
74        }
                    
80        } catch (Exception e) {
                    
81            throw new RuntimeException(e);
                    
82        }
                    
                
UnmodifiableCollectionsSerializer.java https://github.com/opentripplanner/OpenTripPlanner.git | Java | 174 lines
                    
46  /**
                    
47   * Creates a new {@link UnmodifiableCollectionsSerializer} and registers its serializer for the
                    
48   * several unmodifiable Collections that can be created via {@link Collections}, including {@link
                    
59  public static void registerSerializers(Kryo kryo) {
                    
60    UnmodifiableCollectionsSerializer serializer = new UnmodifiableCollectionsSerializer();
                    
61    UnmodifiableCollection.values();
                    
80    } catch (Exception e) {
                    
81      throw new RuntimeException(e);
                    
82    }
                    
104    } catch (Exception e) {
                    
105      throw new RuntimeException(e);
                    
106    }
                    
109  private Collection<?> getValues(Object coll) {
                    
110    return new ArrayList<>((Collection) coll);
                    
111  }
                    
                
JRBaseGroup.java https://gitlab.com/samuel-davis/JasperReports-OSGI | Java | 344 lines
                    
54	
                    
55	public static final String PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE = "minHeightToStartNewPage";
                    
56	
                    
66	
                    
67	public static final String PROPERTY_START_NEW_PAGE = "isStartNewPage";
                    
68
                    
138		this.isStartNewColumn = isStart;
                    
139		getEventSupport().firePropertyChange(PROPERTY_START_NEW_COLUMN, old, this.isStartNewColumn);
                    
140	}
                    
194		this.minHeightToStartNewPage = minHeight;
                    
195		getEventSupport().firePropertyChange(PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE, old, this.minHeightToStartNewPage);
                    
196	}
                    
261		{
                    
262			throw new JRRuntimeException(e);
                    
263		}
                    
                
SimplifiedOneToManyRelation.java https://bitbucket.org/cprenzberg/resteasy.git | Java | 364 lines
                    
235
                    
236			throw new RuntimeException(e);
                    
237		}
                    
252
                    
253				throw new RuntimeException(e);
                    
254
                    
260
                    
261				throw new RuntimeException(e);
                    
262			}
                    
282
                    
283				throw new RuntimeException(e);
                    
284
                    
335
                    
336			throw new RuntimeException(e);
                    
337		}
                    
                
BulkCursorToCursorAdaptor.java https://bitbucket.org/leispire/android-database-sqlcipher.git | Java | 319 lines
                    
90        if (mObserverBridge == null) {
                    
91            mObserverBridge = new SelfContentObserver(this);
                    
92        }
                    
101    @Override
                    
102    public boolean onMove(int oldPosition, int newPosition) {
                    
103        try {
                    
105            if (mWindow != null) {
                    
106                if (newPosition < mWindow.getStartPosition() ||
                    
107                        newPosition >= (mWindow.getStartPosition() + mWindow.getNumRows())) {
                    
107                        newPosition >= (mWindow.getStartPosition() + mWindow.getNumRows())) {
                    
108                    mWindow = mBulkCursor.getWindow(newPosition);
                    
109                } else if (mWantsAllOnMoveCalls) {
                    
270            // cursors when the provider process is killed.
                    
271            throw new RuntimeException(e);
                    
272        }
                    
                
DirectIoFileChannel.java https://github.com/VoltDB/voltdb.git | Java | 152 lines
                    
43public class DirectIoFileChannel {
                    
44    private static final VoltLogger s_log = new VoltLogger("HOST");
                    
45    // Open options for DIRECT IO support. Only exists in java 10+
                    
70            } catch (ClassNotFoundException | NoSuchMethodException e1) {
                    
71                throw new RuntimeException("Unable to load java classes for direct IO", e1);
                    
72            }
                    
97        } else if (Files.exists(path)) {
                    
98            throw new IllegalArgumentException("Path exists but is not a regular file or directory: " + path);
                    
99        } else if (!Files.isDirectory(path.getParent())) {
                    
141        } catch (IllegalAccessException e) {
                    
142            throw new RuntimeException(e);
                    
143        } catch (InvocationTargetException e) {
                    
144            Throwables.throwIfUnchecked(e.getCause());
                    
145            throw new RuntimeException(e);
                    
146        }
                    
                
OAuthScribeClient.java git://github.com/winterstein/JTwitter.git | Java | 471 lines
                    
105		} catch (Exception e) {
                    
106			throw new RuntimeException(e);
                    
107		}
                    
196		} catch (Exception e) {
                    
197			throw new RuntimeException(e);
                    
198		}
                    
212		} catch (URISyntaxException e) {
                    
213			throw new TwitterException(e);
                    
214		}
                    
313		/*
                    
314		Properties props = new Properties();
                    
315		// hard coded for efficiency & why not?
                    
338			assert canAuthenticate();
                    
339			OAuthRequest request = new OAuthRequest(Verb.POST, uri);
                    
340			if (vars != null && vars.size() != 0) {
                    
                
Node.java https://github.com/caffeinborg/org.eclipse.ecr.git | Java | 396 lines
                    
92            // do not propagate this unlikely exception as a checked one
                    
93            throw new RuntimeException(e);
                    
94        }
                    
101            // do not propagate this unlikely exception as a checked one
                    
102            throw new RuntimeException(e);
                    
103        }
                    
110            // do not propagate this unlikely exception as a checked one
                    
111            throw new RuntimeException(e);
                    
112        }
                    
199        } catch (StorageException e) {
                    
200            throw new RuntimeException(e);
                    
201        }
                    
220        } catch (StorageException e) {
                    
221            throw new RuntimeException(e);
                    
222        }
                    
                
FileBackend.java https://github.com/NuclearW/PermissionsEx.git | Java | 356 lines
                    
98            } catch (IOException e) {
                    
99                throw new RuntimeException(e);
                    
100            }
                    
108        if (world != null && !world.isEmpty()) {
                    
109            return this.permissions.getStringList("worlds." + world + ".inheritance", new LinkedList<String>()).toArray(new String[0]);
                    
110        }
                    
221            if (baseKey != null && !baseKey.isEmpty()) {
                    
222                newKey = baseKey + "." + newKey;
                    
223            }
                    
242
                    
243        Yaml yaml = new Yaml(new SafeConstructor(), new Representer(), options);
                    
244
                    
244
                    
245        ConfigurationNode root = new ConfigurationNode();
                    
246
                    
                
FileUtil.java https://github.com/sfyrat/fitnesse.git | Java | 222 lines
                    
20      for (int i = 0; i < names.length - 1; i++) {
                    
21        parent = parent == null ? new File(names[i]) : new File(parent, names[i]);
                    
22        if (!parent.exists())
                    
24      }
                    
25      File fileToCreate = new File(parent, names[names.length - 1]);
                    
26      return createFile(fileToCreate, content);
                    
36    catch (IOException e) {
                    
37      throw new RuntimeException(e);
                    
38    }
                    
134    LinkedList<String> lines = new LinkedList<String>();
                    
135    BufferedReader reader = new BufferedReader(new FileReader(file));
                    
136    String line;
                    
148  public static void writeLinesToFile(File file, List<?> lines) throws Exception {
                    
149    PrintStream output = new PrintStream(new FileOutputStream(file));
                    
150    for (Iterator<?> iterator = lines.iterator(); iterator.hasNext();) {
                    
                
ParserTest.java https://github.com/JetBrains/la-clojure.git | Java | 209 lines
                    
43    try {
                    
44      final String expected = FileUtil.loadFile(new File(getDataPath() + fileName + "-tree.txt"), true);
                    
45      assertEquals(expected, psiTree);
                    
46    } catch (IOException e) {
                    
47      throw new RuntimeException(e);
                    
48    }
                    
                
AbstractFilterInvocationDefinition.java https://github.com/pedjak/grails-spring-security-core.git | Java | 341 lines
                    
55
                    
56	private final Map<Object, Collection<ConfigAttribute>> _compiled = new LinkedHashMap<Object, Collection<ConfigAttribute>>();
                    
57
                    
86			// TODO fix this
                    
87			throw new RuntimeException(e);
                    
88		}
                    
118					if (_log.isTraceEnabled()) {
                    
119						_log.trace("new candidate for '" + url + "': '" + pattern
                    
120								+ "':" + configAttributes);
                    
165
                    
166		Collection<ConfigAttribute> all = new HashSet<ConfigAttribute>();
                    
167		for (Collection<ConfigAttribute> configs : _compiled.values()) {
                    
228		String[] parts = StringUtils.commaDelimitedListToStringArray(value);
                    
229		List<String> cleaned = new ArrayList<String>();
                    
230		for (String part : parts) {
                    
                
JarESModuleRepository.java https://github.com/Gubaer/josm-scripting-plugin.git | Java | 276 lines
                    
79            // shouldn't happen
                    
80            throw new RuntimeException(e);
                    
81        }
                    
93        this.jarFile = jarFile;
                    
94        this.jar = new JarFile(jarFile);
                    
95        this.root = Path.of("");
                    
111        this.jarFile = jarFile;
                    
112        this.jar = new JarFile(jarFile);
                    
113        var path = Path.of(rootEntry).normalize();
                    
120        if (entry == null) {
                    
121            throw new IllegalArgumentException(MessageFormat.format(
                    
122                "Root entry ''{0}'' not found in jar file ''{1}''",
                    
141        try {
                    
142            final var moduleJarUri = new ModuleJarURI(uri);
                    
143            if (!moduleJarUri.refersToJarFile()) {
                    
                
ReplaySubjectConcurrencyTest.java https://gitlab.com/francesmorales/RxJava | Java | 327 lines
                    
53        final ReplaySubject<Long> replay = ReplaySubject.create();
                    
54        Thread source = new Thread(new Runnable() {
                    
55
                    
119
                    
120        Thread fastThread = new Thread(new Runnable() {
                    
121
                    
198            }
                    
199            Thread t = new Thread(new Runnable() {
                    
200
                    
268
                    
269            Thread t1 = new Thread(new Runnable() {
                    
270
                    
294            } catch (InterruptedException e) {
                    
295                throw new RuntimeException(e);
                    
296            }
                    
                
Cloud.java https://gitlab.com/alvinahmadov2/h2o-2 | Java | 162 lines
                    
27  /** Includes for rsync between the master and slaves */
                    
28  public final Set<String> fannedRSyncIncludes = new HashSet<String>();
                    
29  /** Excludes for rsync between the master and slaves */
                    
67    if( JRE != null )
                    
68      p._incls.add(new File(JRE).getName());
                    
69    list.add(VM.write(p));
                    
71    String[] java = Utils.append(java_args, NodeVM.class.getName());
                    
72    Params params = new Params(master, java, list.toArray(new String[0]));
                    
73    if( WATCHDOGS ) {
                    
80      } catch( Exception e ) {
                    
81        throw new RuntimeException(e);
                    
82      }
                    
135        hosts.put(host.address(), host);
                    
136        workers.add(new NodeHost(host, workerArgs));
                    
137      }
                    
                
BluetoothDeviceDetailsRotationTest.java https://gitlab.com/SkyDragon-OSP/platform_packages_apps_settings | Java | 105 lines
                    
70        BluetoothDeviceDetailsFragment.sTestDataFactory =
                    
71                new BluetoothDeviceDetailsFragment.TestDataFactory() {
                    
72            @Override
                    
85    public void rotation() {
                    
86        Intent intent = new Intent("android.settings.BLUETOOTH_SETTINGS");
                    
87        SettingsActivity activity = (SettingsActivity) mInstrumentation.startActivitySync(intent);
                    
87        SettingsActivity activity = (SettingsActivity) mInstrumentation.startActivitySync(intent);
                    
88        Bundle args = new Bundle(1);
                    
89        args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS, mDeviceAddress);
                    
89        args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS, mDeviceAddress);
                    
90        new SubSettingLauncher(activity)
                    
91                .setDestination(BluetoothDeviceDetailsFragment.class.getName())
                    
101        } catch (RemoteException e) {
                    
102            throw new RuntimeException(e);
                    
103        }
                    
                
RangeTombstone.java https://github.com/thepaul/cassandra.git | Java | 281 lines
                    
37{
                    
38    public static final Serializer serializer = new Serializer();
                    
39
                    
41    {
                    
42        this(start, stop, new DeletionTime(markedForDeleteAt, localDeletionTime));
                    
43    }
                    
66    {
                    
67        throw new UnsupportedOperationException();
                    
68    }
                    
97        {
                    
98            throw new RuntimeException(e);
                    
99        }
                    
118        private final Deque<RangeTombstone> ranges = new ArrayDeque<RangeTombstone>();
                    
119        private final SortedSet<RangeTombstone> maxOrderingSet = new TreeSet<RangeTombstone>(new Comparator<RangeTombstone>()
                    
120        {
                    
                
MapObject.java https://gitlab.com/mfriedenhagen/swizzle | Java | 387 lines
                    
37     */
                    
38    protected Map xmlrpcRefs = new HashMap();
                    
39
                    
174        if (object instanceof JSONObject) {
                    
175            object = new JSONObjectToMap((JSONObject) object).invoke();
                    
176        }
                    
182        } catch (Exception e) {
                    
183            throw new RuntimeException(e);
                    
184        }
                    
261
                    
262        Object object = constructor.newInstance(new Object[]{data});
                    
263        return (MapObject) object;
                    
330        public Attributes() {
                    
331            fields.put("#attributes", new LinkedHashMap());
                    
332            xmlrpcNoSend.add("#attributes");
                    
                
FreeTTSVoices.java https://bitbucket.org/ftesser/marytts.git | Java | 248 lines
                    
107    {
                    
108        if (mary2freettsVoices == null) mary2freettsVoices = new HashMap<marytts.modules.synthesis.Voice, com.sun.speech.freetts.Voice>();
                    
109        if (freetts2maryVoices == null) freetts2maryVoices = new HashMap<com.sun.speech.freetts.Voice, marytts.modules.synthesis.Voice>();
                    
123            try {
                    
124                freeTTSVoice = (DummyFreeTTSVoice) Class.forName("marytts.language.en.DummyFreeTTSVoice").newInstance();
                    
125            } catch (InstantiationException e) {
                    
125            } catch (InstantiationException e) {
                    
126                throw new RuntimeException(e);
                    
127            } catch (IllegalAccessException e) {
                    
127            } catch (IllegalAccessException e) {
                    
128                throw new RuntimeException(e);
                    
129            } catch (ClassNotFoundException e) {
                    
129            } catch (ClassNotFoundException e) {
                    
130                throw new RuntimeException(e);
                    
131            }
                    
                
VectorUDFAdaptor.java https://github.com/pkalmegh/hive.git | Java | 350 lines
                    
75    genericUDF = expr.getGenericUDF();
                    
76    deferredChildren = new GenericUDF.DeferredObject[expr.getChildren().size()];
                    
77    childrenOIs = new ObjectInspector[expr.getChildren().size()];
                    
101      } catch (Exception e) {
                    
102        throw new RuntimeException(e);
                    
103      }
                    
212      if (value instanceof String) {
                    
213        t = new Text((String) value);
                    
214      } else {
                    
303    } else {
                    
304      throw new RuntimeException("Unhandled object type " + outputOI.getTypeName());
                    
305    }
                    
347  public VectorExpressionDescriptor.Descriptor getDescriptor() {
                    
348    return (new VectorExpressionDescriptor.Builder()).build();
                    
349  }
                    
                
OperatorFactory.java https://github.com/pkalmegh/hive.git | Java | 336 lines
                    
84  static {
                    
85    opvec = new ArrayList<OpTuple>();
                    
86    opvec.add(new OpTuple<FilterDesc>(FilterDesc.class, FilterOperator.class));
                    
86    opvec.add(new OpTuple<FilterDesc>(FilterDesc.class, FilterOperator.class));
                    
87    opvec.add(new OpTuple<SelectDesc>(SelectDesc.class, SelectOperator.class));
                    
88    opvec.add(new OpTuple<ForwardDesc>(ForwardDesc.class, ForwardOperator.class));
                    
88    opvec.add(new OpTuple<ForwardDesc>(ForwardDesc.class, ForwardOperator.class));
                    
89    opvec.add(new OpTuple<FileSinkDesc>(FileSinkDesc.class, FileSinkOperator.class));
                    
90    opvec.add(new OpTuple<CollectDesc>(CollectDesc.class, CollectOperator.class));
                    
90    opvec.add(new OpTuple<CollectDesc>(CollectDesc.class, CollectOperator.class));
                    
91    opvec.add(new OpTuple<ScriptDesc>(ScriptDesc.class, ScriptOperator.class));
                    
92    opvec.add(new OpTuple<PTFDesc>(PTFDesc.class, PTFOperator.class));
                    
161          e.printStackTrace();
                    
162          throw new RuntimeException(e);
                    
163        }
                    
                
CacheHeaderTest.java https://github.com/adsabs/solr-affiliation-disambiguation.git | Java | 246 lines
                    
45    HttpMethodBase m=getUpdateMethod("GET");
                    
46    m.setQueryString(new NameValuePair[] { new NameValuePair("stream.file",f.getCanonicalPath())});
                    
47    getClient().executeMethod(m);
                    
54    // We force an exception from Solr. This should emit "no-cache" HTTP headers
                    
55    m.setQueryString(new NameValuePair[] { new NameValuePair("q", "xyz:solr"),
                    
56        new NameValuePair("qt", "standard") });
                    
95    get = getSelectMethod(method);
                    
96    get.addRequestHeader("If-Modified-Since", DateUtil.formatDate(new Date()));
                    
97
                    
236      f.deleteOnExit();
                    
237      Writer out = new OutputStreamWriter(new FileOutputStream(f),
                    
238          charset);
                    
242    } catch (Exception e) {
                    
243      throw new RuntimeException(e);
                    
244    }
                    
                
ClassPathInfo.java https://bitbucket.org/yossi_gil/services.git | Java | 325 lines
                    
48	public ClassPathInfo(File... fs) {
                    
49		files = new File[fs.length];
                    
50		int i = 0;
                    
146	 * @param cs
                    
147	 *            An array of classes return A new ClassPathInfo object
                    
148	 * @return A list of files
                    
178		} catch (Exception e) {
                    
179			throw new RuntimeException(e);
                    
180		}
                    
221					newPath = "";
                    
222				addFromDirectory(depth + 1, new File(dirOrFile, s), root, result, newPath);
                    
223			}
                    
319	public static void main(String[] args) {
                    
320		ClassPathInfo cpi = new ClassPathInfo(new File("D:/tools/jdk-1-6-0/jre/lib/rt.jar"));
                    
321		List<String> list = cpi.getClasses();
                    
                
KafkaConsumer.java https://gitlab.com/zhengdingke/htest | Java | 250 lines
                    
51        this.config = config;
                    
52        this.brokerList = new LinkedList<Host>(config.brokers);
                    
53        this.brokerIndex = 0;
                    
58        String topic = config.topic;
                    
59        FetchRequest req = new FetchRequestBuilder().clientId(config.clientId).addFetch(topic, partition, offset, config.fetchMaxBytes)
                    
60                .maxWait(config.fetchWaitMaxMs).build();
                    
77                    simpleConsumer = null;
                    
78                    throw new KafkaException("Network error when fetching messages: " + host + ":" + port + " , " + e.getMessage(), e);
                    
79                }
                    
81            } else {
                    
82                throw new RuntimeException(e);
                    
83            }
                    
123            leaderBroker = metadata.leader();
                    
124            consumer = new SimpleConsumer(leaderBroker.host(), leaderBroker.port(), config.socketTimeoutMs, config.socketReceiveBufferBytes,
                    
125                    config.clientId);
                    
                
DisconnectTest.java https://gitlab.com/JoshLucid/okhttp | Java | 132 lines
                    
59    client = new OkHttpClient.Builder()
                    
60        .socketFactory(new DelegatingSocketFactory(SocketFactory.getDefault()) {
                    
61          @Override protected Socket configureSocket(Socket socket) throws IOException {
                    
72
                    
73    server.enqueue(new MockResponse()
                    
74        .throttleBody(64 * 1024, 125, TimeUnit.MILLISECONDS)); // 500 Kbps
                    
82    OutputStream requestBody = connection.getOutputStream();
                    
83    byte[] buffer = new byte[1024];
                    
84    try {
                    
99    server.enqueue(new MockResponse()
                    
100        .setBody(new Buffer().write(new byte[responseBodySize]))
                    
101        .throttleBody(64 * 1024, 125, TimeUnit.MILLISECONDS)); // 500 Kbps
                    
125        } catch (InterruptedException e) {
                    
126          throw new RuntimeException(e);
                    
127        }
                    
                
RuntimeHelper.java https://gitlab.com/meetly/torquebox | Java | 278 lines
                    
80                if (defined( ruby, target, name )) {
                    
81                    result = JavaEmbedUtils.invokeMethod( ruby, target, name, new Object[] {}, Object.class );
                    
82                }
                    
149        try {
                    
150            StringBuilder script = new StringBuilder();
                    
151            script.append("require %q(");
                    
193    public static IRubyObject executeScript(final Ruby ruby, final String script, final String location) {
                    
194        return withinContext( ruby, new Callable<IRubyObject>() {
                    
195            public IRubyObject call() throws Exception {
                    
208    public static IRubyObject instantiate(Ruby ruby, String className) {
                    
209        return instantiate( ruby, className, new Object[] {} );
                    
210    }
                    
267        } catch (Exception e) {
                    
268            throw new RuntimeException(e);
                    
269        } finally {
                    
                
NativeSSTableLoaderClient.java https://github.com/beobal/cassandra.git | Java | 232 lines
                    
52    {
                    
53        this(hosts, storagePort, new PlainTextAuthProvider(username, password), sslOptions);
                    
54    }
                    
58        super();
                    
59        this.tables = new HashMap<>();
                    
60        this.hosts = hosts;
                    
81
                    
82            IPartitioner partitioner = FBUtilities.newPartitioner(metadata.getPartitioner());
                    
83            TokenFactory tokenFactory = partitioner.getTokenFactory();
                    
87                Set<Host> endpoints = metadata.getReplicas(Metadata.quote(keyspace), tokenRange);
                    
88                Range<Token> range = new Range<>(tokenFactory.fromString(tokenRange.getStart().getValue().toString()),
                    
89                                                 tokenFactory.fromString(tokenRange.getEnd().getValue().toString()));
                    
106        {
                    
107            throw new RuntimeException(e);
                    
108        }
                    
                
HandleDelegateImpl.java https://bitbucket.org/cprenzberg/wildfly.git | Java | 119 lines
                    
99                    final Stub stub = (Stub) object;
                    
100                    final ORB orb = (ORB) new InitialContext().lookup("java:comp/ORB");
                    
101                    stub.connect(orb);
                    
112        try {
                    
113            final InitialContext ctx = new InitialContext();
                    
114            return (HandleDelegate) ctx.lookup("java:comp/HandleDelegate");
                    
115        } catch (NamingException e) {
                    
116            throw new NestedRuntimeException(e);
                    
117        }
                    
                
IndexCacheLoaderTest.java https://bitbucket.org/cprenzberg/infinispan.git | Java | 112 lines
                    
87      final EmbeddedCacheManager cacheManager = initializeInfinispan(rootDir);
                    
88      TestingUtil.withCacheManager(new CacheManagerCallable(cacheManager) {
                    
89         public void call() {
                    
90            Cache<Object, Object> cache = cacheManager.getCache();
                    
91            Directory directory = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, indexName).create();
                    
92
                    
95            } catch (IOException e) {
                    
96               throw new RuntimeException(e);
                    
97            }
                    
102   protected EmbeddedCacheManager initializeInfinispan(File rootDir) {
                    
103      ConfigurationBuilder builder = new ConfigurationBuilder();
                    
104      builder
                    
106            .addLoader()
                    
107               .cacheLoader( new LuceneCacheLoader() )
                    
108                  .addProperty(LuceneCacheLoaderConfig.LOCATION_OPTION, rootDir.getAbsolutePath())
                    
                
IO.java https://github.com/hsablonniere/play.git | Java | 368 lines
                    
37        } catch (Exception e) {
                    
38            throw new RuntimeException(e);
                    
39        }
                    
61        } catch(Exception e) {
                    
62            throw new RuntimeException(e);
                    
63        } finally {
                    
204        try {
                    
205            PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(os, encoding));
                    
206            printWriter.println(content);
                    
356            for (String child: source.list()) {
                    
357                copyDirectory(new File(source, child), new File(target, child));
                    
358            }
                    
360            try {
                    
361                write(new FileInputStream(source),  new FileOutputStream(target));
                    
362            } catch (IOException e) {
                    
                
NativeTypeTranslator.java https://bitbucket.org/dagronlund/opengl-game-platform.git | Java | 256 lines
                    
125		} else
                    
126			throw new RuntimeException(t + " is not allowed");
                    
127	}
                    
150		} catch (ClassNotFoundException e) {
                    
151			throw new RuntimeException(e);
                    
152		}
                    
174		} else if ( PointerBuffer.class.isAssignableFrom(c) ) {
                    
175			native_types = new ArrayList<Class>();
                    
176			native_types.add(PointerBuffer.class);
                    
177		} else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(c) ) {
                    
178			native_types = new ArrayList<Class>();
                    
179			native_types.add(PointerWrapper.class);
                    
190	public void visitDeclaredType(DeclaredType t) {
                    
191		throw new RuntimeException(t + " is not allowed");
                    
192	}
                    
                
PanelSizeProperties.java https://bitbucket.org/teamwildtreechase/hatparsing.git | Java | 302 lines
                    
240		{	
                    
241			throw new RuntimeException("Font \"" + DEFAULT_FONT_FILE_NAME +   "\"  not found... make sure it is in the right place");
                    
242		}
                    
257			e.printStackTrace();
                    
258			throw new RuntimeException(e);
                    
259		} catch (IOException e) 
                    
261			e.printStackTrace();
                    
262			throw new RuntimeException(e);
                    
263		}
                    
281	{
                    
282		font = new Font(fontName, Font.PLAIN, fontSize);
                    
283		smallFont = new Font(fontName, Font.PLAIN, smallFontSize());
                    
283		smallFont = new Font(fontName, Font.PLAIN, smallFontSize());
                    
284		ultraSmallFont = new Font(fontName, Font.PLAIN, ultraSmallFontSize());
                    
285	}
                    
                
MongoPersisterService.java https://github.com/LaMaldicionDeMandos/PersisterService.git | Java | 108 lines
                    
16	private final DB db;
                    
17	private final GsonMongoMapper mapper = new GsonMongoMapper();
                    
18	private final ExampleFactory factory = new ExampleFactory();
                    
21		try {
                    
22			mongo = new Mongo(host,port);
                    
23			db = mongo.getDB(dbName);	
                    
24		} catch (Exception e) {
                    
25			throw new RuntimeException(e);
                    
26		}
                    
38		@SuppressWarnings("unchecked")
                    
39		T newObject = (T)mapper.fromDbObject(dbObject, object.getClass());
                    
40		return newObject;
                    
62		@SuppressWarnings("unchecked")
                    
63		T newObject = (T)mapper.fromDbObject(dbObject, object.getClass());
                    
64		return newObject;
                    
                
FileTimerPersistence.java https://github.com/bmaxwell/jboss-ejb3.git | Java | 336 lines
                    
137        } catch (SystemException e) {
                    
138            throw new RuntimeException(e);
                    
139        }
                    
179            final Map<String, TimerEntity> timers = getTimers(timedObjectId);
                    
180            return new ArrayList<TimerEntity>(timers.values());
                    
181        } finally {
                    
213    private Map<String, TimerEntity> loadTimersFromFile(final String timedObjectId) {
                    
214        final Map<String, TimerEntity> timers = new HashMap<String, TimerEntity>();
                    
215        try {
                    
290        } catch (FileNotFoundException e) {
                    
291            throw new RuntimeException(e);
                    
292        } catch (IOException e) {
                    
292        } catch (IOException e) {
                    
293            throw new RuntimeException(e);
                    
294        } finally {
                    
                
FileDownloader.java https://gitlab.com/CORP-RESELLER/SeLion | Java | 326 lines
                    
122
                    
123        List<URLChecksumEntity> artifactDetails = new ArrayList<ArtifactDetails.URLChecksumEntity>();
                    
124
                    
128            LOGGER.log(Level.SEVERE, "Unable to open download.json file", e);
                    
129            throw new RuntimeException(e);
                    
130        }
                    
190            LOGGER.log(Level.SEVERE, "Unable to open download.json file", e);
                    
191            throw new RuntimeException(e);
                    
192        }
                    
228        MessageDigest md = null;
                    
229        StringBuilder sb = new StringBuilder("");
                    
230        try {
                    
271        try {
                    
272            FileUtils.copyURLToFile(new URL(url), new File(filename), 10000, 60000);
                    
273        } catch (IOException e) {
                    
                
StringValueDeserializer.java https://gitlab.com/zouxc/dubbo | Java | 130 lines
                    
64      _cl = cl;
                    
65      _constructor = cl.getConstructor(new Class[] { String.class });
                    
66    } catch (Exception e) {
                    
66    } catch (Exception e) {
                    
67      throw new RuntimeException(e);
                    
68    }
                    
121    if (value == null)
                    
122      throw new IOException(_cl.getName() + " expects name.");
                    
123
                    
124    try {
                    
125      return _constructor.newInstance(new Object[] { value });
                    
126    } catch (Exception e) {
                    
126    } catch (Exception e) {
                    
127      throw new IOExceptionWrapper(e);
                    
128    }
                    
                
ReportContextCreatorServlet.java https://gitlab.com/samuel-davis/JasperReports-OSGI | Java | 118 lines
                    
84
                    
85				Controller controller = new Controller(getJasperReportsContext());
                    
86				initWebContext(request, webReportContext);
                    
91					log.error("Error on report execution", e);
                    
92					throw new JRRuntimeException(e);
                    
93				} catch (JRException e) {
                    
                
BarcodeEvaluator.java https://gitlab.com/samuel-davis/JasperReports-OSGI | Java | 181 lines
                    
79		{
                    
80			throw new JRRuntimeException(e);
                    
81		}
                    
                
ImaerController.java https://gitlab.com/AERIUS/AERIUS | Java | 179 lines
                    
71          } catch (final SQLException e) {
                    
72            throw new RuntimeException(e);
                    
73          }
                    
74        }));
                    
75    validators = new SchematronValidators();
                    
76    try {
                    
76    try {
                    
77      gmlWriter = new GMLWriter(ReceptorGridSettingsRepository.getReceptorGridSettings(pmf), new PermitReferenceGenerator());
                    
78    } catch (final SQLException e) {
                    
79      LOG.error("Failed creating GMLWriter", e);
                    
80      throw new AeriusException(AeriusExceptionReason.SQL_ERROR);
                    
81    }
                    
99      LOG.error("Error during processing file", e);
                    
100      throw new AeriusException(AeriusExceptionReason.INTERNAL_ERROR);
                    
101    }
                    
                
Filesystem.java https://gitlab.com/gregtyka/Ionic_Music_Player | Java | 325 lines
                    
79            e.printStackTrace();
                    
80            throw new RuntimeException(e);
                    
81        }
                    
210        // I know this looks weird but it is to work around a JSON bug.
                    
211        if ("null".equals(newName) || "".equals(newName)) {
                    
212            newName = srcURL.uri.getLastPathSegment();;
                    
214
                    
215        String newDest = destURL.uri.toString();
                    
216        if (newDest.endsWith("/")) {
                    
216        if (newDest.endsWith("/")) {
                    
217            newDest = newDest + newName;
                    
218        } else {
                    
218        } else {
                    
219            newDest = newDest + "/" + newName;
                    
220        }
                    
                
ExopackageSoLoader.java https://gitlab.com/smartether/buck | Java | 203 lines
                    
98    try {
                    
99      br = new BufferedReader(new FileReader(metadata));
                    
100      String line;
                    
108          if (spaceIndex == -1) {
                    
109            throw new RuntimeException("Error parsing metadata.txt; invalid line: " + line);
                    
110          }
                    
118    } catch (IOException e) {
                    
119      throw new RuntimeException(e);
                    
120    }
                    
170        in = new BufferedInputStream(new FileInputStream(sourcePath));
                    
171        out = new BufferedOutputStream(new FileOutputStream(libraryFile));
                    
172        byte[] buffer = new byte[4 * 1024];
                    
185    } catch (IOException e) {
                    
186      throw new RuntimeException(e);
                    
187    }
                    
                
Task.java https://github.com/jlym/hive.git | Java | 475 lines
                    
61  protected Task<? extends Serializable> backupTask;
                    
62  protected List<Task<? extends Serializable>> backupChildrenTasks = new ArrayList<Task<? extends Serializable>>();
                    
63  protected int taskTag;
                    
91    LOG = LogFactory.getLog(this.getClass().getName());
                    
92    this.taskCounters = new HashMap<String, Long>();
                    
93    taskTag = Task.NO_TAG;
                    
108      LOG.error(StringUtils.stringifyException(e));
                    
109      throw new RuntimeException(e);
                    
110    }
                    
112
                    
113    console = new LogHelper(LOG);
                    
114  }
                    
135    } catch (IOException e) {
                    
136      throw new RuntimeException(e.getMessage());
                    
137    }
                    
                
 

Source

Language