nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Sleep { private long id ; private long time_to_bed ; private long time_up ; private long wakeDate ; private int sleep_rating ; private int syncFlag ; public Sleep ( ) { } public Sleep ( long time_to_bed , long time_up ) { } public Sleep ( long date , long time_to_bed , long time_up , int sleep_rating ) { } public Sleep ( int sleep_rating ) { } public void setID ( long xID ) { } public void setTimeUp ( long time_up ) { } public void setTimeToBed ( long time_to_bed ) { } public void setSleepRating ( int sleep_rating ) { } public void setDate ( long date ) { } public long getID ( ) { } public long getDate ( ) { } public long getTimeUp ( ) { } public long getTimeToBed ( ) { } public int getSleepRating ( ) { } public int getSyncFlag ( ) { } public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( "Sleep<seq2seq4repair_space>[ID:<seq2seq4repair_space>" + ( id ) ) + ",<seq2seq4repair_space>Date:<seq2seq4repair_space>" ) + ( wakeDate ) ) + ",<seq2seq4repair_space>Time<seq2seq4repair_space>to<seq2seq4repair_space>bed:<seq2seq4repair_space>" ) + ( time_to_bed ) ) + ",<seq2seq4repair_space>Time<seq2seq4repair_space>Up:<seq2seq4repair_space>" ) + ( time_up ) ) + ",<seq2seq4repair_space>Sleep<seq2seq4repair_space>Rating<seq2seq4repair_space>" ) + ( sleep_rating ) ) + "]" ) + "\n" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( ( ( ( ( ( "Sleep<seq2seq4repair_space>[ID:<seq2seq4repair_space>" + ( id ) ) + ",<seq2seq4repair_space>Date:<seq2seq4repair_space>" ) + ( wakeDate ) ) + ",<seq2seq4repair_space>Time<seq2seq4repair_space>to<seq2seq4repair_space>bed:<seq2seq4repair_space>" ) + ( time_to_bed ) ) + ",<seq2seq4repair_space>Time<seq2seq4repair_space>Up:<seq2seq4repair_space>" ) + ( time_up ) ) + ",<seq2seq4repair_space>Sleep<seq2seq4repair_space>Rating<seq2seq4repair_space>" ) + ( sleep_rating ) ) + ",<seq2seq4repair_space>syncFlag:<seq2seq4repair_space>" ) + ( syncFlag ) ) + "]" ) + "\n" ;
Buggy code:
public class ExcelDataExtractor { private WorkbookReader reader ; private ArrayList < String > invalidFiles ; public ExcelDataExtractor ( ) { } public static void main ( String [ ] args ) throws IOException { } private void readFile ( File f ) throws IOException { if ( f . isDirectory ( ) ) { File [ ] files = f . listFiles ( ) ; for ( File subFile : files ) { readFile ( subFile ) ; } } else <START_BUG> if ( f . getName ( ) . contains ( ".xlsx" ) ) { <END_BUG> reader . readFile ( f ) ; } else { invalidFiles . add ( f . getAbsolutePath ( ) ) ; } } No newline ; at end ; of file ; }

Fix:
if ( ( f . getName ( ) . contains ( ".xlsx" ) ) && ( ! ( f . getName ( ) . contains ( "~$" ) ) ) ) {
Buggy code:
public class BundleResourceHandler extends AbstractRuntimeOnlyHandler { public static final BundleResourceHandler INSTANCE = new BundleResourceHandler ( ) ; static final String [ ] ATTRIBUTES = new String [ ] { ModelConstants . ID , ModelConstants . LOCATION , ModelConstants . STARTLEVEL , ModelConstants . STATE , ModelConstants . SYMBOLIC_NAME , ModelConstants . TYPE , ModelConstants . VERSION } ; static final String [ ] OPERATIONS = new String [ ] { ModelConstants . START , ModelConstants . STOP } ; private BundleResourceHandler ( ) { } public void register ( ManagementResourceRegistration registry ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private void handleReadAttributeOperation ( OperationContext context , ModelNode operation ) { } private void handleOperation ( String operationName , OperationContext context , ModelNode operation ) { } private Bundle getTargetBundle ( OperationContext context , ModelNode operation ) { } static String getBundleState ( Bundle bundle ) { } private BundleManager getBundleManager ( OperationContext context ) { } private BundleContext getSystemContext ( OperationContext context ) { <START_BUG> ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SYSTEM_CONTEXT ) ; <END_BUG> return controller != null ? ( ( BundleContext ) ( controller . getValue ( ) ) ) : null ; } private StartLevel getStartLevel ( OperationContext context ) { } }

Fix:
ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( FRAMEWORK_CREATE ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class TimerServicePersistenceSecondTestCase { @ Deployment public static Archive < ? > deploy ( ) { } @ Test <START_BUG> @ Ignore ( "Failing" ) <END_BUG> public void testTimerServiceCalled ( ) throws NamingException { InitialContext ctx = new InitialContext ( ) ; Assert . assertTrue ( SimpleTimerServiceBean . awaitTimerCall ( ) ) ; } }

Fix:
@ Ignore ( "AS7-2168<seq2seq4repair_space>--<seq2seq4repair_space>Disabled<seq2seq4repair_space>because<seq2seq4repair_space>failing" )
Buggy code:
public class Stratego extends ApplicationAdapter { private float windowScale ; private Game game ; private SpriteBatch batch ; private Renderer layerRenderer ; @ Override public void create ( ) { } @ Override public void render ( ) { } protected JOptionPane getOptionPane ( JComponent parent ) { } private Stratego . GameSetting showMainMenu ( ) { } private boolean isLocal ( ) { } private void setupGame ( ) { } private Player [ ] determinePlayers ( GameView playerOneView , GameView playerTwoView ) { } private void setupRenderer ( Game game ) { } private void startGame ( ) { <START_BUG> game . setAI_delay ( 0 ) ; <END_BUG> game . startSetupPhase ( ) ; } private void listenForRemoteGameCreation ( ) { } @ AllArgsConstructor @ Data public class GameSetting { private boolean local ; private PlayerType player1 ; private PlayerType player2 ; private boolean serving ; private String ip ; } @ AllArgsConstructor private class GameRestarter extends InputAdapter { Game game ; Stratego strategoInstance ; @ Override public boolean keyDown ( int keycode ) { } } }

Fix:
game . setAI_delay ( AI_DELAY ) ;
Buggy code:
public class TestPersistenceManagerFactoryImpl extends BaseKernelTest { private OpenJPAConfiguration _conf = null ; public TestPersistenceManagerFactoryImpl ( ) { } public TestPersistenceManagerFactoryImpl ( String test ) { } public void setUp ( ) { } public void testFactoryLifecycleListeners ( ) { } public void testPlatform ( ) { OpenJPAEntityManagerFactory pmf = ( ( OpenJPAEntityManagerFactory ) ( getEmf ( ) ) ) ; <START_BUG> assertNotNull ( pmf . getProperties ( ) . getProperty ( "Platform" ) ) ; <END_BUG> } protected OpenJPAEntityManagerFactory getEmf ( Map props ) { } public static class BrokerFactoryTest extends AbstractBrokerFactory { public static synchronized TestPersistenceManagerFactoryImpl . BrokerFactoryTest getInstance ( ConfigurationProvider cp ) { } public static TestPersistenceManagerFactoryImpl . BrokerFactoryTest newInstance ( ConfigurationProvider cp ) { } protected BrokerFactoryTest ( OpenJPAConfiguration conf ) { } protected StoreManager newStoreManager ( ) { } } }

Fix:
assertNotNull ( pmf . getProperties ( ) . get ( "Platform" ) ) ;
Buggy code:
public class Assignment extends Expression { public Expression lhs ; public Expression expression ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } void checkAssignmentEffect ( BlockScope scope ) { } void checkAssignment ( BlockScope scope , TypeBinding lhsType , TypeBinding rhsType ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } Binding getDirectBinding ( Expression someExpression ) { } FieldBinding getLastField ( Expression someExpression ) { } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public StringBuffer printExpressionNoParenthesis ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; if ( ( ! ( ( this . lhs ) instanceof Reference ) ) || ( this . lhs . isThis ( ) ) ) { scope . problemReporter ( ) . expressionShouldBeAVariable ( this . lhs ) ; return null ; } TypeBinding lhsType = lhs . resolveType ( scope ) ; expression . setExpectedType ( lhsType ) ; if ( lhsType != null ) <START_BUG> this . resolvedType = lhsType . capture ( ) ; <END_BUG> TypeBinding rhsType = expression . resolveType ( scope ) ; if ( ( lhsType == null ) || ( rhsType == null ) ) { return null ; } checkAssignmentEffect ( scope ) ; if ( lhsType != rhsType ) scope . compilationUnitScope ( ) . recordTypeConversion ( lhsType , rhsType ) ; if ( ( ( expression . isConstantValueOfTypeAssignableToType ( rhsType , lhsType ) ) || ( ( lhsType . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( lhsType . id , rhsType . id ) ) ) ) || ( rhsType . isCompatibleWith ( lhsType ) ) ) { expression . computeConversion ( scope , lhsType , rhsType ) ; checkAssignment ( scope , lhsType , rhsType ) ; return this . resolvedType ; } else if ( scope . isBoxingCompatibleWith ( rhsType , lhsType ) ) { expression . computeConversion ( scope , lhsType , rhsType ) ; return this . resolvedType ; } scope . problemReporter ( ) . typeMismatchError ( rhsType , lhsType , expression ) ; return lhsType ; } public TypeBinding resolveTypeExpecting ( BlockScope scope , TypeBinding expectedType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
this . resolvedType = lhsType . capture ( scope , this . sourceEnd ) ;
Buggy code:
public class SimpleRealmTest extends PlexusTestCaseSupport { @ Override protected void customizeContainerConfiguration ( ContainerConfiguration configuration ) { configuration . setAutoWiring ( true ) ; <START_BUG> configuration . setClassPathScanning ( SCANNING_CACHE ) ; <END_BUG> } private static File confdir = new File ( "target//app-conf" ) ; @ Test public void testValidAuthentication ( ) throws Exception { } @ Test public void testInvalidPasswordAuthentication ( ) throws Exception { } @ Test public void testInvalidUserAuthentication ( ) throws Exception { } @ Test public void testPrivileges ( ) throws Exception { } @ Test public void testPrivilegesInvalidUser ( ) throws Exception { } @ Override protected void setUp ( ) throws Exception { } @ Override protected void customizeContext ( Context ctx ) { } private void copyTestConfigToPlace ( ) throws FileNotFoundException , IOException { } }

Fix:
configuration . setClassPathScanning ( SCANNING_ON ) ;
Buggy code:
public class DecimalValue extends NumericValue { public static final int HASH_ORIGIN = 623 ; private final Double value ; public DecimalValue ( Double theValue ) { } public Double getValue ( ) { } @ Override protected BooleanValue hasEqualValue ( NumericValue other ) { } @ Override protected BooleanValue hasEqualValue ( DecimalValue other ) { } @ Override protected BooleanValue hasEqualValue ( IntValue other ) { } @ Override protected BooleanValue hasEqualValue ( MoneyValue other ) { } @ Override public BooleanValue ternaryGreaterThan ( NumericValue other ) { } @ Override protected BooleanValue ternaryGreaterThan ( DecimalValue other ) { } @ Override protected BooleanValue ternaryGreaterThan ( IntValue other ) { } @ Override protected BooleanValue ternaryGreaterThan ( MoneyValue other ) { } @ Override public NumericValue add ( NumericValue other ) { <START_BUG> return other . multiply ( this ) ; <END_BUG> } @ Override protected DecimalValue add ( DecimalValue other ) { } @ Override protected DecimalValue add ( IntValue other ) { } @ Override protected MoneyValue add ( MoneyValue other ) { } @ Override public NumericValue multiply ( NumericValue other ) { } @ Override protected DecimalValue multiply ( DecimalValue other ) { } @ Override protected DecimalValue multiply ( IntValue other ) { } @ Override protected MoneyValue multiply ( MoneyValue other ) { } @ Override public DecimalValue divide ( NumericValue other ) { } @ Override protected DecimalValue inverseDivide ( DecimalValue other ) { } @ Override protected DecimalValue inverseDivide ( IntValue other ) { } @ Override protected MoneyValue inverseDivide ( MoneyValue other ) { } protected MoneyValue castMoney ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
return other . add ( this ) ;
Buggy code:
public class ScrollPopupUtil { static boolean device = BrowserAgent . isDevice ( ) ; static Widget widgetContainer ; static boolean isFromAddtags = false ; public static void ScrollPopupUtilWidget ( Widget widget , boolean val ) { } public static class ResizeEvent implements ResizeHandler { @ Override public void onResize ( com . google . gwt . event . logical . shared . ResizeEvent event ) { } } static void setAddTagesPopupOnResize ( boolean value ) { if ( ScrollPopupUtil . device ) { if ( ( ( Window . getClientHeight ( ) ) - 150 ) <= 564 ) { ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( ( ( Window . getClientHeight ( ) ) - 150 ) , PX ) ; ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflowY ( AUTO ) ; ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflowX ( AUTO ) ; } else { if ( ScrollPopupUtil . isFromAddtags ) { <START_BUG> ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( 575 , PX ) ; <END_BUG> } else { ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( 545 , PX ) ; } ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflow ( HIDDEN ) ; } } } }

Fix:
ScrollPopupUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( 590 , PX ) ;
Buggy code:
public final class OrderGlobalStep < S > extends CollectingBarrierStep < S > implements ComparatorHolder < S > , TraversalParent { private List < Comparator < S > > comparators = new ArrayList < > ( ) ; private ChainedComparator chainedComparator = null ; public OrderGlobalStep ( final Traversal . Admin traversal ) { } @ Override public void barrierConsumer ( final TraverserSet < S > traverserSet ) { } @ Override public void addComparator ( final Comparator < S > comparator ) { } @ Override public List < Comparator < S > > getComparators ( ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public Set < TraverserRequirement > getRequirements ( ) { <START_BUG> return Collections . singleton ( OBJECT ) ; <END_BUG> } @ Override public < S , E > List < Admin < S , E > > getLocalChildren ( ) { } @ Override public void addLocalChild ( final Traversal . Admin < ? , ? > localChildTraversal ) { } @ Override public OrderGlobalStep < S > clone ( ) { } }

Fix:
return this . getSelfAndChildRequirements ( OBJECT ) ;
Buggy code:
public class ExplicitConstructorCall extends Statement implements InvocationSite { public Expression [ ] arguments ; public Expression qualification ; public MethodBinding binding ; protected MethodBinding codegenBinding ; MethodBinding syntheticAccessor ; public int accessMode ; public TypeReference [ ] typeArguments ; public TypeBinding [ ] genericTypeArguments ; public static final int ImplicitSuper = 1 ; public static final int Super = 2 ; public static final int This = 3 ; public VariableBinding [ ] [ ] implicitArguments ; boolean discardEnclosingInstance ; public int typeArgumentsSourceStart ; public ExplicitConstructorCall ( int accessMode ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public boolean isImplicitSuper ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; this . codegenBinding = this . binding . original ( ) ; if ( ( binding . isPrivate ( ) ) && ( ( accessMode ) != ( ExplicitConstructorCall . This ) ) ) { <START_BUG> if ( currentScope . environment ( ) . options . isPrivateConstructorAccessChangingVisibility ) { <END_BUG> this . codegenBinding . tagForClearingPrivateModifier ( ) ; } else { syntheticAccessor = ( ( SourceTypeBinding ) ( this . codegenBinding . declaringClass ) ) . addSyntheticMethod ( this . codegenBinding , isSuperAccess ( ) ) ; currentScope . problemReporter ( ) . needToEmulateMethodAccess ( this . codegenBinding , this ) ; } } } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( currentScope . compilerOptions ( ) . isPrivateConstructorAccessChangingVisibility ) {
Buggy code:
public class SeamProcessor implements DeploymentUnitProcessor { public static final String SEAM_PROPERTIES = "seam.properties" ; public static final String SEAM_PROPERTIES_META_INF = "META-INF//" + ( SeamProcessor . SEAM_PROPERTIES ) ; public static final String SEAM_PROPERTIES_WEB_INF = "WEB-INF//classes//" + ( SeamProcessor . SEAM_PROPERTIES ) ; public static final String SEAM_COMPONENTS = "components.xml" ; public static final String SEAM_COMPONENTS_META_INF = "META-INF//" + ( SeamProcessor . SEAM_COMPONENTS ) ; public static final String SEAM_COMPONENTS_WEB_INF = "WEB-INF//classes//META-INF//" + ( SeamProcessor . SEAM_COMPONENTS ) ; public static final String [ ] SEAM_FILES = new String [ ] { SeamProcessor . SEAM_PROPERTIES , SeamProcessor . SEAM_PROPERTIES_META_INF , SeamProcessor . SEAM_PROPERTIES_WEB_INF , SeamProcessor . SEAM_COMPONENTS_META_INF , SeamProcessor . SEAM_COMPONENTS_WEB_INF } ; public static final String SEAM_INT_JAR = "jboss-seam-int.jar" ; public static final ModuleIdentifier EXT_CONTENT_MODULE = ModuleIdentifier . create ( "org.jboss.integration.ext-content" ) ; public static final ModuleIdentifier VFS_MODULE = ModuleIdentifier . create ( "org.jboss.vfs" ) ; public static final AttachmentKey < Boolean > ADDED = AttachmentKey . create ( Boolean . class ) ; private ServiceTarget serviceTarget ; private ResourceLoaderSpec seamIntResourceLoader ; public SeamProcessor ( ServiceTarget serviceTarget ) { } protected synchronized ResourceLoaderSpec getSeamIntResourceLoader ( ) throws DeploymentUnitProcessingException { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit unit = phaseContext . getDeploymentUnit ( ) ; DeploymentUnit top = DeploymentUtils . getTopDeploymentUnit ( unit ) ; if ( top . hasAttachment ( SeamProcessor . ADDED ) ) return ; final ResourceRoot mainRoot = unit . getAttachment ( DEPLOYMENT_ROOT ) ; if ( mainRoot == null ) return ; VirtualFile root = mainRoot . getRoot ( ) ; for ( String path : SeamProcessor . SEAM_FILES ) { if ( root . getChild ( path ) . exists ( ) ) { top . putAttachment ( SeamProcessor . ADDED , true ) ; final ModuleSpecification moduleSpecification = top . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; <START_BUG> moduleSpecification . addDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , SeamProcessor . VFS_MODULE , false , false , false ) ) ; <END_BUG> moduleSpecification . addResourceLoader ( getSeamIntResourceLoader ( ) ) ; break ; } } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , SeamProcessor . VFS_MODULE , false , false , false ) ) ;
Buggy code:
public class CreateSubFolderAction extends FrameAction implements SelectionListener { public CreateSubFolderAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] selection = ( ( FolderCommandReference [ ] ) ( getFrameController ( ) . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; <END_BUG> CreateFolderDialog dialog = new CreateFolderDialog ( selection [ 0 ] . getFolder ( ) . getSelectionTreePath ( ) ) ; dialog . showDialog ( ) ; String name ; if ( dialog . success ( ) ) { selection [ 0 ] . setFolder ( dialog . getSelected ( ) ) ; selection [ 0 ] . setFolderName ( dialog . getName ( ) ) ; processor . addOp ( new org . columba . mail . gui . tree . command . CreateSubFolderCommand ( selection ) ) ; } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] selection = ( ( FolderCommandReference [ ] ) ( getFrameMediator ( ) . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ;
Buggy code:
class DOMField extends DOMMember implements IDOMField { protected String fType ; protected int [ ] fTypeRange ; protected String fInitializer ; protected int [ ] fInitializerRange ; DOMField ( ) { } DOMField ( char [ ] document , int [ ] sourceRange , String name , int [ ] nameRange , int [ ] commentRange , int flags , int [ ] modifierRange , int [ ] typeRange , String type , boolean hasInitializer , int [ ] initRange , boolean isVariableDeclarator ) { } DOMField ( char [ ] document , int [ ] sourceRange , String name , int [ ] nameRange , int flags , String type , boolean isVariableDeclarator ) { } protected void appendMemberBodyContents ( CharArrayBuffer buffer ) { } protected void appendMemberDeclarationContents ( CharArrayBuffer buffer ) { } protected void appendMemberHeaderFragment ( CharArrayBuffer buffer ) { } protected void appendSimpleContents ( CharArrayBuffer buffer ) { } protected void becomeDetailed ( ) throws DOMException { } public Object clone ( ) { } protected void expand ( ) { } protected DOMNode getDetailedNode ( ) { } protected DOMField getFirstFieldDeclaration ( ) { } public String getInitializer ( ) { becomeDetailed ( ) ; if ( hasInitializer ( ) ) { if ( ( fInitializer ) != null ) { return fInitializer ; } else { <START_BUG> return new String ( CharOperation . subarray ( fDocument , fInitializerRange [ 0 ] , ( ( fInitializerRange [ 1 ] ) + 1 ) ) ) ; <END_BUG> } } else { return null ; } } public IJavaElement getJavaElement ( IJavaElement parent ) throws IllegalArgumentException { } protected DOMField getLastFieldDeclaration ( ) { } protected int getMemberDeclarationStartPosition ( ) { } public int getNodeType ( ) { } protected char [ ] getSingleVariableDeclaratorContents ( ) { } public String getType ( ) { } protected char [ ] getTypeContents ( ) { } protected boolean hasInitializer ( ) { } protected boolean hasMultipleVariableDeclarators ( ) { } public void insertSibling ( IDOMNode sibling ) throws IllegalArgumentException , DOMException { } protected boolean isTypeAltered ( ) { } protected boolean isVariableDeclarator ( ) { } protected DOMNode newDOMNode ( ) { } void normalizeEndPosition ( ILineStartFinder finder , DOMNode next ) { } void normalizeStartPosition ( int endPosition , ILineStartFinder finder ) { } protected void offset ( int offset ) { } public void remove ( ) { } public void setComment ( String comment ) { } public void setFlags ( int flags ) { } protected void setHasInitializer ( boolean hasInitializer ) { } public void setInitializer ( String initializer ) { } void setInitializerRange ( int start , int end ) { } protected void setIsVariableDeclarator ( boolean isVariableDeclarator ) { } public void setName ( String name ) throws IllegalArgumentException { } public void setType ( String typeName ) throws IllegalArgumentException { } protected void setTypeAltered ( boolean typeAltered ) { } protected void shareContents ( DOMNode node ) { } public String toString ( ) { } }

Fix:
return new String ( fDocument , fInitializerRange [ 0 ] , ( ( ( fInitializerRange [ 1 ] ) + 1 ) - ( fInitializerRange [ 0 ] ) ) ) ;
Buggy code:
public class BackTracker extends Maze { private boolean _animate = false ; private float _delay = 0.02F ; public BackTracker ( ) { } public BackTracker ( int w , int h ) { } public BackTracker ( int w , int h , long seed ) { } public BackTracker ( int w , int h , boolean animate , float delay ) { } public BackTracker ( int w , int h , boolean animate , float delay , long seed ) { } private void initialize ( ) { } protected String metadata ( ) { } public void draw ( ) { } private void display ( int i , int j ) { System . out . print ( ( ( ( char ) ( 27 ) ) + "[H" ) ) ; System . out . print ( "<seq2seq4repair_space>" ) ; for ( int c = 0 ; c < ( ( ( _w ) * 2 ) - 1 ) ; ++ c ) { System . out . print ( "_" ) ; } System . out . println ( "" ) ; for ( int y = 0 ; y < ( _grid . length ) ; ++ y ) { System . out . print ( "|" ) ; for ( int x = 0 ; x < ( _grid [ 0 ] . length ) ; ++ x ) { if ( ( _grid [ y ] [ x ] ) == 0 ) { System . out . print ( ( ( ( char ) ( 27 ) ) + "[47m" ) ) ; } else if ( ( x == i ) && ( y == j ) ) { System . out . print ( ( ( ( char ) ( 27 ) ) + "[41m" ) ) ; } System . out . print ( ( ( ( _grid [ y ] [ x ] ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ; if ( ( ( _grid [ y ] [ x ] ) & ( Maze . E ) ) != 0 ) { <START_BUG> System . out . print ( ( ( ( _grid [ y ] [ x ] ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ; <END_BUG> } else { System . out . print ( "|" ) ; } if ( ( ( _grid [ y ] [ x ] ) == 0 ) || ( ( x == i ) && ( y == j ) ) ) { System . out . print ( ( ( ( char ) ( 27 ) ) + "[m" ) ) ; } } System . out . println ( "" ) ; } } private void carvePassageFrom ( int x , int y ) { } private void shuffle ( int [ ] args ) { } No newline ; at end ; of file ; }

Fix:
System . out . print ( ( ( ( ( _grid [ y ] [ x ] ) | ( _grid [ y ] [ ( x + 1 ) ] ) ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ;
Buggy code:
public class SetServer { public static ConcurrentMap < Integer , Socket > SocketList = new ConcurrentHashMap < > ( ) ; public static BlockingQueue < String > bqueue = new LinkedBlockingQueue < String > ( ) ; public static ConcurrentMap < Integer , Socket > waitingSockets = new ConcurrentHashMap < > ( ) ; private static int sid = 0 ; public static void main ( String [ ] args ) throws IOException { try { final int port = 8080 ; ServerSocket SERVER = new ServerSocket ( port ) ; <START_BUG> System . out . println ( "Waiting<seq2seq4repair_space>for<seq2seq4repair_space>clients..." ) ; <END_BUG> MessageProcessor pm = new MessageProcessor ( ) ; Thread processM = new Thread ( pm ) ; processM . start ( ) ; while ( true ) { Socket SOCK = SERVER . accept ( ) ; System . out . println ( ( "ConnectFrom=" + ( SOCK . getInetAddress ( ) . getHostAddress ( ) ) ) ) ; ( SetServer . sid ) ++ ; SetServer . waitingSockets . put ( SetServer . sid , SOCK ) ; ServSideThread sst = new ServSideThread ( SOCK , SetServer . sid ) ; Thread X = new Thread ( sst ) ; X . start ( ) ; } } catch ( Exception X ) { System . out . println ( ( ( "ERROR:" + X ) + "<seq2seq4repair_space>in<seq2seq4repair_space>SetServer.main()<seq2seq4repair_space>" ) ) ; } } No newline ; at end ; of file ; }

Fix:
System . out . println ( ( "Waiting<seq2seq4repair_space>for<seq2seq4repair_space>clients<seq2seq4repair_space>on<seq2seq4repair_space>IP<seq2seq4repair_space>" + ( InetAddress . getLocalHost ( ) . getHostAddress ( ) ) ) ) ;
Buggy code:
public class GoProjectCollaboration extends AbstractGoRule { private static final Category cat = Category . getInstance ( "org.argouml.uml.diagram.collaboration.ui.GoProjectCollaboration" ) ; public String getRuleName ( ) { } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public Collection getChildren ( Object parent ) { if ( ! ( parent instanceof Project ) ) return null ; Vector res = new Vector ( ) ; <START_BUG> Vector models = ( ( Project ) ( parent ) ) . getModels ( ) ; <END_BUG> if ( models == null ) return null ; util . Enumeration = models . elements ( ) ; } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } }

Fix:
Vector models = ( ( Project ) ( parent ) ) . getUserDefinedModels ( ) ;
Buggy code:
public class ModClusterStop implements OperationStepHandler , DescriptionProvider { static final ModClusterStop INSTANCE = new ModClusterStop ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . getProcessType ( ) . isServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; int waittime = 10 ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "waittime" ) ) { waittime = Integer . parseInt ( ContextHost . RemoveQuotes ( prop . getValue ( ) . toString ( ) ) ) ; } } modcluster . stop ( waittime ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
class ClasspathJar extends ClasspathLocation { String zipFilename ; ZipFile zipFile ; SimpleLookupTable directoryCache ; ClasspathJar ( String zipFilename ) { } void buildDirectoryStructure ( ) { this . directoryCache = new SimpleLookupTable ( 101 ) ; try { if ( JavaModelManager . ZIP_ACCESS_VERBOSE ) { <START_BUG> System . out . println ( ( ( "Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" + ( zipFilename ) ) + "<seq2seq4repair_space>[ClasspathJar.buildDirectoryStructure()]" ) ) ; <END_BUG> } this . zipFile = new ZipFile ( zipFilename ) ; } catch ( IOException e ) { return ; } for ( Enumeration e = zipFile . entries ( ) ; e . hasMoreElements ( ) ; ) { String fileName = ( ( ZipEntry ) ( e . nextElement ( ) ) ) . getName ( ) ; int last = fileName . lastIndexOf ( '//' ) ; if ( ( last > 0 ) && ( ( directoryCache . get ( fileName . substring ( 0 , last ) ) ) == null ) ) { for ( int i = 0 ; i <= last ; i ++ ) { i = fileName . indexOf ( '//' , i ) ; String packageName = fileName . substring ( 0 , i ) ; if ( ( directoryCache . get ( packageName ) ) == null ) directoryCache . put ( packageName , packageName ) ; } } } } void cleanup ( ) { } public boolean equals ( Object o ) { } NameEnvironmentAnswer findClass ( char [ ] className , char [ ] [ ] packageName ) { } boolean isPackage ( char [ ] [ ] compoundName , char [ ] packageName ) { } public String toString ( ) { } }

Fix:
System . out . println ( ( "[ClasspathJar.buildDirectoryStructure()]<seq2seq4repair_space>Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" + ( zipFilename ) ) ) ;
Buggy code:
public class AmenDetailActivity extends ListActivity { private static final String TAG = "AmenDetailActivity" ; private Amen currentAmen ; private Statement currentStatement ; private Topic topicWithRankedStatements ; private TextView statementView ; private TextView userView ; private TextView amenCount ; private Button amenTakeBackButton ; private Button hellNoButton ; private UserListAdapter adapter ; private ThumbnailAdapter thumbs ; private AmenService service ; private static final int [ ] IMAGE_IDS = new int [ ] { id . user_image } ; private String lastError = null ; private SimpleWebImageCache cache ; private Typeface amenTypeThin ; private Typeface amenTypeBold ; @ Override public boolean onSearchRequested ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } public void onCreate ( Bundle savedInstanceState ) { } private void startScoreBoardActivity ( ) { } public void onResume ( ) { } private void populateFormWithAmen ( boolean updateName ) { } private void setAmenButtonListener ( ) { } private boolean amened ( Statement currentStatement ) { } public static String format ( Date firstPostedAt ) { SimpleDateFormat fmt = new SimpleDateFormat ( "dd.<seq2seq4repair_space>MMMMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>-<seq2seq4repair_space>HH:mm" ) ; if ( firstPostedAt != null ) { <START_BUG> fmt . format ( firstPostedAt ) ; <END_BUG> } return "<date<seq2seq4repair_space>unknown>" ; } public void onPause ( ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { } private class TakeBackTask extends AmenLibTask < Long , Integer , Amen > { public TakeBackTask ( Activity context ) { } protected Amen wrappedDoInBackground ( Long ... statementId ) throws IOException { } @ Override protected void onPreExecute ( ) { } protected void wrappedOnPostExecute ( Amen result ) { } } private class AmenTask extends AmenLibTask < Long , Integer , Amen > { public AmenTask ( Activity context ) { } protected Amen wrappedDoInBackground ( Long ... amenId ) throws IOException { } @ Override protected void onPreExecute ( ) { } protected void wrappedOnPostExecute ( Amen result ) { } } private class GetStatementTask extends AmenLibTask < Long , Integer , Statement > { public GetStatementTask ( Activity context ) { } protected Statement wrappedDoInBackground ( Long ... statementIds ) throws IOException { } @ Override protected void onPreExecute ( ) { } protected void wrappedOnPostExecute ( Statement result ) { } } public boolean onCreateOptionsMenu ( Menu menu ) { } public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
return fmt . format ( firstPostedAt ) ;
Buggy code:
public class TCPTest extends TestCase { public static final String JITSI_MEET_SUDO_CONFIGED_PROP = "jitsi-meet.sudo.fw.configured" ; public static final String JITSI_MEET_DISABLE_TCP_PROTOCOL_CHECK_PROP = "jitsi-meet.tcp.protocol.check.disabled" ; public TCPTest ( String name ) { } public static Test suite ( ) { } public void tcpTest ( ) { } public void removeRules ( ) { } private void addFWRules ( ) throws IOException { } private void removeFWRules ( ) throws IOException { } private void executeFirewallRule ( String rule ) { } private Map < String , String > printFocusConnectInfo ( ) { <START_BUG> Map stats = ( ( Map ) ( ( ( JavascriptExecutor ) ( ConferenceFixture . getFocus ( ) ) ) . executeScript ( "return<seq2seq4repair_space>ConnectionQuality.getStats();" ) ) ) ; <END_BUG> Map < String , String > focusIPAddresses = new HashMap < String , String > ( ) ; List < Map < String , String > > transports = ( ( List ) ( stats . get ( "transport" ) ) ) ; System . out . println ( "Currently<seq2seq4repair_space>connected<seq2seq4repair_space>to:" ) ; for ( Map < String , String > t : transports ) { String protocol = t . get ( "type" ) ; String address = t . get ( "ip" ) ; String ipAddress = address . substring ( 0 , address . lastIndexOf ( ':' ) ) ; focusIPAddresses . put ( ipAddress , protocol ) ; System . out . println ( ( ( protocol + ":" ) + ipAddress ) ) ; } return focusIPAddresses ; } }

Fix:
Map stats = ( ( Map ) ( ( ( JavascriptExecutor ) ( ConferenceFixture . getFocus ( ) ) ) . executeScript ( "return<seq2seq4repair_space>connectionquality.getStats();" ) ) ) ;
Buggy code:
public class PlayerListener implements Listener { private static Map < UUID , List < Group > > notifications = new HashMap < UUID , List < Group > > ( ) ; @ EventHandler ( priority = EventPriority . LOWEST ) public void playerJoinEvent ( PlayerJoinEvent event ) { Player p = event . getPlayer ( ) ; UUID uuid = p . getUniqueId ( ) ; <START_BUG> if ( ! ( PlayerListener . notifications . containsKey ( uuid ) ) ) <END_BUG> return ; String x = "You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>invited<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>groups<seq2seq4repair_space>while<seq2seq4repair_space>you<seq2seq4repair_space>were<seq2seq4repair_space>away:<seq2seq4repair_space>" ; for ( Group g : PlayerListener . notifications . get ( uuid ) ) { x += ( g . getName ( ) ) + ",<seq2seq4repair_space>" ; } x = x . substring ( 0 , ( ( x . length ( ) ) - 2 ) ) ; x += "." ; p . sendMessage ( ( ( ChatColor . YELLOW ) + x ) ) ; } public static void addNotification ( UUID u , Group g ) { } public static void removeNotification ( UUID u , Group g ) { } public static String getNotificationsInStringForm ( UUID u ) { } }

Fix:
if ( ( ! ( PlayerListener . notifications . containsKey ( uuid ) ) ) && ( ! ( PlayerListener . notifications . get ( uuid ) . isEmpty ( ) ) ) )
Buggy code:
public class SettingFragment extends Fragment { @ InjectView ( id . setting_list ) ListView mSettingList ; private SettingFragment . SettingListAdapter adapter ; private List < SettingData > items = new ArrayList < SettingData > ( ) ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void initItems ( ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ OnItemClick ( id . setting_list ) public void clickCallback ( int position ) { SettingData data = this . items . get ( position ) ; if ( ( data . hasSubContent ) && ( data . settingName . equals ( "°æ±¾ÐÅÏ¢" ) ) ) { String rmdStr = getResources ( ) . getString ( current_version ) ; Toast . makeText ( getActivity ( ) , ( rmdStr + ( data . subContent ) ) , LENGTH_SHORT ) . show ( ) ; } else if ( data . hasMoreContent ) { getActivity ( ) . startActivity ( data . targetIntent ) ; getActivity ( ) . overridePendingTransition ( slide_in_from_right , scale_fade_out ) ; } <START_BUG> SharedPreferences sp = getActivity ( ) . getPreferences ( MODE_PRIVATE ) ; <END_BUG> SharedPreferences . Editor editor = sp . edit ( ) ; editor . putInt ( PREVIOUS_TAB_PAGE , PAGE_SETTING ) ; editor . commit ( ) ; } class SettingListAdapter extends BaseAdapter { private List < SettingData > mItems ; private LayoutInflater mInflater ; public SettingListAdapter ( Context context , List < SettingData > items ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ SuppressLint ( "InflateParams" ) @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } final class ViewHolder { TextView lblContent ; TextView lblSubContent ; ImageView imgView ; } }

Fix:
SharedPreferences sp = getActivity ( ) . getSharedPreferences ( SP_NAME , MODE_PRIVATE ) ;
Buggy code:
public class ValueSourceAugmenter extends DocTransformer { public final String name ; public final QParser qparser ; public final ValueSource valueSource ; public ValueSourceAugmenter ( String name , QParser qparser , ValueSource valueSource ) { } @ Override public String getName ( ) { } @ Override public void setContext ( TransformContext context ) { try { IndexReader reader = qparser . getReq ( ) . getSearcher ( ) . getIndexReader ( ) ; <START_BUG> readerContexts = reader . getTopReaderContext ( ) . leaves ( ) ; <END_BUG> docValuesArr = new FunctionValues [ readerContexts . size ( ) ] ; searcher = qparser . getReq ( ) . getSearcher ( ) ; fcontext = ValueSource . newContext ( searcher ) ; this . valueSource . createWeight ( fcontext , searcher ) ; } catch ( IOException e ) { throw new org . apache . solr . common . SolrException ( ErrorCode . SERVER_ERROR , e ) ; } } Map fcontext ; SolrIndexSearcher searcher ; List < AtomicReaderContext > readerContexts ; FunctionValues [ ] docValuesArr ; @ Override public void transform ( SolrDocument doc , int docid ) { } }

Fix:
readerContexts = reader . leaves ( ) ;
Buggy code:
class Sideassignments { private final Deque < List < CAstNode > > preSideAssignments ; private final Deque < List < CAstNode > > postSideAssignments ; private final Deque < List < Pair < IASTExpression , CIdExpression > > > conditionalExpressions ; public Sideassignments ( ) { } public Sideassignments ( Deque < List < CAstNode > > preSideAssignments , Deque < List < CAstNode > > postSideAssignments , Deque < List < Pair < IASTExpression , CIdExpression > > > conditionalExpressions ) { } public void enterBlock ( ) { } public void leaveBlock ( ) { } public List < CAstNode > getAndResetPreSideAssignments ( ) { } public List < CAstNode > getAndResetPostSideAssignments ( ) { } public List < Pair < IASTExpression , CIdExpression > > getAndResetConditionalExpressions ( ) { } public boolean hasConditionalExpression ( ) { } public boolean hasPreSideAssignments ( ) { } public boolean hasPostSideAssignments ( ) { } public List < Pair < IASTExpression , CIdExpression > > getConditionalExpressions ( ) { } public void addConditionalExpression ( IASTExpression e , CIdExpression tempVar ) { <START_BUG> conditionalExpressions . peek ( ) . add ( Pair . of ( Preconditions . checkNotNull ( e ) , Preconditions . checkNotNull ( tempVar ) ) ) ; <END_BUG> } public void addPreSideAssignment ( CAstNode node ) { } public void addPostSideAssignment ( CAstNode node ) { } }

Fix:
conditionalExpressions . peek ( ) . add ( Pair . of ( Preconditions . checkNotNull ( e ) , tempVar ) ) ;
Buggy code:
public class ContainerEntry implements IContainerEntry { private static final String FACTORY_NAME_KEY = "factoryName" ; ISecurePreferences prefs ; IIDEntry idEntry ; ID containerID ; public ContainerEntry ( IIDEntry idEntry ) { } public IContainer createContainer ( ) throws ContainerCreateException { try { IContainer container = ContainerFactory . getDefault ( ) . createContainer ( getFactoryName ( ) , getContainerID ( ) ) ; IStorableContainerAdapter containerAdapter = ( ( IStorableContainerAdapter ) ( container . getAdapter ( IStorableContainerAdapter . class ) ) ) ; if ( containerAdapter != null ) { <START_BUG> containerAdapter . handleRestore ( prefs ) ; <END_BUG> } return container ; } catch ( IDCreateException e ) { throw new ContainerCreateException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>ID<seq2seq4repair_space>for<seq2seq4repair_space>container" , e ) ; } catch ( StorageException e ) { throw new ContainerCreateException ( "Exception<seq2seq4repair_space>on<seq2seq4repair_space>restore" , e ) ; } } public void delete ( ) { } public ID getContainerID ( ) throws IDCreateException { } public String getFactoryName ( ) throws StorageException { } protected void setFactoryName ( String factoryName , boolean encrypt ) throws StorageException { } public ISecurePreferences getPreferences ( ) { } }

Fix:
containerAdapter . restore ( prefs ) ;
Buggy code:
public class NewActivity extends Activity { private Button back ; private TextView ingredients ; private TextView nameFood ; private ImageView photo ; private Ingredient retryIngredient ; public void onCreate ( Bundle savedInstanceState ) { } public void back ( View v ) { } private ClickableSpan getClickableSpan ( final String word ) { return new ClickableSpan ( ) { private TextPaint ds ; @ Override public void onClick ( View widget ) { new android . os . AsyncTask < Void , Void , Void > ( ) { @ Override protected Void doInBackground ( Void ... params ) { org . springframework . http . HttpHeaders requestHeaders = new org . springframework . http . HttpHeaders ( ) ; requestHeaders . setAccept ( java . util . Collections . singletonList ( new org . springframework . http . MediaType ( "application" , "json" ) ) ) ; org . springframework . http . HttpEntity < ? > requestEntity = new org . springframework . http . HttpEntity < Object > ( requestHeaders ) ; <START_BUG> String url = "http:////192.168.0.101:8080//api//ingredient//get//" + word ; <END_BUG> org . springframework . web . client . RestTemplate restTemplate = new org . springframework . web . client . RestTemplate ( ) ; org . springframework . http . ResponseEntity < Ingredient > responseEntity = restTemplate . exchange ( url , HttpMethod . GET , requestEntity , Ingredient . class ) ; Ingredient events = responseEntity . getBody ( ) ; retryIngredient = events ; return null ; } @ Override protected void onPostExecute ( Void aVoid ) { goNewView ( ) ; } } . execute ( null , null , null ) ; changeSpanBgColor ( widget ) ; } public void changeSpanBgColor ( View widget ) { updateDrawState ( ds ) ; widget . invalidate ( ) ; } @ Override public void updateDrawState ( @ NonNull TextPaint ds ) { if ( ( this . ds ) == null ) { this . ds = ds ; } ds . setARGB ( 150 , 0 , 0 , 0 ) ; } } ; } public void goNewView ( ) { } private void prepareIngredientForTextView ( String val ) { } }

Fix:
String url = "http:////192.168.0.101:8080//api//ingredients//get?name=" + word ;
Buggy code:
public class ReduceSideJoinDriver { public static class UserJoinMapper extends Mapper < Object , Text , Text , Text > { private Text outkey = new Text ( ) ; private Text outvalue = new Text ( ) ; @ Override public void map ( Object key , Text value , Context context ) throws IOException , InterruptedException { } } public static class CommentJoinMapper extends Mapper < Object , Text , Text , Text > { private Text outkey = new Text ( ) ; private Text outvalue = new Text ( ) ; @ Override public void map ( Object key , Text value , Context context ) throws IOException , InterruptedException { } } public static class UserJoinReducer extends Reducer < Text , Text , Text , Text > { private ArrayList < Text > listA = new ArrayList < Text > ( ) ; private ArrayList < Text > listB = new ArrayList < Text > ( ) ; private String joinType = null ; @ Override public void setup ( Context context ) { } @ Override public void reduce ( Text key , Iterable < Text > values , Context context ) throws IOException , InterruptedException { listA . clear ( ) ; listB . clear ( ) ; for ( Text t : values ) { if ( ( t . charAt ( 0 ) ) == 'A' ) { listA . add ( new Text ( t . toString ( ) . substring ( 1 ) ) ) ; } else <START_BUG> if ( ( t . charAt ( '0' ) ) == 'B' ) { <END_BUG> listB . add ( new Text ( t . toString ( ) . substring ( 1 ) ) ) ; } } executeJoinLogic ( context ) ; } private void executeJoinLogic ( Context context ) throws IOException , InterruptedException { } } public static void main ( String [ ] args ) throws Exception { } }

Fix:
if ( ( t . charAt ( 0 ) ) == 'B' ) {