- 1
 
float sales = new Integer(getSalesCount()).floatValue();
                                    Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 116
+1
float sales = new Integer(getSalesCount()).floatValue();
                                    
+5
function ехал(f) { f(); }
function через(f) { f.call(null); }
function видит(f) { setTimeout(f, 0); }
function сунул(f) { Promise.resolve(null).then(f); }
function в(f) { alert("Hello functional world!"); return f; }
ехал(function() {
	через(function() {
		видит(function() {
			(function(_function) {
				сунул(function() {
					_function(в(function() {}))
				})
			})(function(_function() {
				_function(function() {})
			})
		})
	})
})
                                    
−28
/**
 * A Multipurpose Internet Mail Extension (MIME) type, as defined
 * in RFC 2045 and 2046.
 *
 * THIS IS *NOT* - REPEAT *NOT* - A PUBLIC CLASS! DataFlavor IS
 * THE PUBLIC INTERFACE, AND THIS IS PROVIDED AS A ***PRIVATE***
 * (THAT IS AS IN *NOT* PUBLIC) HELPER CLASS!
 */
class MimeType implements Externalizable, Cloneable {
                                    java.awt.datatransfer.MimeType
−30
private JsPromise<Void> setData(final JsEditorData data) {
	return setTag(data.getTag()).then(new ResolveCallback<Void, Void>() {
		@Override
		public JsPromise<Void> onResolve(final Void value) {
			return setFont(data.getFont());
		}
	}, null).then(new ResolveCallback<Void, Void>() {
		@Override
		public JsPromise<Void> onResolve(final Void value) {
			return setLines(data.getLines());
		}
	}, null).then(new ResolveCallback<Void, Void>() {
		@Override
		public JsPromise<Void> onResolve(final Void value) {
			setLayout(data.getLayout());
			setEdited(data.isEdited());
			return null;
		}
	}, null);
}
                                    Промисы и GWT выглядят страшно вместе.
−25
double a = +0.0;
double b = -0.0;
 
System.out.println(a == b);
System.out.println(Objects.equals(a, b));
                                    
            Результат:
true
false
http://ideone.com/eIUQmB
        
−27
package com.google.gwt.regexp.shared;
<...>
public class RegExp {
  // In JS syntax, a \ in the replacement string has no special meaning.
  // In Java syntax, a \ in the replacement string escapes the next character,
  // so we have to translate \ to \\ before passing it to Java.
  private static final Pattern REPLACEMENT_BACKSLASH = Pattern.compile("\\\\");
  // To get \\, we have to say \\\\\\\\:
  // \\\\\\\\ --> Java string unescape --> \\\\
  // \\\\ ---> Pattern replacement unescape in replacement preprocessing --> \\
  private static final String REPLACEMENT_BACKSLASH_FOR_JAVA = "\\\\\\\\";
                                    
            https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/regexp/shared/RegExp.java
И в тему: http://xkcd.com/1638/
        
−37
List<Tuple4<Bayes, Bayes, Bayes, Bayes>> bayesResult = new ArrayList<>();
                                    http://stackoverflow.com/questions/29970164/reuse-results-of-first-computation-in-second-computation
−99
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
#ifndef va_end
#define va_end(ap) va_end (ap)
#endif
                                    /usr/include/c++/5/cstdarg
−94
#define PI 3.14159265358979323846  /* Assume not near black hole nor in Tennessee */
                                    
+77
val field = HttpEntityWrapper.class.getDeclaredField("wrappedEntity");
field.setAccessible(true);
HttpEntity entity = response.getEntity();
while (entity instanceof HttpEntityWrapper) {
	entity = (HttpEntity) field.get(entity);
}
log.info("Response entity class: {}", entity.getClass().getName());
                                    Чего только не приходится делать ради отладки...